-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Overview
In Branta, two types of data are stored across sessions, locally on the users computer:
Wallets
Users add Wallets to their local app which (on mac) are saved under: /Users/satoshi/Library/Application Support/Branta/wallet.json
History
As the user makes bitcoin transaction, addresses, xpubs, and npubs (if enabled) are saved under: /Users/satoshi/Library/Application Support/Branta/history.json
This ticket is to allow the user to sync these settings across different computers using NOSTR. The users nsec must be used for encryption/decryption.
Implementation
This ticket does not require "production-ready" code.
Acceptable submissions will include a basic functioning proof-of-concept which supports the flow:
- User copies a valid nsec into their clipboard
- The Branta clipboard UI will show a small button "Sync via NOSTR"
- The payload will be encrypted and stored to a relay
- On a new computer, the user copies their nsec, and Branta shows a button: "Pull Branta data from NOSTR?"
- User clicks yes, and the application is synced.
Details
history.json and wallet.json use Safe Storage API.
Also see: https://github.com/BrantaOps/branta-core/blob/main/app/lib/storage.ts