Skip to main content

Ledger

o1js / Modules / Ledger

Class: Ledger

Represents the Mina ledger.

Table of contents

Constructors

Methods

Constructors

constructor

new Ledger()

Methods

addAccount

addAccount(publicKey, balance): void

Adds an account and its balance to the ledger.

Parameters

NameType
publicKeyMlPublicKey
balancestring

Returns

void

Defined in

snarky.d.ts:395


applyJsonTransaction

applyJsonTransaction(txJson, accountCreationFee, networkState): void

Applies a JSON transaction to the ledger.

Parameters

NameType
txJsonstring
accountCreationFeestring
networkStatestring

Returns

void

Defined in

snarky.d.ts:400


getAccount

getAccount(publicKey, tokenId): undefined | Account

Returns an account.

Parameters

NameType
publicKeyMlPublicKey
tokenIdUint8Array

Returns

undefined | Account

Defined in

snarky.d.ts:409


create

Static create(): Ledger

Creates a fresh ledger.

Returns

Ledger

Defined in

snarky.d.ts:390