SDKs
Official client libraries for Causet. Submit intents, run named queries, stream intent progress (SSE), and receive real-time ledger patches (WebSocket or SSE).
Source of truth: github.com/Causet-Inc/causet-sdks
Use SDKs in application code — do not hand-roll HTTP calls to runtime endpoints.
client.submitIntent() (or language equivalents) to submit intents from your application.SDK status by language
Availability, maturity, registry publishing, and install commands. Full product readiness tiers: What runs today?.
Synchronized from causet-sdks/docs/sdk-status.json (last verified 2026-07-16). SDK source is MIT-licensed.
| SDK | Source | Package / registry | Availability | Maturity | Production use | Runtime compatibility | Install |
|---|---|---|---|---|---|---|---|
| JavaScript / TypeScript SDK | Available | npm (0.2.0) | Available now | Supported preview | Supported for pilots | Node.js 18+ (ESM); browsers with native fetch; TypeScript 5+ declarations | npm install @causet/sdk-node # 0.2.0 |
| Python SDK | Available | PyPI (not published yet) | Early access | Preview | Community or best effort | Python 3.10+ | Install from source — see Python SDK guide |
| Java SDK | Available | Maven Central (not published yet) | Early access | Preview | Community or best effort | Java 17+ | Install from source — see SDK overview |
| PHP SDK (Laravel) | Available | Packagist (not published yet) | Early access | Experimental | Not supported | PHP 8.2+; Laravel 11+ or 12+ | Install from source — see PHP / Laravel SDK guide |
| Go SDK | Available | Go modules (source-first) | Early access | Experimental | Not supported | Go 1.22+ | Install from source — see SDK overview |
| Rust SDK | Not available | Not published | Coming soon | Planned | Not supported | — | Not available yet |
Package reference
| Package | Language | Install |
|---|---|---|
@causet/sdk-core | TypeScript | npm i @causet/sdk-core |
@causet/sdk | JavaScript (ESM) | npm i @causet/sdk |
@causet/sdk-node | Node.js 18+ | npm i @causet/sdk-node |
@causet/sdk-next | Next.js + React | npm i @causet/sdk-next |
causet-sdk | Python 3.10+ | Install from source (PyPI not published yet) |
causet-sdk-go | Go 1.22+ | go get github.com/causet-inc/causet-sdk-go |
com.causet:causet-sdk | Java 17+ | Install from source (Maven Central not published yet) |
causet/laravel-sdk | PHP / Laravel 11+ | Install from source (Packagist not published yet) |
JavaScript / TypeScript packages are published on npm at 0.2.0 (supported preview — see Support policy). Other languages are source-first while registry publishing is in progress.
| Your stack | Package |
|---|---|
| Browser / Vite / React (non-Next) | @causet/sdk |
| Node.js, Express, Fastify, workers | @causet/sdk-node |
| Next.js App Router | @causet/sdk-next |
| Custom TS library / framework author | @causet/sdk-core |
| Python asyncio, FastAPI, Django async | causet-sdk (CausetClient) |
| Python scripts / sync code | causet-sdk (CausetClientSync) |
| Go services, CLIs, workers | causet-sdk-go |
| JVM / Spring / Kotlin | com.causet:causet-sdk |
| Laravel | causet/laravel-sdk |
Language guides on this site:
| Page | Covers |
|---|---|
| TypeScript / JavaScript | @causet/sdk-core, @causet/sdk, @causet/sdk-node, @causet/sdk-next |
| Python | causet-sdk async + sync |
| PHP / Laravel | causet/laravel-sdk |
| Testing | Integration and replay tests |
What the SDKs do
Your app (SDK) ──HTTPS/WSS──► Causet management API (:8085 local) ──► Runtime / Query / Realtime| Capability | Description |
|---|---|
| Submit intent | Typed action to mutate entity state (submitIntent) |
| SSE streaming | Intent progress: START, COMPLETE, ERROR |
| Run query | Named projection query with filters and pagination |
| Entity state | Fetch/cache snapshots; apply JSON patches locally |
| WebSocket / SSE streams | Live ledger patches (stream + fork, or + entity) |
| API key auth | Exchange ck_live_... for a short-lived JWT |
Quick start
Node (retrofit path)
npm i @causet/sdk-nodeimport { createCausetClient } from '@causet/sdk-node';
const client = createCausetClient({
apiUrl: process.env.CAUSET_API_URL ?? 'http://localhost:8085',
platformSlug: process.env.CAUSET_PLATFORM,
appSlug: process.env.CAUSET_APPLICATION,
forkId: process.env.CAUSET_FORK ?? 'sandbox',
apiKey: process.env.CAUSET_API_KEY,
});
await client.init();
await client.submitIntent('refund_stream', refundId, 'REFUND_REQUESTED', {
refund_id: refundId,
order_id: orderId,
amount: 50,
reason: 'damaged',
requested_at: new Date().toISOString(),
}, refundId);Used by Retrofit an Existing App.
Browser
npm i @causet/sdkimport { CausetClient } from '@causet/sdk';
const client = new CausetClient({
apiUrl: 'https://api.causet.cloud',
platformSlug: 'my-platform',
appSlug: 'my-app',
bearerToken: sessionJwt, // never embed API keys in the browser
});
await client.init();
await client.submitIntent('ticket_stream', 'tkt_1', 'CREATE_TICKET', { subject: 'Help' });Python
Install from source until PyPI publish completes:
git clone https://github.com/Causet-Inc/causet-sdks.git
cd causet-sdks/packages/python && pip install -e ".[dev]"from causet_sdk import CausetClient
client = CausetClient(
api_url="http://localhost:8085",
platform_slug="my-platform",
app_slug="my-app",
api_key="ck_live_xxx.secret",
)
await client.init()
await client.submitIntent("ticket_stream", "tkt_1", "CREATE_TICKET", {"subject": "Help"})Install from source (until registries publish)
git clone https://github.com/Causet-Inc/causet-sdks.git
cd causet-sdks
npm install && npm run build
# link or pack individual packages as neededConfiguration
| Option | Env var | Description |
|---|---|---|
| API URL | CAUSET_API_URL | SaaS base (default http://localhost:8085) |
| Platform | CAUSET_PLATFORM | Platform slug |
| Application | CAUSET_APPLICATION | Application slug |
| Fork | CAUSET_FORK | Fork id (default main) |
| API key | CAUSET_API_KEY | Server-side Cloud key |
| Bearer token | CAUSET_BEARER_TOKEN | Static JWT (browser-safe alternative) |
| Realtime URL | CAUSET_REALTIME_URL | SSE stream base |
| WebSocket URL | CAUSET_WS_URL | WS endpoint |
Next.js: use NEXT_PUBLIC_CAUSET_* only for non-secret client values — never expose API keys.