Account

Account

Create a new Account object.

Account represents a single account in the DigitalBits network and its sequence number. Account tracks the sequence number as it is used by TransactionBuilder. See Accounts for more information about how accounts work in DigitalBits.

Constructor

new Account(accountId, sequence)

Source:
Parameters:
Name Type Description
accountId string

ID of the account (ex. GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA). If you provide a muxed account address, this will throw; use MuxedAccount instead.

sequence string

current sequence number of the account

Methods

accountId() → {string}

Returns DigitalBits account ID, ex. GB3KJPLFUYN5VL6R3GU3EGCGVCKFDSD7BEDX42HWG5BWFKB3KQGJJRMA.

Source:
Returns:
Type:
string

createSubaccount(id) → {MuxedAccount}

Creates a muxed "sub"account with this base address and an ID set.

Source:
See:
Parameters:
Name Type Description
id string

the ID of the new muxed account

Returns:
Type:
MuxedAccount

a new instance w/ the specified parameters

incrementSequenceNumber() → {void}

Increments sequence number in this object by one.

Source:
Returns:
Type:
void

sequenceNumber() → {string}

Source:
Returns:
Type:
string

sequence number for the account as a string