Closed tka85 closed 3 years ago
The naming of master
was that it originally was going to be the actual master xpub, but not all devices support exporting that. So instead it returns an xpub that some other wallets refer to as master (I remember seeing m/44'/0'/0'
referred to as master because that's what would be exported for a watch only wallet).
But yes, we should have it respect the --testnet
switch and also add --sh_wpkh
and --wpkh
options too to get the "master" xpubs for BIPs 49/84.
On Trezor 1, with one legacy account (BIP44) and one wrapped segwit account (BIP49).
returns same results as:
I was under the impression that given the
--testnet
param, it should actually return as per BIP44 the node at m/44h/1h/0h and not m/44h/0h/0h.I used the wallet's mnemonic to get the seed and from there I re-evaluated the xpub using bitcoinjs-lib and the correct one is indeed at node m/44h/1h/0h and not m/44h/0h/0h. By correct I mean it coincides with what Trezor displays on page in the browser under
Account public keys
.Also
master
to my understanding refers to the node of the seed i.e. depth == 0. Anything else is not a master xpub. I find the namegetmasterxpub
a bit confusing given it actually returns a node at depth 3.