upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoji Shidara <dara@shidara.net>2025-08-20 01:11:40 +0900
committerGitHub <noreply@github.com>2025-08-19 09:11:40 -0700
commitc222f711020db8b18a5fab8e7891ea05049956cc (patch)
tree7b07e475bf792210ca57819da126163a595df9e5
parent68e5d0ada427a5d4783b8727cd2334a6b3a5e89f (diff)
NIP-60: Fix heading levels (#2029)
-rw-r--r--60.md18
1 files changed, 9 insertions, 9 deletions
diff --git a/60.md b/60.md
index 4d0c709..786ce97 100644
--- a/60.md
+++ b/60.md
@@ -16,12 +16,12 @@ The purpose of this NIP is:
16 16
17This NIP doesn't deal with users' *receiving* money from someone else, it's just to keep state of the user's wallet. 17This NIP doesn't deal with users' *receiving* money from someone else, it's just to keep state of the user's wallet.
18 18
19# High-level flow 19## High-level flow
201. A user has a `kind:17375` event that represents a wallet. 201. A user has a `kind:17375` event that represents a wallet.
212. A user has `kind:7375` events that represent the unspent proofs of the wallet. -- The proofs are encrypted with the user's private key. 212. A user has `kind:7375` events that represent the unspent proofs of the wallet. -- The proofs are encrypted with the user's private key.
223. 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. 223. 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```jsonc
26{ 26{
27 "kind": 17375, 27 "kind": 17375,
@@ -40,7 +40,7 @@ Tags:
40* `mint` - Mint(s) this wallet uses -- there MUST be one or more mint tags. 40* `mint` - Mint(s) this wallet uses -- there MUST be one or more mint tags.
41* `privkey` - Private key used to unlock P2PK ecash. MUST be stored encrypted in the `.content` field. **This is a different private key exclusively used for the wallet, not associated in any way to the user's Nostr private key** -- This is only used for receiving [NIP-61](61.md) nutzaps. 41* `privkey` - Private key used to unlock P2PK ecash. MUST be stored encrypted in the `.content` field. **This is a different private key exclusively used for the wallet, not associated in any way to the user's Nostr private key** -- This is only used for receiving [NIP-61](61.md) nutzaps.
42 42
43## Token Event 43### Token Event
44Token events are used to record unspent proofs. 44Token events are used to record unspent proofs.
45 45
46There can be multiple `kind:7375` events for the same mint, and multiple proofs inside each `kind:7375` event. 46There can be multiple `kind:7375` events for the same mint, and multiple proofs inside each `kind:7375` event.
@@ -75,7 +75,7 @@ When one or more proofs of a token are spent, the token event should be [NIP-09]
75 75
76The `kind:5` _delete event_ created in the [NIP-09](09.md) process MUST have a tag `["k", "7375"]` to allow easy filtering by clients interested in state transitions. 76The `kind:5` _delete event_ created in the [NIP-09](09.md) process MUST have a tag `["k", "7375"]` to allow easy filtering by clients interested in state transitions.
77 77
78## Spending History Event 78### Spending History Event
79Clients SHOULD publish `kind:7376` events to create a transaction history when their balance changes. 79Clients SHOULD publish `kind:7376` events to create a transaction history when their balance changes.
80 80
81```jsonc 81```jsonc
@@ -103,17 +103,17 @@ All tags can be [NIP-44](44.md) encrypted. Clients SHOULD leave `e` tags with a
103 103
104Multiple `e` tags can be added, and should be encrypted, except for tags with the `redeemed` marker. 104Multiple `e` tags can be added, and should be encrypted, except for tags with the `redeemed` marker.
105 105
106# Flow 106## Flow
107A client that wants to check for user's wallets information starts by fetching `kind:10019` events from the user's relays, if no event is found, it should fall back to using the user's [NIP-65](65.md) relays. 107A client that wants to check for user's wallets information starts by fetching `kind:10019` events from the user's relays, if no event is found, it should fall back to using the user's [NIP-65](65.md) relays.
108 108
109## Fetch wallet and token list 109### Fetch wallet and token list
110From those relays, the client should fetch wallet and token events. 110From those relays, the client should fetch wallet and token events.
111 111
112`"kinds": [17375, 7375], "authors": ["<my-pubkey>"]` 112`"kinds": [17375, 7375], "authors": ["<my-pubkey>"]`
113 113
114## Fetch proofs 114### Fetch proofs
115 115
116## Spending token 116### Spending token
117If Alice spends 4 sats from this token event 117If Alice spends 4 sats from this token event
118```jsonc 118```jsonc
119{ 119{
@@ -166,7 +166,7 @@ Her client:
166} 166}
167``` 167```
168 168
169## Redeeming a quote (optional) 169### Redeeming a quote (optional)
170When creating a quote at a mint, an event can be used to keep the state of the quote ID, which will be used to check when the quote has been paid. These events should be created with an expiration tag [NIP-40](40.md) of 2 weeks (which is around the maximum amount of time a Lightning payment may be in-flight). 170When creating a quote at a mint, an event can be used to keep the state of the quote ID, which will be used to check when the quote has been paid. These events should be created with an expiration tag [NIP-40](40.md) of 2 weeks (which is around the maximum amount of time a Lightning payment may be in-flight).
171 171
172However, application developers SHOULD use local state when possible and only publish this event when it makes sense in the context of their application. 172However, application developers SHOULD use local state when possible and only publish this event when it makes sense in the context of their application.