Go — raw HTTP
Call ZeqVM from Go
Get the CLI (recommended first install)
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/.
Compute over raw HTTP — stdlib only
Zero external dependencies — net/http + encoding/json. Compile-ready:
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"log"
"net/http"
"os"
)
func main() {
body, _ := json.Marshal(map[string]any{
"operators": []string{"KO42", "NM19"},
"domain": "Newtonian Mechanics",
"inputs": map[string]any{"mass": 5, "acceleration": 9.81},
})
req, _ := http.NewRequest("POST", "https://zeqsdk.com/api/zeq/compute", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("ZEQ_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
raw, _ := io.ReadAll(res.Body)
var out map[string]any
json.Unmarshal(raw, &out)
fmt.Println(out["value"], out["unit"], out["uncertainty"])
fmt.Println("zeqProof:", out["zeqProof"])
fmt.Println("explorer:", out["explorer_url"])
}
The public pulse needs no key: GET https://zeqsdk.com/api/zeq/pulse with the same stdlib pattern.
The response's compliance field is the ZeqCompliance v1 envelope — the 13-standard regulatory record returned on every call. Every result also carries signed — an Ed25519-signed claim (claim + signature + public_key) verifiable offline by anyone, or by POSTing the block to any node's public /api/attest. Or pipe the whole envelope to the CLI: … | zeq verify -.
Why Go here
- Backend services. Drop the snippet into a
cmd/binary and you have acomputeworker that scales horizontally without any extra glue. - CLI tools. Single static binary, fast cold-start, no runtime to ship.
- Goroutine concurrency. Wrap the request in
context.Context; cancel an in-flightcomputecleanly when the caller's request is closed.
Compose with
- Hosted API reference — every route, body, response, error.
- HTTP / curl — the full wire-format walkthrough (solve, multibody, attest).
- Observer Agents — Network Tap — Go is the canonical language for the agent's pacemaker daemon variants.
Source
- The wire contract is documented in full at HTTP / curl and the API reference.