solar
solar copied to clipboard
Mnemonic keyphrases
Support importing and exporting mnemonic keyphrases instead of secret keys. Secret key import/export should still be possible, but mnemonic phrases should become the default.
Show a small text button "Use secret key" below the textfield or add a key icon button to the end of the textfield if there is not enough space. We should also show a short explanatory text telling the user what those twelve words in front of them are and what to do with them.
See SEP-5 / BIP-39 for technical details about mnemonic keyphrases.
How it's done in similar apps: LOBSTR vault:
- only mnemonic imports / no secret key import
- create or import account with 12 word mnemonic phrase
- looking at mnemonic phrase possible in app settings
- mnemonic phrase works with
stellar-hd-wallet
package
LOBSTR wallet:
- import of secret key or mnemonic phrase
- creating new account will show 12 word mnemonic phrase for backup
- export of mnemonic phrase not possible afterwards
- mnemonic phrase works with
stellar-hd-wallet
package
StellarX:
- creation of new account not possible / only import of existing account with secret key
- StellarX creates 15 word mnemonic phrase for account recovery (probably based on secret key but details are unknown)
- export of mnemonic phrase not possible afterwards but a new mnemonic phrase can be generated at any time
- mnemonic phrases don't work with
stellar-hd-wallet
package
LOBSTR vault and wallet use the first key pair derived from the mnemonic phrase.
Thoughts from our (private) discussion:
- Hard to establish consistent concept since it's not possible to obtain a mnemonic phrase from a secret key with BIP-39.
- We could only support importing accounts with a mnemonic phrase but exporting accounts with mnemonic phrases would be impossible in most cases since we only have the secret key and not the mnemonic phrase that was used to derive that key.
- We would need some kind of protocol for mapping a key to words of a wordlist so that we can use it bidirectional. But this carries the risk of clashing with the existing mnemonic phrases that are currently in use by other wallets.
Although the details of the export remain unclear for now, we should still add the import feature to increase convenience for our users.