diff options
| author | Vitor Pamplona <vitor@vitorpamplona.com> | 2023-05-23 13:44:58 -0400 |
|---|---|---|
| committer | Vitor Pamplona <vitor@vitorpamplona.com> | 2023-05-23 13:44:58 -0400 |
| commit | e4937befd6fc29482387ab18a7fab98338dba55d (patch) | |
| tree | 50c730cb1005aeae1c7b0d65c757d3978ec72515 | |
| parent | 04959313559731c90cfa74413b7b8996795ee601 (diff) | |
Zap splits
| -rw-r--r-- | 57.md | 8 |
1 files changed, 6 insertions, 2 deletions
| @@ -168,16 +168,20 @@ A client can retrieve `zap receipt`s on events and pubkeys using a NIP-01 filter | |||
| 168 | 168 | ||
| 169 | ### Appendix G: `zap` tag on zapped event | 169 | ### Appendix G: `zap` tag on zapped event |
| 170 | 170 | ||
| 171 | When an event includes a `zap` tag, clients SHOULD calculate the lnurl pay request based on it's value instead of the profile's field. An optional third argument on the tag specifies the type of value, either `lud06` or `lud16`. | 171 | When an event includes one or more `zap` tags, clients SHOULD calculate the lnurl pay request based on their value instead of the profile's field. The tag's second argument is a `lud06` address, `lud16` identifier or `hex` string of the receiver's pub key. An optional third argument specifies the type of the previous value: `lud06`, `lud16` or `pubkey`. 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 member. If weights are not present, CLIENTS should equally divide the zap amount to all zap receivers. If weights are only partially present, receivers without a weight should not be zapped (`weight = 0`). |
| 172 | 172 | ||
| 173 | ```json | 173 | ```json |
| 174 | { | 174 | { |
| 175 | "tags": [ | 175 | "tags": [ |
| 176 | [ "zap", "pablo@f7z.io", "lud16" ] | 176 | [ "zap", "LNURL..", "lud06", 10 ], // 10% |
| 177 | [ "zap", "pablo@f7z.io", "lud16", 65 ], // 65% | ||
| 178 | [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", 25 ] // 25% | ||
| 177 | ] | 179 | ] |
| 178 | } | 180 | } |
| 179 | ``` | 181 | ``` |
| 180 | 182 | ||
| 183 | When the hex code is used, clients MAY inform the user the zap split configuration in the note. | ||
| 184 | |||
| 181 | ## Future Work | 185 | ## Future Work |
| 182 | 186 | ||
| 183 | Zaps can be extended to be more private by encrypting `zap request` notes to the target user, but for simplicity it has been left out of this initial draft. | 187 | Zaps can be extended to be more private by encrypting `zap request` notes to the target user, but for simplicity it has been left out of this initial draft. |