Skip to main content

Ledger

Defined in: bindings.d.ts:505

Represents the Mina ledger.

Constructors

Constructor

new Ledger(): Ledger;

Returns

Ledger

Methods

addAccount()

addAccount(publicKey: MlPublicKey, balance: string): void;

Defined in: bindings.d.ts:514

Adds an account and its balance to the ledger.

Parameters

publicKey

MlPublicKey

balance

string

Returns

void


applyJsonTransaction()

applyJsonTransaction(
txJson: string,
accountCreationFee: string,
networkState: string): void;

Defined in: bindings.d.ts:519

Applies a JSON transaction to the ledger.

Parameters

txJson

string

accountCreationFee

string

networkState

string

Returns

void


getAccount()

getAccount(publicKey: MlPublicKey, tokenId: FieldConst): undefined | Account;

Defined in: bindings.d.ts:528

Returns an account.

Parameters

publicKey

MlPublicKey

tokenId

FieldConst

Returns

undefined | Account


create()

static create(): Ledger;

Defined in: bindings.d.ts:509

Creates a fresh ledger.

Returns

Ledger