Skip to content

Conversation

@DanConwayDev
Copy link
Contributor

to prevent loss of funds if Wallet Event is overwritten with a new privkey

@DanConwayDev DanConwayDev changed the title NIP-66: add Wallet Backup Events NIP-60: add Wallet Backup Events Mar 8, 2025
to prevent loss of funds if Wallet Event is overwritten with a new `privkey`
@DanConwayDev DanConwayDev force-pushed the pr/nip-60-add-wallet-backup branch from c5e5a55 to ea1e645 Compare March 8, 2025 18:31
Copy link
Member

@pablof7z pablof7z left a comment

Choose a reason for hiding this comment

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

ACK. I think this is a very sane addition

@trbouma
Copy link

trbouma commented Mar 15, 2025

Why kind 375? My preference would be 7377 (which I am implementing). I think it would be a good idea to keep all the cashu wallet regular events in a 73XX block. I think event kinds <1000 should be reserved for very nostr-generic things versus more specific things, like wallets.

Also, are these backup events for kind 7375 only (i.e., proofs) or other events? If just for 7375, the example should show a proof instead.

@DanConwayDev
Copy link
Contributor Author

Why kind 375? My preference would be 7377 (which I am implementing). I think it would be a good idea to keep all the cashu wallet regular events in a 73XX block. I think event kinds <1000 should be reserved for very nostr-generic things versus more specific things, like wallets.

Kind 375 was chosen to maintain a consistent numbering theme but I'm not precious about it. It is currently implemented in the Applesauce library, being used in experimental wallets within GitWorkshop and Nostrudel. Since 375 is only utilized for experimental wallets, I don't see any issue with transitioning to 7377.

I'll update the PR if @hzrd149 is happy and updates the applesauce.

Also, are these backup events for kind 7375 only (i.e., proofs) or other events? If just for 7375, the example should show a proof instead.

Its a backup the wallet event 17375 only and not each proof. I dont think backing up each proof at a protocol level is a good idea.

@pablof7z
Copy link
Member

☑️ ndk-wallet (hence Olas) supports kind:375 backups.

@robwoodgate
Copy link
Contributor

ACK: This is a great solution for ensuring safe key rotation too.

[ "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.

@pablof7z pablof7z marked this pull request as ready for review July 21, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants