Wallet to manager accounts.
Kind: global class
- Wallet
- new Wallet(networkId)
- .setNetworkId(networkId)
- .has(address) ⇒
boolean - .delete(address) ⇒
boolean - .clear()
- .set(address, account) ⇒
any - .get(address) ⇒
Account - .addPrivateKey(privateKey) ⇒
PrivateKeyAccount - .addRandom([entropy]) ⇒
PrivateKeyAccount - .addKeystore(keystore, password) ⇒
PrivateKeyAccount
| Param | Type |
|---|---|
| networkId | number |
Set network id
Kind: instance method of Wallet
| Param | Type |
|---|---|
| networkId | number |
Check if address exist
Kind: instance method of Wallet
| Param | Type |
|---|---|
| address | string |
Drop one account by address
Kind: instance method of Wallet
| Param | Type |
|---|---|
| address | string |
Drop all account in wallet
Kind: instance method of Wallet
Kind: instance method of Wallet
| Param | Type | Description |
|---|---|---|
| address | any |
Key of account, usually is address |
| account | any |
Account instance |
Kind: instance method of Wallet
| Param | Type |
|---|---|
| address | string |
Kind: instance method of Wallet
| Param | Type | Description |
|---|---|---|
| privateKey | string | Buffer |
Private key of account |
Kind: instance method of Wallet
| Param | Type | Description |
|---|---|---|
| [entropy] | string | Buffer |
Entropy of random account |
Kind: instance method of Wallet
| Param | Type | Description |
|---|---|---|
| keystore | object |
Keystore version 3 object. |
| password | string | Buffer |
Password for keystore to decrypt with. |