Creates an account object from a secret key
Readonly
addressThe address of the account.
Local copy of the account nonce. Must be explicitly managed by client code.
Readonly
publicThe public key of the account.
Readonly
secretThe secret key of the account.
Gets the nonce (the one from the object's state) and increments it.
Increments (locally) the nonce (the account sequence number).
Saves the wallet to a keystore file
Saves the wallet to a pem file
Signs using the secret key of the account.
Serializes the message, computes the signature and returns it.
Serializes the transaction, computes the signature and returns it.
Verifies the signature using the public key of the account.
Verifies the message signature using the public key of the account.
Verifies the transaction signature using the public key of the account.
Static
newStatic
newNamed constructor Loads a secret key from an encrypted keystore file. Handles both keystores that hold a mnemonic and ones that hold a secret key (legacy). For keystores that hold an encrypted mnemonic, the optional "addressIndex" parameter is used to derive the desired secret key. Returns an Account object, initialized with the secret key.
Optional
addressIndex: numberStatic
newNamed constructor Loads (derives) a secret key from a mnemonic. The optional "addressIndex" parameter is used to guide the derivation. Returns an Account object, initialized with the secret key.
Static
newNamed constructor Loads a secret key from a PEM file. PEM files may contain multiple accounts - thus, an (optional) "index" is used to select the desired secret key. Returns an Account object, initialized with the secret key.
An abstraction representing an account (user or Smart Contract) on the Network.