中文 / English
HD Wallet (Hierarchical Deterministic Wallet), Wallet Protocol: BIP32, BIP44, BIP39 Wallet Principle
Created by:
- Random number
- Private key
- Mnemonic
- keystore A Keystore file is a file format (JSON) in which the Ethereum wallet stores private keys. Use the password set by the user to encrypt to a certain extent, and the degree of protection depends on the password strength of the user to encrypt the wallet.
- Brain wallets (etherjs 5 has been removed)
- Etherscan Provider: It requires two parameters to connect the Etherscan API, one is the network name, and the other is the token required to query the API (the API token is not necessary when querying the Etherscan API, but if not, the subject will be limited of 5 calls per second).
- Json Rpc Provider: The Provider that connects to the local Ethereum network.
- Infura Provider: The Provider that connects to the Infura network. Infura is a set of Ethereum infrastructure services, and also has the Ethereum main network and test network.
- Web3 Provider: A provider that connects to an existed web3 object.
- Fallback Provider: Connect to a group of providers that can be of various types. If there is a problem with the previous provider, it will automatically connect to the latter.
const provider = providers.getDefaultProvider();
const wallet = new Wallet(privateKey, provider);
or
const wallet = new Wallet(privateKey);
wallet.provider = provider;
If you use a normal JS number object to store the operation, it may cause abnormal results due to data overflow.