@somnia-chain/markets-sdk


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

Interface: QueryKeyChainOptions

Defined in: packages/sdk/src/queryKeys.ts:68

Trailing chain scope of a query-key factory. Pass the chain of the engine that serves the read. Omit it in a single-chain app: the key is then the same key the factory produced before it took a chain.

A key with a chain is the key without one plus a last { chainId } element. So a key without a chain, used as a prefix filter (TanStack Query's default for invalidation), also matches every chain's entry. A key with a chain never matches an entry stored without one, even on the primary chain. On a multi-chain exchange, pass chainId on every key.

Properties

chainId?

optional chainId?: number

Defined in: packages/sdk/src/queryKeys.ts:70

Numeric chain id of the engine that serves the read.