All Vite official wallets are HD wallets. For specific derivation rules, please visit: VEP-3
For the HD protocol, please visit: HD Protocol, HD Wallet, BIP3
To generate the private key, Vite wallet will
ed25519 blake2b seed;
coin_type666666 has been registered as Vite at SLIP-0044.
When creating an account in the wallet, user needs to enter a password, which is not
Two-Factor Seed Phrases, but one of the parameters we encrypt BIP39 entropy. The specific encryption is different in iOS wallet, web wallet and go-vite built-in wallet
A single mnemonic, under the rule of
vep-3: m/44'/666666'/x', theoretically can derive
2^32-1 addresses. So how does the wallet restore the account from the mnemonic phrase if the user forgets his private key, or even his Vite address as well?
In web wallet, iOS wallet and Android wallet(yet to be released), a default maximum of 10 addresses are generated from one mnemonic phrase. When restoring account, the wallet will traverse the 0-9 address to check whether they are used. For example, if a transaction is found on the 8th address, the wallet will immediately restore all the addresses of 0-8. Therefore, do remember your mnemonic, because from which your lost accounts/private keys can always be found back.
You can directly integrate go-vite wallet module in your project. After creating the mnemonic and having it unlocked, you will have
entropystore.Manager object with two methods:
DeriveForFullPath: As method name suggests, the complete prefix
m/44'/666666'/x' is passed in to derive address and private key. This method can also be used at a very large scale such as the required addresses exceed 2^32. To meet this purpose, passing in
uint32 values indicating different sub levels, each of which has
2^32-1 sub addresses associated).
DeriveForIndexPath: After passing in a
x, this method will compose a prefix string of
m/44'/666666'/x' and call
DeriveForFullPath, then return related private key and account address. Up to
2^32-1 addresses can be generated by this method.