@capxul/sdk 0.2.0-alpha.3 → 0.2.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -266
- package/dist/InMemoryAuthCacheAdapter-BK-B_ERB.mjs +113 -0
- package/dist/InMemoryAuthCacheAdapter-BK-B_ERB.mjs.map +1 -0
- package/dist/index.d.mts +1263 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +4740 -0
- package/dist/index.mjs.map +1 -0
- package/dist/node/index.d.mts +55 -0
- package/dist/node/index.d.mts.map +1 -0
- package/dist/node/index.mjs +159 -0
- package/dist/node/index.mjs.map +1 -0
- package/dist/ports/safe-deployment.d.mts +2 -0
- package/dist/ports/safe-deployment.mjs +38 -0
- package/dist/ports/safe-deployment.mjs.map +1 -0
- package/dist/safe-deployment-Vni46k3t.d.mts +137 -0
- package/dist/safe-deployment-Vni46k3t.d.mts.map +1 -0
- package/dist/signer-oaYGfjDe.d.mts +142 -0
- package/dist/signer-oaYGfjDe.d.mts.map +1 -0
- package/package.json +37 -71
- package/CHANGELOG.md +0 -256
- package/LICENSE +0 -44
- package/dist/client-B_Z3ThFO.d.cts +0 -1484
- package/dist/client-pMBRFcsz.d.ts +0 -1484
- package/dist/client.cjs +0 -4324
- package/dist/client.d.cts +0 -6
- package/dist/client.d.ts +0 -6
- package/dist/client.js +0 -4322
- package/dist/errors-CwhCWGxm.d.ts +0 -70
- package/dist/errors-rqxuUhQP.d.cts +0 -70
- package/dist/errors.cjs +0 -35
- package/dist/errors.d.cts +0 -2
- package/dist/errors.d.ts +0 -2
- package/dist/errors.js +0 -31
- package/dist/index.cjs +0 -4626
- package/dist/index.d.cts +0 -571
- package/dist/index.d.ts +0 -571
- package/dist/index.js +0 -4585
- package/dist/next-action-CTGl8wpy.d.cts +0 -177
- package/dist/next-action-CTGl8wpy.d.ts +0 -177
- package/dist/types-Brucpq0Z.d.cts +0 -1191
- package/dist/types-V_D7qjxY.d.ts +0 -1191
- package/dist/webhooks.cjs +0 -118
- package/dist/webhooks.d.cts +0 -33
- package/dist/webhooks.d.ts +0 -33
- package/dist/webhooks.js +0 -116
package/package.json
CHANGED
|
@@ -1,92 +1,58 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capxul/sdk",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"homepage": "https://capxul.com",
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/Xelmar-tech/Capxul.git",
|
|
12
|
-
"directory": "packages/sdk"
|
|
13
|
-
},
|
|
14
|
-
"bugs": {
|
|
15
|
-
"url": "https://github.com/Xelmar-tech/Capxul/issues"
|
|
16
|
-
},
|
|
17
|
-
"author": "Capxul (Xelmar Tech Ltd.)",
|
|
18
|
-
"keywords": [
|
|
19
|
-
"capxul",
|
|
20
|
-
"sdk",
|
|
21
|
-
"stablecoin",
|
|
22
|
-
"payments",
|
|
23
|
-
"smart-account",
|
|
24
|
-
"typescript"
|
|
3
|
+
"version": "0.2.0-alpha.5",
|
|
4
|
+
"files": [
|
|
5
|
+
"dist",
|
|
6
|
+
"package.json",
|
|
7
|
+
"README.md"
|
|
25
8
|
],
|
|
26
|
-
"
|
|
27
|
-
"module": "./dist/index.js",
|
|
28
|
-
"types": "./dist/index.d.ts",
|
|
9
|
+
"type": "module",
|
|
29
10
|
"exports": {
|
|
30
11
|
".": {
|
|
31
|
-
"types": "./dist/index.d.
|
|
32
|
-
"import": "./dist/index.
|
|
33
|
-
"require": "./dist/index.cjs"
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
|
+
"import": "./dist/index.mjs"
|
|
34
14
|
},
|
|
35
|
-
"./
|
|
36
|
-
"types": "./dist/
|
|
37
|
-
"import": "./dist/
|
|
38
|
-
"require": "./dist/client.cjs"
|
|
15
|
+
"./node": {
|
|
16
|
+
"types": "./dist/node/index.d.mts",
|
|
17
|
+
"import": "./dist/node/index.mjs"
|
|
39
18
|
},
|
|
40
|
-
"./
|
|
41
|
-
"types": "./dist/
|
|
42
|
-
"import": "./dist/
|
|
43
|
-
"require": "./dist/errors.cjs"
|
|
44
|
-
},
|
|
45
|
-
"./webhooks": {
|
|
46
|
-
"types": "./dist/webhooks.d.ts",
|
|
47
|
-
"import": "./dist/webhooks.js",
|
|
48
|
-
"require": "./dist/webhooks.cjs"
|
|
19
|
+
"./ports/safe-deployment": {
|
|
20
|
+
"types": "./dist/ports/safe-deployment.d.mts",
|
|
21
|
+
"import": "./dist/ports/safe-deployment.mjs"
|
|
49
22
|
}
|
|
50
23
|
},
|
|
51
|
-
"files": [
|
|
52
|
-
"dist",
|
|
53
|
-
"README.md",
|
|
54
|
-
"LICENSE",
|
|
55
|
-
"CHANGELOG.md"
|
|
56
|
-
],
|
|
57
24
|
"publishConfig": {
|
|
58
25
|
"access": "public"
|
|
59
26
|
},
|
|
60
27
|
"dependencies": {
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"@
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
"viem": "
|
|
28
|
+
"@effect/experimental": "^0.60.0",
|
|
29
|
+
"@effect/platform": "^0.96.1",
|
|
30
|
+
"@effect/platform-node": "^0.106.0",
|
|
31
|
+
"@effect/schema": "^0.75.5",
|
|
32
|
+
"convex": "^1.39.1",
|
|
33
|
+
"effect": "^3.21.2",
|
|
34
|
+
"viem": "^2.21.0",
|
|
35
|
+
"@capxul/config": "0.0.0",
|
|
36
|
+
"@capxul/observability": "0.0.0",
|
|
37
|
+
"@capxul/types": "0.0.0",
|
|
38
|
+
"@capxul/wire": "0.0.0"
|
|
68
39
|
},
|
|
69
40
|
"devDependencies": {
|
|
70
|
-
"@
|
|
41
|
+
"@effect/vitest": "^0.29.0",
|
|
42
|
+
"@vitest/coverage-v8": "4.1.7",
|
|
43
|
+
"fast-check": "^3.23.2",
|
|
71
44
|
"permissionless": "0.3.4",
|
|
72
|
-
"tsup": "^8.5.1",
|
|
73
45
|
"typescript": "5.9.2",
|
|
74
|
-
"
|
|
75
|
-
"vitest": "^4.1.2",
|
|
76
|
-
"zod": "^4.3.6",
|
|
77
|
-
"@repo/api-contract": "0.0.0",
|
|
78
|
-
"@repo/backend": "0.0.1-alpha.0",
|
|
79
|
-
"@repo/config": "0.0.0",
|
|
80
|
-
"@repo/observability": "0.0.0",
|
|
81
|
-
"@repo/platform-kernel": "0.0.0",
|
|
82
|
-
"@repo/typescript-config": "0.0.0",
|
|
83
|
-
"@repo/safe-derive": "0.0.1-alpha.0"
|
|
46
|
+
"vitest": "npm:@voidzero-dev/vite-plus-test@0.1.23"
|
|
84
47
|
},
|
|
48
|
+
"_permissionlessPinReason": "permissionless.toSafeSmartAccount is pinned to 0.3.4 for live Safe deployment E2E. Counterfactual address fixtures captured 2026-05-17 in packages/backend/convex/_shared/__tests__/counterfactual.test.ts and packages/config/tests/safe.test.ts must be re-verified before upgrading.",
|
|
85
49
|
"scripts": {
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
90
|
-
"test:
|
|
50
|
+
"check-types": "tsc -p tsconfig.json --noEmit",
|
|
51
|
+
"lint": "oxlint -c ../../.oxlintrc.json . --deny-warnings",
|
|
52
|
+
"build": "vp pack",
|
|
53
|
+
"_vp-tasks-allowed": "vp-allowed: `test` + `test:coverage` are vp tasks in vite.config.ts so vitest self-writes don't bust cache (#205). `test:coverage:full` keeps the script form because it composes 5 reporters at invocation time.",
|
|
54
|
+
"test:coverage:full": "CAPXUL_FAST_CHECK_NUM_RUNS=50 vp test run --coverage --coverage.reporter=text --coverage.reporter=json-summary --coverage.reporter=json --coverage.reporter=html --coverage.reporter=clover",
|
|
55
|
+
"test:e2e": "vp test run --config vitest.e2e.config.ts",
|
|
56
|
+
"org:domain-live": "vp dlx tsx e2e/org-domain-sdk-live.ts"
|
|
91
57
|
}
|
|
92
58
|
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
# @capxul/sdk
|
|
2
|
-
|
|
3
|
-
## 0.2.0-alpha.3
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 5b99a9b: **Publishable-key path + error classification (#675).** Two tangled bugs landed in the consumer-path proof.
|
|
8
|
-
|
|
9
|
-
**Reference-cli was on the wrong path.** `build-browser-config.ts` had a `build-time-urls` fallback that fired silently whenever `CAPXUL_REF_PUBLISHABLE_KEY` was unset, so the CLI routed direct to Convex URLs and bypassed `/v1/client/bootstrap` entirely. It "worked" through a code path no external SDK consumer will ever run, masking publishable-key path breakage.
|
|
10
|
-
|
|
11
|
-
Reference-cli now:
|
|
12
|
-
- Requires `CAPXUL_REF_PUBLISHABLE_KEY`. The repo ships a long-lived shared sandbox key at `apps/reference-cli/.env.example` so `git clone && export $(...)` works; the key targets `elated-oyster-269`, is environment `test` (`cap_pk_test_*`), and is intentionally shareable.
|
|
13
|
-
- Strips the `build-time-urls` arm entirely. There is no silent fallback — missing env produces a structured `ENV_MISSING` envelope with an actionable message.
|
|
14
|
-
- Keeps `bootstrap probe --mock` working env-less (the mock factory bypasses `buildBrowserInputs()`).
|
|
15
|
-
|
|
16
|
-
**Error classification.** The SDK's auth-layer catch was swallowing typed bootstrap errors. A bad publishable key produced HTTP 401 + `NOT_AUTHENTICATED: "Publishable key is invalid or revoked."` from the bootstrap endpoint, but `postBetterAuth`'s `catch (cause)` wrapped any throw from `transport.fetch()` as `NETWORK_ERROR: "BetterAuth … network failure."`, burying the real diagnosis on `cause`. Reference-cli then flattened further to `AUTH_ERROR`.
|
|
17
|
-
|
|
18
|
-
The SDK now:
|
|
19
|
-
- Preserves `CapxulError` verbatim in `postBetterAuth` and `exchangeConvexToken` catches. Genuine non-`CapxulError` throws still fall back to `NETWORK_ERROR`.
|
|
20
|
-
- Widens `SendOtpCodes` + `VerifyOtpCodes` to include `NOT_AUTHENTICATED` and `PERMISSION_DENIED` so consumers can exhaustively narrow bootstrap-layer errors.
|
|
21
|
-
|
|
22
|
-
**Consumer impact:** SDK consumers that switch on `err.code` from `auth.sendOtp` / `auth.verifyOtp` should now expect `NOT_AUTHENTICATED` (bad/revoked publishable key) and `PERMISSION_DENIED` (origin not on the key's allow-list) as additional possible codes alongside the existing BetterAuth + rate-limit codes. No type-narrowing regressions — the unions only widened.
|
|
23
|
-
|
|
24
|
-
## 0.2.0-alpha.2
|
|
25
|
-
|
|
26
|
-
### Minor Changes
|
|
27
|
-
|
|
28
|
-
- 995383f: Epic 660: Unified auth surface
|
|
29
|
-
- Introduces AuthService promise-based auth API replacing the imperative capxul.auth.\* tuple interface
|
|
30
|
-
- Adds SignerProvisioner for deterministic Safe v1.4.1 address derivation from viem signers
|
|
31
|
-
- Adds useAuth() React hook with reactive state + promise-based methods
|
|
32
|
-
- Deprecates useAuthFlow and useAuthBootstrapFlow in favor of useAuth()
|
|
33
|
-
- Migrates reference CLI auth commands (send-otp, verify-otp, signout) to useAuth()
|
|
34
|
-
- Migrates test surfaces: walkthroughs, type tests, e2e harness signup, lazy-dx provider
|
|
35
|
-
- Adds @repo/safe-derive workspace package for Safe address derivation utilities
|
|
36
|
-
- Aligns CapxulConfig.data to \_data with internal SDK transport ownership (Epic 652)
|
|
37
|
-
- Pins esbuild to 0.25.12 to fix binary-version skew in fresh worktrees
|
|
38
|
-
|
|
39
|
-
- 2ef4ee3: Reshape the organizations members surface around a single Membership entity
|
|
40
|
-
with a status lifecycle (`pending | active | revoked | expired`).
|
|
41
|
-
- Replaces the prior invitation/membership split (which produced a phantom
|
|
42
|
-
`MemberInvitation` type that never compiled) with a single `Member` type
|
|
43
|
-
exposing `status`, `email`, `acceptedAt`, `expiresAt`, and `resentCount`.
|
|
44
|
-
- New methods on `organizations.members.*`: `accept(token)`, `revoke(memberId)`,
|
|
45
|
-
`resend(memberId)`. `invite()` now returns a `MemberInviteResponse`
|
|
46
|
-
containing the raw invite token (returned once).
|
|
47
|
-
- Auto-accepts pending invitations on first sign-in for the matching email
|
|
48
|
-
via a BetterAuth post-signup hook.
|
|
49
|
-
- Nightly Convex cron expires overdue pending invitations.
|
|
50
|
-
|
|
51
|
-
Public type changes:
|
|
52
|
-
- Removed: `MemberInvitation` (was never exported; type didn't compile).
|
|
53
|
-
- Added: `MembershipStatus`, `MemberInviteResponse`.
|
|
54
|
-
- Updated: `Member` shape — see SDK reference for the full delta.
|
|
55
|
-
|
|
56
|
-
React hooks:
|
|
57
|
-
- New: `useAcceptInvitation`, `useRevokeMember`, `useResendInvitation`.
|
|
58
|
-
- Updated: `useInviteMember` returns `MemberInviteResponse` (was returning a
|
|
59
|
-
type that didn't exist).
|
|
60
|
-
|
|
61
|
-
Reference CLI:
|
|
62
|
-
- New commands: `org members invite`, `org members list`, `org members retrieve`,
|
|
63
|
-
`org members accept`, `org members updateRole`, `org members revoke`,
|
|
64
|
-
`org members remove`, `org members resend`.
|
|
65
|
-
|
|
66
|
-
- c7146bf: **Transport ownership (#656):** The SDK now owns construction of the
|
|
67
|
-
authenticated `ConvexHttpClient`. Consumers no longer wire `data` manually
|
|
68
|
-
or provide `auth.createDataClient`. After `verifyOtp` exchanges a Convex
|
|
69
|
-
JWT, the SDK builds the default data client internally via
|
|
70
|
-
`createDefaultDataClient` and stores it on `config._data`.
|
|
71
|
-
- `CapxulConfig.data` renamed to `_data` (internal test seam).
|
|
72
|
-
- `CapxulAuthConfig.createDataClient` removed from public types.
|
|
73
|
-
- `convex` moved from `peerDependencies` to `dependencies`.
|
|
74
|
-
|
|
75
|
-
### Patch Changes
|
|
76
|
-
|
|
77
|
-
- Updated dependencies [995383f]
|
|
78
|
-
- @repo/safe-derive@0.0.1-alpha.0
|
|
79
|
-
|
|
80
|
-
## 0.2.0-alpha.1
|
|
81
|
-
|
|
82
|
-
### Minor Changes
|
|
83
|
-
|
|
84
|
-
- **Transport ownership (#656):** The SDK now owns construction of the
|
|
85
|
-
authenticated `ConvexHttpClient`. Consumers no longer wire `data` manually
|
|
86
|
-
or provide `auth.createDataClient`. After `verifyOtp` exchanges a Convex
|
|
87
|
-
JWT, the SDK builds the default data client internally via
|
|
88
|
-
`createDefaultDataClient` and stores it on `config._data`.
|
|
89
|
-
- `CapxulConfig.data` renamed to `_data` (internal test seam).
|
|
90
|
-
- `CapxulAuthConfig.createDataClient` removed from public types.
|
|
91
|
-
- `convex` moved from `peerDependencies` to `dependencies`.
|
|
92
|
-
|
|
93
|
-
### Patch Changes
|
|
94
|
-
|
|
95
|
-
- Bundle `@repo/safe-derive` into the published artifact so the new
|
|
96
|
-
`SignerProvisioner` class works for external consumers.
|
|
97
|
-
|
|
98
|
-
## 0.1.0-alpha.12
|
|
99
|
-
|
|
100
|
-
### Minor Changes
|
|
101
|
-
|
|
102
|
-
- Publish the post-alpha.11 SDK and React SDK surface: funds v1 sub-account
|
|
103
|
-
runtime coverage, React hook wiring, payments list support, and the latest
|
|
104
|
-
generated Convex API snapshots used by current alpha consumers.
|
|
105
|
-
|
|
106
|
-
Note: alpha.10 and alpha.11 were intermediate runner artifacts from the
|
|
107
|
-
prior release pipeline (manual `package.json` bumps that were never folded
|
|
108
|
-
back into the repo). alpha.12 reconciles `package.json`, the changesets
|
|
109
|
-
state, and npm to a single consistent version.
|
|
110
|
-
|
|
111
|
-
## 0.1.0-alpha.9
|
|
112
|
-
|
|
113
|
-
### Minor Changes
|
|
114
|
-
|
|
115
|
-
- Add the canonical auth bootstrap flow.
|
|
116
|
-
|
|
117
|
-
`verifyOtp()` now resolves a verified email session into either an
|
|
118
|
-
`existing_member` identity or a `bootstrap_required` continuation. New and
|
|
119
|
-
incomplete members continue through `completeBootstrap()`, which validates a
|
|
120
|
-
server-issued bootstrap token, claims the username, provisions the account/Safe
|
|
121
|
-
through the backend bootstrap path, and returns the authenticated product
|
|
122
|
-
identity. The React SDK adds `useAuthBootstrapFlow()` as the typed first-run
|
|
123
|
-
flow wrapper.
|
|
124
|
-
|
|
125
|
-
## 0.1.0-alpha.8
|
|
126
|
-
|
|
127
|
-
### Minor Changes
|
|
128
|
-
|
|
129
|
-
- 57203a4: Withdrawals v1 W2 (#465) — public surface tightening + org-scope create
|
|
130
|
-
- `WithdrawalsCreateInput.destination` no longer accepts `kind`. The
|
|
131
|
-
backend now resolves the `external_account` row by FK and infers
|
|
132
|
-
the kind + rail server-side. Anything that doesn't route to
|
|
133
|
-
`chain_wallet` (or is chain_wallet but non-EVM in slice 1) returns
|
|
134
|
-
`VERIFICATION_REQUIRED` with `details.rail` + `details.currentKind`.
|
|
135
|
-
- `organizations.withdrawals.create` is now a real mutation (no
|
|
136
|
-
longer a `NOT_IMPLEMENTED` stub). Returns the `processing` row
|
|
137
|
-
only — Safe + Zodiac submission orchestration ships in W3+.
|
|
138
|
-
- `Errors.verificationRequired({ rail, currentKind })` factory
|
|
139
|
-
added; the `VERIFICATION_REQUIRED` code now broadens to cover
|
|
140
|
-
both KYC tier gates and unsupported withdrawal rails.
|
|
141
|
-
|
|
142
|
-
**Migration:** Remove `destination.kind` from any
|
|
143
|
-
`capxul.withdrawals.create({ destination: { kind, externalAccountId } })`
|
|
144
|
-
call sites. Pass only `externalAccountId`.
|
|
145
|
-
|
|
146
|
-
## 0.1.0-alpha.4
|
|
147
|
-
|
|
148
|
-
### Minor Changes
|
|
149
|
-
|
|
150
|
-
- Post-alpha hardening — WAVE 1 + WAVE 2 cumulative
|
|
151
|
-
|
|
152
|
-
**WAVE 1 (merged 2026-05-03 12:44Z):**
|
|
153
|
-
- S2 story 1: wire onboarding readback hooks (#469) — `me.update`, `accounts.retrieve`, `accounts.update`, `useAccount`, `useSafe`
|
|
154
|
-
- S3 phase 1: Ink reference CLI scaffold + `auth+me` end-to-end against live alpha-3 Convex (#470). Stickiness gate (D3) fired.
|
|
155
|
-
- S5: split `CapxulProvider` into public single-input `BrowserCapxulConfig` + test-only `CapxulTestProvider` from `@capxul/sdk-react/proof` (#473). Q1 lock honored. 7 type-level provider-shape guards including `@ts-expect-error` against test-provider leaking to public barrel.
|
|
156
|
-
|
|
157
|
-
**WAVE 2 (merged 2026-05-03 12:54-13:16Z):**
|
|
158
|
-
- S3 phase 2: per-domain CLI commands closing #458 (#476) — `account retrieve/update`, `safe retrieve`, `payment retrieve`, `withdrawal retrieve/list`. 12/12 agent-driver tests pass.
|
|
159
|
-
- S2 story 2: `capxul.tokenTransfers.*` non-canonical SDK namespace (#479) — Option A per #477 (canon-aligned `transfers.*` shape deferred to alpha.5+ pending backend canon work). New `useTokenTransfers` + `useTokenTransfer` hooks; new `getByTxLogIndex` backend query. Hook proof matrix length unchanged at 41 (non-canonical hooks deliberately excluded).
|
|
160
|
-
|
|
161
|
-
**S1 (#456) closed no-op** — alpha publish infrastructure (tsup, lazy-DX, transport state machine, npm metadata, READMEs, CHANGELOG, changesets, OIDC release workflow) physically merged into `api-first` via PRs #449-#452 earlier the same day; the slice merge produced 0 file changes per clean-room probe.
|
|
162
|
-
|
|
163
|
-
**Friction issues filed for alpha.4+ polish:**
|
|
164
|
-
- #474 — `me.get` returns `NOT_IMPLEMENTED` when `config.data` is undefined; should be `NOT_AUTHENTICATED`.
|
|
165
|
-
- #475 — `@capxul/sdk/headless` slim entry point excludes xstate flow machines + brand constructors (1.6 MB → much smaller).
|
|
166
|
-
- #477 / #478 — `transfers.*` / `balanceLedger.*` / `treasury` canon-shape alignment with indexer feed.
|
|
167
|
-
- #471 — Vercel-capxul-web preview-deploy systemic failure on api-first base (separate from epic).
|
|
168
|
-
|
|
169
|
-
## 0.1.0-alpha.3
|
|
170
|
-
|
|
171
|
-
### Patch Changes
|
|
172
|
-
|
|
173
|
-
- Re-export `tryCatch` from `@capxul/sdk`.
|
|
174
|
-
|
|
175
|
-
`tryCatch` is referenced in `packages/sdk/README.md` (live on npm at
|
|
176
|
-
`0.1.0-alpha.2`) and in `.claude/rules/sdk.md` as the canonical
|
|
177
|
-
async-error helper for SDK operations:
|
|
178
|
-
|
|
179
|
-
```ts
|
|
180
|
-
import { tryCatch } from "@capxul/sdk";
|
|
181
|
-
|
|
182
|
-
const [err, payment] = await tryCatch(capxul.payments.create({ ... }));
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
The helper lives at `@repo/observability/try-catch.ts` and is bundled
|
|
186
|
-
into the SDK dist via tsup `noExternal`, but it was never re-exported
|
|
187
|
-
from `packages/sdk/src/index.ts`. Consumers following the README example
|
|
188
|
-
hit `Module '"@capxul/sdk"' has no exported member 'tryCatch'.` at
|
|
189
|
-
import time.
|
|
190
|
-
|
|
191
|
-
Caught during alpha.2 spike-install verification (REVIEW.html, "What's
|
|
192
|
-
not proven" row 6). One-line public-export addition; no runtime change.
|
|
193
|
-
|
|
194
|
-
## 0.1.0-alpha.2
|
|
195
|
-
|
|
196
|
-
### Patch Changes
|
|
197
|
-
|
|
198
|
-
- Add `convex` as a peer dependency.
|
|
199
|
-
|
|
200
|
-
`@capxul/sdk`'s bundled `_generated/api` snapshot calls
|
|
201
|
-
`anyApi` / `componentsGeneric` from `convex/server` at runtime — they
|
|
202
|
-
are not just types — and tsup correctly externalizes `convex` /
|
|
203
|
-
`convex/server` / `convex/react` so the consumer's own Convex install
|
|
204
|
-
is reused. The peer was missing from the published manifest, so
|
|
205
|
-
`require('@capxul/sdk')` failed with `Cannot find module 'convex/server'`
|
|
206
|
-
in any spike that hadn't already installed `convex`.
|
|
207
|
-
|
|
208
|
-
`@capxul/sdk-react` mirrors the peer because its bundle re-exports
|
|
209
|
-
flow-machine constructors from `@capxul/sdk` and may transitively
|
|
210
|
-
pull in the same module.
|
|
211
|
-
|
|
212
|
-
Caught during alpha.1 spike-install verification.
|
|
213
|
-
|
|
214
|
-
## 0.1.0-alpha.1
|
|
215
|
-
|
|
216
|
-
### Patch Changes
|
|
217
|
-
|
|
218
|
-
- Move workspace `@repo/*` packages from `dependencies` to
|
|
219
|
-
`devDependencies` so the published `package.json` doesn't list them
|
|
220
|
-
as runtime deps. The tsup pipeline bundles every `@repo/*` import
|
|
221
|
-
inline (`noExternal`), so the published code has zero references to
|
|
222
|
-
those packages — but until now the published `package.json` still
|
|
223
|
-
declared them, and `npm install @capxul/sdk@0.1.0-alpha.0` failed
|
|
224
|
-
trying to resolve `@repo/api-contract@0.0.0` etc. on the public
|
|
225
|
-
registry.
|
|
226
|
-
|
|
227
|
-
`@capxul/sdk-react` keeps `@capxul/sdk` as a runtime dep — that one
|
|
228
|
-
is published.
|
|
229
|
-
|
|
230
|
-
No public surface changes. Pure publish-metadata correction caught
|
|
231
|
-
during alpha.0 spike-install verification.
|
|
232
|
-
|
|
233
|
-
Changelog managed by [changesets](https://github.com/changesets/changesets) —
|
|
234
|
-
see `.changeset/README.md` for the operator workflow.
|
|
235
|
-
|
|
236
|
-
## 0.1.0-alpha.0
|
|
237
|
-
|
|
238
|
-
### Minor Changes
|
|
239
|
-
|
|
240
|
-
- Initial alpha publish.
|
|
241
|
-
|
|
242
|
-
`@capxul/sdk` ships the headless TypeScript client for Capxul's
|
|
243
|
-
`/v1/*` HTTP contract — auth, me, accounts, payments, organizations,
|
|
244
|
-
withdrawals, documents, and three XState v5 flow machines. Errors
|
|
245
|
-
are typed `CapxulError` instances with narrowed `code` unions per
|
|
246
|
-
method; `tryCatch` returns the canonical `[error, data]` tuple.
|
|
247
|
-
|
|
248
|
-
`@capxul/sdk-react` ships the React provider and hooks. The lazy-DX
|
|
249
|
-
`<CapxulProvider publishableKey="cap_pk_…">` mounts synchronously
|
|
250
|
-
and bootstraps runtime URLs through `/v1/client/bootstrap` on the
|
|
251
|
-
first SDK call. `useCapxulStatus()` exposes the canonical 5-state
|
|
252
|
-
transport lifecycle through `useSyncExternalStore`. Read hooks
|
|
253
|
-
return the canonical `QueryResult<T>` three-state discriminated
|
|
254
|
-
union (loading / data / error) — never throws on "still loading".
|
|
255
|
-
|
|
256
|
-
See each package's `README.md` for the public surface.
|
package/LICENSE
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2026 Xelmar Tech Ltd. ("Capxul"). All rights reserved.
|
|
2
|
-
|
|
3
|
-
This software ("@capxul/sdk", the "Software") is proprietary to Capxul.
|
|
4
|
-
The Software is licensed, not sold, and is made available solely to
|
|
5
|
-
registered Capxul customers under the Capxul Terms of Service or a
|
|
6
|
-
separate written commercial agreement between Capxul and the licensee.
|
|
7
|
-
|
|
8
|
-
Two-layer trust
|
|
9
|
-
---------------
|
|
10
|
-
Capxul's value-bearing on-chain logic — Safe v1.4.1, ERC-4337 modules,
|
|
11
|
-
and any contract that custodies, transfers, or signs over user funds —
|
|
12
|
-
is open source under permissive licenses and is published in a
|
|
13
|
-
separate, auditable repository. See:
|
|
14
|
-
|
|
15
|
-
https://github.com/Xelmar-tech/Capxul
|
|
16
|
-
|
|
17
|
-
The orchestration layer in this package — workflow logic, business
|
|
18
|
-
rules, integration glue, the contents of /v1/* clients, and any code
|
|
19
|
-
that translates customer intent into transactions or routes data
|
|
20
|
-
between subsystems — is the proprietary product of Capxul and is
|
|
21
|
-
governed by this license.
|
|
22
|
-
|
|
23
|
-
Customers of the Capxul platform may use this Software solely:
|
|
24
|
-
(a) to access Capxul's hosted services they have contracted for,
|
|
25
|
-
(b) within the scope of their active subscription or trial, and
|
|
26
|
-
(c) in accordance with the Capxul Terms of Service.
|
|
27
|
-
|
|
28
|
-
Without limiting the foregoing, you may NOT:
|
|
29
|
-
(i) redistribute, sublicense, sell, lease, or rent the Software,
|
|
30
|
-
(ii) reverse-engineer, decompile, or disassemble the Software,
|
|
31
|
-
except to the limited extent applicable mandatory law
|
|
32
|
-
permits, and
|
|
33
|
-
(iii) remove or alter copyright, trademark, or other proprietary
|
|
34
|
-
notices in the Software.
|
|
35
|
-
|
|
36
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
37
|
-
OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
|
|
38
|
-
FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT
|
|
39
|
-
SHALL CAPXUL OR ITS AFFILIATES BE LIABLE FOR ANY CLAIM, DAMAGES, OR
|
|
40
|
-
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE,
|
|
41
|
-
ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
42
|
-
OTHER DEALINGS IN THE SOFTWARE.
|
|
43
|
-
|
|
44
|
-
Contact: legal@capxul.com
|