Skip to content

Sync preferences via nsec #20

@keith-gardner

Description

@keith-gardner

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:

  1. User copies a valid nsec into their clipboard
  2. The Branta clipboard UI will show a small button "Sync via NOSTR"
  3. The payload will be encrypted and stored to a relay
  4. On a new computer, the user copies their nsec, and Branta shows a button: "Pull Branta data from NOSTR?"
  5. 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

Bounty

See Lightning Bounties

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions