Skip to main content
Version: 2.4.0

Ledger

Defined in: snarky.d.ts:499

Represents the Mina ledger.

Constructors​

new Ledger()​

new Ledger(): Ledger

Returns​

Ledger

Methods​

addAccount()​

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

Defined in: snarky.d.ts:508

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: snarky.d.ts:513

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: snarky.d.ts:522

Returns an account.

Parameters​

publicKey​

MlPublicKey

tokenId​

FieldConst

Returns​

undefined | Account


create()​

static create(): Ledger

Defined in: snarky.d.ts:503

Creates a fresh ledger.

Returns​

Ledger