TypeScript SDK — @zeq-os/sdk
The reference SDK. Open source, published to npm, works in Node 18+ and modern browsers.
Source: app/packages/sdk/ in the framework repo.
Install
npm install @zeq-os/sdk
Exports
import {
// Core client
ZeqClient,
// Pulse / timing
pulse,
modulate,
unixToZeqond,
zeqondToUnix,
// Local compute
computeByDomain,
// Constants
NIST,
PULSE_HZ, // 1.287
ZEQOND_SEC, // 0.777
ALPHA_K, // 1.29e-3
bindConstants,
// Operator registry
getOperators,
findDomain,
getOperatorsByDomain,
DOMAINS,
// Vertical clients
ZeqMailClient,
ZeqDaemonClient,
ZeqMeshClient,
} from "@zeq-os/sdk";
ZeqClient
The primary entry point. Works in two modes:
// Local-only: pure in-process computation, no network.
const localZeq = new ZeqClient();
// Hosted: routes compute through api.zeq.dev with signed CKOs.
const hostedZeq = new ZeqClient({
apiKey: process.env.ZEQ_API_KEY,
baseUrl: "https://api.zeq.dev", // default
});
compute(request)
type ComputeRequest = {
domain: string; // e.g. "quantum_mechanics", "general_relativity"
inputs: Record<string, unknown>;
operators?: string[]; // optional explicit operator list
};
type ComputeResponse = {
value: number | string | Record<string, unknown>;
unit: string;
operators: string[];
ko42?: { mode: string; alpha: number; error_band: number; within_bound: boolean };
signature?: string; // hosted only
zeqond_at?: number; // hosted only
};
pulse()
Get the current HulyaPulse state. Purely local, no network.
import { pulse } from "@zeq-os/sdk";
const p = pulse();
// { zeqond, phase, f_hz, T_s, R_t, unix }
modulate(signal, t)
Apply the Zeq modulation R(t) = S(t) [1 + alpha sin(2 pi f t)]:
import { modulate } from "@zeq-os/sdk";
const R = modulate(1.0, 3.14159); // S(t)=1, t=pi seconds
// ≈ 1.00000..., modulated at 1.287 Hz
Bridge functions
unixToZeqond(1_745_164_800); // 2245837837.8
zeqondToUnix(2_245_837_837.8); // 1745164800
Operator registry
import { DOMAINS, getOperators, getOperatorsByDomain } from "@zeq-os/sdk";
DOMAINS; // ["quantum_mechanics", "newtonian_mechanics", ...]
getOperatorsByDomain("quantum_mechanics");
// [ { id: "QM1", name: "Schrödinger equation", formula: "..." }, ... ]
const all = getOperators(); // full registry
Vertical clients
ZeqMailClient
End-to-end encrypted email over the ZEQ-PROTECT-001 + ZEQ-TETHER-003 operators. See the Apps reference.
ZeqMeshClient
Multi-party mesh routing for distributed CKO attestation.
ZeqDaemonClient
TESC attestation + Landauer-bound accounting; exposes daemon status and pulse events.
CLI
The SDK package also exports a zeq CLI binary:
npx zeq pulse # print current pulse state
npx zeq compute --domain quantum_mechanics --inputs '{"frequency": 5e14}'
npx zeq operators --domain general_relativity
Source: app/packages/sdk/src/cli.ts.
Roadmap
- browser bundle — currently ESM-only; a UMD bundle for direct
<script>include is on the roadmap. - streaming compute — long-running protocols will support async iterator responses.
- offline operator bundles — all 42 operators + KO42 ship in-SDK; a future release will also bundle protocol definitions so you can run the full 235-protocol registry without the hosted API.