Packed exports
Import paths that exist in the published @capxul/sdk npm package.
The published package exposes exactly three entry points:
| Import | Audience | Contents |
|---|---|---|
@capxul/sdk | Browser and Node consumers | createCapxulClient, client/method/value types, public signers, errors, and host observability. |
@capxul/sdk/node | Node consumers | localPrivateKeySigner plus Node auth-cache utilities. |
@capxul/sdk/testing | Test consumers | The real identity client over deterministic in-memory ports, plus bounded test controls. |
This table follows the packed package's publishConfig.exports, not the
workspace source manifest.
@capxul/sdk/ports/safe-deployment was the third packed entry point until
alpha.23. It carried a fakes-only port — Safe deployment is orchestrated by the
backend through SmartAccountPort, and the port's only real implementation was
an E2E-internal live adapter. It is gone; the two data shapes it contributed to
the public surface (SafeDeploymentConfig, SafeDeploymentEvidence) are still
reachable from the root @capxul/sdk barrel.
Root examples
import {
createCapxulClient,
formatMoney,
injectedWalletSigner,
isMoneyParseError,
parseMoney,
PAYMENT_DIRECTIONS,
PAYMENT_STATUSES,
postHogObservability,
type CapxulClient,
type CapxulClientInput,
type CapxulResult,
type Holding,
type Money,
} from "@capxul/sdk";Node example
import { localPrivateKeySigner } from "@capxul/sdk/node";Testing example
import { createCapxulTestClient } from "@capxul/sdk/testing";
const testing = createCapxulTestClient();
await testing.seedIdentity({ authUserId: "auth_seeded_test", email: "test@example.test" });
await testing.clock.advance(1_000);
await testing.client.auth.signIn({ email: "test@example.test" });
const otp = testing.peekOtp("test@example.test");
if (!otp) throw new Error("expected a test OTP");
await testing.client.auth.verifyOtp({ email: "test@example.test", code: otp });
await testing.close();This entry drives the production identity actor and client assembly over
in-memory ports. It captures transition and observation records without a
network exit. A seeded email verifies as its requested auth user ID. The clock
control exposes only advance(ms); it does not publish the internal clock
adapter, its Effect/conformance methods, the internal assembler, or nested test
adapters.
Workspace-only paths
Source checkouts expose additional adapter, flow, port, environment, and
testing subpaths to monorepo packages. Those paths are not included in the npm
tarball export map. In particular, do not publish consumer examples using
@capxul/sdk/production, @capxul/sdk/flows,
@capxul/sdk/adapters/*, or nested @capxul/sdk/testing/* paths.
An entry in the workspace exports map is not proof that an npm consumer can import it. Pack
verification is the authority.
The Node auth-cache helper is packed, but the root CapxulClientInput has no
authCache field. It cannot currently be passed to the public factory; see the
Node guide.