aere-cloud-sdk/go
2026-09-29 15:45:17 +03:00
..
aerecloud_test.go 1.6.0: the Trust API (verify: one AERE Proof Protocol envelope -> VALID / INVALID / PARTIAL, judged by the published reference verifier) in all clients; a .NET client (Aere.Cloud, .NET 8+); Java 1.6.1 on the Java 8 API (Android transport, redirects not followed). Go's Verify takes the envelope's bytes (json.RawMessage): a Go map would sort the keys and change the statement's hash. 2026-09-29 15:45:17 +03:00
aerecloud.go 1.6.0: the Trust API (verify: one AERE Proof Protocol envelope -> VALID / INVALID / PARTIAL, judged by the published reference verifier) in all clients; a .NET client (Aere.Cloud, .NET 8+); Java 1.6.1 on the Java 8 API (Android transport, redirects not followed). Go's Verify takes the envelope's bytes (json.RawMessage): a Go map would sort the keys and change the statement's hash. 2026-09-29 15:45:17 +03:00
control-negativ.mjs 1.6.0: the Trust API (verify: one AERE Proof Protocol envelope -> VALID / INVALID / PARTIAL, judged by the published reference verifier) in all clients; a .NET client (Aere.Cloud, .NET 8+); Java 1.6.1 on the Java 8 API (Android transport, redirects not followed). Go's Verify takes the envelope's bytes (json.RawMessage): a Go map would sort the keys and change the statement's hash. 2026-09-29 15:45:17 +03:00
go.mod aere-cloud Go 1.5.0: the Go client (standard library only), same surface as the JS client 2026-09-25 10:45:59 +03:00
README.md 1.6.0: the Trust API (verify: one AERE Proof Protocol envelope -> VALID / INVALID / PARTIAL, judged by the published reference verifier) in all clients; a .NET client (Aere.Cloud, .NET 8+); Java 1.6.1 on the Java 8 API (Android transport, redirects not followed). Go's Verify takes the envelope's bytes (json.RawMessage): a Go map would sort the keys and change the statement's hash. 2026-09-29 15:45:17 +03:00

aere-cloud (Go)

The official Go client for the Aere Cloud API on Aere Network (chain 2800). Zero dependencies beyond the Go standard library. Same routes and semantics as the JS, Python and Java clients 1.5.0.

JSON routes return the server's JSON as json.RawMessage, so you decode it into the types you already use. The two routes that return files (the audit export and the check of a kept export) return typed results, with the SHA-256 computed locally from the bytes received.

Use

import aerecloud "git.aere.network/aere-network/aere-cloud-sdk/go"

c, err := aerecloud.New(os.Getenv("AERE_KEY"))
head, err := c.DataHead(ctx)                         // {"block":...,"chainId":2800,...}
n, err := c.BlockNumber(ctx)

// quantum-readiness scan of a domain's TLS edge: free, no key is sent unless you attest the report
report, err := c.Readiness(ctx, "example.com", false, false)

// the audit log of a day as a file; Verified is true only if the sha256 of the bytes you received equals the digest
day, err := c.AuditExport(ctx, "2026-09-24", "jsonl")

// a kept export still matches the day we hold, or the tombstone a deleted day left behind
k, err := c.AuditVerifyKept(ctx, "2026-05-01", keptBytes)

// Trust API (1.6.0): any AERE Proof Protocol (AIP-23) envelope -> VALID / INVALID / PARTIAL; chain 0 = the one the envelope declares.
// Pass the envelope's bytes as received (os.ReadFile): a Go map would sort the keys and change the statement's hash.
verdict, err := c.Verify(ctx, json.RawMessage(envelopeBytes), 2800)

// verify a webhook delivery (constant-time HMAC-SHA256 over the exact bytes received)
ok := aerecloud.VerifyWebhook(rawBody, r.Header.Get("x-aere-signature"), secret)

Non-2xx answers come back as *aerecloud.Error with Status, Body and Path. The client does not follow redirects: a 3xx is returned as an answer, so your API key is never sent to a host you did not name.

Tests

go test ./...                 # offline, against a local httptest server
node control-negativ.mjs      # breaks six guards in a copy of the package; each one's test must fail

Measured 2026-09-25: 7 tests green; the negative control 6 of 6 red, the untouched package green.