upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--60.md7
-rw-r--r--61.md3
2 files changed, 10 insertions, 0 deletions
diff --git a/60.md b/60.md
index 4b74418..8c836ac 100644
--- a/60.md
+++ b/60.md
@@ -50,6 +50,7 @@ There can be multiple `kind:7375` events for the same mint, and multiple proofs
50 "kind": 7375, 50 "kind": 7375,
51 "content": nip44_encrypt({ 51 "content": nip44_encrypt({
52 "mint": "https://stablenut.umint.cash", 52 "mint": "https://stablenut.umint.cash",
53 "unit": "sat",
53 "proofs": [ 54 "proofs": [
54 // one or more proofs in the default cashu format 55 // one or more proofs in the default cashu format
55 { 56 {
@@ -69,6 +70,7 @@ There can be multiple `kind:7375` events for the same mint, and multiple proofs
69 * `.content` is a [NIP-44](44.md) encrypted payload: 70 * `.content` is a [NIP-44](44.md) encrypted payload:
70 * `mint`: The mint the proofs belong to. 71 * `mint`: The mint the proofs belong to.
71 * `proofs`: unencoded proofs 72 * `proofs`: unencoded proofs
73 * `unit` the base unit the proofs are denominated in (eg: `sat`, `usd`, `eur`). Default: `sat` if omitted.
72 * `del`: token-ids that were destroyed by the creation of this token. This assists with state transitions. 74 * `del`: token-ids that were destroyed by the creation of this token. This assists with state transitions.
73 75
74When one or more proofs of a token are spent, the token event should be [NIP-09](09.md)-deleted and, if some proofs are unspent from the same token event, a new token event should be created rolling over the unspent proofs and adding any change outputs to the new token event (the change output should include a `del` field). 76When one or more proofs of a token are spent, the token event should be [NIP-09](09.md)-deleted and, if some proofs are unspent from the same token event, a new token event should be created rolling over the unspent proofs and adding any change outputs to the new token event (the change output should include a `del` field).
@@ -84,6 +86,7 @@ Clients SHOULD publish `kind:7376` events to create a transaction history when t
84 "content": nip44_encrypt([ 86 "content": nip44_encrypt([
85 [ "direction", "in" ], // in = received, out = sent 87 [ "direction", "in" ], // in = received, out = sent
86 [ "amount", "1" ], 88 [ "amount", "1" ],
89 [ "unit", "sat" ],
87 [ "e", "<event-id-of-created-token>", "", "created" ] 90 [ "e", "<event-id-of-created-token>", "", "created" ]
88 ]), 91 ]),
89 "tags": [ 92 "tags": [
@@ -93,6 +96,7 @@ Clients SHOULD publish `kind:7376` events to create a transaction history when t
93``` 96```
94 97
95* `direction` - The direction of the transaction; `in` for received funds, `out` for sent funds. 98* `direction` - The direction of the transaction; `in` for received funds, `out` for sent funds.
99* `unit` the base unit of the amount (eg: `sat`, `usd`, `eur`). Default: `sat` if omitted.
96 100
97Clients MUST add `e` tags to create references of destroyed and created token events along with the marker of the meaning of the tag: 101Clients MUST add `e` tags to create references of destroyed and created token events along with the marker of the meaning of the tag:
98* `created` - A new token event was created. 102* `created` - A new token event was created.
@@ -121,6 +125,7 @@ If Alice spends 4 sats from this token event
121 "id": "event-id-1", 125 "id": "event-id-1",
122 "content": nip44_encrypt({ 126 "content": nip44_encrypt({
123 "mint": "https://stablenut.umint.cash", 127 "mint": "https://stablenut.umint.cash",
128 "unit": "sat",
124 "proofs": [ 129 "proofs": [
125 { "id": "1", "amount": 1 }, 130 { "id": "1", "amount": 1 },
126 { "id": "2", "amount": 2 }, 131 { "id": "2", "amount": 2 },
@@ -140,6 +145,7 @@ Her client:
140 "id": "event-id-2", 145 "id": "event-id-2",
141 "content": nip44_encrypt({ 146 "content": nip44_encrypt({
142 "mint": "https://stablenut.umint.cash", 147 "mint": "https://stablenut.umint.cash",
148 "unit": "sat",
143 "proofs": [ 149 "proofs": [
144 { "id": "1", "amount": 1 }, 150 { "id": "1", "amount": 1 },
145 { "id": "2", "amount": 2 }, 151 { "id": "2", "amount": 2 },
@@ -159,6 +165,7 @@ Her client:
159 "content": nip44_encrypt([ 165 "content": nip44_encrypt([
160 [ "direction", "out" ], 166 [ "direction", "out" ],
161 [ "amount", "4" ], 167 [ "amount", "4" ],
168 [ "unit", "sat" ],
162 [ "e", "<event-id-1>", "", "destroyed" ], 169 [ "e", "<event-id-1>", "", "destroyed" ],
163 [ "e", "<event-id-2>", "", "created" ], 170 [ "e", "<event-id-2>", "", "created" ],
164 ]), 171 ]),
diff --git a/61.md b/61.md
index 5ef7f68..5842d6b 100644
--- a/61.md
+++ b/61.md
@@ -51,6 +51,7 @@ Clients MUST prefix the public key they P2PK-lock with `"02"` (for nostr<>cashu
51 "pubkey": "<sender-pubkey>", 51 "pubkey": "<sender-pubkey>",
52 "tags": [ 52 "tags": [
53 [ "proof", "{\"amount\":1,\"C\":\"02277c66191736eb72fce9d975d08e3191f8f96afb73ab1eec37e4465683066d3f\",\"id\":\"000a93d6f8a1d2c4\",\"secret\":\"[\\\"P2PK\\\",{\\\"nonce\\\":\\\"b00bdd0467b0090a25bdf2d2f0d45ac4e355c482c1418350f273a04fedaaee83\\\",\\\"data\\\":\\\"02eaee8939e3565e48cc62967e2fde9d8e2a4b3ec0081f29eceff5c64ef10ac1ed\\\"}]\"}" ], 53 [ "proof", "{\"amount\":1,\"C\":\"02277c66191736eb72fce9d975d08e3191f8f96afb73ab1eec37e4465683066d3f\",\"id\":\"000a93d6f8a1d2c4\",\"secret\":\"[\\\"P2PK\\\",{\\\"nonce\\\":\\\"b00bdd0467b0090a25bdf2d2f0d45ac4e355c482c1418350f273a04fedaaee83\\\",\\\"data\\\":\\\"02eaee8939e3565e48cc62967e2fde9d8e2a4b3ec0081f29eceff5c64ef10ac1ed\\\"}]\"}" ],
54 [ "unit", "sat" ],
54 [ "u", "https://stablenut.umint.cash" ], 55 [ "u", "https://stablenut.umint.cash" ],
55 [ "e", "<nutzapped-event-id>", "<relay-hint>" ], 56 [ "e", "<nutzapped-event-id>", "<relay-hint>" ],
56 [ "k", "<nutzapped-kind>"], 57 [ "k", "<nutzapped-kind>"],
@@ -62,6 +63,7 @@ Clients MUST prefix the public key they P2PK-lock with `"02"` (for nostr<>cashu
62* `.content` is an optional comment for the nutzap 63* `.content` is an optional comment for the nutzap
63* `.tags`: 64* `.tags`:
64 * `proof` is one or more proofs P2PK-locked to the public key the recipient specified in their `kind:10019` event and including a DLEQ proof. 65 * `proof` is one or more proofs P2PK-locked to the public key the recipient specified in their `kind:10019` event and including a DLEQ proof.
66 * `unit` the base unit the proofs are denominated in (eg: `sat`, `usd`, `eur`). Default: `sat` if omitted.
65 * `u` is the mint the URL of the mint EXACTLY as specified by the recipient's `kind:10019`. 67 * `u` is the mint the URL of the mint EXACTLY as specified by the recipient's `kind:10019`.
66 * `p` is the Nostr identity public key of nutzap recipient. 68 * `p` is the Nostr identity public key of nutzap recipient.
67 * `e` is the event that is being nutzapped, if any. 69 * `e` is the event that is being nutzapped, if any.
@@ -95,6 +97,7 @@ Multiple `kind:9321` events can be tagged in the same `kind:7376` event.
95 "content": nip44_encrypt([ 97 "content": nip44_encrypt([
96 [ "direction", "in" ], // in = received, out = sent 98 [ "direction", "in" ], // in = received, out = sent
97 [ "amount", "1" ], 99 [ "amount", "1" ],
100 [ "unit", "sat" ],
98 [ "e", "<7375-event-id>", "<relay-hint>", "created" ] // new token event that was created 101 [ "e", "<7375-event-id>", "<relay-hint>", "created" ] // new token event that was created
99 ]), 102 ]),
100 "tags": [ 103 "tags": [