Static, client-side Ed25519 verifier for Headless Oracle signed market-state receipts. Deployed to verify.headlessoracle.com.
The page lets anyone — agent, auditor, regulator, or a human with a browser — confirm that a receipt was signed by the operator's published key, without trusting any intermediary. All cryptography happens in the browser via the Web Crypto API.
Headless Oracle answers one question: is this exchange open right now? Every answer is an Ed25519-signed attestation. For the trust model to mean anything, anyone must be able to verify a receipt without trusting Headless Oracle's servers. This page is the open-source artifact that does that.
The signing spec is short:
- Drop the
signaturefield. - Sort remaining keys alphabetically.
JSON.stringifywith no whitespace.- UTF-8 encode.
- Verify with Ed25519 (RFC 8032) against the public key whose
key_idmatches the receipt'spublic_key_id.
The public key is published at
/.well-known/oracle-keys.json
under RFC 8615 well-known URI
conventions.
npm install
npm test # runs the 6-test suite + a live /v5/demo round-trip
npm run dev # serves index.html on http://localhost:8788 via wranglerTo run the test suite without the live network round-trip:
HEADLESS_ORACLE_OFFLINE=1 npm test| File | Role |
|---|---|
index.html |
Single-page UI |
style.css |
Theming (light/dark) |
ui.js |
Tab routing, paint, fetch orchestration |
verify.js |
Verification pipeline |
canonical.js |
Canonical-JSON construction |
_headers |
Cloudflare Pages security headers (CSP, HSTS, etc.) |
tests/verify.test.js |
6-test suite |
tests/fixtures/build-fixtures.mjs |
Generates known-good.json fixture |
tests/fixtures/known-good.json |
Deterministic fixture for offline tests |
wrangler.toml |
Cloudflare Pages project configuration |
package.json |
npm metadata + scripts; @noble/ed25519 is a devDependency only |
Trust the math, not the deploy. Three checks anyone should run:
- Read the verification pipeline. It's ~150 lines across
verify.jsandcanonical.js. Every step has a single responsibility. There is no server-side fallback path. - Run the test suite.
npm testproves the verifier accepts a known-good receipt, rejects a single-byte signature mutation, rejects a single-field payload mutation, rejects an unknown-key reference, and rejects malformed input. - Round-trip a live receipt. Test #6 fetches a fresh receipt from
/v5/demo?mic=XNYSand verifies it against the live registry.
The cryptography is delegated to the browser's Web Crypto API
(crypto.subtle.verify({ name: 'Ed25519' }, ...)) — the same primitive
TLS uses for Ed25519 today. There is no custom Ed25519 implementation in
this codebase. @noble/ed25519 appears in devDependencies only, used by
tests/fixtures/build-fixtures.mjs to sign the deterministic test vector.
npx wrangler pages project create verify-headlessoracle
npm run deployThe site is static. There is no build step. There is no server-side code.
- All cryptographic verification happens in the browser.
- Two outbound network calls:
GET /.well-known/oracle-keys.jsonand (in fetch-from-Oracle mode)GET /v5/demo. - No telemetry, no analytics, no third-party scripts.
_headersships a Content Security Policy that disallows inline scripts and restrictsconnect-srctoheadlessoracle.com.
MIT — see LICENSE. Copyright © 2026 Michael Msebenzi / LembaGang.