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
booleanCheck if address exist
Kind: instance method of Wallet
address
string
wallet.delete(address) ⇒ boolean
booleanDrop 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
anyKind: instance method of Wallet
address
any
Key of account, usually is address
account
any
Account instance
wallet.get(address) ⇒ Account
AccountKind: instance method of Wallet
address
string
wallet.addPrivateKey(privateKey) ⇒ PrivateKeyAccount
PrivateKeyAccountKind: instance method of Wallet
privateKey
string | Buffer
Private key of account
wallet.addRandom([entropy]) ⇒ PrivateKeyAccount
PrivateKeyAccountKind: instance method of Wallet
[entropy]
string | Buffer
Entropy of random account
wallet.addKeystore(keystore, password) ⇒ PrivateKeyAccount
PrivateKeyAccountKind: instance method of Wallet
keystore
object
Keystore version 3 object.
password
string | Buffer
Password for keystore to decrypt with.
Last updated
Was this helpful?