kopia lustrzana https://github.com/Podcastindex-org/podcast-namespace
blip-10 cleanup
rodzic
2fb5b8875a
commit
cf1fbd56bb
|
@ -15,10 +15,9 @@ called a `stream`, a manually triggered payment is called a `boost` and an autom
|
|||
payment is called an `auto` payment. If there is a message to the podcaster included in a `boost` it is referred to as
|
||||
a `boostagram`.
|
||||
|
||||
The payload is a simple JSON structure that is encoded as a TLV in the Lightning payment when it is sent. This
|
||||
The payload is a simple JSON structure that is encoded as a TLV in the Lightning payment when it is sent. This
|
||||
structure is explained in this document.
|
||||
|
||||
|
||||
Simple Example:
|
||||
|
||||
```json
|
||||
|
@ -35,7 +34,7 @@ Simple Example:
|
|||
|
||||
## Specification
|
||||
|
||||
The sender of a bLIP-10 payment (i.e. - the podcast app) needs to include some metadata so the podcast host can
|
||||
The sender of a bLIP-10 payment (i.e. - the podcast app) needs to include some metadata so the podcast host can
|
||||
identify for whom the payment is for. Most fields are optional.
|
||||
|
||||
<br>
|
||||
|
@ -44,7 +43,7 @@ identify for whom the payment is for. Most fields are optional.
|
|||
|
||||
A flat, key-value json structure is used where the keys listed below can be set. The json string is then encoded
|
||||
into `utf8` and attached to the Lightning payment. Most of the time, the payment will be a `keysend` payment, but this
|
||||
TLV data can be used in standard BOLT11 and BOLT12 payments also. Receivers of messages must be aware that there
|
||||
TLV data can be used in standard BOLT11 and BOLT12 payments also. Receivers of messages must be aware that there
|
||||
is no guarantee for the order of the keys.
|
||||
|
||||
A more complex example:
|
||||
|
@ -67,6 +66,7 @@ A more complex example:
|
|||
```
|
||||
|
||||
Treated as `utf-8`, the hex value of the above json record would be:
|
||||
|
||||
```base64
|
||||
7b226170705f6e616d65223a202243617374616d61746963222c20226170705f76657273696f6e223a2022382e302e36222c202276616c75655f
|
||||
6d7361745f746f74616c223a2034393936302c202275726c223a202268747470733a2f2f66656564732e62757a7a7370726f75742e636f6d2f31
|
||||
|
@ -80,7 +80,7 @@ Treated as `utf-8`, the hex value of the above json record would be:
|
|||
|
||||
### Types
|
||||
|
||||
If a field is indicated to be a `str` in the fields-list, that means it is a JSON string (within quotes). An `int` is
|
||||
If a field is indicated to be a `str` in the fields-list, that means it is a JSON string (within quotes). An `int` is
|
||||
a plain number.
|
||||
|
||||
<br>
|
||||
|
@ -89,7 +89,8 @@ a plain number.
|
|||
|
||||
Identifying the podcast **required**: use one or more of `podcast`, `guid`, `feedID` and/or `url`. **guid preferred**
|
||||
|
||||
* `guid` (str) [The `<podcast:guid>` tag](https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid).
|
||||
* `guid` (
|
||||
str) [The `<podcast:guid>` tag](https://github.com/Podcastindex-org/podcast-namespace/blob/main/docs/1.0.md#guid).
|
||||
* `podcast` (str) Title of the podcast
|
||||
* `feedID` (int) ID of podcast in PodcastIndex.org directory
|
||||
* `url` (str) RSS feed URL of podcast
|
||||
|
@ -109,61 +110,62 @@ Information about time within the episode **recommended**: use one of `ts` or `t
|
|||
|
||||
* `ts` (int) Timestamp of when the payment was sent, in seconds, as an offset from zero (i.e. - playback position)
|
||||
* `time` (str) Timestamp of when the payment was sent, in HH:MM:SS notation, as an offset from 00:00:00
|
||||
(i.e. - playback position)
|
||||
(i.e. - playback position)
|
||||
|
||||
<br>
|
||||
|
||||
Other fields that are strongly recommended:
|
||||
|
||||
* `action` **recommended**: (str) "boost", "stream" or "auto". See Appending B of the
|
||||
[value](/value.md#appendix-b---payment-actions) spec for details.
|
||||
* `action` **recommended**: (str) "boost", "stream" or "auto". See Appending B of the
|
||||
[value](/value.md#appendix-b---payment-actions) spec for details.
|
||||
* `app_name`: **recommended** (str) Name of sending app
|
||||
* `sender_name` **recommended** (str) Name of the sender (free text, not validated in any way)
|
||||
* `value_msat_total`: **recommended** (int) TOTAL Number of millisats for the payment before any fees are subtracted.
|
||||
This should be the number the listener entered into the app. Preserving
|
||||
this value is important for numerology reasons. Certain numeric values can
|
||||
have significance to the sender and/or receiver, so giving a way to show
|
||||
this is critical.
|
||||
This should be the number the listener entered into the app. Preserving
|
||||
this value is important for numerology reasons. Certain numeric values can
|
||||
have significance to the sender and/or receiver, so giving a way to show
|
||||
this is critical.
|
||||
|
||||
<br>
|
||||
|
||||
Other optional fields:
|
||||
|
||||
* `message` (str) Text message to add to the payment. When this field is present, the payment is known as a
|
||||
"boostagram".
|
||||
* `message` (str) Text message to add to the payment. When this field is present, the payment is known as a
|
||||
"boostagram".
|
||||
* `app_version`: (str) Version of sending app
|
||||
* `boost_link`: (str) App specific URL containing route to podcast, episode, and/or timestamp at time of the action.
|
||||
The use case for this is sending a link along with the payment that will take the recipient to
|
||||
the exact playback position within the episode where the payment was sent.
|
||||
* `boost_link`: (str) App specific URL containing route to podcast, episode, and/or timestamp at time of the action.
|
||||
The use case for this is sending a link along with the payment that will take the recipient to
|
||||
the exact playback position within the episode where the payment was sent.
|
||||
* `name` (str) Name for this split in value tag
|
||||
* `sender_id` (str) Static random identifier for users, not displayed by apps to prevent abuse. Apps can set this
|
||||
per-feed or app-wide. A GUID-like random identifier or a hash works well. Max 32 bytes (64 ascii
|
||||
characters). This can be a Nostr hex encoded pubkey (not NIP-19) for purposes of sender attribution.
|
||||
per-feed or app-wide. A GUID-like random identifier or a hash works well. Max 32 bytes (64 ascii
|
||||
characters). This can be a Nostr hex encoded pubkey (not NIP-19) for purposes of sender attribution.
|
||||
* `signature` (str) Optionally, this field can contain a signature for the payment, to be able to verify that the
|
||||
user who sent it is actually who they claim in the `sender_id` field. If the `sender_id` contains
|
||||
a Nostr public key, this field should contain a Nostr `sig` value as a 64-byte encoded hex string.
|
||||
For the purpose of generating the Nostr signature, the following data should be serialized:
|
||||
[0,`sender_id`,`ts`,1,[],`message`] to conform to the
|
||||
[NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md) specification. The resulting
|
||||
serialized string should be hashed with `sha256` to obtain the value.
|
||||
* `speed` (str) Speed in which the podcast was playing, in decimal notation at the time the payment was sent. So 0.5
|
||||
is half speed and 2 is double speed.
|
||||
user who sent it is actually who they claim in the `sender_id` field. If the `sender_id` contains
|
||||
a Nostr public key, this field should contain a Nostr `sig` value as a 64-byte encoded hex string.
|
||||
For the purpose of generating the Nostr signature, the following data should be serialized:
|
||||
[0,`sender_id`,`ts`,1,[],`message`] to conform to the
|
||||
[NIP-01](https://github.com/nostr-protocol/nips/blob/master/01.md) specification. The resulting
|
||||
serialized string should be hashed with `sha256` to obtain the value.
|
||||
* `speed` (str) Speed in which the podcast was playing, in decimal notation at the time the payment was sent. So 0.5
|
||||
is half speed and 2 is double speed.
|
||||
* `uuid` (str) Unique UUID of the payment.
|
||||
* `reply_address` (str) The pubkey of the lightning node that can receive payments for the sender. The node given
|
||||
must be capable of receiving keysend payments. If this field contains an "@" symbol, it should
|
||||
be interpreted as a
|
||||
"[lightning address](https://github.com/andrerfneves/lightning-address/blob/master/README.md#tldr)".
|
||||
* `reply_custom_key` (str) The custom key for routing a reply payment to the sender. This field should not be present
|
||||
if it is not required for payment routing.
|
||||
* `reply_custom_value` (str) The custom value for routing a reply payment to the sender. This field should not be present
|
||||
if it is not required for payment routing.
|
||||
* `remote_feed_guid` (str) Sometimes a payment will be sent to a feed's value block because a different feed referenced it in a `<podcast:valueTimeSplit>` tag. When that happens, this field will contain the guid of the referencing feed.
|
||||
* `remote_item_guid` (str) Sometimes a payment will be sent to an episode's value block because a different feed referenced it in a `<podcast:valueTimeSplit>` tag. When that happens, this field will contain the guid of the referencing feed's `<item>`.
|
||||
|
||||
* `reply_address` (str) The pubkey of the lightning node that can receive payments for the sender. The node given
|
||||
must be capable of receiving keysend payments. If this field contains an "@" symbol, it should
|
||||
be interpreted as a
|
||||
"[lightning address](https://github.com/andrerfneves/lightning-address/blob/master/README.md#tldr)".
|
||||
* `reply_custom_key` (str) The custom key for routing a reply payment to the sender. This field should not be present
|
||||
if it is not required for payment routing.
|
||||
* `reply_custom_value` (str) The custom value for routing a reply payment to the sender. This field should not be
|
||||
present if it is not required for payment routing.
|
||||
* `remote_feed_guid` (str) Sometimes a payment will be sent to a feed's value block because a different feed referenced
|
||||
it in a `<podcast:valueTimeSplit>` tag. When that happens, this field will contain the guid of the referencing feed.
|
||||
* `remote_item_guid` (str) Sometimes a payment will be sent to an episode's value block because a different feed
|
||||
referenced it in a `<podcast:valueTimeSplit>` tag. When that happens, this field will contain the guid of the
|
||||
referencing feed's `<item>`.
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
## Reference Implementations
|
||||
|
||||
*
|
||||
|
|
Ładowanie…
Reference in New Issue