upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Fernandez <p@f7z.io>2024-08-07 11:22:00 +0100
committerPablo Fernandez <p@f7z.io>2024-08-07 11:22:00 +0100
commitea8ce6589e05bbbe5ce8aace14671a63291e6563 (patch)
tree1c0a77da5ebbad78b946c91a0370bc523d9ad6e8
parent8ae9b9b7446e7299c770d53f37b9e2bf7000c55f (diff)
correct nutzap kind
-rw-r--r--61.md16
1 files changed, 8 insertions, 8 deletions
diff --git a/61.md b/61.md
index 4b4020a..4e2148c 100644
--- a/61.md
+++ b/61.md
@@ -9,10 +9,10 @@ Alice wants to nutzap 1 sat to Bob because of an event `event-id-1` she liked.
9## Alice nutzaps Bob 9## Alice nutzaps Bob
101. Alice fetches event `kind:10019` from Bob to see the mints Bob trusts. 101. Alice fetches event `kind:10019` from Bob to see the mints Bob trusts.
112. She mints a token at that mint (or swaps some tokens she already had in that mint) p2pk-locked to the pubkey Bob has listed in his `kind:10019`. 112. She mints a token at that mint (or swaps some tokens she already had in that mint) p2pk-locked to the pubkey Bob has listed in his `kind:10019`.
123. She publishes a `kind:7337` event to the relays Bob indicated with the proofs she minted. 123. She publishes a `kind:9321` event to the relays Bob indicated with the proofs she minted.
13 13
14## Bob receives the nutzap 14## Bob receives the nutzap
151. At some point, Bob's client fetches `kind:7337` events p-tagging him from his relays. 151. At some point, Bob's client fetches `kind:9321` events p-tagging him from his relays.
162. Bob's client swaps the token into his wallet. 162. Bob's client swaps the token into his wallet.
17 17
18# Nutzap informational event 18# Nutzap informational event
@@ -36,13 +36,13 @@ Alice wants to nutzap 1 sat to Bob because of an event `event-id-1` she liked.
36* `pubkey` - Pubkey that SHOULD be used to P2PK-lock receiving nutzaps. If not present, clients SHOULD use the pubkey of the recipient. This is explained in Appendix 1. 36* `pubkey` - Pubkey that SHOULD be used to P2PK-lock receiving nutzaps. If not present, clients SHOULD use the pubkey of the recipient. This is explained in Appendix 1.
37 37
38## Nutzap event 38## Nutzap event
39Event `kind:7337` is a nutzap event published by the sender, p-tagging the recipient. The outputs are P2PK-locked to the pubkey the recipient indicated in their `kind:10019` event or to the recipient pubkey if the `kind:10019` event doesn't have a explicit pubkey. 39Event `kind:9321` is a nutzap event published by the sender, p-tagging the recipient. The outputs are P2PK-locked to the pubkey the recipient indicated in their `kind:10019` event or to the recipient pubkey if the `kind:10019` event doesn't have a explicit pubkey.
40 40
41Clients MUST prefix the pubkey they p2pk-lock with `"02"` (for nostr<>cashu pubkey compatibility). 41Clients MUST prefix the pubkey they p2pk-lock with `"02"` (for nostr<>cashu pubkey compatibility).
42 42
43```jsonc 43```jsonc
44{ 44{
45 kind: 7337, 45 kind: 9321,
46 content: "[{\"amount\":1,\"C\":\"02277c66191736eb72fce9d975d08e3191f8f96afb73ab1eec37e4465683066d3f\",\"id\":\"000a93d6f8a1d2c4\",\"secret\":\"[\\\"P2PK\\\",{\\\"nonce\\\":\\\"b00bdd0467b0090a25bdf2d2f0d45ac4e355c482c1418350f273a04fedaaee83\\\",\\\"data\\\":\\\"02eaee8939e3565e48cc62967e2fde9d8e2a4b3ec0081f29eceff5c64ef10ac1ed\\\"}]\"}]", 46 content: "[{\"amount\":1,\"C\":\"02277c66191736eb72fce9d975d08e3191f8f96afb73ab1eec37e4465683066d3f\",\"id\":\"000a93d6f8a1d2c4\",\"secret\":\"[\\\"P2PK\\\",{\\\"nonce\\\":\\\"b00bdd0467b0090a25bdf2d2f0d45ac4e355c482c1418350f273a04fedaaee83\\\",\\\"data\\\":\\\"02eaee8939e3565e48cc62967e2fde9d8e2a4b3ec0081f29eceff5c64ef10ac1ed\\\"}]\"}]",
47 pubkey: "sender-pubkey", 47 pubkey: "sender-pubkey",
48 tags: [ 48 tags: [
@@ -79,14 +79,14 @@ Clients should REQ for nut zaps:
79 79
80Clients MIGHT choose to use some kind of filtering (e.g. WoT) to ignore spam. 80Clients MIGHT choose to use some kind of filtering (e.g. WoT) to ignore spam.
81 81
82`{ "kinds": [7337], "#p": "my-pubkey", "#u": [ "<mint-1>", "<mint-2>"], "since": <latest-created_at-of-kind-7376> }`. 82`{ "kinds": [9321], "#p": "my-pubkey", "#u": [ "<mint-1>", "<mint-2>"], "since": <latest-created_at-of-kind-7376> }`.
83 83
84Upon receiving a new nut zap, the client should swap the tokens into a wallet the user controls, either a [[NIP-60]] wallet, their own LN wallet or anything else. 84Upon receiving a new nut zap, the client should swap the tokens into a wallet the user controls, either a [[NIP-60]] wallet, their own LN wallet or anything else.
85 85
86## Updating nutzap-redemption history 86## Updating nutzap-redemption history
87When claiming a token the client SHOULD create a `kind:7376` event and `e` tag the original nut zap event. This is to record that this token has already been claimed (and shouldn't be attempted again) and as signaling to the recipient that the ecash has been redeemed. 87When claiming a token the client SHOULD create a `kind:7376` event and `e` tag the original nut zap event. This is to record that this token has already been claimed (and shouldn't be attempted again) and as signaling to the recipient that the ecash has been redeemed.
88 88
89Multiple `kind:7337` events can be tagged in the same `kind:7376` event. 89Multiple `kind:9321` events can be tagged in the same `kind:7376` event.
90 90
91```jsonc 91```jsonc
92{ 92{
@@ -98,8 +98,8 @@ Multiple `kind:7337` events can be tagged in the same `kind:7376` event.
98 ]), 98 ]),
99 "tags": [ 99 "tags": [
100 [ "a", "37375:<pubkey>:my-wallet" ], // an optional wallet tag 100 [ "a", "37375:<pubkey>:my-wallet" ], // an optional wallet tag
101 [ "e", "<7337-event-id>", "relay-hint", "redeemed" ], // nutzap event that has been redeemed 101 [ "e", "<9321-event-id>", "relay-hint", "redeemed" ], // nutzap event that has been redeemed
102 [ "p", "sender-pubkey" ] // pubkey of the author of the 7337 event (nutzap sender) 102 [ "p", "sender-pubkey" ] // pubkey of the author of the 9321 event (nutzap sender)
103 ] 103 ]
104} 104}
105``` 105```