get acounts addresses
accounts addresses
get the signer of the account, by default, using the first account
Add an account using privateKey
keystore jsonString to add
password to decrypt the file
return added Account
Add account using Mnemonic phrases
Mnemonic phrase
index to hdKey root
Add an account using privateKey
privateKey to add
return added Account
create a new account using Mnemonic
{description}
To decrypt an account that lives in the wallet,if not encrypted, return original, if not found, throw error
address in accounts
string that used to encrypt
To encrypt an account that lives in the wallet. if encrypted, returns original one, if not found, throw error
address in accounts
string that used to encrypt
encryption options
Get Account instance using address as param
address hex
Account instance which lives in Wallet
Mnemonics
Set Customer Messenage
Set signer
one of the address in the accounts
Generated using TypeDoc
const { Wallet } = require('@harmony-js/account'); const { HttpProvider, Messenger } = require('@harmony-js/network'); const { ChainType, ChainID } = require('@harmony-js/utils'); // create a custom messenger const customMessenger = new Messenger( new HttpProvider('http://localhost:9500'), ChainType.Harmony, // if you are connected to Harmony's blockchain ChainID.HmyLocal, // check if the chainId is correct ) const wallet = new Wallet(customMessenger);