hd-wallet-derive icon indicating copy to clipboard operation
hd-wallet-derive copied to clipboard

Problem with creating public address - base on XPUB like ledger-live

Open wierzcholski opened this issue 4 years ago • 1 comments

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 avatar Oct 27 '20 19:10 wierzcholski

@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 avatar Aug 15 '21 01:08 ynohtna92

@ynohtna92 appears to have addressed this. closing.

dan-da avatar Nov 05 '23 23:11 dan-da