recently i played with the tool generation of HD address on https://iancoleman.github.io/bip39/. after input mnemonic code and check the derivation path, why is there Account Extended Public Key & BIP32 Extended Public Key? What's the difference between 2? Can i use Account xpubkey to generate the same address as bip32 xpubkey?

please advice,


BIP 44 just specifies a structure for organising keys using BIP 32 style generation. The tree structure is this:

 m / purpose' / coin_type' / account' / change / address_index

Generally, m refers to your BIP 32 master private key generated from the mnemonic in BIP 39. But all children extended keys are also extended parents if you want them to be - all can have children. So Account extended public key will just be the extended public key generated as a child of the coin_type extended key from the hierarchy above.

  • if that's the case, is it possible to get extended public key from Account extended public key? perhaps a suggestion of library would be helpful; please advice Aug 26 '17 at 16:03
  • It's not possible to find the parent from the child, you can only go down the tree not up.
    – meshcollider
    Aug 26 '17 at 20:42
  • i see, will it be possible to derive deterministic address from account extended public key? Aug 27 '17 at 18:14
  • Of course, that's what the levels below it in the tree are - change and address_index. Please accept my answer if it has satisfied your question btw :)
    – meshcollider
    Aug 27 '17 at 23:38
  • BIP 32 master private key is equal to BIP32 Root Key ? Jul 28 '20 at 12:20

I've just had the same question.

So if you go to https://iancoleman.io/bip39/ and use mnemonic zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong"and ETH-Ethereum, you would get the same result as the following code:

const seed = Bip39.mnemonicToSeedSync(mnemonic); 

console.log("BIP39 Seed = ", seed);

const hdkey = HDKey.fromMasterSeed(seed);

console.log("BIP32 Root Key = ", hdkey.privateExtendedKey);

console.log("Account Extended Private Key = ", hdkey.derive("m/44'/60'/0'").privateExtendedKey);

console.log("BIP32 Extended Private Key = ", hdkey.derive("m/44'/60'/0'/0").privateExtendedKey);

it was contr intuitive for me, that "Account Extended Private Key" is the ancestor of "BIP32 Extended Private Key". So yes, you can use the account key to derive all child keys (xpub->xpub, xprv->all).
Hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.