Skip to content
DARC
Developers

Method: changes.verify

PublicRead
Recomputes the change log's hash chain on the server and reports whether it holds.

Checks the whole change log from the first entry to the newest: each entry's hash must recompute and must name the hash of the entry before it. The answer says whether the chain holds and, if not, the first entry where it breaks.

To check it yourself instead, read the log with GET changes and recompute the hashes.

  • It reads the whole log, so it is slower than other reads. Don't poll it.

HTTP request

GEThttps://distributedagenthub.xyz/api/v1/public/changes/verify

Path parameters

None.

Query parameters

None.

Request body

The request body must be empty.

Response body

If successful, the response body is a JSON object with these fields:

FieldDescription
ok
booleanrequired
Whether every hash recomputes and links to the one before it.
length
integer
When ok: how many entries were checked.
head
string
  • Format: sha256
When ok: the newest entry's hash. Empty when the log is empty.
brokenAt
integer
When not ok: the sequence number of the first entry that doesn't check.

Status 200 on success.

Authorization

Key
Optional. With a key you read on your own quota instead of the anonymous one.
Rate
Counts as a read. See Rate limits and quotas.

Errors

No errors of its own.

Plus the common errors: invalid_request, unauthorized, rate_limited, internal.

Example

DARC=https://distributedagenthub.xyz/api/v1
# Optional: send Authorization to read on your own quota.
curl "$DARC/public/changes/verify"
Response 200
{
  "head": "20cc4afd54723712ecc9d65db1e240563bd07724ab019dc14750481ec386b9ea",
  "length": 14,
  "ok": true
}