1
1
I am copying and pasting the example from the bitcoin-cli help:
deriveaddresses "wpkh([d34db33f/84h/0h/0h] xpub6EuEBhzm7KD3yxmt9wFHisymSNmK8w2CFmfgUgXi74ChFa79YouJ1w3hpZmFAWiuLezZqD38fY6K8PkxUfPifzSEB35skuBBNf1efmSp12K/0/*)#trd0mf0l" "[0,2]"
And copying in a valid xpub.
However I always get an error:
Invalid descriptor (code -5)
Even if I copy in the exact bitcoin-cli call from the bitcoin github page here deriveaddresses pull request
deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/0)"
I still get the same error.
I am entering the commands directly in the console. What am I doing wrong?
Im using mainnet bitcoin core 0.18.0, mac OS 10.13.6
Thank you, what is the "d34db33f" portion of the origin info and how do I get the correct origin info for my xpub? I understand the derivation path 84'/0'/0' but not the rest. – Fontaine – 2019-05-07T16:59:14.833
That is the fingerprint of the master public key. It's the first 4 bytes of the ripemd160 hash of the sha256 hash of the public key. – Andrew Chow – 2019-05-07T17:11:20.927
How can i ensure the descriptor has range? – Fontaine – 2019-05-07T17:12:27.557
By having
/*after your xpub. You can specify unhardened indexes after the xpub, and ending with/*indicates that the last index is the range. – Andrew Chow – 2019-05-07T17:19:11.697Thank you very much for the info :) – Fontaine – 2019-05-07T17:21:19.760
Still trying to wrap my head around the origin info and its effect on the derived keys. Again i get how the 84'/0'/0' derives keys work. But when I input
deriveaddresses "wpkh([d34db33f/84'/0'/0']xpub6EuEBhzm7KD3yxmt9wFHisymSNmK8w2CFmfgUgXi74ChFa79YouJ1w3hpZmFAWiuLezZqD38fY6K8PkxUfPifzSEB35skuBBNf1efmSp12K/*)#9k0fv7eh" "[0,99]"It returns the same 100 keys from an xpub that I created on another app, which is great, but I copied thed34db33ffrom the example origin, it seems like the fingerprint doesn't have an effect? If it does can you explain its effect? – Fontaine – 2019-05-07T17:37:18.520Origin info has no effect on key derivation entirely. It is metadata that is useful for transaction signing. You would want to have origin info if you were importing the descriptors via
importmulti, but forderiveaddress, it is unnecessary. – Andrew Chow – 2019-05-07T17:40:22.420