From 62f0b14ae81fd062bb84791bca698b29f6b573a3 Mon Sep 17 00:00:00 2001 From: Rob Woodgate Date: Fri, 31 Oct 2025 13:59:35 +0000 Subject: Added base "unit" tag to NutZap kind:9321 event (#1915) --- 60.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to '60.md') 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 "kind": 7375, "content": nip44_encrypt({ "mint": "https://stablenut.umint.cash", + "unit": "sat", "proofs": [ // one or more proofs in the default cashu format { @@ -69,6 +70,7 @@ There can be multiple `kind:7375` events for the same mint, and multiple proofs * `.content` is a [NIP-44](44.md) encrypted payload: * `mint`: The mint the proofs belong to. * `proofs`: unencoded proofs + * `unit` the base unit the proofs are denominated in (eg: `sat`, `usd`, `eur`). Default: `sat` if omitted. * `del`: token-ids that were destroyed by the creation of this token. This assists with state transitions. When 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 "content": nip44_encrypt([ [ "direction", "in" ], // in = received, out = sent [ "amount", "1" ], + [ "unit", "sat" ], [ "e", "", "", "created" ] ]), "tags": [ @@ -93,6 +96,7 @@ Clients SHOULD publish `kind:7376` events to create a transaction history when t ``` * `direction` - The direction of the transaction; `in` for received funds, `out` for sent funds. +* `unit` the base unit of the amount (eg: `sat`, `usd`, `eur`). Default: `sat` if omitted. Clients MUST add `e` tags to create references of destroyed and created token events along with the marker of the meaning of the tag: * `created` - A new token event was created. @@ -121,6 +125,7 @@ If Alice spends 4 sats from this token event "id": "event-id-1", "content": nip44_encrypt({ "mint": "https://stablenut.umint.cash", + "unit": "sat", "proofs": [ { "id": "1", "amount": 1 }, { "id": "2", "amount": 2 }, @@ -140,6 +145,7 @@ Her client: "id": "event-id-2", "content": nip44_encrypt({ "mint": "https://stablenut.umint.cash", + "unit": "sat", "proofs": [ { "id": "1", "amount": 1 }, { "id": "2", "amount": 2 }, @@ -159,6 +165,7 @@ Her client: "content": nip44_encrypt([ [ "direction", "out" ], [ "amount", "4" ], + [ "unit", "sat" ], [ "e", "", "", "destroyed" ], [ "e", "", "", "created" ], ]), -- cgit v1.2.3