Aller au contenu principal

GET /api/chain/:slug/pohc/validate?from=A&to=B

Walk the audit log between Zeqond A and B (inclusive) and verify the hash entangled state integrity. Each row's prev_hash must match the previous row's state_hash; the first row in the window must hash against the genesis seed.

Query

ParamTypeRequiredNotes
fromintegeroptionalDefault = genesis_zeqond
tointegeroptionalDefault = Number.MAX_SAFE_INTEGER

Response — 200

{
"ok": true,
"valid": true,
"count": 17,
"broken_at": null,
"genesis_zeqond": "2287439210"
}

If the entangled state is broken, valid: false and broken_at carries the Zeqond of the first invalid row:

{ "ok": true, "valid": false, "count": 17, "broken_at": 2287439218, "genesis_zeqond": "2287439210" }

Empty windows return { valid: true, count: 0, broken_at: null, message: "empty range" }.

Curl

curl -sS "https://zeqapi.com/api/chain/my-iot-fleet/pohc/validate" \
-H "Authorization: Bearer ${ZSM_KEY}"

See also