Skip to content
v0.12.04 rails + 9 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
Live

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
Live

Agentic Commerce Protocol for agent-to-agent transactions.

  • Budget enforcement utilities
  • Agent identity binding
  • Multi-hop transaction support

TAP

@peac/mappings-tap
29 testsLive

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 testsLive

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
70 testsLive

Google Universal Commerce Protocol webhook verification and mapping.

  • Detached JWS verification (RFC 7797)
  • UCP order to PEAC receipt mapping
  • Dispute evidence generation for audit bundles
  • ES256/ES384/ES512 signature support

AIPREF

@peac/mappings-aipref
32 testsLive

IETF AIPREF vocabulary mapping for purpose declarations.

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

A2A

@peac/mappings-a2a
Live

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
Live

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
Live

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

4 adapters

x402

@peac/rails-x402
Live

HTTP 402 extension with v0.2 profile (peac-x402-offer-receipt/0.1) and DoS protection.

  • Profile: peac-x402-offer-receipt/0.1
  • DoS guards: 128 entries max, 256 KiB total
  • CAIP-2 network validation
  • termMatching first-class field

Payment gateways

@peac/rails-stripe
Live

Stripe payment gateway integration with webhook verification, receipt issuance, and x402 crypto bridge.

  • Checkout Sessions and Payment Intents
  • Webhook signature verification
  • Subscription billing support
  • Receipt issuance on payment success
  • fromCryptoPaymentIntent() for x402 bridge

Card Billing

@peac/rails-card
Live

Generic card billing bridge with billing_snapshot support.

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

Razorpay

@peac/rails-razorpay
Live

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 testsLive

AI inference router adapter for Daydreams events.

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

Fluora

@peac/adapter-x402-fluora
27 testsLive

MCP marketplace adapter for Fluora hosting events.

  • Tool call metering
  • Hosting cost tracking
  • MCP integration

Pinata

@peac/adapter-x402-pinata
27 testsLive

IPFS gateway adapter for Pinata private objects.

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

Infrastructure

Low-level utilities and transports

6 packages

Contracts

@peac/contracts
28 testsLive

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 testsLive

Runtime-neutral TAP verification handler with security hardening.

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

HTTP Signatures

@peac/http-signatures
22 testsLive

RFC 9421 HTTP Message Signatures parsing and verification.

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

JWKS Cache

@peac/jwks-cache
19 testsLive

Edge-safe JWKS fetch with SSRF protection.

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

Net Node

@peac/net-node
Live

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
60 testsLive

gRPC transport with HTTP StatusCode parity.

  • StatusCode mapping to HTTP
  • Streaming support
  • Metadata propagation

Observability & Telemetry

Trace correlation and metrics for PEAC operations

1 packages

OpenTelemetry

@peac/telemetry-otel
90 testsLive

OpenTelemetry adapter for PEAC telemetry with privacy modes.

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

Provenance & Attribution

Content derivation proofs and C2PA bridging

1 packages

Attribution

@peac/attribution
Live

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

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

MCP Server for AI Agents

Verify, inspect, decode, issue, and bundle receipts via MCP tools (v0.10.13+)

1 packages

MCP Server

@peac/mcp-server
226 testsLive

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 (v0.10.8+)

2 packages

Middleware Core

@peac/middleware-core
Live

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
Live

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 (v0.10.7+)

2 packages

Capture Core

@peac/capture-core
Live

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
Live

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 (v0.10.7+)

1 adapters

OpenClaw

@peac/adapter-openclaw
1815 testsLive

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