AergoClient.accounts¶
-
class
Accounts
(aergo)¶ exported from
accounts/index
Accounts controller. It is exposed at aergoClient.accounts.
Arguments: - aergo (any) –
-
Accounts.
aergo
¶ type: any
-
Accounts.
client
¶ type: any
-
Accounts.
create
(passphrase)¶ Create a new account in the node.
Arguments: - passphrase (string) –
Returns: Promise<models/address.Address> – newly created account address
-
Accounts.
get
()¶ Get list of accounts.
Returns: Promise<models/address.Address[]> – list of account addresses
-
Accounts.
lock
(address, passphrase)¶ Lock account.
Arguments: - address (models/address.Address|string) –
- passphrase (string) –
Returns: Promise<models/address.Address> – locked account address
-
Accounts.
sendTransaction
(tx)¶ Convenience method to send transaction from account. This method automatically retrieves the nonce, signs the transaction, and sends it to the network.
Arguments: - tx (any) – transaction data
Returns: Promise<string> – transaction hash
-
Accounts.
signTransaction
(_tx)¶ Sign transaction.
Arguments: - _tx (models/tx.Tx|object) –
Returns: Promise<models/tx.Tx> – transaction data including signature
-
Accounts.
unlock
(address, passphrase)¶ Unlock account.
Arguments: - address (models/address.Address|string) –
- passphrase (string) –
Returns: Promise<models/address.Address> – unlocked account address