diff options
| author | Kieran <kieran@harkin.me> | 2024-10-15 11:15:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-15 11:15:54 +0100 |
| commit | 1e2f19863ca56754daa2466881eb22087a71b17d (patch) | |
| tree | 4f7be759dce290fea1d3ae10c403260b466ee16c /57.md | |
| parent | 53afaaece61f02e92b5ef9c3e9c32945c7ebf522 (diff) | |
| parent | e381b577c997b849fa544eea7dc9f08b360b4a33 (diff) | |
Merge branch 'master' into nip71-imeta
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 | ||
| @@ -131,7 +131,7 @@ The following should be true of the `zap receipt` event: | |||
| 131 | - The `created_at` date SHOULD be set to the invoice `paid_at` date for idempotency. | 131 | - The `created_at` date SHOULD be set to the invoice `paid_at` date for idempotency. |
| 132 | - `tags` MUST include the `p` tag (zap recipient) AND optional `e` tag from the `zap request` AND optional `a` tag from the `zap request` AND optional `P` tag from the pubkey of the zap request (zap sender). | 132 | - `tags` MUST include the `p` tag (zap recipient) AND optional `e` tag from the `zap request` AND optional `a` tag from the `zap request` AND optional `P` tag from the pubkey of the zap request (zap sender). |
| 133 | - The `zap receipt` MUST have a `bolt11` tag containing the description hash bolt11 invoice. | 133 | - The `zap receipt` MUST have a `bolt11` tag containing the description hash bolt11 invoice. |
| 134 | - The `zap receipt` MUST contain a `description` tag which is the JSON-encoded invoice description. | 134 | - The `zap receipt` MUST contain a `description` tag which is the JSON-encoded zap request. |
| 135 | - `SHA256(description)` MUST match the description hash in the bolt11 invoice. | 135 | - `SHA256(description)` MUST match the description hash in the bolt11 invoice. |
| 136 | - The `zap receipt` MAY contain a `preimage` tag to match against the payment hash of the bolt11 invoice. This isn't really a payment proof, there is no real way to prove that the invoice is real or has been paid. You are trusting the author of the `zap receipt` for the legitimacy of the payment. | 136 | - The `zap receipt` MAY contain a `preimage` tag to match against the payment hash of the bolt11 invoice. This isn't really a payment proof, there is no real way to prove that the invoice is real or has been paid. You are trusting the author of the `zap receipt` for the legitimacy of the payment. |
| 137 | 137 | ||
| @@ -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% |