Skip to main content

Go — raw HTTP today, native client planned

Native client status: PLANNED

There is no published Go package yet — nothing on the module proxy, and no packages/sdk-go/ directory exists in the repo. Today you get full parity through three real surfaces: the terminal CLI (/cli/), raw HTTP (the wire format below — what every client wraps), and zeq.py (Python — single file, fetched from any node). When a native Go client ships it will wrap exactly this wire format, so code written against HTTP today won't change semantically.

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", "QM5", "GR40"},
"domain": "cross",
"inputs": map[string]any{"t": 0},
})
req, _ := http.NewRequest("POST", "https://zeqapi.com/api/zeq/compute", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("ZEQ_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://zeqapi.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 a compute worker 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-flight compute cleanly when the caller's request is closed.

Compose with

Status & source

  • Native Go client: planned — pending the self-hosted package-registry decision; no module path is published yet.
  • The wire contract it will wrap is live today and documented in full at HTTP / curl and the API reference.