Skip to main content

TypeScript SDK — @zeq/sdk

The reference SDK. Open source, Node 18+ and modern browsers.

Full page

This is the quick-reference. The complete @zeq/sdk page — install, the public surface, the master-equation methods, verify, and the wallet client — lives at SDKs → TypeScript.

Source: app/packages/sdk/ · v1.0.0.

Install

@zeq/sdk is published to Zeq's own registry (not npmjs). Point the @zeq scope at it once, then install normally:

npm config set @zeq:registry https://zeqsdk.com
npm install @zeq/sdk

The registry is served by every node — swap the host (zeqond.com, zeqstate.com, zeqapi.com, zeq.dev) and the tarball is identical. Or use the one-liner that also installs the zeq CLI:

curl -fsSL https://zeqsdk.com/install.sh | sh

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, // 1e-3 exactly
bindConstants,

// Operator registry
getOperators,
findDomain,
getOperatorsByDomain,
DOMAINS,

// Vertical clients
ZeqMailClient,
ZeqDaemonClient,
ZeqMeshClient,
} from "@zeq/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 your node's origin with signed CKOs.
const hostedZeq = new ZeqClient({
apiKey: process.env.ZEQ_API_KEY,
origin: "https://zeqsdk.com", // any node; defaults to the platform
});

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/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/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/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 package declares a zeq bin. The fastest way to get it is the one-liner installer (curl -fsSL https://zeqsdk.com/install.sh | sh), which also pins the CLI per node — see /cli/:

zeq pulse # print current pulse state
zeq compute NM19 mass=5 acceleration=2
zeq operators

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 — the operator catalogue ships in-SDK (42+ Kinematic operators locally); a future release will also bundle protocol definitions so you can run more of the protocol registry without the platform.