Overview
The Machine Payments Protocol (MPP) defines how AI agents pay for services via HTTP 402 flows and streaming sessions. MPP solves payment mechanics but has a structural gap: no identity layer. When an agent makes an MPP payment, thesource field is a wallet address — no human name, no organization, no authorization chain. For low-value API calls this is fine. For B2B procurement and regulated transactions, it’s a compliance blocker.
Grantex fills this gap with the AgentPassportCredential — a W3C VC 2.0 credential that binds agent identity, human delegation, spending limits, and payment categories into a single offline-verifiable document.
The
@grantex/mpp package provides both agent-side middleware (attach passports to outgoing requests) and merchant-side verification (validate passports on incoming requests) in a single package.How It Works
AgentPassportCredential Structure
The credential follows the W3C Verifiable Credentials Data Model v2.0:KYA tier
WithAGENT_PASSPORT_KYA_TIER_ENABLED=true (default off), an issued passport’s
credentialSubject may carry kyaTier:
AGENT_PASSPORT_KYA_TIER_MAP,
that maps registry trust marks to tier labels. The table is empty by default, so
no tier is issued until an operator configures one. The card networks’ and
wallet schemes’ KYA tier specifications are not yet published; until they are,
Grantex defines no tiers of its own and attaches no meaning to a label beyond
the mapping. The first table entry whose trust marks the agent’s counted
attestations all hold gives the tier. The claim reflects the registry at
issuance; read the registry lookup for the agent’s standing now.
verifyPassport in @grantex/mpp returns kyaTier when the signed passport
carries one, and refuses a malformed one (MALFORMED_CREDENTIAL).
MPP Category Scopes
Each MPP category maps to a Grantex scope. The agent’s grant must include the corresponding scope:Trust Registry
The trust registry is a public endpoint that maps organization DIDs to verified trust records:basic (self-declared), verified (DNS-TXT proof), soc2 (SOC 2 audit verified).
Verification Error Codes
API Endpoints
SDK Support
The PassportsClient / PassportsService is available across all three SDKs:Next Steps
- MPP Integration Guide — step-by-step setup for agents and merchants
- Verifiable Credentials — the underlying VC infrastructure
- DID Infrastructure — how agent DIDs work
- Delegation — multi-agent delegation chains