@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / WaitForIndexedBlockOptions

Type Alias: WaitForIndexedBlockOptions

WaitForIndexedBlockOptions = object

Defined in: packages/sdk/src/syncStatus.ts:160

Options for SomniaMarketsClient.waitForIndexedBlock. All optional.

Properties

timeoutMs?

optional timeoutMs?: number

Defined in: packages/sdk/src/syncStatus.ts:169

Give up after this many milliseconds (default 30,000).

The deadline is checked between polls, so the wait performs at least one read even at 0, and a metadata request already in flight is allowed to finish and decide: a reply that arrives late but reports the block as processed resolves rather than failing.


pollMs?

optional pollMs?: number

Defined in: packages/sdk/src/syncStatus.ts:176

Milliseconds between polls (default 500, minimum 100). Each poll is one small chain_metadata read, and several waiters share one indexer — 500ms keeps a waiting client at two requests per second while staying well inside the indexing delay it is waiting on.


signal?

optional signal?: AbortSignal

Defined in: packages/sdk/src/syncStatus.ts:181

Abort the wait. The caller's own abort reason is rethrown unchanged, and the owner's configured signal aborts it as well — whichever fires first.