Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions 60.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ Tags:
* `mint` - Mint(s) this wallet uses -- there MUST be one or more mint tags.
* `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.

## Wallet Backup Events

A Wallet Backup Event SHOULD be created at the same time as a new Wallet Event so that future inadvertent overwrites of the `privkey` do not lead to loss of funds.

```jsonc
{
"kind": 375,
"content": nip44_encrypt([
[ "privkey", "hexkey" ],
[ "mint", "https://mint1" ],
[ "mint", "https://mint2" ]
]),
"tags": []
Copy link
Contributor

@robwoodgate robwoodgate Apr 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be even more useful if the backup event had a single character k (key) tag with the corresponding pubkey to the privkey. This would allow REQ filtering with #k to find a wallet backup for a Proof locked to a specific pubkey without having to load, decrypt and check every backup.

Especially important if the user is being prompted for permission each time (eg: via NIP-07 signer)

"tags": [
    [ "k", "<hex-pubkey>" ]
]
  • k: The Nostr hex-format public key corresponding to the privkey field encrypted in the wallet backup.

}
```

## Token Event
Token events are used to record unspent proofs.

Expand Down