JavaScript — fetch() or the @zeq/sdk package
For a typed client with local compute and offline verify, install the
package — it's published to Zeq's own registry:
npm config set @zeq:registry https://zeqsdk.com
npm install @zeq/sdk
See TypeScript — @zeq/sdk (it's the same package for
JS and TS). This page shows the zero-dependency path: raw HTTP with
built-in fetch(), which every client wraps. Pick whichever fits — both
return the identical signed envelope.
Every node serves the terminal CLI with a sha256-pinned installer — the fastest way onto the framework:
curl -fsSL https://zeqstate.com/install.sh | sh # any node works as the origin
zeq tutorial # guided: account → machine → first compute → verify
Full install notes + the complete command reference: /cli/.
First call — public, no key
fetch() is built into every browser and Node ≥ 18 — nothing to install:
const p = await (await fetch("https://zeqsdk.com/api/zeq/pulse")).json();
console.log(`Zeqond ${p.zeqond} · phase ${p.phase.toFixed(3)} · R(t) ${p.R_t}`);
GET /api/zeq/pulse — no authentication, no rate limit beyond the public quota. Use it for live cadence on dashboards, status pages, or as the first heartbeat in an observer agent.
Authed call — POST /api/zeq/compute
const res = await fetch("https://zeqsdk.com/api/zeq/compute", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ZEQ_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
operators: ["KO42", "QM5", "GR40"],
domain: "cross",
inputs: { t: 0 },
}),
});
const r = await res.json();
console.log(r.value, r.unit, "± " + r.uncertainty);
console.log(r.signed.claim.registry_version); // Ed25519-signed claim
console.log(r.zeqProof); // HMAC receipt
console.log(r.explorer_url); // deep-link to the Zeqond tick
Every compute returns a zeqState (the math), an Ed25519-signed claim (signed — verifiable offline by anyone, no secrets), the HMAC zeqProof receipt, equations[] + master_sum (the generative mathematics), and a ZeqCompliance v1 envelope. The wire envelope is identical from Python, curl, or any other surface.
What you get back
| Field | Shape | Use |
|---|---|---|
value / unit / uncertainty | numeric | the closed-form answer |
signed | object | Ed25519 { claim, signature, public_key } — verify offline or via POST /api/attest |
equations[] / master_sum | array / object | per-operator equations + R(t) term breakdown |
zeqProof | 64-hex | HMAC receipt — re-prove at /api/zeq/verify |
zeqState | object | domain, masterEquation, operator sequence, zeqond, phase |
compliance | zeq.compliance.v1 | per-call regulatory envelope |
explorer_url | string | the exact Zeqond tick in the State Explorer |
tally_charge | object | per-call wallet receipt |
Master-equation solve + register dump
The compute endpoint runs the textbook-dispatch path. For the master-equation runtime (full trajectory + register dump + functional energy E = P_φ · Z), POST to the framework routes:
const post = (path, body) =>
fetch("https://zeqsdk.com" + path, {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.ZEQ_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify(body),
}).then((r) => r.json());
// Single-body
const r = await post("/api/framework/solve", {
prompt: "feather drop",
mass: 1e-4,
location: "earth",
medium: "air",
koSettings: { KO42: 1.0 },
});
console.log("registerDump: ", r.registerDump);
console.log("functionalEnergy:", r.functionalEnergy, "= P_φ·Z");
// Multi-body
const mb = await post("/api/framework/multibody", {
prompt: "sun-earth-moon",
bodies: [
{ mass: 1.989e30, location: "sun", object: "sun" },
{ mass: 5.972e24, location: "earth", object: "earth" },
{ mass: 7.342e22, location: "moon", object: "moon" },
],
koSettings: { KO42: 1.0, NM21: 0.5, GR35: 0.3 },
});
for (const body of mb.bodies) console.log(body.object, body.registerDump);
These routes are server-only — they require an API key (don't ship the key to a browser). /api/framework/solve-strict runs the ≤0.1% autotune loop. See /api/framework/ for the full request/response schema and every optional field (useOperatorModules, coreOnly, referenceMode, pairwiseCoupling, …).
Economy — send a ZEQ coin (and across domains)
Every compute mints a ZEQ envelope coin (the transferable asset). Transfers are
private by default; pass visibility:"public" to publish to the observer.
// Send a coin you hold. Cross-domain: add `to_origin` for a peer-domain recipient.
const r = await fetch("https://zeq.dev/api/tally/envelopes/transfer", {
method: "POST",
headers: { "Authorization": `Bearer ${ZSM_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ token_id: "ZT-…", to: "ZEQ07…", to_origin: "https://zeqond.com" }),
});
const { receipt, claim_ticket, spend_seq } = await r.json();
// The recipient's domain verifies `receipt` against the home chain, imports a
// claim, and can move it onward with `claim_ticket`. No consensus, one home per coin.
Full model + the verify/claim/publish endpoints: cross-domain economy.
Compose with
- TypeScript —
@zeq/sdk— the typed client (same wire shape, plus local compute and offlineverify). - Hosted API reference — every route, body, response, error.
- HTTP / curl — the full wire-format walkthrough (attest, verify, headers).
- Observer Agents — drop the universal sensor into the same project.
Source
- The typed package is
@zeq/sdk(v1.0.0, source inapp/packages/sdk/), published to Zeq's own registry — see TypeScript —@zeq/sdk. - The wire contract every client wraps is documented in full at HTTP / curl and the API reference.