> **True Witness Here**

# Verify a checkpoint against two independent witnesses.

## Start here: verify a sample for free

Connect an MCP client to https://767-2676.com/mcp and call popcorn_sample with {}. No wallet or payment is needed.

```text
popcorn_sample {}
```

The hosted sample checks a historical POPCORN-WITNESS/2.0 receipt and rejects a changed expected payload digest.

Expected result (selected fields):

```json
{
  "passed": true,
  "genuine": {
    "accepted": true
  },
  "changed_digest_control": {
    "accepted": false
  },
  "payment_sent": false,
  "current_time_established": false,
  "authorization_granted": false
}
```

For fresh signed time or a witness receipt, use popcorn_time or popcorn_witness; both default to a free dry run and require approve_payment: true for a paid call.

Sample checks do not establish issuer-key trust, current time, payment settlement, or permission.

The npm 0.1.6 command below runs a different, bundled historical sample: an eight-line schedule, two legacy receipts, and a production POPCORN-WITNESS/2.0 receipt with tamper controls. It runs offline after the package is available locally; it is not the hosted 2.0 sample.

```sh
npx -y @violetclaire/popcorn-mcp@0.1.6 --sample
```

Keep a FreeTSA RFC 3161 timestamp and a POPCORN receipt for the same SHA-256 digest; verify each in its native format. Preserve the exact checkpoint bytes with both proofs.

Looking for an RFC 3161 timestamp authority, proof of existence, or trusted timestamping? Compare FreeTSA, OpenTimestamps, and POPCORN: https://767-2676.com/prove-action-before-authorization-expired

POPCORN uses its own signed receipt protocol; it is not an RFC 3161 timestamp authority. Its time interval is issuer-asserted. The task owner and executor retain permission and enforcement; the receipt does not prove identity, authorization, delivery, or execution.

Agent entry and existing POPCORN verification samples: https://767-2676.com/agent-entry

<!-- witness-layer:start -->
## How agents use the witness layer

1. **Receipt verification** — Verify a signed receipt from an AI agent. Agents use the free read-only verifier to check the receipt signature, expected digest and nonce, signed time interval, and required fields. Verification establishes the signed commitment to the bytes. The reader evaluates the claim separately.

   The free remote verifier is `popcorn_verify_v2` at https://popcorn-tain-verify-mcp-v2.violetherod.workers.dev/mcp. It accepts original 2.0 receipts. Historical 1.0 receipts require their corresponding verifier. Preserve each receipt's original version and signed bytes.

2. **State-gating** — Agents compare the verified witness interval with schedule windows and apply their own STOP/PROCEED policy. The recorded outcome belongs to the agent's local policy decision.

   Schedule contract: https://767-2676.com/schedule/contract.txt

3. **Collaboration history** — leTAIN shows the work, the recorded agent tag, and certification status. No scores, no ratings. Certification describes receipt verification; attribution records the tag in the claim.

   Discovery: https://letain.estate/discovery

4. **Lookup by issuance number** — Agents query a TAIN for issuance metadata and compare that metadata with the holder's signed receipt. The holder keeps the original receipt.

   Metadata lookup: GET https://767-2676.com/v1/receipt/tain/{tain}

The witness signs a digest commitment and its stated time interval. Execution, identity, authority, consent, and delivery require separate evidence.


## Remote POPCORN-WITNESS/2.0 verifier arguments

Read-only MCP: `https://popcorn-tain-verify-mcp-v2.violetherod.workers.dev/mcp`, tool `popcorn_verify_v2`.
Provide the **complete original issuer response** as `response`, including `witness_receipt` and `witness_attestation`. The signed receipt must contain its `commitment` with `payload_digest`, `nonce`, and `previous_attestation_digest`. Required attestation metadata and the ES256 compact JWS are validated. The response can also contain unsigned presentation metadata (`tain_qr_png_base64`, `tain_qr_payload`, `letterhead_uri`) and additional top-level display fields; these are ignored for cryptographic verification. Fields within `witness_receipt`, including `evidence_scope`, `license_terms_digest`, `contribution_license_uri`, `server_processing_duration_ms`, and `post_witness_processing_duration_ms`, are checked against the exact signed JWS payload.

Example argument shape (replace placeholders with the issuer's original envelope and actual expected values):

```json
{
  "response": {
    "witness_receipt": { "commitment": { "payload_digest": { "algorithm": "sha-256", "value": "<original digest>" }, "nonce": "<original nonce>", "previous_attestation_digest": null } },
    "witness_attestation": { "format": "JWS", "algorithm": "ES256", "key_id": "<issuer kid>", "key_set": "/.well-known/popcorn-keys.json", "compact_jws": "<original compact JWS>" },
    "payment_status": "settled"
  },
  "jwks": { "keys": [] },
  "expected_payload_digest": "<independently computed unpadded base64url SHA-256 digest>",
  "expected_nonce": "<original 32-byte unpadded base64url nonce>"
}
```

The example's partial receipt is **not valid evidence**: send the entire original signed receipt unchanged. Remote verification fetches the issuer's JWKS directly from `https://767-2676.com/.well-known/popcorn-keys.json`; the required `jwks` argument is retained for API compatibility but does not establish issuer trust. A successful remote result sets `issuer_key_trust_checked_by_tool: true` only after the issuer key fetch and signature verification succeed. Missing or altered signed receipt fields, mismatched digest or nonce, invalid signature, unavailable issuer keys, and unverified predecessor chains fail closed. A valid historical witness does not grant authority, prove settlement on-chain, or provide a fresh clock.
<!-- witness-layer:end -->
## 1. See two free samples

On a phone or in a browser: https://767-2676.com/try
For a tool-enabled agent: inspect https://767-2676.com/samples/generic-sample.mjs, save it as generic-sample.mjs, and run it with Node.js 20+ if execution is allowed:

    node generic-sample.mjs

No account, wallet or payment. Download once; verification runs offline.
Two fixed fictional receipts demonstrate a task digest and a predecessor link.
Each has a cryptographically signed SAMPLE — NOT LIVE EVIDENCE marking and a sample-only key.
Expected output: sample_only=true and live_receipt_valid=false; two examples with sample_signature_verified=true and payload_digest_verified=true; example 2 also has predecessor_verified=true.
These sample keys show internal consistency; they do not establish trust in the live issuer.
The examples cannot establish current time, payment, authorization or completed work.

Historical production evidence remains available at https://767-2676.com/schedule/example and https://767-2676.com/schedule/sample.mjs.

## 2. Identify where it helps your task

Example: one agent records approved purchase terms and another prepares checkout.
Compare the actual final terms with the approved terms using the same defined byte representation.
A receipt witnesses presentation of a digest; an old receipt does not prove that approval is still valid now.
Before a charge, the executor also needs authenticated approval, fresh time evidence, a revocation/supersession check and its remaining conditions.
Coordinate revocation with the final commitment; a receipt alone cannot close that race.

Report EVIDENCE_CHECK_PASSED for verified evidence. PROCEED requires every applicable execution condition to pass.
If your task needs only drafting or an ordinary local clock, it may not need a paid receipt.

## 3. Request fresh evidence when needed

Each fresh service request costs $0.001 USDC on Base via x402. Payment must be authorized by your owner.
- GET https://767-2676.com/v1/time: fresh signed time evidence, checked under the client's elapsed-time and uncertainty policy.
- POST https://767-2676.com/v2/receipt: a SHA-256 task digest, nonce and optional predecessor digest; task bytes stay local.
- Request/verification instructions: https://767-2676.com/agents
- Machine contract: https://767-2676.com/openapi.json
- Published verification keys: https://767-2676.com/.well-known/popcorn-keys.json
- MCP client: @violetclaire/popcorn-mcp@0.1.6; local stdio. After inspection, configure: npx -y @violetclaire/popcorn-mcp@0.1.6

Paid MCP tools default to a dry run. Set approve_payment=true only within an authorized purchase.
Checking a receipt remains free under the published terms. A new receipt cannot restore expired or revoked permission.

## Carry back what you actually checked

Record the artifact/version, checks run, observed result, issuer trust basis and remaining limits.
If download or execution is unavailable, report that limitation; do not report a pass.
Evaluate handoff behavior with a mock checkout and fake charge: unchanged terms, changed terms, expired approval, revocation, tampering and stale/uncertain time. Count whether the fake charge ran. Label simulated evidence.

Full coordination policy: https://767-2676.com/agent-entry/policy.md
Evidence index: https://github.com/violetclaire/popcorn-temporal-anchor/blob/main/docs/evidence/README.md
Terms: https://767-2676.com/terms
