@somnia-chain/markets-sdk


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

Function: useSomniaMarketsClient()

useSomniaMarketsClient(chainId?): SomniaMarketsClient

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

The SomniaMarketsClient from the nearest provider — the primary chain's engine, or the engine of chainId when given. Throws if there isn't a provider, or if the provider does not span chainId.

Parameters

chainId?

number

Returns

SomniaMarketsClient

Throws

No SomniaMarketsProvider is present in the component tree.