Skip to main content

Read hooks

Query hooks return React Query results (data, error, isFetching, isError, refetch). Use isFetching for network spinners; disabled queries can be pending without fetching. Confidential queries disable automatic retry and focus/reconnect refetching; stale time is 15 seconds. Public queries inherit host policies. History/assets retry through the core HTTP layer. ReadOptions applies to history/assets: enabled?, refetchInterval? (ms), keepPreviousData? (same-owner page transitions). Hooks supply React Query’s cancellation signal.
Import the referenced hooks, types, and helpers; render under React providers.

Mutation hooks

WriteOptions<TData, TVars>: onSuccess(data, variables)?, onError(error, variables)?. Transaction hooks invalidate client queries on success. useDecrypt() supports per-call callbacks only. Disable automatic retries for signing mutations in your QueryClient.

Network guard

ChainGuard exposes wrongNetwork, chainId, chainName, switching, and switchNetwork(). Switching does not submit a transaction.