useClient
Reads the Kit client published by the nearest ClientProvider. Throws a SolanaError with code SOLANA_ERROR__REACT__MISSING_PROVIDER if no provider is mounted in the ancestor tree.
Defaults to the base Client shape. Callers who know a specific plugin is installed may
widen the type via the generic — this is a pure cast with no runtime capability check, so reach
for useClientCapability when a missing plugin should fail loudly at mount instead of
surfacing later as undefined.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TClient extends object | object | The shape the client is expected to satisfy. Pure type assertion. |
Returns
Client<TClient>