@capxul/sdk
v1.0.0-alpha.18
Published
The imperative TypeScript client for Capxul. It owns the public `createCapxulClient` factory, domain method bundles, production adapter assembly, and the internal Effect-based ports and flows that those methods bridge.
Readme
@capxul/sdk
The imperative TypeScript client for Capxul. It owns the public
createCapxulClient factory, domain method bundles, production adapter assembly,
and the internal Effect-based ports and flows that those methods bridge.
import { createCapxulClient } from "@capxul/sdk";
const created = await createCapxulClient({
publishableKey: process.env.CAPXUL_PUBLISHABLE_KEY!,
requirement: "counterfactual",
});
if (!created.ok) throw created.error;
const client = created.value;Every public operation resolves a Promise<CapxulResult<T>>. Domain failures
are values, not thrown exceptions.
Published entry points
The packed npm package exposes only:
@capxul/sdk— the client factory, public method and value types, signers, and observation helpers.@capxul/sdk/node— Node-only signer and runtime helpers.@capxul/sdk/ports/safe-deployment— the explicitly published Safe deployment contract.
The many extra subpaths in package.json#exports are workspace development
surfaces. Do not show them in consumer examples unless publishConfig.exports
also contains them.
Documentation
- Maintainer context — ownership, boundaries, invariants, evidence, and update triggers.
- Architecture — client assembly, flows, ports, adapters, and proof map.
- Observation — host-owned failure observation and bounded backend linkage.
- Public SDK documentation — tutorials, guides, reference, and explanation for npm consumers.
React integration is a separate projection owned by @capxul/sdk-react.
Development
Run package commands through Vite+:
vp run --filter @capxul/sdk check-types
vp run --filter @capxul/sdk test
vp run --filter @capxul/sdk build
vp run --filter @capxul/sdk proofs:liveproofs:live runs the deterministic Organization Core SDK journey against the
configured live Convex deployment and Base Sepolia. Live proofs require
operator secrets and prove only the path named by the command. See
maintainer context.
