SDKCrux

Platform surface

SDKCrux

TypeScript-first SDKs with Zod schemas and verification helpers

SDKCrux is the TypeScript-first client library suite that provides developers with typed, validated access to every service in the CueCrux platform. It is designed to make integration as straightforward as importing a package and calling a function, while ensuring that every request and response conforms to the platform's strict type contracts.

The SDK ships with comprehensive Zod schemas for all request and response types across the Engine, VaultCrux, and receipt verification APIs. These schemas provide runtime validation in addition to compile-time type checking, catching malformed requests before they reach the server and ensuring that responses are parsed correctly even as the API evolves. When the platform adds new fields or modifies existing ones, the Zod schemas provide clear, actionable error messages that guide developers through the necessary updates.

Receipt verification helpers are a standout feature of the SDK. Developers can verify CROWN receipts with a single function call that checks the BLAKE3 hash chain, validates the cryptographic signatures, and confirms that the receipt structure conforms to the expected schema. These helpers work both online, querying the platform to verify against the canonical receipt store, and offline, performing local verification using the receipt's self-contained proof data. This makes it possible to verify receipts in air-gapped environments or in automated CI pipelines.

Streaming support enables real-time answer delivery for applications that need to display answers as they are generated rather than waiting for the complete response. The SDK provides both callback-based and async iterator interfaces for consuming streamed answers, with automatic reconnection handling and progress indicators. Streaming is particularly valuable for interactive applications where latency perception matters and for long-running queries that benefit from incremental display.

The SDK also provides convenience methods for common workflows. Developers can submit queries with a single call that handles authentication, mode selection, and response parsing automatically. Batch query APIs allow submitting multiple questions in parallel with configurable concurrency limits. Watch subscription APIs provide a programmatic interface to the Signals Feed with filtering and event handling.

Authentication is handled transparently through the SDK's client configuration. Developers provide their API credentials once during initialisation, and the SDK manages token refresh, retry logic, and error handling automatically. The authentication layer supports OAuth2 bearer tokens for server-to-server integration and session-based authentication for browser-based applications.

For developers building on top of CueCrux, SDKCrux reduces the integration effort from weeks to hours. The combination of strict type checking, runtime validation, and high-level convenience methods means that developers can focus on their application logic rather than wrestling with API details, authentication flows, and error handling. It is the primary recommended path for any programmatic interaction with the platform.