[CAP] Charter Agreement Protocol · the verifier package

Judge the deal from the bytes —
CAP verifies. It never authorizes.

Two systems claim different versions of the same agreement. This package reads the signed artifacts — descriptors, revisions, acceptances, terminations, receipts — and returns byte-exact structural facts: which revision governed, who accepted which bytes, whether a key history forks. And the protocol’s facts records carry a closed twelve-item not_verified floor — authority, billing, legal validity — that no API can shrink. You read the evidence. You decide.

The verifier never sees a private key — only bytes. The charter set below is minted in your browser by the signer package.

The bench

Everything is live: this page bundles the real verifier package. Step 1 mints a complete charter set in your browser — descriptors, a canonical revision, dual acceptance, a receipt — then judge it, decode it, and try to rewrite its past.

A charter set arrives demo issuance
the set
2 descriptors · 1 revision · 2 acceptances · 1 receipt
claims
revision 1 governs; both parties accepted its exact bytes
You judge it verifyChain
input
raw bytes only — no trust, no phone-home
output
structural facts + the omission floor
verify the set to see the facts
DecodeThe signed contents of each artifact — signature-checked, no trust needed.

Tamper deckFive real attempts — five real closed refusals.

Mint and verify first — then rewrite history.

The family lifecycle

Three protocols, one chain of evidence: what the agent is, what was agreed, what this call may do.

Verify-only

No key parameter, no signer callback, no custody handle — the package refuses to sign by construction. Signing lives in the signer package.

The omission floor

Twelve not_verified items — authority, execution, billing, term satisfaction, legal validity — travel with every facts record. No API can shrink them.

Byte-exact by construction

Strict unpadded base64url, deterministic tagged decoding, RFC 8785 canonicalization, domain-separated SHA-256.

Two implementations, zero shared code

A certified 100-case corpus runs through the pure Elixir verifier and this builtins-only TypeScript one — reports must be byte-identical.

Install

npm i @charter-agreement-protocol/verifier    # Node >= 22, zero runtime dependencies