Skip to content

Account

@aeternity/aepp-sdk/es/account

Account module

Example

import Account from '@aeternity/aepp-sdk/es/account'

Account([options]) ⇒ Object

Basic Account Stamp

Attempting to create instances from the Stamp without overwriting all abstract methods using composition will result in an exception.

Account is one of the three basic building blocks of an Ae client and provides access to a signing key pair.

Kind: Exported function
Returns: Object - Account instance
rtype: Stamp

Param Type Default Description
[options] Object {} Initializer object
options.networkId String NETWORK_ID using for signing transaction's

account.signTransaction(tx, opt) ⇒ String

Sign encoded transaction

Kind: instance method of Account
Returns: String - Signed transaction
Category: async
rtype: (tx: String) => tx: Promise[String], throws: Error

Param Type Description
tx String Transaction to sign
opt Object Options

account.getNetworkId() ⇒ String

Obtain networkId for signing

Kind: instance method of Account
Returns: String - NetworkId
Category: async
rtype: () => networkId: String

account.sign(data) ⇒ String

Sign data blob

Kind: instance abstract method of Account
Returns: String - Signed data blob
Category: async
rtype: (data: String) => data: Promise[String]

Param Type Description
data String Data blob to sign

account.address() ⇒ String

Obtain account address

Kind: instance abstract method of Account
Returns: String - Public account address
Category: async
rtype: () => address: Promise[String]