Proof bundles and badges

Every settled Voynich receipt can be exported as a self-contained voynich/proof/v1 JSON file and rendered as an embeddable SVG verification badge. Anyone with the JSON file can re-run all five cryptographic checks locally with zero network calls, no RPC node, and no wallet.

Export and verify from the CLI#

Use voynich receipt export to download a receipt's proof bundle from the API, and voynich verify --bundle to verify that file completely offline:

Shell
voynich receipt export <receipt-address> --out proof.json --api https://api.voynich.dev
voynich verify --bundle proof.json

voynich receipt export accepts a Receipt account address, its Call address, or the settling transaction signature. With --out <file>, it writes the formatted JSON bundle to disk in addition to printing it to stdout.

voynich verify --bundle <file> makes zero network calls. It validates the voynich/proof/v1 schema, runs all five checks locally, prints the OfflineProofVerification object to stdout, and exits with code 0 when all five checks pass (verified: true) or 1 otherwise.

Export and verify from the SDK#

Use exportProofBundle, verifyProofBundle, and receiptBadgeUrl from voynich:

TypeScript
import voynich, { verifyProofBundle, receiptBadgeUrl } from 'voynich'

const bundle = await voynich.exportProofBundle('6fty85XeviuYrPNpfoJhcZuRZBfqDxu6iyHpsgdi1vhh')

// Pure offline verification: zero network calls, browser and Node compatible
const result = verifyProofBundle(bundle)
console.log(result.verified, result.passedCount, result.checks, result.offline)

// Embeddable SVG badge URL
const svgUrl = receiptBadgeUrl(bundle.receipt.address)
FieldMeaning
exportProofBundle(receiptId, options?)Promise<ProofBundle>

Calls GET /v1/receipts/{id}/proof and returns a validated ProofBundle (schema: 'voynich/proof/v1'). Needs no wallet. Accepts { signal?: AbortSignal }.

verifyProofBundle(input)OfflineProofVerification

Pure, zero-network verifier that parses input against ProofBundle and re-runs all five checks (signature, record, expiry, answer, base) locally using verifyReceipt / verifyPiece and sha256. Returns { verified, passedCount, totalChecks: 5, checks, receipt, model, enclave, offline: true }.

receiptBadgeUrl(receiptId, apiUrl?)string

Returns ${apiUrl}/v1/receipts/${encodeURIComponent(receiptId)}/badge.svg, defaulting apiUrl to https://api.voynich.dev.

The voynich/proof/v1 bundle schema#

GET /v1/receipts/{id}/proof (exported as PROOF_BUNDLE_SCHEMA = 'voynich/proof/v1' in @voynich/contract) returns one self-contained JSON document:

JSON
{
  "schema": "voynich/proof/v1",
  "exportedAt": "2026-11-29T00:38:00.000Z",
  "verifyUrl": "https://voynich.dev/receipts/6fty85XeviuYrPNpfoJhcZuRZBfqDxu6iyHpsgdi1vhh",
  "receipt": {
    "address": "6fty85XeviuYrPNpfoJhcZuRZBfqDxu6iyHpsgdi1vhh",
    "call": "...",
    "caller": "...",
    "callerIsProgram": false,
    "model": "...",
    "modelName": "sketch-32",
    "enclave": "...",
    "inputHash": "...",
    "outputHash": "...",
    "signature": "...",
    "answerMode": "open",
    "openAnswerBase64": "...",
    "deliveredCount": null,
    "returnedAmount": null,
    "runningHash": null,
    "slot": "371920411",
    "transactionSignature": "...",
    "payments": { "mint": null, "total": "100000", "owner": {}, "operator": {}, "protocol": {} }
  },
  "model": {
    "address": "...",
    "slug": "sketch-32",
    "baseHash": null,
    "weightsHash": "...",
    "allowedMeasurements": ["..."]
  },
  "enclave": {
    "address": "...",
    "key": "...",
    "measurement": "...",
    "attestationRecord": "...",
    "attestedSlot": "371900000",
    "expiresSlot": "372116000",
    "hardwareType": "dev",
    "layoutVersion": 1
  },
  "measurement": null,
  "checks": {
    "signature": true,
    "record": true,
    "expiry": true,
    "answer": true,
    "base": true
  }
}

What the five offline checks verify#

CheckWhat verifyProofBundle checks offline
signatureCanonical Ed25519 signature over voynich/receipt/v1|v2 (per-call) or voynich/piece/v1|v2 (metered stream when deliveredCount !== null) under enclave.key.
recordNon-zero 48-byte enclave.measurement, enclave.layoutVersion >= 1, 32-byte enclave.attestationRecord and enclave.key, and enclave.measurement is present in model.allowedMeasurements (when non-empty).
expiryBigInt(receipt.slot) <= BigInt(enclave.expiresSlot).
answerFor answerMode === 'open', openAnswerBase64 is present and sha256(fromBase64(openAnswerBase64)) equals receipt.outputHash. Always true for sealed receipts.
baseWhen model.baseHash is set (sealed adapter), the enclave signature commits to model.baseHash under voynich/receipt/v2 or voynich/piece/v2. Always true for standalone models where model.baseHash is null.

Embeddable SVG verification badges#

GET /v1/receipts/{id}/badge.svg renders an XML-escaped SVG badge (Voynich Receipt | 5/5 Verified · <model-slug>) with Content-Type: image/svg+xml; charset=utf-8, Cache-Control: public, max-age=300, and Access-Control-Allow-Origin: *.

markdown
[![Verified on Voynich](https://api.voynich.dev/v1/receipts/<receipt-address>/badge.svg)](https://voynich.dev/receipts/<receipt-address>)

On any receipt page at https://voynich.dev/receipts/<address>, the Proof bundle & badge bar shows the live SVG badge preview and provides one-press Download proof, Copy Markdown badge, and Copy HTML badge actions.