Verify an answer
Two things come back from the machine, and they differ:
- A state contract is a new question. The machine runs it through FORM, BIND, COMPUTE, MEASURE and SEAL, each step a guarded transition, and answers with an envelope.
- A Zeq envelope is a computation already proven. It is signed, and carries the value, the unit, the verdict and the recipe that computes it again.
Check it
POST /verify with what /ask returned, or {sealed, record} for another machine's answer. It answers {verified, by, reproduction}: the signature checked, the ZeqProof checked, the recipe computed again.
curl -s https://HOST/verify -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d @answer.json
reproduce distinguishes two cases:
- The same engine. The digest must match bit for bit.
- A different engine. Value, unit and verdict must match, and both engines are named.
Every log row binds its Zeqond into its hash, so identity, time and value travel as one authenticated tuple that a peer verifies offline.
Turn it into code
--export, POST /export and the export MCP tool turn an envelope into Python, JavaScript or C:
python3 zeq.py --ask "E ? E = h*nu; nu = c/lam | lam = 500 nm" --json > answer.json
python3 zeq.py --export answer.json --lang python --out photon.py
python3 photon.py # its self-test, then the value
The snippet carries:
- the equations as a function, written from the machine's own parse tree;
- the proven instance;
- a self-test;
- the envelope and the public record, verbatim. The JavaScript version checks both signatures with Node's Ed25519.
Code is made only from an envelope that verifies and recomputes, and each snippet's sha256 is signed into the log. Only the sealed value is proven. Calling the function with other inputs is ordinary arithmetic; a new proven value is a new question.
A reviewer's word
python3 zeq.py --attest answer.json confirmed "checked by hand" # a signed verdict over one sealed result
python3 zeq.py --attest answer.json answer.attest.json # check someone's attestation: no PIN needed
A reviewer's machine computes the answer again before it signs confirmed, and refuses to when it does not reproduce.
Clips: evidence by its hash
A clip stamps any payload (a file, a reading, a message) by its sha256 alone, as one signed row of the log. The payload is never kept, so a clip proves you held those bytes at that Zeqond without handing them over.
--clips stamp NAME FILErecords one.--clips check ID FILEchecks the bytes against it later.--clips graph IDwalks the evidence a clip rests on.
Over the wire, use the routes under /clips.