upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/57.md
diff options
context:
space:
mode:
authorVitor Pamplona <vitor@vitorpamplona.com>2023-05-24 10:41:14 -0400
committerVitor Pamplona <vitor@vitorpamplona.com>2023-05-24 10:41:14 -0400
commit2f8be7c32b7b624ed65b3238d3ada9f2f8859777 (patch)
tree0e30b78fda165a206fc8a37f7df1cd514cac9894 /57.md
parent9c97736066a131442a5e43420f0600904959d1cf (diff)
better example of weights.
Diffstat (limited to '57.md')
-rw-r--r--57.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/57.md b/57.md
index a221481..cb6a290 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
170 170
171When 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`). 171When 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`).
172 172
173```json 173```js
174{ 174{
175 "tags": [ 175 "tags": [
176 [ "zap", "LNURL..", "lud06", "10" ], // 10% 176 [ "zap", "LNURL..", "lud06", "1" ], // 25%
177 [ "zap", "pablo@f7z.io", "lud16", "65" ], // 65% 177 [ "zap", "pablo@f7z.io", "lud16", "1" ], // 25%
178 [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", "25" ] // 25% 178 [ "zap", "460c25e682fda7832b52d1f22d3d22b3176d972f60dcdc3212ed8c92ef85065c", "pubkey", "2" ] // 50%
179 ] 179 ]
180} 180}
181``` 181```