Post
Topic
Board Development & Technical Discussion
Re: Bitcoin core hd wallet from mnemonic
by
croxNN
on 31/08/2019, 08:45:37 UTC
Hello all!

I'm trying understand HD wallets in bitcoin core implementation and got stuck. Here it is:

$ bx seed | bx mnemonic-new -l en
reward awake later spot grass list peanut clog hurry guess question father leg dress only reunion horn napkin

$ echo "reward awake later spot grass list peanut clog hurry guess question father leg dress only reunion horn napkin" | bx mnemonic-to-seed | bx hd-new | bx hd-to-ec | bx ec-to-wif
L1G3dzjDmkPNkrYLs2L9pTbF9BZ4XThqkXVtDxcrP887uPYRjriG

That WIF key L1G3dzjDmkPNkrYLs2L9pTbF9BZ4XThqkXVtDxcrP887uPYRjriG should be ok for sethdseed? Right?

So next:
$ bitcoin-cli createwallet test
{
  "name": "test",
  "warning": ""
}


$ bitcoin-cli -rpcwallet=test sethdseed true L1G3dzjDmkPNkrYLs2L9pTbF9BZ4XThqkXVtDxcrP887uPYRjriG
error code: -5
error message:
Invalid private key


What's wrong?

Thanks in advance.