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