Capxul Docs
Reference

CapxulProvider reference

Props, ownership, bootstrap states, and cache behavior.

CapxulProvider requires exactly one bootstrap mode.

PropModeMeaning
publishableKey: stringcreated clientrequired bootstrap credential
client: CapxulClientinjected clientcaller-owned, already-created client
requirement?created clientnone, counterfactual, or deployed readiness target
signer?created clientoptional consumer-held deployment signer
observation?created clienthost-owned SDK failure observation adapter
queryClient?bothTanStack cache pinned at mount
childrenbothReact subtree receiving both contexts

Created-client mode calls createCapxulClient, exposes bootstrap status, and closes the created client on teardown or re-bootstrap. Injected-client mode is ready immediately and leaves disposal with the caller.

useCapxul() returns:

type CapxulBootstrapStatus = "bootstrapping" | "ready" | "error";

interface CapxulBootstrapState {
  status: CapxulBootstrapStatus;
  error: CapxulError | null;
  retry(): void;
}