nip60: fix links.

This commit is contained in:
Asai Toshiya 2025-02-03 23:00:33 +09:00 committed by GitHub
parent c88d925613
commit 8577545faa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

14
60.md
View File

@ -44,14 +44,14 @@ The wallet event is an addressable event `kind:37375`.
Tags:
* `d` - wallet ID.
* `mint` - Mint(s) this wallet uses -- there MUST be one or more mint tags.
* `relay` - Relays where the wallet and related events can be found. -- one ore more relays SHOULD be specified. If missing, clients should follow [[NIP-65]].
* `relay` - Relays where the wallet and related events can be found. -- one ore more relays SHOULD be specified. If missing, clients should follow [NIP-65](65.md).
* `unit` - Base unit of the wallet (e.g. "sat", "usd", etc).
* `name` - Optional human-readable name for the wallet.
* `description` - Optional human-readable description of the wallet.
* `balance` - Optional best-effort balance of the wallet that can serve as a placeholder while an accurate balance is computed from fetching all unspent proofs.
* `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 when receiving funds from others, described in NIP-61.
Any tag, other than the `d` tag, can be [[NIP-44]] encrypted into the `.content` field.
Any tag, other than the `d` tag, can be [NIP-44](44.md) encrypted into the `.content` field.
### Deleting a wallet event
Due to addressable event being hard to delete, if a user wants to delete a wallet, they should empty the event and keep just the `d` identifier and add a `deleted` tag.
@ -90,7 +90,7 @@ There can be multiple `kind:7375` events for the same mint, and multiple proofs
* `del`: token-ids that were destroyed by the creation of this token. This assists with state transitions.
### Spending proofs
When one or more proofs of a token are spent, the token event should be [[NIP-09]]-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.
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.
## Spending History Event
Clients SHOULD publish `kind:7376` events to create a transaction history when their balance changes.
@ -115,14 +115,14 @@ Clients SHOULD publish `kind:7376` events to create a transaction history when t
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.
* `destroyed` - A token event was destroyed.
* `redeemed` - A [[NIP-61]] nutzap was redeemed.
* `redeemed` - A [NIP-61](61.md) nutzap was redeemed.
All tags can be [[NIP-44]] encrypted. Clients SHOULD leave `e` tags with a `redeemed` marker unencrypted.
All tags can be [NIP-44](44.md) encrypted. Clients SHOULD leave `e` tags with a `redeemed` marker unencrypted.
Multiple `e` tags can be added to a `kind:7376` event.
# Flow
A 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]] relays.
A 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.
## Fetch wallet and token list
From those relays, the client should fetch wallet and token events.
@ -192,7 +192,7 @@ Her client:
```
## Redeeming a quote (optional)
When 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]] matching the expiration of the bolt11 received from the mint; this signals to relays when they can safely discard these events.
When 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) matching the expiration of the bolt11 received from the mint; this signals to relays when they can safely discard these events.
Application developers are encouraged to use local state when possible and only publish this event when it makes sense in the context of their application.