@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / react / SomniaMarketsProvider

Function: SomniaMarketsProvider()

SomniaMarketsProvider(__namedParameters): ReactNode

Defined in: packages/sdk/src/hooks.ts:85

Provide the SDK's engine tier to the hooks below. Build one exchange (new SomniaMarkets(...)) near the root of your app and pass it as exchange — every hook then accepts a chainId filter to read any chain the exchange spans. Passing client (one engine) is the single-chain form and keeps working unchanged.

Parameters

__namedParameters

client?

SomniaMarketsClient

One engine. Every hook reads it, and a chainId filter must name its chain.

exchange?

SomniaMarkets

A (possibly multi-chain) exchange. Hooks read its primary engine unless filtered.

children

ReactNode

Returns

ReactNode