Skip to main content

Ledger

SnarkyJS / 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:393


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:398


getAccount

getAccount(publicKey, tokenId): undefined | Account

Returns an account.

Parameters

NameType
publicKeyMlPublicKey
tokenIdUint8Array

Returns

undefined | Account

Defined in

snarky.d.ts:407


create

Static create(): Ledger

Creates a fresh ledger.

Returns

Ledger

Defined in

snarky.d.ts:388