Verify it yourself — call the service AND cryptographically verify the proof
============================================================================

No extension needed. These commands hit the SAME service the extension uses, and
then verify the signed receipt OFFLINE on your own machine.

curl ships with Windows 10+, macOS, and Linux. In PowerShell use "curl.exe".
Run everything from INSIDE this folder (so the -d @file and the pinned key resolve).

STEP 1 — See governance happen
------------------------------
Service up?
   curl https://dgw.byteverity.com/v1/healthz

A prompt full of PII -> comes back redacted (verdict: allow):
   curl -X POST https://dgw.byteverity.com/v1/browser/interactions/govern -H "Content-Type: application/json" -d @pii-prompt.json

A prompt-injection attempt -> refused (verdict: deny):
   curl -X POST https://dgw.byteverity.com/v1/browser/interactions/govern -H "Content-Type: application/json" -d @injection-prompt.json

(Add  | jq  at the end for pretty output, if you have jq.)

STEP 2 — Verify the receipt is authentic, OFFLINE (needs Node 16+; node --version)
---------------------------------------------------------------------------------
Save a response, then verify its signature with the tiny zero-dependency script:

   curl -s -X POST https://dgw.byteverity.com/v1/browser/interactions/govern -H "Content-Type: application/json" -d @pii-prompt.json > response.json
   node verify-receipt.mjs response.json

Expected:  "✓ VERIFIED — this receipt is authentic and untampered."

The script checks three things, with NO access to our servers:
  1. TRUST ANCHOR — the signer's key_id == sha256() of the PINNED public key in
     this folder (k1-anchor-pubkey.hex). We trust that tracked key, not a key the
     receipt carries about itself.
  2. INTEGRITY    — receipt id == sha256(the exact signed bytes).
  3. SIGNATURE    — the Ed25519 signature verifies under the pinned key.

Try to break it: change ONE character in response.json (e.g. a digit of a redacted
token) and run the verify again -> it FAILS ("signature does NOT verify" /
"content hash mismatch"). That tamper-evidence, checkable by anyone air-gapped, is
the point: they have dashboards; we have proof.

Files in this folder
--------------------
  pii-prompt.json        request body: a prompt full of (fake) PII
  injection-prompt.json  request body: a prompt-injection attempt
  verify-receipt.mjs     offline receipt verifier (Node, zero dependencies)
  k1-anchor-pubkey.hex   the PINNED public key the receipts are checked against

Note: this is a demo endpoint that records prompts as receipts — use only the
fake values in these files, nothing real or confidential.
