DefendableLedger · Verify a Record
What you can verify
- A DefendableRouter receipt (full
router_receipt.json) - A Tribunal verdict (full
verdict.json) - A SwarmJelly training pair (full
<pair_id>.json) - A DefendableLedger record (single JSONL line)
- The entire ledger chain (every record’s
parent_hashmatches the priorrecord_sha256)
Verify a single record (web)
- Go to defendableledger.com/verify.
- Paste the record’s JSON into the input box.
- Paste the claimed
record_sha256(orreceipt_sha256etc.) into the claimed-hash box. - Click Compute SHA-256.
- The page computes both:
- Raw SHA-256 — over the bytes as-pasted.
- Canonical SHA-256 — over the JSON with keys sorted and no whitespace.
- Result shows ✓ MATCH if either matches the claimed hash.
WebCrypto runs in your browser. Nothing is sent to a server. Verification is client-side and offline-capable after first page load.
Verify a single record (CLI)
defendablerouter receipt hash --file path/to/router_receipt.json# prints: <sha256> path/to/router_receipt.jsonCompare the printed hash against the claimed receipt_sha256 or record_sha256.
Verify a full run directory
defendablerouter receipt verify --run data/runs/DRR-20260524-XYZThis walks the run directory and checks:
canonical_receipt_sha256reproduces from the volatile-stripped receipt bodyreceipt_sha256reproduces from the canonical-hash-injected bodymanifest_sha256reproduces from the file listSHA256SUMS.txtmatches the manifest entries- Every file in the manifest hashes to its stored digest
Output: PASS or FAIL with the exact mismatch surfaced.
Verify the ledger chain
defendablerouter ledger verify# walks defendable_ledger.jsonl# checks every record's parent_hash points at the prior record_sha256# checks every record_sha256 recomputes correctly# reports first chain break (if any) with ledger_seqAny tamper to any record downstream of ledger_seq N breaks the chain at N. The verifier surfaces the exact line.
The canonicalization rule
There is one canonicalization rule across the spine. Use it for any custom verification:
- Take the JSON object.
- Strip volatile fields:
- For receipts:
created_at,hashes - For manifests:
manifest_id,created_at,manifest_sha256 - For ledger records:
record_sha256itself
- For receipts:
- Sort keys alphabetically · all levels of nesting.
- Serialize as JSON with no whitespace · UTF-8.
- SHA-256 over the resulting bytes.
This rule lives in defendablerouter/core/canonicalize.py. The /verify page on defendableledger.com applies the same rule in WebCrypto.
Verify the publication itself
Each entry on /records at defendableledger.com carries:
- The full record JSON
- Its
record_sha256andparent_hash - A link to the
payload_refartifact (also published)
Verify by:
- Compute SHA-256 of the published record body → must equal stored
record_sha256. - Compute SHA-256 of the payload artifact → must equal stored
payload_hash. - Check
parent_hashagainst the prior record on the public site.
Three checks. Three SHA-256s. Provenance proven.
🐝 Verify anything · trust no one · books and records · to the shed.