@proto-kit/sequencerDocs


Documentation / @proto-kit/sequencer / AsyncStateService

Interface: AsyncStateService

This Interface should be implemented for services that store the state in an external storage (like a DB). This can be used in conjunction with CachedStateService to preload keys for In-Circuit usage.

Properties

commit()

commit: () => Promise<void>

Returns

Promise<void>

Defined in

packages/sequencer/src/state/async/AsyncStateService.ts:16


get()

get: (key) => Promise<undefined | Field[]>

Parameters

key: Field

Returns

Promise<undefined | Field[]>

Defined in

packages/sequencer/src/state/async/AsyncStateService.ts:22


getMany()

getMany: (keys) => Promise<StateEntry[]>

Parameters

keys: Field[]

Returns

Promise<StateEntry[]>

Defined in

packages/sequencer/src/state/async/AsyncStateService.ts:20


openTransaction()

openTransaction: () => Promise<void>

Returns

Promise<void>

Defined in

packages/sequencer/src/state/async/AsyncStateService.ts:14


writeStates()

writeStates: (entries) => void

Parameters

entries: StateEntry[]

Returns

void

Defined in

packages/sequencer/src/state/async/AsyncStateService.ts:18