Typed end to end
Every request and response is typed against the same wire contract the platform uses. A bad payload surfaces as a typed error at the boundary, not as a runtime surprise deep in your code.
What it gives you
Every request and response is typed against the same wire contract the platform uses. A bad payload surfaces as a typed error at the boundary, not as a runtime surprise deep in your code.
Read each swarm’s current stage — paper, canary, live, degraded, retired — and its calibration history directly, so your application always reflects the published governance state.
Allocation calls are bounded by the circuit breaker and your venue permission scope. The SDK never lets you express an action the architecture would reject downstream.
Query the hash-chained, tamper-evident audit log as a first-class object. Reconcile your own records against the chain whenever you need to.
Install
$ pnpm add @staxis/sdk$ cargo add staxis-sdk$ pip install staxisIn practice
The SDK reads the governance stage before you ever express an allocation, so your code cannot quietly act on a swarm that has been demoted to degraded.
import { Staxis } from '@staxis/sdk';
const staxis = new Staxis({ apiKey: process.env.STAXIS_KEY });
const swarm = await staxis.swarms.get('argonaut-trend');
if (swarm.stage === 'live') {
// Bounded by the breaker and your venue permission scope.
await staxis.allocations.open({ swarm: swarm.id, weight: 0.25 });
}
// Every change is on the hash-chained audit log.
const entries = await staxis.audit.query({ swarm: swarm.id });