diff options
| author | Alejandro Gomez <alejandro@strike.me> | 2023-02-21 20:08:46 +0100 |
|---|---|---|
| committer | fiatjaf_ <fiatjaf@gmail.com> | 2023-02-22 12:42:01 -0300 |
| commit | 050317409d92aaab9007408f4bd5b206cdada1d7 (patch) | |
| tree | 6cc33cc0192ff145d990bbac7fb01517deb84b44 /57.md | |
| parent | b1a5ad355a8b376170471a41817d8722ba7443b1 (diff) | |
NIP-57: add optional a tag for tipping nip-33 coordinates
Diffstat (limited to '57.md')
| -rw-r--r-- | 57.md | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -30,7 +30,7 @@ Having lightning receipts on nostr allows clients to display lightning payments | |||
| 30 | 30 | ||
| 31 | 3. Clients may choose to display a lightning zap button on each post or on the users profile, if the user's lnurl pay request endpoint supports nostr, the client SHOULD generate a `zap invoice` instead of a normal lnurl invoice. | 31 | 3. Clients may choose to display a lightning zap button on each post or on the users profile, if the user's lnurl pay request endpoint supports nostr, the client SHOULD generate a `zap invoice` instead of a normal lnurl invoice. |
| 32 | 32 | ||
| 33 | 4. To generate a `zap invoice`, call the `callback` url with `amount` set to the milli-satoshi amount value. A `nostr` querystring value MUST be set as well. It is a uri-encoded `zap request` note signed by the user's key. The `zap request` note contains an `e` tag of the note it is zapping, and a `p` tag of the target user's pubkey. The `e` tag is optional which allows profile tipping. The `zap request` note must also have a `relays` tag, which is gathered from the user's configured relays. The `zap request` note SHOULD contain an `amount` tag, which is the milli-satoshi value of the zap which clients SHOULD verify being equal to the amount of the invoice. The `content` MAY be an additional comment from the user which can be displayed when listing zaps on posts and profiles. | 33 | 4. To generate a `zap invoice`, call the `callback` url with `amount` set to the milli-satoshi amount value. A `nostr` querystring value MUST be set as well. It is a uri-encoded `zap request` note signed by the user's key. The `zap request` note contains an `e` tag of the note it is zapping, and a `p` tag of the target user's pubkey. The `e` tag is optional which allows profile tipping. An optional `a` tag allows tipping parameterized replaceable events such as NIP-23 long-form notes. The `zap request` note must also have a `relays` tag, which is gathered from the user's configured relays. The `zap request` note SHOULD contain an `amount` tag, which is the milli-satoshi value of the zap which clients SHOULD verify being equal to the amount of the invoice. The `content` MAY be an additional comment from the user which can be displayed when listing zaps on posts and profiles. |
| 34 | 34 | ||
| 35 | 5. Pay this invoice or pass it to an app that can pay the invoice. Once it's paid, a `zap note` will be created by the `zapper`. | 35 | 5. Pay this invoice or pass it to an app that can pay the invoice. Once it's paid, a `zap note` will be created by the `zapper`. |
| 36 | 36 | ||
| @@ -58,6 +58,8 @@ The lnurl server will need some additional pieces of information so that clients | |||
| 58 | 58 | ||
| 59 | f. If there is an `amount` tag, it MUST be equal to the `amount` query parameter. | 59 | f. If there is an `amount` tag, it MUST be equal to the `amount` query parameter. |
| 60 | 60 | ||
| 61 | g. If there is an `a` tag, it MUST be a valid NIP-33 event coordinate | ||
| 62 | |||
| 61 | 5. If valid, fetch a description hash invoice where the description is this note and this note only. No additional lnurl metadata is included in the description. | 63 | 5. If valid, fetch a description hash invoice where the description is this note and this note only. No additional lnurl metadata is included in the description. |
| 62 | 64 | ||
| 63 | At this point, the lightning node is ready to send the zap note once payment is received. | 65 | At this point, the lightning node is ready to send the zap note once payment is received. |