I wrote a script that derivate keys on a given derivate path. I tested it here, and the results are for the path m/44'/60'/0'/0/0 matched. My goal is to generate a mnemonic phrase, and then derive an account from it, similar to the metamask account from this phrase. So, I am convinced that my script is working correctly (I also tested it on test vectors from the bip32 specification). However, when I generate a mnemonic phrase and then insert it into metamask, then my script and metamask give out different accounts. I use the derive path m/44'/66'/0'/0 according to the metamask specification, however, the accounts received are different. Maybe someone has encountered something like this, or I don't know something about the derivate of keys in metamask?

  • Can you share the source code? Any change in the derivation path will affect the calculated address. Try m/44'/60'/0'/0/0 or m/44'/60'/0'/0 (some wallets adds the extra /0 automatically). The derivation path has been standardized for several years ethereum.stackexchange.com/questions/19055/….
    – Ismael
    Apr 26, 2023 at 18:57


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.