How to restore Bitcoin Core HD wallet private keys by master key?

9

Since version 0.13.0 Bitcoin Core supports HD wallets. In a .txt dump of the wallet (created by JSON-RPC dumpwallet command), one can find an "extended private masterkey" which is intended to be used for generation of rest of the private keys. How can lost private keys be restored with the help of the mentioned masterkey in Bitcoin Core? I have not found any RPC method that would accept the masterkey to generate private keys

talalai88

Posted 2017-03-27T15:33:31.997

Reputation: 151

related: How do I retrieve my backed up wallet to Bitcoin Core?

Murch 2017-04-11T14:46:17.820

Answers

6

Unfortunately, Bitcoin Core itself does not provide methods to generate private keys from master key. However, there are libraries that can produce correct keys from xprv string (chain m/iH/0/k with hardened keys according to BIP0032) - I used https://github.com/prusnak/bip32utils for Python.

talalai88

Posted 2017-03-27T15:33:31.997

Reputation: 151