MetaMask / snaps

Extend the functionality of MetaMask using Snaps
https://metamask.io/snaps/
Other
712 stars 547 forks source link

Add ability to import private keys #377

Open ritave opened 2 years ago

ritave commented 2 years ago

MyEtherWallet would like to import private keys to Metamask and let them show up as an another account in MetaMask.

Key management snaps should be able to import private keys in a secure way.

This is dependent on Keyrings and Blockkit like UI.

yashovardhan commented 2 years ago

@chaitanyapotti

rekmarks commented 2 years ago

At present, this would probably be implemented by means of a wallet_invokeSnap called within MetaMask itself. Here are some quick thoughts about how this could be implemented:

rekmarks commented 2 years ago

Hey team! Please add your planning poker estimate with ZenHub @FrederikBolding @Mrtenz @GuillaumeRx @hmalik88 @eriknson

FrederikBolding commented 2 years ago

I may lack some context here, how is this useful as an API to expose to snaps? What's the use case? 🤔

ritave commented 2 years ago

This will be possible with the Snap Keyring Accounts API

ritave commented 2 years ago

@yashovardhan @chaitanyapotti We've been designing a new API that allows snaps to manage accounts in MetaMask. It's possible to import private keys using that APIs. If you would like to shape how the APIs looks so that it can be useful for your case. Now's a good time get involved in discussions