MetaMask / MetaMask/metamask-extension
Add API method & confirmation for importing a seed phrase
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
SeedQuest is a project for creating a 3D mnemonic world. They can make seed phrases more memorable, and help users restore them.
A user can use their application already by pasting in their seed phrase to start memorizing it, and by playing through their game to restore it, but this involves requiring a user to copy and paste their seed phrase around, which is both fairly dangerous and bad UX.
While SeedQuest would most ideally want to be featured in our on-boarding flow, we could help them prove their concept in three phases:
- [ ] Listing them in a dapp store (when they are ready/stable).
- [ ] Providing an API for importing a seed phrase (this issue).
- [ ] Providing an API for exporting a seed phrase (another issue, yes it seems the most security sensitive).
- [ ] If the app was proving stable and effective, possibly suggesting it as a backup option during on-boarding & restore.
This issue represents the goal of providing an API for a site to import a new seed phrase into MetaMask. This could take the form of a new RPC method like:
```javascript
const success = await provider.send('wallet_importSeed', twelveWords)
```
This method would prompt the user with a new confirmation like:
- This site would like to import a new seed phrase into your wallet. It contains the accounts listed below. `Reject` `Approve`
If the user approved the confirmation the provider would return `true` to the requesting site, and MetaMask may present the user with some additional backup options, since we do not know that the user has backed up this seed phrase before.
If the user rejects the confirmation, the provider would return `false`.
After this issue is completed, we should specify any seed-exporting API we are willing to consider.
Contributor guide
Research direction
Start by tracing the provider.send entry point for the proposed wallet_importSeed method and the existing confirmation flow. Define the import request, the displayed accounts, approval and rejection results, and any additional backup options; done means the API and confirmation behavior match this issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, security
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100