[BAP] Bounded Authority Protocol · the verifier package

The resource’s side of BAP:
check the envelope, keep the facts.

Somewhere between your MCP server and the caller, a question has to be answered without trusting anyone: is this request authorized — provably? The verifier package answers it deterministically: issuer signature, holder binding, operation match, time window — cryptographic facts, no reason codes, no oracles. This page runs the real package.

The verifier never sees keys — only bytes. The demo envelope below is minted in your browser by the signer package; this package just judges it.

What verification owes you

Authorization decisions get audited, disputed, and attacked. A verifier that explains itself becomes an oracle. This one doesn’t.

Facts, not feelings.

“The token looked valid” is not an answer your auditors, or your incident review, can use.

checkEnvelope returns the binding facts — issuer identity, holder key fingerprint, operation, window — or exactly {"ok":false}. Never a maybe.

No oracle for attackers.

Verbose verifiers leak which check failed — free reconnaissance for anyone probing your boundary.

The result is closed: one invalid, no reason, no partial. Your logs record what YOU choose; the caller learns nothing.

Pure and deterministic.

A verifier that reads the clock, the network, or the environment decides differently on Tuesday.

The verify path is pure — no I/O, no clock, no RNG — enforced by its own lint gate, and proven against certified conformance corpora.

The bench

Everything is live: this page bundles the real verifier and signer packages. Step 1 mints a genuine envelope in your browser — then judge it, decode it, and try to sneak one past.

An envelope arrives demo issuance
claimed
transfer · POST /invoke · amount 5000
window
t=1000 → 2000 (evaluated at 1500)
Your resource the verifier
trusts issuer key
expects
the request as minted — nothing more
verify an envelope to see the fact sheet
DecodeThe signed contents of each artifact — signature-checked, no trust needed.
Tamper deckEvery button below produces a real, closed INVALID.

Mint and verify first — then try to sneak one past.

Wire viewerClick any artifact to inspect its actual bytes.
nothing selected yet

The family lifecycle

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

Verify-only

The package produces no signatures and holds no keys — it consumes bytes and returns facts. The signing side lives in the signer package.

Closed results

Ok<Facts> or {"ok":false}. No error taxonomy to leak, no partial acceptance to abuse.

Profile separation

Standard and local-loopback proofs never mix: each family verifies through its own check function and rejects the other.

Conformance-proven

Certified corpora from the protocol monorepo run in CI — the bytes this page verifies are the bytes the spec froze.

The verification surface

FunctionAnswers
checkEnvelopegrant + proof against an expected request — the resource’s entry point
checkLocalLoopbackHttpEnvelopesame, for the ba+loopback-proof profile (canonical loopback targets only)
verifyGranta grant standalone against one trusted issuer
decodeGrant / decodeProofsignature-checked contents of either compact — what the bench shows
verifyHistoricalAnchor / verifyKeyTransitionthe historical surfaces — boundary anchors and key rotations
checkChain / verifyAnchoredExportconsumption chains and anchored exports

Install

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