diff options
| -rw-r--r-- | 60.md | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -22,7 +22,7 @@ This NIP doesn't deal with users' *receiving* money from someone else, it's just | |||
| 22 | 3. A user has `kind:7376` events that represent the spending history of the wallet -- This history is for informational purposes only and is completely optional. | 22 | 3. A user has `kind:7376` events that represent the spending history of the wallet -- This history is for informational purposes only and is completely optional. |
| 23 | 23 | ||
| 24 | ### Wallet Event | 24 | ### Wallet Event |
| 25 | ```jsonc | 25 | ```javascript |
| 26 | { | 26 | { |
| 27 | "kind": 17375, | 27 | "kind": 17375, |
| 28 | "content": nip44_encrypt([ | 28 | "content": nip44_encrypt([ |
| @@ -45,7 +45,7 @@ Token events are used to record unspent proofs. | |||
| 45 | 45 | ||
| 46 | There can be multiple `kind:7375` events for the same mint, and multiple proofs inside each `kind:7375` event. | 46 | There can be multiple `kind:7375` events for the same mint, and multiple proofs inside each `kind:7375` event. |
| 47 | 47 | ||
| 48 | ```jsonc | 48 | ```javascript |
| 49 | { | 49 | { |
| 50 | "kind": 7375, | 50 | "kind": 7375, |
| 51 | "content": nip44_encrypt({ | 51 | "content": nip44_encrypt({ |
| @@ -78,7 +78,7 @@ The `kind:5` _delete event_ created in the [NIP-09](09.md) process MUST have a t | |||
| 78 | ### Spending History Event | 78 | ### Spending History Event |
| 79 | Clients SHOULD publish `kind:7376` events to create a transaction history when their balance changes. | 79 | Clients SHOULD publish `kind:7376` events to create a transaction history when their balance changes. |
| 80 | 80 | ||
| 81 | ```jsonc | 81 | ```javascript |
| 82 | { | 82 | { |
| 83 | "kind": 7376, | 83 | "kind": 7376, |
| 84 | "content": nip44_encrypt([ | 84 | "content": nip44_encrypt([ |
| @@ -115,7 +115,7 @@ From those relays, the client should fetch wallet and token events. | |||
| 115 | 115 | ||
| 116 | ### Spending token | 116 | ### Spending token |
| 117 | If Alice spends 4 sats from this token event | 117 | If Alice spends 4 sats from this token event |
| 118 | ```jsonc | 118 | ```javascript |
| 119 | { | 119 | { |
| 120 | "kind": 7375, | 120 | "kind": 7375, |
| 121 | "id": "event-id-1", | 121 | "id": "event-id-1", |
| @@ -134,7 +134,7 @@ If Alice spends 4 sats from this token event | |||
| 134 | 134 | ||
| 135 | Her client: | 135 | Her client: |
| 136 | * MUST roll over the unspent proofs: | 136 | * MUST roll over the unspent proofs: |
| 137 | ```jsonc | 137 | ```javascript |
| 138 | { | 138 | { |
| 139 | "kind": 7375, | 139 | "kind": 7375, |
| 140 | "id": "event-id-2", | 140 | "id": "event-id-2", |
| @@ -153,7 +153,7 @@ Her client: | |||
| 153 | * MUST delete event `event-id-1` | 153 | * MUST delete event `event-id-1` |
| 154 | * SHOULD add the `event-id-1` to the `del` array of deleted token-ids. | 154 | * SHOULD add the `event-id-1` to the `del` array of deleted token-ids. |
| 155 | * SHOULD create a `kind:7376` event to record the spend | 155 | * SHOULD create a `kind:7376` event to record the spend |
| 156 | ```jsonc | 156 | ```javascript |
| 157 | { | 157 | { |
| 158 | "kind": 7376, | 158 | "kind": 7376, |
| 159 | "content": nip44_encrypt([ | 159 | "content": nip44_encrypt([ |
| @@ -171,7 +171,7 @@ When creating a quote at a mint, an event can be used to keep the state of the q | |||
| 171 | 171 | ||
| 172 | However, application developers SHOULD use local state when possible and only publish this event when it makes sense in the context of their application. | 172 | However, application developers SHOULD use local state when possible and only publish this event when it makes sense in the context of their application. |
| 173 | 173 | ||
| 174 | ```jsonc | 174 | ```javascript |
| 175 | { | 175 | { |
| 176 | "kind": 7374, | 176 | "kind": 7374, |
| 177 | "content": nip44_encrypt("quote-id"), | 177 | "content": nip44_encrypt("quote-id"), |