MetaMask / MetaMask/metamask-extension
Add Ability to login with actual private (secp256k1) key
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
What problem are you trying to solve?
Allow more users to log in to MetaMask in different ways, and arguably using the most fundamental way with a private key.
Added Benefit: This will also help to educate users as mnemonics aren't private keys although are almost always reffered to as such as they derive private keys, yet many still don't know the difference (note: I realize adding this feature could confuse newbies, but if it is added as an additional link at the bottom of the import recovery phrase page, it shouldn't do harm).
There could even be a warning not to paste recovery words (or their equivalent 132-bits in binary) into the private key field and perhaps show a warning unless it gets a single 64-Hex string.
Users should be able to login to MetaMask with a private key that may or may not be attached to a specific BIP39 mnemonic recovery phrase
Certain services such as mycrypto.com allow users to login with a 64-hex character private key which is used to compute an associated public key and thus control the derived ethereum address. In other words, a user who has a private key that is not attached to a BIP39 mnemonic cannot currently use MetaMask. In other cases, a user might want to use a private key attached to a mnemonic without importing the entire mnemonic, in order to protect the security of the rest of the extended keys.
Additional context
I realize that when a user logs in with a mnemonic there are other parts of the UI/UX such as adding an account or choosing a different address which simply searches through the index values of the derivation path. Perhaps this entire section would be greyed-out or not visible in the event a user logs in with just a solo private key?
I think it is worth adding this feature as single private keys are still in use, even though Brain wallets are not as popular anymore for obvious reasons, there are still services such as Vanity address generators that users can benefit from for potential gas savings by having zero-bytes within the Ethereum address as it leads to less Gwei charged overall (as an example use case).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are identified in the issue, so begin by locating the recovery-phrase import flow and its account-management behavior. Define how a standalone secp256k1 private key is imported, how warnings and account selection should work, and what tests cover successful import and the restricted mnemonic-only controls.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- authentication, blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100