DocsReference@proto-kit/sequencerClassesInMemoryMessageStorage

@proto-kit/sequencerDocs


Documentation / @proto-kit/sequencer / InMemoryMessageStorage

Class: InMemoryMessageStorage

Interface to store Messages previously fetched by a IncomingMessageadapter

Implements

Constructors

new InMemoryMessageStorage()

new InMemoryMessageStorage(): InMemoryMessageStorage

Returns

InMemoryMessageStorage

Methods

getMessageBatches()

getMessageBatches(fromMessagesHash, toMessagesHash): Promise<object[]>

Parameters

fromMessagesHash: string

toMessagesHash: string

Returns

Promise<object[]>

Implementation of

MessageStorage.getMessageBatches

Defined in

packages/sequencer/src/storage/inmemory/InMemoryMessageStorage.ts:33


getNextMessagesBatch()

getNextMessagesBatch(fromMessagesHash): Promise<undefined | object>

Parameters

fromMessagesHash: string

Returns

Promise<undefined | object>

Implementation of

MessageStorage.getNextMessagesBatch

Defined in

packages/sequencer/src/storage/inmemory/InMemoryMessageStorage.ts:15


pushMessages()

pushMessages(fromMessagesHash, toMessagesHash, messages): Promise<void>

Parameters

fromMessagesHash: string

toMessagesHash: string

messages: PendingTransaction[]

Returns

Promise<void>

Implementation of

MessageStorage.pushMessages

Defined in

packages/sequencer/src/storage/inmemory/InMemoryMessageStorage.ts:61