open-standards/wai/examples/verify-receipts
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science e8c8327631 wai/examples: every template Apache-2.0, its LICENSE carried into the project
Each example holds the license's text as LICENSE (wai/LICENSE, byte for byte) and says so in
its README; wai create writes it with the rest of the template, from one copy in the binary.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-27 04:52:31 -04:00
..
python wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
rust wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
test wai/examples: encoder-ingest subscribes once the gateway publishes; tests take CARGO_TARGET_DIR 2026-10-26 22:58:39 -04:00
.gitignore wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
LICENSE wai/examples: every template Apache-2.0, its LICENSE carried into the project 2026-10-27 04:52:31 -04:00
README.md wai/examples: every template Apache-2.0, its LICENSE carried into the project 2026-10-27 04:52:31 -04:00
wai.json wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00

Verify receipts in Rust and in Python

What it shows. WAI receipts checked offline, twice: once by the reference implementation (rust/, on the wai crate) and once by a second implementation in plain Python (python/, standard library only, sharing no code with the first). A receipt index sits beside each object; it names the object's group receipt, which is signed with Ed25519 and holds the Merkle root the object's BLAKE3 content hash reaches.

Run it.

wai create my-check --template verify-receipts
cd my-check
wai hello receipts                              # writes an object and its receipts in receipts/
python3 python/verify_receipts.py receipts
cd rust && cargo run --release -- ../receipts   # builds the wai crate from the repository

What you see. Each verifier prints ok for the object, the group that signed it and the key that signed the group. Change one byte of receipts/*.wai, or of a file in receipts/rcpt/, and each prints FAIL with the reason.

Make it yours. Point either verifier at any directory laid out the same way: an object <cid>.wai, its index <cid>.wai.receipts, and the group receipts under rcpt/, as WAI's HTTP delivery serves them beside an object. wai verify <dir> runs the Rust checks from the command line.

With a coding assistant. Run wai setup-agent in this directory: it writes the instructions an assistant reads and connects it to WAI's tools.

License. Apache-2.0: the text is in LICENSE, and a project wai create makes from this example carries it.