0
  • Using bitcoin-cli -datadir=X sethdseed true "WIF_KEY" the current wallet within datadir is updated
  • Then, using bitcoin-cli -datadir=X dumpwallet my_dump.txt shows a fresh new
    # extended private masterkey: tpriv..., which is determiniscally generated from the WIF_KEY

Now, using the # extended private masterkey I could indeed generate the same address than bitcoin core with the m/0'/0'/i' derivated path.

How could I compute the # extended private masterkey without dumping the wallet, using tools like libbitcoin bx ?

Also, the dumping file show a
WIF_KEY 2019-03-22T14:43:55Z hdseed=1 # addr=mnMEP6P92XKxKfEM5v2SxzLBMVB2tf7Lsj hdkeypath=s
which is exactly the m/44'/1'/0'/0/0 from the WIF_KEY passed in sethdseed cmd, why ?

1

Bitcoin Core uses the method described in BIP 32 to generate the master private key from a seed. The seed here is WIF private key. To get the master private key from the seed, you will need to decode the WIF private key to get the byte sequence that it represents. Then you can hash it as described in BIP 32 and encode it to get the master private key.

You can use bx to do this:

bx wif-to-ec <WIF key> | bx hd-new
  • Thanks very much for answer quickly my 2 posts. bx hd-new --version 70615956 for testnet and it works great. – onepix Mar 23 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.