hd-wallet-derive
hd-wallet-derive copied to clipboard
Problem with creating public address - base on XPUB like ledger-live
Hi,
In short I have export xpub from Leger-Live:
{ "xpub": "xpub6BemYi..", "index": 0, "freshAddressPath": "44'/60'/0'/0/0", "id": "libcore:1:ethereum:xpub6B...", "blockHeight": 11140608 }
and try to use it with hd-wallet-derive:
./hd-wallet-derive.php -g --key=xpub6BemYi... --numderive=3 --coin=eth --path="m/44/60/0" --cols=address,xpub,path --format=jsonpretty
[ { "address": "0xc42Ef07...", "xpub": "xpub6LCcV6Xy...", "path": "m/44/60/0/0" }, ... ]
but address is not matching with that from Ledger Live: 0x682ebE..
Do you know why there is a mismatch, how I should use --path parameter if I don't want to provide private key.
Regards, Jakub
@wierzcholski It is because you are not using the correct hardened path and missing a key branch.
"freshAddressPath": "44'/60'/0'/0/0",
but you are using --path="m/44/60/0"
Notice the missing apostrophes, use should be using --path="m/44'/60'/0'/0"
@ynohtna92 appears to have addressed this. closing.