44

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?

Chris Moore
  • 14,825
  • 6
  • 66
  • 87

2 Answers2

48

To export a private key from your Satoshi bitcoin-qt client:

  1. launch your bitcoin client as usual and wait for it to load the blockchain and start up
  2. click on 'help' in the menu bar (top right)
  3. click on 'debug window'
  4. select the 'console' tab
  5. type: walletpassphrase "your walletpassphrase here" 600
  6. type: dumpprivkey [your Bitcoin address here]
  7. this will return the private key, you can copy it now; ensure you clear your clipboard/history afterwards
  8. type: walletlock
Stephen Gornick
  • 27,040
  • 12
  • 67
  • 141
rxon
  • 606
  • 1
  • 5
  • 5
16

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:

  1. run: bitcoin-qt -server and wait for it to load the blockchain and start up

  2. if 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)

  3. run this command using bitcoin-cli: bitcoin-cli dumpprivkey 1my1bitcoin1addres11111 (replace 1my... with the bitcoin address of which you want the private key)

  4. if your wallet is encrypted and you want to re-lock your wallet, run bitcoin-cli walletlock

Willtech
  • 3,269
  • 2
  • 15
  • 43
Chris Moore
  • 14,825
  • 6
  • 66
  • 87