1

Is it possible to import a Metamask account to Mist or Ethereum Wallet? Metamask doesn't allow to export UTC file or json file, only pass phrase and private key and I don't see the option to import these in Mist or Ethereum wallet? Thanks.

Shane Fontaine
  • 18,036
  • 20
  • 54
  • 82
Tomesupp
  • 75
  • 8
  • See: https://ethereum.stackexchange.com/questions/465/how-to-import-a-plain-private-key-into-geth-or-mist – Prashant Prabhakar Singh Feb 06 '18 at 11:02
  • thanks! Please post an answer and I will check it solved. – Tomesupp Feb 06 '18 at 11:39
  • I did geth account import „path to private key text file“ Everything seams to worked ok but my account doesn't show up in Ethereum Wallet nor Mist? When I try to run the command again it says „Account already exists…“. Am I doing something wrrong, how can I make it show up in ETH Walle tor Mist? Thanks. – Tomesupp Feb 07 '18 at 11:25
  • Check the .ethereum/keystore folder, if your account is there. If yes, Mist should pick the account. – Prashant Prabhakar Singh Feb 07 '18 at 12:27
  • It's not there at all... when try to run geth account import „path to private key text file“ again, I get an error saying: „Account already exists…“. – Tomesupp Feb 07 '18 at 12:42
  • I'm really stupid, I ran cmd as an administrator so it put my account in my admin profile... I suppose I can just copy to my regular profile keystore... – Tomesupp Feb 07 '18 at 12:44
  • It shows, it shows, thanks Prashant Prabhakar Singh, please post an answer so I can close it. – Tomesupp Feb 07 '18 at 12:54

1 Answers1

1

This question is already answered here. Just for the shake of no link only answer.

DO the following steps to import your private key to geth and get a keystore file:

  • Open Notepad
  • Paste key into notepad without any extra characters or quotations
  • Save the file as nothing_special_delete_me.txt at C:\
  • Run the command, geth account import C:\nothing_special_delete_me.txt
  • After successful import, delete the file at C:\nothing_special_delete_me.txt

If you don't want to use or you don't have geth. You can create keystore file using node and ethereumjs-wallet for same. (Ref: here)

var Wallet = require('ethereumjs-wallet');
var key = Buffer.from('efca4cdd31923b50f4214af5d2ae10e7ac45a5019e9431cc195482d707485378', 'hex');
var wallet = Wallet.fromPrivateKey(key);
wallet.toV3String('password');

The output of the last command is content of your keystore file. Just paste this in a json file and put this in .ethereum/keystore folder.

Prashant Prabhakar Singh
  • 8,026
  • 5
  • 40
  • 79