Defi decentralized wallet development - Huashang g
Wallets are classified according to the two dimensions of private key generation and private key storage. Each dimension can be further subdivided. Different users can choose their own wallets according to their own needs. Development details of decentralized wallet system.
1. Classification of private key generation methods
The wallet can be divided into "non deterministic wallet", "deterministic wallet" and "hierarchical deterministic wallet" due to the different methods of generating the private key used by the account in the wallet. The generation of private keys in "uncertain wallet" has no correlation and is independent of each other. The "deterministic wallet" is generated by the algorithm through the "seed", in which the familiar "mnemonic" mode is to generate the private key in the form of seed.
The "hierarchical deterministic wallet" introduces the concept of "master private key" on the basis of "deterministic wallet", which is hierarchical in terms of the generation process of private key. At the same time, in order to compare different private key generation processes, the author takes finding leaves as an example to illustrate the generation process of private key and the process of finding private key through mnemonics.
2. Private key storage classification
According to different storage methods of private keys, wallets can be divided into "centralized wallets" and "decentralized wallets". More frankly, the private key of "decentralized wallets" is in the hands of users, while the private key of centralized wallets is often in the hands of one project party. There is no cold wallet in the centralized wallet. After all, all the centralized wallets need to touch the Internet. At present, users have digital currencies in centralized exchanges, which can also be considered as stored in centralized wallets.
"Decentralized wallet" is more popular with block users because the private key is in the hands of users. The "decentralized wallet" can be divided into hot wallet and cold wallet according to whether the wallet touches the Internet. The mobile version, desktop version and web version of applications that we commonly use that need to be connected to the Internet belong to hot wallet. The application of writing the private key on non net touching paper or writing non net touching hardware belongs to cold wallet.