Skip to content
v0.12.115 rails + 7 protocols + 1 runtime

Adapters & Integrations

PEAC provides unified verifiable interaction records across systems and organizational boundaries. One receipt format designed to compose with MCP, ACP, A2A, TAP, UCP, x402, payment gateways, and more via adapters and mappings.

Agent Protocol Mappings

Integrate with AI agent and commerce protocols

9 protocols

MCP

@peac/mappings-mcp
Stable

Model Context Protocol integration with budget utilities.

  • Per-call and daily budget limits
  • Bigint minor units for precision
  • Tool call authorization

ACP

@peac/mappings-acp
Stable

Agentic Commerce Protocol session lifecycle and payment observation evidence.

  • Session lifecycle evidence (fromACPSessionLifecycleEvent)
  • Payment observation with explicit state (fromACPPaymentObservation)
  • Budget enforcement utilities
  • Agent identity binding

TAP

@peac/mappings-tap
29 testsStable

Visa Trusted Agent Protocol mapping with signature verification.

  • RFC 9421 HTTP Message Signatures
  • Time window validation (8 min max)
  • Fail-closed security defaults

RSL

@peac/mappings-rsl
47 testsStable

Robots Specification Language alignment for access permissions.

  • RSL 1.0 token mapping
  • Canonical ControlPurpose (train, search, user_action, inference, index)
  • Collective licensing support

UCP

@peac/mappings-ucp
84 testsStable

Google Universal Commerce Protocol webhook verification with order-vs-payment separation.

  • Order-vs-payment semantic separation (payment_state_source marker)
  • JWS verification (RFC 7797 detached payload for UCP webhooks)
  • Dispute evidence generation for audit bundles
  • ES256/ES384/ES512 signature support

AIPREF

@peac/mappings-aipref
32 testsStable

IETF AIPREF vocabulary mapping for purpose declarations.

  • Purpose token normalization
  • Canonical purpose mapping
  • Robots.txt bridge

A2A

@peac/mappings-a2a
Production-ready

Agent-to-Agent Protocol evidence carrier for TaskStatus, Message, and Artifact metadata.

  • Agent Card extension (capabilities.extensions)
  • Evidence Carrier Contract support
  • 3-step discovery (Agent Card, well-known, header probe)

Content Signals

@peac/mappings-content-signals
Stable

Observation-only mapping for robots.txt (RFC 9309), AIPREF Content-Usage, tdmrep.json, and Content-Signal headers.

  • Three-state model: allow / deny / unspecified
  • Source precedence: tdmrep.json > Content-Signal > Content-Usage > robots.txt
  • No network I/O (pure transform)

Inference Evidence

@peac/adapter-openai-compatible
Stable

Hash-first interaction evidence for OpenAI-compatible chat completion APIs.

  • SHA-256 digests only, no raw text stored
  • Works with any OpenAI-compatible provider
  • fromChatCompletion() convenience function

Payment Rails

5 adapters

x402

@peac/rails-x402
Production-ready

HTTP 402 extension with v0.2 profile, DoS protection, and v1/v2 dual-header read.

  • Profile: peac-x402-offer-receipt/0.1
  • v1/v2 dual-header read with upstream artifact separation
  • DoS guards: 128 entries max, 256 KiB total
  • CAIP-2 network validation

Payment gateways

@peac/rails-stripe
Production-ready

Stripe payment gateway integration with webhook verification, SPT delegation evidence, and x402 crypto bridge.

  • Payment Intent observation with explicit payment state
  • SPT delegation evidence (granted, presented, deactivated)
  • Webhook signature verification
  • Subscription billing support
  • fromCryptoPaymentIntent() for x402 bridge

Card Billing

@peac/rails-card
Stable

Generic card billing bridge with billing_snapshot support.

  • billing_snapshot in payment.evidence
  • Works with any card processor
  • Statement descriptor support

Paymentauth / MPP

@peac/mappings-paymentauth
Reference

HTTP Payment authentication scheme (draft-ryan-httpauth-payment) with envelope-first parsing and carrier adapter.

  • Challenge + Credential + Receipt envelope parsing
  • Raw + normalized dual representation
  • JSON-RPC/MCP error helpers
  • Carrier coexistence with PEAC-Receipt header

Razorpay

@peac/rails-razorpay
Stable

India payment adapter supporting UPI, cards, and netbanking.

  • UPI, cards, netbanking support
  • Webhook signature verification
  • India-first payment flows

x402 Vendor Adapters

Normalize vendor-specific events to PaymentEvidence

3 adapters

Daydreams

@peac/adapter-x402-daydreams
28 testsReference

AI inference router adapter for Daydreams events.

  • Event normalization to PaymentEvidence
  • Model and token tracking
  • Inference cost attribution

Fluora

@peac/adapter-x402-fluora
27 testsReference

MCP marketplace adapter for Fluora hosting events.

  • Tool call metering
  • Hosting cost tracking
  • MCP integration

Pinata

@peac/adapter-x402-pinata
27 testsReference

IPFS gateway adapter for Pinata private objects.

  • Private IPFS object access
  • Bandwidth tracking
  • CID-based authorization

Infrastructure

Low-level utilities and transports

7 packages

Contracts

@peac/contracts
28 testsStable

Single source of truth for error codes and MODE_BEHAVIOR contract.

  • Canonical E_* error codes
  • WWW-Authenticate builder
  • Contract-driven design

Worker Core

@peac/worker-core
112 testsStable

Runtime-neutral TAP verification handler with security hardening.

  • Default mode: tap_only
  • Error message sanitization
  • LRU replay protection

HTTP Signatures

@peac/http-signatures
22 testsStable

RFC 9421 HTTP Message Signatures parsing and verification.

  • Full RFC 9421 compliance
  • Signature-Input parsing
  • Component extraction

JWKS Cache

@peac/jwks-cache
19 testsStable

Edge-safe JWKS fetch with SSRF protection.

  • Literal IP blocking
  • No redirect following
  • Cache TTL management

Net Node

@peac/net-node
Stable

SSRF-safe network utilities with DNS resolution pinning.

  • RFC 6890 special-use IP blocking
  • Redirect policy with host-change validation
  • Three-tier evidence redaction

gRPC Transport

@peac/transport-grpc
84 testsStable

gRPC carrier adapter with HTTP/2 metadata binding and status code parity.

  • CarrierAdapter for gRPC metadata (8 KiB default)
  • Real SHA-256 receipt_ref computation
  • Binary metadata rejection
  • HTTP/gRPC status code mapping

DID Resolution

@peac/adapter-did
73 testsStable

DID document resolution for did:key and did:web with caching.

  • did:key Ed25519 resolution (zero I/O)
  • did:web SSRF-hardened resolution
  • TTL-based caching with mutation isolation
  • Domain allowlist and IP rejection

Observability & Telemetry

Trace correlation and metrics for PEAC operations

1 packages

OpenTelemetry

@peac/telemetry-otel
96 testsStable

OpenTelemetry adapter for PEAC telemetry with privacy modes.

  • Privacy modes: strict, balanced, custom
  • W3C Trace Context support
  • Metrics and spans for issue()/verify()
  • receipt_ref span attribute correlation

Provenance & Attribution

Content derivation proofs and C2PA bridging

3 packages

Attribution

@peac/attribution
Stable

Content derivation and usage proofs for AI training, RAG, and content reuse.

  • Content hash verification (SHA-256)
  • Attribution chain resolution
  • C2PA provenance bridging

in-toto v1.0

@peac/mappings-intoto
21 testsStable

Bidirectional mapping between in-toto v1.0 attestation statements and PEAC provenance extension.

  • Statement envelope mapping (subjects, predicate type)
  • Deterministic digest selection (sha256 preferred)
  • First-subject-wins for multi-subject statements

SLSA v1.2

@peac/mappings-slsa
25 testsStable

Bidirectional mapping between SLSA v1.2 provenance predicates and PEAC provenance extension.

  • Build definition and run details mapping
  • Source from resolvedDependencies (not buildType)
  • Track-based SLSA level metadata

MCP Server for AI Agents

Verify, inspect, decode, issue, and bundle receipts via MCP tools

1 packages

MCP Server

@peac/mcp-server
226 testsProduction-ready

MCP server exposing 5 tools for AI agents in Claude Desktop, Cursor, and other MCP hosts.

  • peac_verify: verify a receipt with full check pipeline
  • peac_inspect: decode and display receipt claims
  • peac_decode: raw JWS decode without verification
  • peac_issue: issue signed receipts (privileged)
  • peac_create_bundle: create evidence bundles (privileged)

Middleware

Framework middleware for automatic receipt issuance

2 packages

Middleware Core

@peac/middleware-core
Stable

Framework-agnostic middleware primitives for PEAC receipt issuance.

  • Bounded rate-limit store with LRU eviction
  • Configurable maxKeys for memory management
  • Framework-agnostic design

Express Middleware

@peac/middleware-express
Production-ready

Express.js middleware for automatic receipt issuance (Express 4.x and 5.x).

  • Automatic PEAC-Receipt header injection
  • Express 4.x and 5.x compatibility
  • 3-line integration

Capture Pipeline

Evidence capture with spool stores and deduplication

2 packages

Capture Core

@peac/capture-core
Stable

Runtime-neutral capture pipeline with deterministic timestamps and tamper-evident chain.

  • MemorySpoolStore and MemoryDedupeIndex
  • Deterministic timestamps for reproducibility
  • Tamper-evident chain with hash linking
  • 6 E_CAPTURE_* error codes

Capture Node

@peac/capture-node
Stable

Durable filesystem-backed stores for Node.js environments.

  • FileSpoolStore for persistent spool storage
  • FileDedupeIndex for durable deduplication
  • Filesystem-backed durability

Agent Runtimes

Interaction evidence capture for agent execution frameworks

1 adapters

OpenClaw

@peac/adapter-openclaw
1815 testsStable

Full OpenClaw plugin for agent interaction evidence capture with two-stage pipeline.

  • activate() one-call setup with generateSigningKey()
  • Two-stage pipeline: sync capture (< 10ms) + async emit
  • Tamper-evident chain with deterministic timestamps
  • Protocol-grade JWK signing and verification
  • Slash commands: /peac-status, /peac-query, /peac-verify

Example: Rail-Agnostic Verification

middleware.tsTypeScript
import { verify } from '@peac/protocol'

// Works with any payment rail - same verification logic
app.use('/api/premium', async (req, res, next) => {
  const receipt = req.header('PEAC-Receipt')

  if (!receipt) {
    return res.status(402).json({
      type: 'https://www.peacprotocol.org/problems/payment-required',
      title: 'Payment Required',
      rails: ['x402', 'card', 'payment-gateway']
    })
  }

  const result = await verify(receipt, {
    issuerAllowlist: ['https://api.example.com']
  })

  if (!result.ok) {
    return res.status(401).json({ error: result.error.code })
  }

  // Receipt is valid - rail-agnostic verification
  console.log('Rail:', result.claims.payment.rail)        // 'x402' | 'card' | ...
  console.log('Amount:', result.claims.amt, result.claims.cur)
  console.log('Facilitator:', result.claims.payment.facilitator) // 'daydreams' | 'fluora' | ...

  next()
})

Get Started

Install a payment rail adapter and start issuing verifiable receipts.

# Install core + your preferred rail
pnpm add @peac/protocol @peac/rails-x402

# Or for payment gateways
pnpm add @peac/protocol @peac/rails-stripe