Skip to main content

Ledger

Represents the Mina ledger.

Constructors

new Ledger()

new Ledger(): Ledger

Returns

Ledger

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

snarky.d.ts:492


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

snarky.d.ts:497


getAccount()

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

Returns an account.

Parameters

publicKey: MlPublicKey

tokenId: FieldConst

Returns

undefined | Account

Source

snarky.d.ts:506


create()

static create(): Ledger

Creates a fresh ledger.

Returns

Ledger

Source

snarky.d.ts:487