Skip to main content

Deploy and compute

A protocol is a named building block composed from the operator registry — the same pieces a state contract is built from. You run one in one of two ways:

  1. Deploy it as a state contract — the usual path. Most protocols ship as a ready-made contract template you deploy by id, then fire on your machine's clock.
  2. Compute its operators directly — call POST /api/zeq/compute with the operators and inputs when you just want the number back.

Deploy as a state contract

zeq_contract_deploy { "templateId": "orbital-decay-monitor" }

The contract advances when you drive it (POST /api/chain/:slug/contracts/:id/transition) or when a trigger fires it on a Zeqond interval, cron, or event. Every transition is Zeqond-stamped onto your entangled state with a ZeqProof. See State Contracts for the full lifecycle.

Compute directly

curl -sS -X POST https://www.zeq.dev/api/zeq/compute \
-H "Authorization: Bearer zeq_ak_..." \
-H "Content-Type: application/json" \
-d '{ "domain": "General Relativity", "operators": ["KO42","GR37"], "inputs": { "mass": 1.98892e30 } }'

KO42 is always applied; add up to three more operators per call. The response is the compute envelope:

{
"value": 2954.0077,
"unit": "m",
"uncertainty": 0.0,
"operator_id": "KO42",
"zeqState": { "operators": ["KO42","GR37"], "domain": "General Relativity", "zeqond": 2294703417, "phase": 0.38 },
"protocol_steps": [ { "name": "COMPUTE", "detail": { "solver": "GR domain solver", "equation": "r_s = 2GM/c²" } } ],
"signed": { "signature": "…" },
"zeqProof": "…"
}

The fields you use most:

  • value (with unit and uncertainty) — the computed result.
  • zeqState.zeqond / zeqState.phase — the Zeqond the result was stamped at.
  • protocol_steps — the 7-step trace (SELECT → BIND → VALIDATE → COMPUTE → VERIFY → PULSE → RETURN).
  • zeqProof / signed.signature — the HMAC + Ed25519 proof you can verify on any node.

Next

Use it from your preferred language → SDK clients.