Skip to main content

Java — raw HTTP today, native client planned

Native client status: PLANNED

There is no published Java artifact yet — nothing on Maven Central, and no packages/sdk-java/ 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 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

JDK 11+ java.net.http.HttpClient, no third-party dependencies. Compile-ready:

import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class ZeqCompute {
public static void main(String[] args) throws Exception {
String body = """
{ "operators": ["KO42", "QM5", "GR40"],
"domain": "cross",
"inputs": { "t": 0 } }""";

HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://zeqapi.com/api/zeq/compute"))
.header("Authorization", "Bearer " + System.getenv("ZEQ_KEY"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();

HttpResponse<String> res = HttpClient.newHttpClient()
.send(req, HttpResponse.BodyHandlers.ofString());

// Full envelope: value, unit, uncertainty, signed, compliance, zeqProof, explorer_url …
System.out.println(res.body());
}
}

Parse with Jackson, Gson, or jakarta.json — the envelope is plain JSON. 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 Java here

  • Enterprise services. Drop the call into a Spring Boot service; the JDK's HttpClient brings connection pooling for free.
  • Banking and insurance. A compute envelope is a SOC 2 / SOX-ready audit row; the JVM ecosystem's audit-log wiring snaps in directly.
  • Android. The same wire calls run on Android; pair with the Web JS observer for a hybrid mobile app.

Compose with

  • Kotlin — same wire calls, coroutine-friendly.
  • Hosted API reference — every route, body, response, error.
  • HTTP / curl — the full wire-format walkthrough (solve, multibody, attest).

Status & source

  • Native Java client: planned — pending the self-hosted package-registry decision; no Maven coordinates are reserved.
  • The wire contract it will wrap is live today and documented in full at HTTP / curl and the API reference.