Ruby — raw HTTP today, native gem planned
There is no published gem yet — nothing on RubyGems, and no packages/sdk-ruby/ 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 gem ships it will wrap exactly this wire format, so code written against HTTP today won't change semantically.
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
Ruby 3.x Net::HTTP + JSON, no external runtime dependencies. Runs as-is:
require "net/http"
require "json"
require "uri"
uri = URI("https://zeqapi.com/api/zeq/compute")
req = Net::HTTP::Post.new(
uri,
"Content-Type" => "application/json",
"Authorization" => "Bearer #{ENV.fetch("ZEQ_KEY")}"
)
req.body = {
operators: %w[KO42 QM5 GR40],
domain: "cross",
inputs: { t: 0 }
}.to_json
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
http.request(req)
end
out = JSON.parse(res.body)
puts "#{out["value"]} #{out["unit"]} ± #{out["uncertainty"]}"
puts "zeqProof: #{out["zeqProof"]}"
puts "explorer: #{out["explorer_url"]}"
The public pulse needs no key: GET https://zeqapi.com/api/zeq/pulse.
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 Ruby here
- Rails apps. Wrap the call in a Rails service object; the entangled-state row that comes back is a tamper-evident record next to your ActiveRecord rows.
- DevOps tooling. Single-file Ruby scripts that hit
/api/zeq/computefrom a Capistrano task, a Sidekiq worker, or a CI job — same envelope, same receipts. - Educational notebooks. IRB + Pry feels at home with the framework's interactive proof model.
Compose with
- Hosted API reference — every route, body, response, error.
- HTTP / curl — the full wire-format walkthrough (solve, multibody, attest).
- Python — same wire envelope; mix and match in a polyglot data pipeline.
Status & source
- Native gem: planned — pending the self-hosted package-registry decision; no gem name is reserved.
- The wire contract it will wrap is live today and documented in full at HTTP / curl and the API reference.