bitcoinbayfoundation / baywallet

ldk wallet for the plebs of tampa, by tampa plebs
MIT License
11 stars 1 forks source link

Secure account storage #11

Closed bennyhodl closed 1 year ago

bennyhodl commented 1 year ago

Because Bay Wallet is non-custodial, we must have a secure way of storing seeds.

Accounts, or wallets, are stored as:

{
     name: <name>,
     seed: <32 byte seed>
}

The TAccount (type that LDK expects) should be stored in the secure key store of the phone. Using the react-native-keychain package.

We will want to be able to support multiple accounts. To handle this and for the application to know what wallet/account to use. We will store an object in the devices local storage.

{
    name: <name>,
    currentAccount: "current-account"
}

where we query the current account object in local storage and can ask the keychain to use the wallet seed and name.

bennyhodl commented 1 year ago

https://github.com/bennyhodl/baywallet/pull/24

Moved all keys to one store.

Still need to move them to a secure storage

bennyhodl commented 1 year ago

https://github.com/bennyhodl/baywallet/pull/59