Skip to main content
3 of 10
edited tags; edited body
sevcsik
  • 183
  • 1
  • 7

How to import a HD wallet from an extended private key

I'd like to export a derived private key from my Electrum HD wallet, and use it as a HD wallet master key in a Mycelium wallet.

I used bx to get the key like this (m/2'/0) (where m is the unencrypted xprv key extracted from default_wallet JSON):

$ cat m | bx hd-private --index 2 --hardened \
        | bx hd-private | bx hd-to-wif | qrencode -o - | feh -

And scanned the resulting QR code in Mycelium using the "Add Unrelated Account/Scan".

The wallet works, but it's treated as a "single-address" wallet, not a HD wallet. I presumed that the derived xprv can be used as a master key for deriving more keys, since it contains the chaincode. Is that not the case?

Also, the Mycelium "Add Unrelated Account" screen says that

Scan Bitcoin address, private key or HD-Account.

What format does "HD-Account" mean? Is it WIF?

sevcsik
  • 183
  • 1
  • 7