aere-cloud-sdk/java
Aere Network 0fe1828f5b 1.7.0: identity and compliance verification in all five clients (identityVerify / complianceCheck; Go: IdentityVerify / ComplianceCheck with the presentation as its JSON bytes)
POST /v1/identity/verify: an AERE Identity presentation judged by the published command line -> VALID / PARTIAL / INVALID with every
row, the claims shown and the subject when no row failed, and the command that reproduces the verdict.
POST /v1/compliance/check: your policy judged on a presentation -> COMPLIANT / NOT_COMPLIANT with the reasons and, with record, the
decision as an AIP-23 envelope without personal data.
In Go the presentation, keys, lists and policy travel as json.RawMessage: a map or float64 would change numbers above 2^53 and the
canonical text the signatures cover. The .NET negative control now builds clean for each planted defect (an incremental build could
run the tests against the previous planted library). A negative control for the JavaScript and Python routes is added.

Tests: JavaScript 13, Python 14, Go ok, Java 10/10 (and the Java 8 API gate); negative controls Go 9/9, Java 10/10, .NET 12/12,
JavaScript and Python 4/4.
2026-09-30 12:10:59 +03:00
..
src 1.7.0: identity and compliance verification in all five clients (identityVerify / complianceCheck; Go: IdentityVerify / ComplianceCheck with the presentation as its JSON bytes) 2026-09-30 12:10:59 +03:00
.gitignore Install from this repository (the clients are not on npm or PyPI yet); Python and Java clients 1.5.1/1.5.0 added 2026-09-25 11:02:13 +03:00
control-negativ.mjs 1.7.0: identity and compliance verification in all five clients (identityVerify / complianceCheck; Go: IdentityVerify / ComplianceCheck with the presentation as its JSON bytes) 2026-09-30 12:10:59 +03:00
README.md 1.7.0: identity and compliance verification in all five clients (identityVerify / complianceCheck; Go: IdentityVerify / ComplianceCheck with the presentation as its JSON bytes) 2026-09-30 12:10:59 +03:00

aere-cloud (Java)

The official Java client for the Aere Cloud API — one keyed endpoint for RPC, post-quantum signature verification, chain data, notarization, webhooks and gas sponsorship on Aere Network (chain 2800). Zero dependencies beyond the standard library: java.net.HttpURLConnection and javax.crypto only. Since 1.6.1 the class uses only the Java 8 API (the tests enforce it with javac --release 8), which is what Android provides; it has not yet been run on an Android device (see below). It does not follow redirects: a 3xx is raised as an error, so your API key is never sent to a host you did not name.

Mirror of @aere/cloud (JS) and aere-cloud (Python): same routes, same semantics. Bodies are raw JSON strings — the client does not force a JSON library on the integrator; parse responses with whatever you already use (Jackson, Gson, org.json, ...).

Use

import network.aere.cloud.AereCloud;

var aere = new AereCloud(System.getenv("AERE_KEY"));

String head = aere.dataHead();          // {"block":...,"chainId":2800,...}
String anchors = aere.anchors(5);       // post-quantum anchor certificates
long n = aere.blockNumber();

// a smart account with a POST-QUANTUM owner (Falcon-512), gas sponsored:
String acct = aere.sponsorCreatePqAccount("0x09" + falconPkHex, 0);

// Trust API (1.6.0): any AERE Proof Protocol (AIP-23) envelope (JSON text) -> VALID / INVALID / PARTIAL with the levels checked
String verdict = aere.verify(envelopeJson, 2800);

// identity and compliance (1.7.0): the request as JSON text, sent as given; read "verdict" (PARTIAL: some rows not judged)
String id = aere.identityVerify("{\"presentation\":" + presentationJson + ",\"audience\":\"https://your.app/verifier\",\"nonce\":\"" + nonce + "\"}");
String ok = aere.complianceCheck(requestWithPolicyJson);

// verify a webhook delivery (constant-time HMAC) — never trust one without this:
boolean ok = AereCloud.verifyWebhook(rawBodyBytes, request.header("x-aere-signature"), secret);

Non-2xx responses raise AereCloud.AereCloudException with .status, .body (server JSON) and .path.

Since 1.5.0 (same surface as the JS and Python SDKs 1.5.0)

aere.proof("0x" + sha256Hex);                            // a proof with its post-quantum finality
aere.readiness("example.com", false, false);             // quantum-readiness scan, free, no key sent
aere.readinessPerimeter("example.com", new String[]{"api"}, null, false); // a domain's whole public perimeter
aere.pqFinality("latest", "testnet", "both");         // AIP-21 per-block PQ finality, both clients

AereCloud.AuditExport day = aere.auditExport("2026-09-24", "jsonl");
// day.bytes are the exact bytes of the day file; day.verified is true only if THEIR sha256 equals the stated digest

aere.auditRetention();                                    // read-only with the API key; set it in the console
AereCloud.KeptCheck k = aere.auditVerifyKept("2026-05-01", keptBytes);
// k.matches: your kept export still matches the day we hold, or the tombstone (digest) a deleted day left behind

auditVerifyKept hashes YOUR bytes locally. An error (rate limit, network) is raised, never returned as "does not match".

Android

Copy src/main/java/network/aere/cloud/AereCloud.java into your app module (package network.aere.cloud) and call it off the main thread, as with any network call on Android. What is measured: the class compiles against the Java 8 API (javac --release 8) and its tests pass on the JDK. What is not: we have not run it on an Android device or emulator.

Tests

javac --release 8 -d out8 src/main/java/network/aere/cloud/AereCloud.java          # the Android gate: Java 8 API only
javac -d out src/main/java/network/aere/cloud/AereCloud.java src/test/java/network/aere/cloud/TestAereCloud.java
java -cp out network.aere.cloud.TestAereCloud                    # unit, offline
AERE_KEY=ak2800... java -cp out network.aere.cloud.TestAereCloud --live   # + live probes

Measured 2026-08-27: 7/7 green, including live probes against production (health, validator set, block number, and the free JSON refusal on the PQ sponsorship route).

Measured 2026-09-28 (1.6.1, JDK 21): 9/9 offline, including a 302 to a second local host that receives zero requests; the negative control (node control-negativ.mjs) turns 8 of 8 planted faults red, among them a followed redirect and two post-Java-8 calls that the JDK tests alone would not catch but --release 8 refuses.

Measured 2026-09-25 (1.5.0): 7/7 offline, the new routes judged against a local JDK HTTP server (what the client sends, what it does with each answer). node control-negativ.mjs breaks five guards in a copy of the class and requires each one's test to fail: 5/5 red, the untouched class green.