Citations: CITATIONS-UNRESOLVED.md generated from the published files; the top README cites the tests on their real paths under tools/proof-of-software/test/; the Cloud client file brought to the published SDK copy (O-017, 2026-10-12)

This commit is contained in:
Aere Network committed 2026-10-12 06:11:12 +03:00
1 parent 549ac7b7fc
commit 829d622719
4 files changed
+78 -14

No files matched your search

+49 -4
View File
@@ -75,12 +75,57 @@ export class AereCloud {
return this._req('POST', '/verify' + (chain ? `?chain=${encodeURIComponent(chain)}` : ''), { body: envelope });
}
/**
* identity verification (1.7.0): 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 (with the moment) that reproduces the verdict. Read `verdict`:
* PARTIAL means some rows could not be judged (no trusted issuers, no status list). Needs a gateway that serves POST /v1/identity/verify.
* @param {{presentation:object, audience:string, nonce:string, trustedIssuers?:(string|object)[], statusLists?:object[], revocations?:object[], maxAgeSeconds?:number}} request
* @returns {Promise<{verdict:'VALID'|'PARTIAL'|'INVALID', notJudged:number, subject:object|null, claims:object|null, rows:object[], judgedAt:string, verifier:object, reproduce:string}>}
*/
identityVerify(request) { return this._req('POST', '/identity/verify', { body: request }); }
/**
* compliance check (1.7.0): your policy judged on an AERE Identity presentation -> COMPLIANT / NOT_COMPLIANT with the reasons, and with
* `record: true` the record of the decision as an AIP-23 envelope without personal data (notarize it with notarize()). No claims come back.
* @param {{presentation:object, policy:object, audience:string, nonce:string, statusLists?:object[], revocations?:object[], record?:boolean}} request
* @returns {Promise<{verdict:'COMPLIANT'|'NOT_COMPLIANT', compliant:boolean, reasons:string[], policyId:string, policyHash:string, presentationHash:string, record?:object, judgedAt:string, verifier:object, reproduce:string}>}
*/
complianceCheck(request) { return this._req('POST', '/compliance/check', { body: request }); }
/**
* payments, the risk step (1.8.0): one payment by a person or a company judged under YOUR declared policy by the published module
* (payments/risc.mjs) -> ALLOW / REFUSE with the reasons, what was measured and what was NOT (named in `unmeasured`, never simulated:
* no sanctions list, no identity tier), and the hashes (policyHash, inputsHash, verdictHash) from which anyone reproduces the verdict.
* A refusal is a verdict (HTTP 200, `verdict: 'REFUSE'`), not an error. Needs a gateway that serves POST /v1/payments/risk.
* @param {{policy:object, inputs:object}} request inputs: { chainId, payer, payee, asset, amount, rate:{usdPerUnit, source, at}, history, now }
* @returns {Promise<{verdict:'ALLOW'|'REFUSE', reasons:string[], unmeasured:string[], measured:object, policyHash:string, inputsHash:string, verdictHash:string, verifier:object, reproduce:string}>}
*/
paymentsRisk(request) { return this._req('POST', '/payments/risk', { body: request }); }
/**
* payments, the receipt (1.8.0): for a payment ALREADY on the chain the gateway serves. The verdict is reproduced and must be ALLOW,
* the transaction must be the payment judged, and the receipt (an instruction and its AIP-23 settlement envelope) comes back notarized.
* Throws AereCloudError 409 (risk_refused, tx_mismatch, chain_mismatch), 404 (tx_not_found) or 502 (notarization_failed, with the
* receipt built but without a time). The amount in USD is exact at the rate YOU declare in the inputs; it is not a market price.
* @param {{policy:object, inputs:object, txHash:string, purpose?:string}} request
* @returns {Promise<{receipt:{instruction:object, envelope:object}, verdict:object, verifier:object, reproduce:string}>}
*/
paymentsReceipt(request) { return this._req('POST', '/payments/receipt', { body: request }); }
/**
* payments, verify a receipt (1.8.0): the rules of the published module against the policy, the inputs and the chain, and the
* envelope judged by the reference verifier -> VALID / INVALID / PARTIAL (PARTIAL: the notarization is not under a certified anchor yet).
* @param {{receipt:{instruction:object, envelope:object}, policy:object, inputs:object}} request
* @returns {Promise<{verdict:'VALID'|'INVALID'|'PARTIAL', reasons:string[], rules:object, envelope:object|null, amountUsd:string, verifier:object, reproduce:string}>}
*/
paymentsVerify(request) { return this._req('POST', '/payments/verify', { body: request }); }
// ---- chain data ----
dataHead() { return this._req('GET', '/data/head'); }
validators() { return this._req('GET', '/data/validators'); }
anchors(limit = 10) { return this._req('GET', `/data/anchors?limit=${encodeURIComponent(limit)}`); }
anchor(height) { return this._req('GET', `/data/anchors/${encodeURIComponent(height)}`); }
// 2026-09-26: the post-quantum finality point (finalized/safe = the parent of the last certified anchor), the tag nodes do not serve yet
// 2026-09-26: the post-quantum certified point (finalized/safe = the parent of the last certified anchor; evidence that its signers sealed it, not by itself that it was decided, AIP-22 erratum 2026-10-01); the tags nodes did not serve then
finality() { return this._req('GET', '/data/finality'); }
transfers(address, limit = 50) {
return this._req('GET', `/data/transfers?address=${encodeURIComponent(address)}&limit=${encodeURIComponent(limit)}`);
@@ -90,7 +135,7 @@ export class AereCloud {
/** Notarizeaza un digest de 32 de octeti (0x + 64 hex); noi platim gazul. */
notarize(hash) { return this._req('POST', '/notarize', { body: { hash } }); }
proofOf(hash) { return this._req('GET', `/notarize/${encodeURIComponent(hash)}`); }
// 2026-09-17: the proof with its post-quantum finality (first appearance, covering anchor, verdict, verification steps)
// 2026-09-17: the proof under a post-quantum certificate (first appearance, covering anchor, verdict, verification steps)
proof(hash) { return this._req('GET', `/proof/${encodeURIComponent(hash)}`); }
// quantum readiness scan of a domain's public TLS edge: free without a key; { attest: true } notarizes the report digest
@@ -108,8 +153,8 @@ export class AereCloud {
return this._req('POST', '/pq/readiness/perimeter', { body });
}
// AIP-21 (2026-09-18): the per-block post-quantum finality record (seals heard by a validator, re-verified, quorum
// verdict). Free, no key. Testnet 28001 first; `network` is reserved for chain 2800 once the method reaches its validators.
// AIP-21 (2026-09-18): the per-block post-quantum seal record (seals heard by a validator, re-verified, quorum
// verdict: evidence of participation, not by itself of the decision, AIP-21 erratum 2026-10-01). Free, no key. Testnet 28001 first; `network` is reserved for chain 2800 once the method reaches its validators.
// `client`: 'besu' (default), 'nethermind', or 'both' (two independent implementations, with `agreement` computed by the gateway).
pqFinality(block = 'latest', network = 'testnet', client = 'besu') {
return this._req('GET', `/pq/finality/${encodeURIComponent(block)}?network=${encodeURIComponent(network)}&client=${encodeURIComponent(client)}`, { auth: false });
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@aere/cloud",
"version": "1.6.0",
"version": "1.8.0",
"description": "Official client for the Aere Cloud API: keyed RPC, post-quantum verification, chain data, notarization, webhooks and gas sponsorship on Aere Network (chain 2800).",
"type": "module",
"main": "index.mjs",