Skip to main content

Function: useKea()

function useKea(): KeaContextValue;

Defined in: useKea.ts:31

Low-level hook that returns the full KeaContextValue from the nearest KeaProvider. Prefer useWallet or useAccounts for most use cases.

Returns

KeaContextValue

The complete Kea context value

Remarks

Provides direct access to the sdk instance for advanced use cases such as subscribing to lower-level events (lock, error) or calling SDK methods not exposed by the higher-level hooks.

Throws

Error if called outside of a <KeaProvider>

Example

function DebugPanel() {
const { sdk, error } = useKea();
return <pre>{JSON.stringify({ initialized: !!sdk, error }, null, 2)}</pre>;
}

See