I have such a question after studying BIP44 path. The last parameter in it is address_index - the wallet number that can be obtained using the seed created from this phrase. Whereas the metamask opens my wallet according to the phrase. is address_index always zero?
1 Answer
A wallet is determined from a mnemonic phrase using a process called HD (Hierarchical Deterministic) wallet generation, specified in these industry standards:
- BIP39 - To generate a human-readable representation of a Seed & converting the mnemonic phrase to a binary seed (hashing the mnemonic with a salt)
- BIP32 - To generate a BIP32 HD wallet, this wallet can be used to generate an infinite number of private/public key pairs in a deterministic manner.
- BIP44 - It specifies the structure of the generated wallet.
address_index doesn't always have to be zero, it is incremented to generate new addresses. When you create a new account using MetaMask it is zero by default for the first address and when you create a new address MetaMask automatically increases address_index by 1.