Skip to content

Commit a02a0ff

Browse files
UTF explanation, example, formatting chapter
1 parent a6e2655 commit a02a0ff

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

blip-0010.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,19 @@ This bLIP is licensed under the CC0 license.
2222

2323
The sender of the payments (the Podcast app) needs to input some metadata so the podcast host can identify whom the payment is for. Most fields are optional.
2424

25+
### Formatting and encoding
26+
A flat key-value json structure is used where below keys can be set. The string is then encided into `utf8` and attached to the keysend payment. Receivers of messages must be aware there is no guarantee for the order of the keys.
27+
28+
Sample JSON string, containing a selection of keys:
29+
`{"app_name": "Castamatic", "app_version": "8.0.6", "value_msat_total": 49960, "url": "https://feeds.buzzsprout.com/1844352.rss", "podcast": "Mere Mortals", "action": "stream", "episode": "The Art Of NFT's & Aimless Wandering", "episode_guid": "Buzzsprout-9931017", "value_msat": 97940, "ts": 574, "name": "Podcaster", "sender_name": "Peter"}`
30+
31+
Treated as `utf8` the hex value of this json record would be:
32+
`7b226170705f6e616d65223a202243617374616d61746963222c20226170705f76657273696f6e223a2022382e302e36222c202276616c75655f6d7361745f746f74616c223a2034393936302c202275726c223a202268747470733a2f2f66656564732e62757a7a7370726f75742e636f6d2f313834343335322e727373222c2022706f6463617374223a20224d657265204d6f7274616c73222c2022616374696f6e223a202273747265616d222c2022657069736f6465223a202254686520417274204f66204e4654277320262041696d6c6573732057616e646572696e67222c2022657069736f64655f67756964223a202242757a7a7370726f75742d39393331303137222c202276616c75655f6d736174223a2039373934302c20227473223a203537342c20226e616d65223a2022506f64636173746572222c202273656e6465725f6e616d65223a20225065746572227d0a`
33+
34+
If a field is indicated to be a `str` in the fields-list, that means it is a JSON string (within quotes) and `int`s are plain numbers.
35+
36+
### Fields
37+
2538
Identifying the podcast **required**: use any of `podcast`, `feedID` or `url`. **guid preferred**
2639
* `podcast` (str) Title of the podcast
2740
* `feedID` (int) ID of podcast in PodcastIndex.org

0 commit comments

Comments
 (0)