Account

constructor(accountId: String, sequenceNumber: Long)

Creates a new account from an account ID and sequence number.

This constructor creates an account with a public-only keypair (derived from the account ID). Such an account can be used to build transactions, but cannot sign them unless a keypair with a private key is provided separately.

Parameters

accountId

The account ID (strkey encoded public key starting with 'G')

sequenceNumber

The current sequence number of the account

Throws

if the account ID is invalid


constructor(keypair: KeyPair, sequenceNumber: Long)

Creates a new account from a keypair and sequence number.

This constructor creates an account that can both build and sign transactions (if the keypair contains a private key).

Parameters

keypair

The keypair for this account (may or may not contain a private key)

sequenceNumber

The current sequence number of the account