This script assists with dumping
the HD wallet seed for a
Bitcoin Core HD wallet. HD
wallets were introduced to Core starting
with Bitcoin Core 0.13.0, released
August 23, 2016. This tool works by calling the dumpwallet
JSON-RPC method,
and extracting the master seed from its output. For more information about HD
wallets,
see BIP32.
In principle, the master seed is the only thing you need to back up if you are using an HD wallet; all subsequent keys used by the wallet are generated deterministically from the HD seed. You can use a tool like bip32utils to experiment with these derived keys.
From the git checkout:
# Optional: create and activate a virtualenv
mkvirtualenv -p python3 bitcoin-hd-seed
workon bitcoin-hd-seed
# Install dump-hd-seed
pip install -r requirements.txt
python setup.py install
This will install a command called dump-hd-seed
.
Just run dump-hd-seed
, and the seed will be dumped to stdout.
If your wallet is locked, you will be prompted for a wallet passphrase. If you
don't feel comfortable typing your passphrase this way, manually unlock the
wallet (e.g. bitcoin-cli -stdin walletpassphrase
) and then enter a blank
passphrase at the prompt.