solana-mobile / seed-vault-sdk

Other
67 stars 16 forks source link

Create “explicit intent” to import BIP-39 phrases or private key from wallet apps into Seed Vault #58

Open lexer opened 1 year ago

lexer commented 1 year ago

Proposal

Create “explicit intent” to import 1..N BIP-39 phrases or private key from wallet apps into Seed Vault

Sample use case

  1. Wallet app restores existing BIP-39 phrases or private keys from proprietary backup solution.
  2. Wallet app sends restored BIP-39 phrases and private keys to Sage Seed Vault using explicit intent.
  3. Saga shows warning UI about danger of importing existing secrets.

Considerations

  1. Considering that Sage will support import of BIP-39 phrases I don't think we are increasing risks here.
  2. We are reducing risks of customers manually copying BIP-39 seed phrases since copy buffer can be accessed by other apps on Android device.

Alternatives

Saga could offer to create a new BIP-39 seed phrase and transfer all known assets to it as part of the import. However this could lead to a loss of assets locked in DeFi protocols associated with imported secret.

References

Android Explicit Intents. https://developer.android.com/guide/components/intents-filters

sdlaver commented 1 year ago

Thanks @lexer. Adding to the backlog bucket, for consideration for the v1.1 milestone.