DocsReference@proto-kit/sequencerClassesMinaTransactionSimulator

@proto-kit/sequencer β€’ Docs


Documentation / @proto-kit/sequencer / MinaTransactionSimulator

Class: MinaTransactionSimulator

Custom variant of the ocaml ledger implementation that applies account updates to a ledger state. It isn’t feature complete and is mainly used to update the o1js internal account cache to create batched transactions

Constructors

new MinaTransactionSimulator()

new MinaTransactionSimulator(baseLayer): MinaTransactionSimulator

Parameters

β€’ baseLayer: MinaBaseLayer

Returns

MinaTransactionSimulator

Defined in

packages/sequencer/src/settlement/transactions/MinaTransactionSimulator.ts:41

Methods

apply()

apply(account, au): void

Parameters

β€’ account: Account

β€’ au: AccountUpdate

Returns

void

Defined in

packages/sequencer/src/settlement/transactions/MinaTransactionSimulator.ts:260


applyFeepayer()

applyFeepayer(account, feepayer): void

Parameters

β€’ account: Account

β€’ feepayer: FeePayerUnsigned

Returns

void

Defined in

packages/sequencer/src/settlement/transactions/MinaTransactionSimulator.ts:255


applyTransaction()

applyTransaction(tx): Promise<void>

Parameters

β€’ tx: Transaction<boolean, boolean>

Returns

Promise<void>

Defined in

packages/sequencer/src/settlement/transactions/MinaTransactionSimulator.ts:90


checkFeePayer()

checkFeePayer(account, feepayer): boolean

Parameters

β€’ account: Account

β€’ feepayer: FeePayerUnsigned

Returns

boolean

Defined in

packages/sequencer/src/settlement/transactions/MinaTransactionSimulator.ts:212


checkPreconditions()

checkPreconditions(account, au): string[]

Parameters

β€’ account: Account

β€’ au: AccountUpdate

Returns

string[]

Defined in

packages/sequencer/src/settlement/transactions/MinaTransactionSimulator.ts:219


getAccount()

getAccount(publicKey, tokenId?): Promise<Account>

Parameters

β€’ publicKey: PublicKey

β€’ tokenId?: Field

Returns

Promise<Account>

Defined in

packages/sequencer/src/settlement/transactions/MinaTransactionSimulator.ts:146


getAccounts()

getAccounts(tx): Promise<Account[]>

Parameters

β€’ tx: Transaction<boolean, boolean>

Returns

Promise<Account[]>

Defined in

packages/sequencer/src/settlement/transactions/MinaTransactionSimulator.ts:84


reloadAccount()

reloadAccount(publicKey, tokenId?): Promise<void>

Parameters

β€’ publicKey: PublicKey

β€’ tokenId?: Field

Returns

Promise<void>

Defined in

packages/sequencer/src/settlement/transactions/MinaTransactionSimulator.ts:167