SDKsOverview

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.

Mental model: Applications submit intents. Causet emits committed business events. Use 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.

SDKSourcePackage / registryAvailabilityMaturityProduction useRuntime compatibilityInstall
JavaScript / TypeScript SDKAvailablenpm (0.2.0)Available nowSupported previewSupported for pilotsNode.js 18+ (ESM); browsers with native fetch; TypeScript 5+ declarationsnpm install @causet/sdk-node # 0.2.0
Python SDKAvailablePyPI (not published yet)Early accessPreviewCommunity or best effortPython 3.10+Install from source — see Python SDK guide
Java SDKAvailableMaven Central (not published yet)Early accessPreviewCommunity or best effortJava 17+Install from source — see SDK overview
PHP SDK (Laravel)AvailablePackagist (not published yet)Early accessExperimentalNot supportedPHP 8.2+; Laravel 11+ or 12+Install from source — see PHP / Laravel SDK guide
Go SDKAvailableGo modules (source-first)Early accessExperimentalNot supportedGo 1.22+Install from source — see SDK overview
Rust SDKNot availableNot publishedComing soonPlannedNot supported—Not available yet

Package reference

PackageLanguageInstall
@causet/sdk-coreTypeScriptnpm i @causet/sdk-core
@causet/sdkJavaScript (ESM)npm i @causet/sdk
@causet/sdk-nodeNode.js 18+npm i @causet/sdk-node
@causet/sdk-nextNext.js + Reactnpm i @causet/sdk-next
causet-sdkPython 3.10+Install from source (PyPI not published yet)
causet-sdk-goGo 1.22+go get github.com/causet-inc/causet-sdk-go
com.causet:causet-sdkJava 17+Install from source (Maven Central not published yet)
causet/laravel-sdkPHP / 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 stackPackage
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 asynccauset-sdk (CausetClient)
Python scripts / sync codecauset-sdk (CausetClientSync)
Go services, CLIs, workerscauset-sdk-go
JVM / Spring / Kotlincom.causet:causet-sdk
Laravelcauset/laravel-sdk

Language guides on this site:

PageCovers
TypeScript / JavaScript@causet/sdk-core, @causet/sdk, @causet/sdk-node, @causet/sdk-next
Pythoncauset-sdk async + sync
PHP / Laravelcauset/laravel-sdk
TestingIntegration and replay tests

What the SDKs do

Your app (SDK)  ──HTTPS/WSS──►  Causet management API (:8085 local)  ──►  Runtime / Query / Realtime
CapabilityDescription
Submit intentTyped action to mutate entity state (submitIntent)
SSE streamingIntent progress: START, COMPLETE, ERROR
Run queryNamed projection query with filters and pagination
Entity stateFetch/cache snapshots; apply JSON patches locally
WebSocket / SSE streamsLive ledger patches (stream + fork, or + entity)
API key authExchange ck_live_... for a short-lived JWT

Quick start

Node (retrofit path)

npm i @causet/sdk-node
import { 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/sdk
import { 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 needed

Configuration

OptionEnv varDescription
API URLCAUSET_API_URLSaaS base (default http://localhost:8085)
PlatformCAUSET_PLATFORMPlatform slug
ApplicationCAUSET_APPLICATIONApplication slug
ForkCAUSET_FORKFork id (default main)
API keyCAUSET_API_KEYServer-side Cloud key
Bearer tokenCAUSET_BEARER_TOKENStatic JWT (browser-safe alternative)
Realtime URLCAUSET_REALTIME_URLSSE stream base
WebSocket URLCAUSET_WS_URLWS endpoint

Next.js: use NEXT_PUBLIC_CAUSET_* only for non-secret client values — never expose API keys.


Next step

TypeScript / JavaScript SDK →