メインコンテンツまでスキップ

Ruby SDK — zeq

Ruby 3.2+ client. Built on stdlib Net::HTTP and JSON — no external runtime dependencies. Same wire envelope as every other SDK.

Install

gem install zeq
# Gemfile
gem 'zeq', '~> 1.287'

First call — public, no key

require 'zeq'

p = Zeq.pulse
puts "Zeqond #{p.zeqond} · phase #{p.phase.round(3)} · R(t) #{p.r_t}"

Authed call — zeq.compute

zeq = Zeq::Client.from_env # reads ENV['ZEQ_KEY']

r = zeq.compute(
operators: %w[KO42 QM5 GR40],
domain: 'cross',
inputs: { t: 0 },
)

puts "#{r.value} #{r.unit} ± #{r.uncertainty}"
puts "zeqProof: #{r.zeq_proof}"
puts "compliance: #{r.compliance.standards_aligned}"

r.compliance carries the ZeqCompliance v1 envelope.

Why Ruby here

  • Rails apps. Drop the gem into 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 Zeq.compute from 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

Source