From e4937befd6fc29482387ab18a7fab98338dba55d Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 23 May 2023 13:44:58 -0400 Subject: [PATCH 1/8] Zap splits --- 57.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/57.md b/57.md index cb1f126c..987b5a2f 100644 --- a/57.md +++ b/57.md @@ -168,16 +168,20 @@ A client can retrieve `zap receipt`s on events and pubkeys using a NIP-01 filter ### Appendix G: `zap` tag on zapped event -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`. +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`). ```json { "tags": [ - [ "zap", "pablo@f7z.io", "lud16" ] + [ "zap", "LNURL..", "lud06", 10 ], // 10% + [ "zap", "pablo@f7z.io", "lud16", 65 ], // 65% + [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", 25 ] // 25% ] } ``` +When the hex code is used, clients MAY inform the user the zap split configuration in the note. + ## Future Work 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. From a56d650333c03a51b1f2d7852670216489ff35d6 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 23 May 2023 13:46:05 -0400 Subject: [PATCH 2/8] fixing json formatting --- 57.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/57.md b/57.md index 987b5a2f..e67ec8b1 100644 --- a/57.md +++ b/57.md @@ -173,9 +173,9 @@ When an event includes one or more `zap` tags, clients SHOULD calculate the lnur ```json { "tags": [ - [ "zap", "LNURL..", "lud06", 10 ], // 10% + [ "zap", "LNURL..", "lud06", 10 ], // 10% [ "zap", "pablo@f7z.io", "lud16", 65 ], // 65% - [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", 25 ] // 25% + [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", 25 ] // 25% ] } ``` From dd5c9c54ae33c0480b2f12b604353b738c827115 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 23 May 2023 13:50:55 -0400 Subject: [PATCH 3/8] Changes the client guidance --- 57.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/57.md b/57.md index e67ec8b1..74716857 100644 --- a/57.md +++ b/57.md @@ -180,7 +180,7 @@ When an event includes one or more `zap` tags, clients SHOULD calculate the lnur } ``` -When the hex code is used, clients MAY inform the user the zap split configuration in the note. +Clients MAY display the zap split configuration in the note. ## Future Work From 7c3e5902471b2eccf8032c06ab4e07940dd56ae7 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 24 May 2023 09:46:36 -0400 Subject: [PATCH 4/8] Moves weights to be a string as tags can only contain strings --- 57.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/57.md b/57.md index 74716857..4d02611d 100644 --- a/57.md +++ b/57.md @@ -173,9 +173,9 @@ When an event includes one or more `zap` tags, clients SHOULD calculate the lnur ```json { "tags": [ - [ "zap", "LNURL..", "lud06", 10 ], // 10% - [ "zap", "pablo@f7z.io", "lud16", 65 ], // 65% - [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", 25 ] // 25% + [ "zap", "LNURL..", "lud06", "10" ], // 10% + [ "zap", "pablo@f7z.io", "lud16", "65" ], // 65% + [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", "25" ] // 25% ] } ``` From 9c97736066a131442a5e43420f0600904959d1cf Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 24 May 2023 10:10:18 -0400 Subject: [PATCH 5/8] minor text/grammar adjustments --- 57.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/57.md b/57.md index 4d02611d..a2214817 100644 --- a/57.md +++ b/57.md @@ -168,7 +168,7 @@ A client can retrieve `zap receipt`s on events and pubkeys using a NIP-01 filter ### Appendix G: `zap` tag on zapped event -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`). +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, a `lud16` identifier or a `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 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`). ```json { From 2f8be7c32b7b624ed65b3238d3ada9f2f8859777 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 24 May 2023 10:41:14 -0400 Subject: [PATCH 6/8] better example of weights. --- 57.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/57.md b/57.md index a2214817..cb6a2904 100644 --- a/57.md +++ b/57.md @@ -170,12 +170,12 @@ A client can retrieve `zap receipt`s on events and pubkeys using a NIP-01 filter 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, a `lud16` identifier or a `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 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`). -```json +```js { "tags": [ - [ "zap", "LNURL..", "lud06", "10" ], // 10% - [ "zap", "pablo@f7z.io", "lud16", "65" ], // 65% - [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", "25" ] // 25% + [ "zap", "LNURL..", "lud06", "1" ], // 25% + [ "zap", "pablo@f7z.io", "lud16", "1" ], // 25% + [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", "2" ] // 50% ] } ``` From 5834c054398b39404868746db973ea7f373d1392 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 24 May 2023 12:20:53 -0400 Subject: [PATCH 7/8] Dropping lud06 and lud16 from the zap tag --- 57.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/57.md b/57.md index cb6a2904..27b85a4c 100644 --- a/57.md +++ b/57.md @@ -166,16 +166,16 @@ A client can retrieve `zap receipt`s on events and pubkeys using a NIP-01 filter - The `invoiceAmount` contained in the `bolt11` tag of the `zap receipt` MUST equal the `amount` tag of the `zap request` (if present). - The `lnurl` tag of the `zap request` (if present) SHOULD equal the recipient's `lnurl`. -### Appendix G: `zap` tag on zapped event +### Appendix G: `zap` tag on other events -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, a `lud16` identifier or a `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 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`). +When an event includes one or more `zap` tags, clients wishing to zap it SHOULD calculate the lnurl pay request based on their 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 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`). ```js { "tags": [ - [ "zap", "LNURL..", "lud06", "1" ], // 25% - [ "zap", "pablo@f7z.io", "lud16", "1" ], // 25% - [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", "2" ] // 50% + [ "zap", "82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2", "wss://nostr.oxtr.dev", "1" ], // 25% + [ "zap", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52", "wss://nostr.wine/", "1" ], // 25% + [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "wss://nos.lol/", "2" ] // 50% ] } ``` From 91bdf63b130cadb89c3908cab09305526e9f2092 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Wed, 24 May 2023 12:22:16 -0400 Subject: [PATCH 8/8] grammar --- 57.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/57.md b/57.md index 27b85a4c..39fa5620 100644 --- a/57.md +++ b/57.md @@ -168,7 +168,7 @@ A client can retrieve `zap receipt`s on events and pubkeys using a NIP-01 filter ### Appendix G: `zap` tag on other events -When an event includes one or more `zap` tags, clients wishing to zap it SHOULD calculate the lnurl pay request based on their 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 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`). +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`). ```js {