npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

trust-receipt-verifier

v0.1.0

Published

TrustReceipt open standard — cross-protocol agentic commerce evidence receipt verifier

Readme

TrustReceipt

Cross-protocol evidence receipts for agentic commerce

Version License npm TrustReceipt Conformant


What it is

TrustReceipt is an open standard for JWS-signed JSON receipts that are verifiable offline against a public JWKS endpoint. A receipt can represent evidence hashes from protocols such as x402, AP2, ACP, MCP, UCP, and MCAP without modification to the receipt format itself. Each receipt proves who the agent was, which protocol ran, what trust providers vouched for the transaction, and what policy decision was reached — all in a single self-contained token that any party can verify without calling back to the issuer.


Quick verify

npm install @agenticmcpstores/trust-receipt-verifier
import { verifyTrustReceipt } from "@agenticmcpstores/trust-receipt-verifier";

const result = await verifyTrustReceipt(jwsToken, {
  jwksUrl: "https://trusteed.xyz/.well-known/jwks.json",
});

if (result.valid) {
  console.log(result.receipt.policy_decision); // "allow"
} else {
  console.error(result.reason, result.errors);
}

Receipt anatomy

A TrustReceipt payload contains 24 fields across five groups:

Core

| Field | Type | Description | | ---------------- | ------------ | ---------------------------- | | receipt_id | UUID v4 | Unique receipt identifier | | schema_version | "1.0" | Schema version literal | | issued_at | Unix seconds | When the receipt was created | | expires_at | Unix seconds | When the receipt expires | | issuer | string | Issuing platform domain |

Participants

| Field | Type | Description | | ---------------- | ------ | ------------------------------------------------ | | merchant_id | string | Merchant identifier | | agent_id | string | Agent session or instance identifier | | agent_provider | string | AI provider (anthropic, openai, google, …) |

Transaction Evidence

| Field | Type | Description | | -------------------- | ----------- | ---------------------------------------------------- | | user_intent_hash | SHA-256 hex | Hash of the user's original intent text | | cart_hash | SHA-256 hex | Hash of cart contents at decision time (optional) | | order_hash | SHA-256 hex | Hash of settled order object (optional) | | transaction_id | string | Platform transaction reference (optional) | | protocol | enum | x402 \| AP2 \| ACP \| MCP \| UCP \| MCAP | | protocol_artifacts | array | Hashes of protocol-specific evidence objects | | payment_reference | object | PSP name + reference, no raw payment data (optional) |

Trust Assertions

| Field | Type | Description | | --------------------------- | ----- | ----------------------------------------------------------- | | risk_signals | array | Normalized signals from issuer or providers | | trust_provider_assertions | array | Scored assertions from ClearSale, Trulioo, Mastercard, etc. | | policy_decision | enum | allow \| deny \| review \| challenge |

Compliance

| Field | Type | Description | | ------------------------ | ----------- | ------------------------------------------------- | | liability_context | object | Assertor and scope (optional) | | consent_context | object | Consent hash, scope, timestamp (optional) | | privacy_classification | object | PII flag, retention days, jurisdiction (optional) | | verification_methods | array | JWKS URL or DID for key resolution | | kid | string | Key ID used to sign this receipt | | hash_chain_prev | SHA-256 hex | Previous receipt in audit chain (optional) | | attachments | array | Named, hashed file references (optional) |


Protocol support

| Protocol | Artifact mapping | Primary artifact types | | -------- | ---------------- | ------------------------------------------------------- | | MCAP | Defined | mcap_consent_hash, mcap_nonce | | x402 | Defined | permit2_hash, settlement_hash, upto_envelope_hash | | AP2 | Defined | mandate_hash, ap2_consent_hash | | MCP | Defined | mcp_call_hash, tool_call_hash | | ACP | Defined | acp_session_hash, acp_policy_hash | | UCP | Defined | ucp_token_hash |


Conformance

A verifier implementation must pass all 10 test vectors to claim TrustReceipt conformance. Three levels are defined:

| Level | Name | Requirement | | ----- | -------- | ----------------------------------------------------------------------- | | 1 | Verifier | Passes all 10 test vectors | | 2 | Issuer | Level 1 + correctly issues valid receipts | | 3 | Provider | Level 2 + co-authors ≥1 trust_provider_assertions type with real data |

This reference implementation is Level 2 conformant. Run the suite:

pnpm test

Add the badge to your project once all 10 pass:

[![TrustReceipt Conformant](https://img.shields.io/badge/TrustReceipt-v1.0%20Conformant-blue)](https://github.com/trust-receipt/spec)

Repo structure

packages/trust-receipt-verifier/
├── SPEC.md                          — formal specification (authoritative)
├── CONTRIBUTING.md                  — how to contribute vectors, ports, and provider schemas
├── LICENSE                          — MIT
├── src/
│   ├── index.ts                     — package exports
│   ├── verifier.ts                  — verifyTrustReceipt() + parseTrustReceiptUnsafe()
│   ├── issuer.ts                    — issueTrustReceipt()
│   └── schema/
│       └── trust-receipt.schema.ts  — Zod schema (source of truth for TypeScript)
├── test-vectors/
│   ├── README.md                    — how to use the vectors
│   ├── vectors.json                 — vector manifest with expected outcomes
│   ├── valid/                       — TC-001 through TC-005
│   └── invalid/                     — TC-006 through TC-010
├── bin/
│   └── trust-receipt.js             — CLI: verify, inspect, generate-key, conformance
└── demo/                            — runnable demo scripts

Issue a receipt

import { issueTrustReceipt } from "@agenticmcpstores/trust-receipt-verifier";

const jws = await issueTrustReceipt({
  payload: {
    issuer: "trusteed.xyz",
    merchant_id: "merchant-001",
    agent_id: "agent-session-xyz",
    agent_provider: "anthropic",
    user_intent_hash: "<sha256-hex-of-user-intent>",
    protocol: "MCP",
    protocol_artifacts: [{ type: "mcp_call_hash", hash: "<sha256-hex>" }],
    policy_decision: "allow",
    verification_methods: [
      { type: "jwks", value: "https://trusteed.xyz/.well-known/jwks.json" },
    ],
    kid: "tr-ed25519-2026-04-29",
  },
  privateKeyJwk: myEd25519PrivateKey,
  kid: "tr-ed25519-2026-04-29",
});

CLI

# Generate an Ed25519 key pair
trust-receipt generate-key

# Verify a receipt file
trust-receipt verify receipt.jws --jwks-url https://trusteed.xyz/.well-known/jwks.json

# Inspect a receipt without verifying the signature
trust-receipt inspect receipt.jws

# Run the full conformance suite
trust-receipt conformance

Contributing

See CONTRIBUTING.md for how to add conformance vectors, port the verifier to another language, or co-author a trust_provider_assertions schema as a trust provider partner.


Trademark Notice

TrustReceipt is not affiliated with, endorsed by, or officially supported by Mastercard, Anthropic, Skyfire, Coinbase, or any other named protocol owner or company referenced in this specification. Protocol names (AP2, MCAP, ACP, MCP, x402, UCP) are used descriptively to indicate interoperability targets only. All trademarks and registered marks are the property of their respective owners.


License

MIT — see LICENSE. Copyright MCPWebStore (trusteed.xyz), 2026.