diff options
Diffstat (limited to '57.md')
| -rw-r--r-- | 57.md | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -36,7 +36,7 @@ A `zap request` is an event of kind `9734` that is _not_ published to relays, bu | |||
| 36 | In addition, the event MAY include the following tags: | 36 | In addition, the event MAY include the following tags: |
| 37 | 37 | ||
| 38 | - `e` is an optional hex-encoded event id. Clients MUST include this if zapping an event rather than a person. | 38 | - `e` is an optional hex-encoded event id. Clients MUST include this if zapping an event rather than a person. |
| 39 | - `a` is an optional event coordinate that allows tipping parameterized replaceable events such as NIP-23 long-form notes. | 39 | - `a` is an optional event coordinate that allows tipping addressable events such as NIP-23 long-form notes. |
| 40 | 40 | ||
| 41 | Example: | 41 | Example: |
| 42 | 42 | ||
| @@ -66,7 +66,7 @@ A signed `zap request` event is not published, but is instead sent using a HTTP | |||
| 66 | - `nostr` is the `9734` `zap request` event, JSON encoded then URI encoded | 66 | - `nostr` is the `9734` `zap request` event, JSON encoded then URI encoded |
| 67 | - `lnurl` is the lnurl pay url of the recipient, encoded using bech32 with the prefix `lnurl` | 67 | - `lnurl` is the lnurl pay url of the recipient, encoded using bech32 with the prefix `lnurl` |
| 68 | 68 | ||
| 69 | This request should return a JSON response with a `pr` key, which is the invoice the sender must pay to finalize his zap. Here is an example flow in javascript: | 69 | This request should return a JSON response with a `pr` key, which is the invoice the sender must pay to finalize their zap. Here is an example flow in javascript: |
| 70 | 70 | ||
| 71 | ```javascript | 71 | ```javascript |
| 72 | const senderPubkey // The sender's pubkey | 72 | const senderPubkey // The sender's pubkey |
| @@ -171,7 +171,7 @@ A client can retrieve `zap receipt`s on events and pubkeys using a NIP-01 filter | |||
| 171 | 171 | ||
| 172 | When an event includes one or more `zap` tags, clients wishing to zap it SHOULD calculate the lnurl pay request based on the tags value instead of the event author's profile field. The tag's second argument is the `hex` string of the receiver's pub key and the third argument is the relay to download the receiver's metadata (Kind-0). An optional fourth parameter specifies the weight (a generalization of a percentage) assigned to the respective receiver. Clients should parse all weights, calculate a sum, and then a percentage to each receiver. If weights are not present, CLIENTS should equally divide the zap amount to all receivers. If weights are only partially present, receivers without a weight should not be zapped (`weight = 0`). | 172 | When an event includes one or more `zap` tags, clients wishing to zap it SHOULD calculate the lnurl pay request based on the tags value instead of the event author's profile field. The tag's second argument is the `hex` string of the receiver's pub key and the third argument is the relay to download the receiver's metadata (Kind-0). An optional fourth parameter specifies the weight (a generalization of a percentage) assigned to the respective receiver. Clients should parse all weights, calculate a sum, and then a percentage to each receiver. If weights are not present, CLIENTS should equally divide the zap amount to all receivers. If weights are only partially present, receivers without a weight should not be zapped (`weight = 0`). |
| 173 | 173 | ||
| 174 | ```js | 174 | ```jsonc |
| 175 | { | 175 | { |
| 176 | "tags": [ | 176 | "tags": [ |
| 177 | [ "zap", "82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2", "wss://nostr.oxtr.dev", "1" ], // 25% | 177 | [ "zap", "82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2", "wss://nostr.oxtr.dev", "1" ], // 25% |