Ledger
Represents the Mina ledger.
Constructors
new Ledger()
new Ledger(): Ledger
Returns
Methods
addAccount()
addAccount(publicKey: MlPublicKey, balance: string): void
Adds an account and its balance to the ledger.
Parameters
• publicKey: MlPublicKey
• balance: string
Returns
void
Source
applyJsonTransaction()
applyJsonTransaction(
txJson: string,
accountCreationFee: string,
networkState: string): void
Applies a JSON transaction to the ledger.
Parameters
• txJson: string
• accountCreationFee: string
• networkState: string
Returns
void
Source
getAccount()
getAccount(publicKey: MlPublicKey, tokenId: FieldConst): undefined | Account
Returns an account.
Parameters
• publicKey: MlPublicKey
• tokenId: FieldConst
Returns
undefined
| Account
Source
create()
static create(): Ledger
Creates a fresh ledger.