If I want to transfer an address from the satoshi client into a different client, how can I find its private key to do so?
2 Answers
To export a private key from your Satoshi bitcoin-qt client:
- launch your bitcoin client as usual and wait for it to load the blockchain and start up
- click on 'help' in the menu bar (top right)
- click on 'debug window'
- select the 'console' tab
- type: walletpassphrase "your walletpassphrase here" 600
- type: dumpprivkey [your Bitcoin address here]
- this will return the private key, you can copy it now; ensure you clear your clipboard/history afterwards
- type: walletlock
-
1This answer would benefit from adding "How to get your public key"; as i don't know my public key.– Ian BoydCommented Apr 8, 2013 at 1:48
-
The Bitcoin address is what is to be used there. I've edited it. Commented Oct 11, 2015 at 3:19
-
FYI, if you didn't already encrypt the Bitcoin-QT wallet then skip the walletpassphrase part (line numbered 5. and 8.). Commented Oct 11, 2015 at 3:21
-
#5 isnt clear :it tells you to type quote:"walletpassphrase "your walletpassphrase here" 600". unquote which gets you no where.. and number 6 is the same Commented Aug 11, 2017 at 22:02
-
1@DavidCrawford: Did you try to replace the three words "your walletpassphrase here" with your wallet passphrase?– Murch ♦Commented Aug 12, 2017 at 2:31
Note: Recent versions of the satoshi client offer a 'debug window' which can be used to export private keys. This is described in Miguel Moreno's answer to this question, and is easier than the steps I describe below.
To export a private key from your satoshi client:
run:
bitcoin-qt -server
and wait for it to load the blockchain and start upif your wallet is encrypted, run:
read -s x; bitcoin-cli walletpassphrase "$x" 600; unset x
to unlock it for 600 seconds (type your passphrase after hitting return, then hit return again; this 'read; ...; unset' prevents the password being written to your shell's history file on disk, and the '-s' in read prevents your password being displayed as you type it, and improves protection from screen-loggers and the shell log)run this command using bitcoin-cli:
bitcoin-cli dumpprivkey 1my1bitcoin1addres11111
(replace 1my... with the bitcoin address of which you want the private key)if your wallet is encrypted and you want to re-lock your wallet, run
bitcoin-cli walletlock
-
-
-
1I guess you do the "read x ..." shell stuff to prevent the shell writing your password to a history file. I think that's worth mentioning. Commented Sep 15, 2012 at 12:37
-
Yes, that's exactly why. I don't want my password being written to disk. Commented Sep 16, 2012 at 3:26
-
1@user2428118 I noticed dumpwallet is a command now in newer versions– SunCommented Jan 23, 2018 at 16:18