Anyways, get your master private key (actually "extended private key") from the console with getmasterprivate() command.
Then see if your other wallet supports importation of xprv keys. You might have to use convert_xkey(xkey="zprv.....",xtype="standard") if the other wallet only support "xprv".
In general this will work, but if uses passphrase, may get something different.
He's using the xprv key and not the seed phrase and passphrase to restore to other wallets.
The linked code shows the derivation from seed phrase + extension to seed; the BIP39 passphrase influenced how the seed is derived, anything after that is the same.
Something that the derivation from the extended private key (
xprv) to child prv keys has nothing to do with.
As far as the command's result is concerned, excluding the prefix that can be converted, it's still compatible with wallets that supports xprv.
For example (
reproducible- TestNet):
1.1 Create an Electrum wallet with the seed phrase:
length water logic object advance abandon brick bachelor thrive farm joke essence
1.2 Plus extend it with this BIP39 passphrase:
12345
2. Use
getmasterprivate() command, result:
vprv9Fsz56ahKw72NWvuKKwryVX5vCAf2m7eAoNsm5aS6WeCLp8dGSDrRhEnwFqPYqUDLpBM4j9gXQF8od7pDWKPDgQYaCduUDjoMFZxa2s543e
3. Use
convert_xkey(xkey="vprv..",xtype="standard"), command:
tprv8cDTTmEs2a24fvYfecNcZKL5aFsm9X8eLaLSCHnfLVtSEcWAm7tjBZvWtqvDZ2ANXXwjZmxZc5Y333tgn7VMdD3LqXF4JQ6pooSfnrM48JM
4. Go to IanColeman's BIP39 tool and select the Coin: "
BTC - Bitcoin Testnet".
5. Paste the tprv key on "
BIP32 Root Key".
6. To reproduce how wallets derive keys/addresses from the xprv/xpub; go to "
BIP141" tab,
7.1 Type
m/0 in 'BIP32 Derivation Path' (
"m" as your xprv and "0" as 'external chain')
7.2 Use
m/1 to derive change addresses instead.
8. Select "
P2WPKH" as 'Script Semantics'.
9. Lastly, compare the addresses and keys in your Electrum client to the list below the BIP39 tool.