How do I import private keys from Bitcoin-qt to Multibit client?

23

14

Question says it. I spent 20 mins Googling. Saw several links on bitcointalk.com but amazingly found no solution to this. Am I the first one trying to do this? Note the following are not the solutions I am looking for:

  1. Transfer the BTC from Bitcoin-qt to Multibit by making a transaction
  2. Some commandline geeky stuff

Jus12

Posted 2012-11-11T16:41:32.650

Reputation: 1 243

Unfortunately there are some commandline geeky stuff commands that you will need to execute. Please see my answer below.Scott 2013-09-14T14:18:28.527

2> Some commandline geeky stuff

Well, that's the way it is done. You could pay someone to do that process for you -- but then you would need to trust them as they have your private keys. – Stephen Gornick 2012-11-11T21:54:57.480

That "commandline geeky stuff" can be done through the debug window / console that is available with the Bitcoin.org client v0.7.Stephen Gornick 2012-11-11T21:56:35.963

The method of importing the wallet via Blockchain.info no longer seems to work. I can produce a JSON file from dumpwallet.py but Blockchain.info apparently fails to recognize it for some reason. – None – 2013-01-16T12:56:37.843

Answers

20

Manual Steps

  1. Copy your public receiving addresses from Bitcoin-Qt.
  2. Go to the Bitcoin-Qt console: click Help/Debug Window and then select the Console tab.
  3. Run walletpassphrase [your password] [timeout in seconds] to unlock your password protected wallet.
  4. Run dumpprivkey [Receiving Bitcoin Address] for each receiving address to be migrated to MultiBit. There may be hidden private change addresses in Bitcoin-Qt which don't show up in the receive tab. Run listaddressgroupings.
  5. Copy the results of dumprivkey for each address (which are the corresponding private keys).
  6. Start the Multibit client and create a new wallet.
  7. Click Tools/Export Private Key after selecting the Do not password protect export file option.
  8. Open the exported file in a text editor.
  9. Below the private key generated by MultiBit, paste the private keys you have copied above. Remember to paste them before the End of private keys line.
  10. After each private key, add a date that is prior to when you created the corresponding wallet. (You can check this date in the Bitcoin-Qt Transactions tab and scrolling to the very bottom.)
  11. Repeat for all addresses you want to move to Multibit Client.
  12. Save the key file and import it to the Multibit client using Tools > Import Private Keys.
  13. In MultiBit, you may not see your total until you click Tools > Reset Blockchain and Transactions
  14. In order to protect yourself from theft, delete the private key files.
  15. Done!

Scott

Posted 2012-11-11T16:41:32.650

Reputation: 804

2Scott's answer above is excellent, but I think there are some final steps missing, which are: After step 8: 9. Save the file that you added the keys to

  1. Click Tools/Import Private Key. Find the file you saved and import it.
  2. < – Velonius 2013-09-14T20:29:20.717

2By the way, this is a great answer, but besides the comment of @Velonius above, you have to make sure to put a date prior to the creation of your wallet when pasting the private key into multibit.key file. This ensures the proper replaying of the blockchain which will then pick up all the transactions.adavid 2013-09-22T19:45:38.517

1Also missing, if you have a password on your wallet, is before step 3 writing: walletpassphrase [your password] [timeout in seconds]Marcelo Mason 2014-01-27T18:47:14.687

1

My transactions were picked up, but my total did not appear in MultiBit until I did "tools > reset blockchain and transactions" at the end (after step 11).

Also, be aware that the QT-client uses hidden private change addresses that don't show up in the receive tab. listadressgroupings in the Qt-debug-console showed my missing addresses which I then followed steps 3-10 for to make ALL of my transactions and money appear in multibit. Get all addresses from bitcoind

Crashthatch 2014-03-15T12:24:31.000

Thanks Marcelo Delgado and Crashthatch, I updated the answer. I hope it helps others and is easy to read.Scott 2014-03-16T05:21:40.973

1Simpler now: bitcoind -daemon; bitcoin-cli dumpwallet wallet-dump.deleteme; grep label= wallet-dump.deleteme | cut -d' ' -f1,2,3 &gt; import-into-multibit.key -- but don't do it on insecure storage! Those contain raw private keys. I'd like to improve this by importing labels as well, but couldn't figure it out.treat your mods well 2014-10-29T00:33:54.937

Oh, here's the script and a helper, I'll add more if I need it: https://github.com/timmc/app-1113

treat your mods well 2014-10-29T01:08:24.217

1Your link is dead.mkabatek 2016-04-13T21:49:56.173

Thanks, I removed the link. I'm glad I wrote out the steps here!Scott 2016-04-14T15:47:03.207

8

Here is one way to do it without the "command line geeky stuff".

  • Visit https://blockchain.info/wallet/import-wallet. Drag the Bitcoin-Qt wallet.dat file into the dotted area. Follow the instructions.
  • Login to the new wallet. Under the Backup heading click download.
  • Open multibit choose Tools -> Import Private Keys. Now import the wallet.aes.json file just downloaded.
  • Delete the keys from the blockchain.info wallet.

However since the goal isn't to setup a blockchain.info wallet you would be much better off using pywallet https://github.com/jackjack-jj/pywallet to dump the wallet and the keys directly.

Ben Reeves

Posted 2012-11-11T16:41:32.650

Reputation: 2 848

blockchain.info has some issues with importing. Few keys were not imported. I guess if the number of keys are large, the problem occurs.Jus12 2013-09-09T20:19:08.877

5This is not a good solution. I do not want a third party to learn all my secrets...adavid 2013-09-22T19:58:17.367

2I also would strongly advise against this. Check out Scotts answer. Did work for me.stigi 2013-11-18T17:35:36.280

4This is a good solution but yes, the goal was do the export without giving my private keys to a 3rd party. I think what I will eventually end up doing is a transfer via a transaction (easiest but not the cheapest way, since the transaction size will be large).Jus12 2012-11-12T09:43:46.187

The way blockchain.info works it stores your wallet but still encrypted with your password, they don't not keep access your wallet.Gopoi 2013-01-17T22:42:48.770

3

It does not answer your question of getting your private keys out of bitcoin-qt, but this link explains how you import a single private key into MultiBit:

http://multibit.org/help_importASingleKey.html

If you have more than one private key it is simply more rows in the import file.

The date alongside each key is a bit non-obvious. It has to be before the date of the first transaction using that key so that the blocks with the transactions in can be found. I recommend just finding the first transaction in your wallet and putting the date one day before it in on every row. (Using a day earlier avoids any time zone problems).

Note that the import only knows about the sipa format private keys (the ones beginning with a 5). It does not understand compressed keys. ( What is a compressed Bitcoin key? )

jim618

Posted 2012-11-11T16:41:32.650

Reputation: 3 205

Still strange to see people name the base58 private key format after me. I'd prefer them adding support for compressed public keys (which I also came up with, including the base58 format...).Pieter Wuille 2012-11-11T19:33:36.933

Hi Pieter, yes I will no doubt get round to adding parsing of compressed keys - it is in my issues list. As the export files are mainly to backup the MultiBit keys it is not top of the list though. I think you will probably have to get used to being famous. :-)jim618 2012-11-11T19:44:49.853

0

I wrote this a while ago and used it to convert all my wallet.dat s to multibit.key to be able to import them to multibit.

https://github.com/shayanb/Open-Wallet-Format

Shayan

Posted 2012-11-11T16:41:32.650

Reputation: 281