Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nhestrompia/shielded-x402/llms.txt
Use this file to discover all available pages before exploring further.
Introduction
The Shielded x402 Client SDK (@shielded-x402/client) provides two complementary rails for building privacy-preserving payment agents:
- ShieldedClientSDK: Anonymous proof-backed x402 payment payload construction using zero-knowledge proofs
- MultiChainCreditClient: Sequencer-authorized fast execution across chain-specific relayers
Installation
Peer Dependencies
For zero-knowledge proof generation (optional):Key Features
Anonymous Payments
Generate zero-knowledge proofs for privacy-preserving x402 payments without revealing transaction history
Multi-Chain Support
Execute payments across multiple chains (Base, Solana) using sequencer-authorized credit
Note Management
Local indexer for tracking shielded notes and commitments
Plug-and-Play
Drop-in
fetch replacement with automatic 402 payment handlingIntegration Modes
1. Direct x402 Header Mode (Merchant-Facing)
UsecreateShieldedFetch for automatic 402 payment handling. The SDK receives 402 PAYMENT-REQUIRED, builds the payment proof, and retries the request:
2. Relayer-Executed Mode (Agent-Facing)
UseMultiChainCreditClient for sequencer-authorized payments. The relayer executes the payment on behalf of the agent:
Core Components
ShieldedClientSDK
Build zero-knowledge payment proofs and handle deposits/spends
MultiChainCreditClient
Execute fast credit-based payments across multiple chains
createShieldedFetch
Drop-in fetch replacement with automatic 402 handling
Note Management
Index and manage shielded notes locally
Architecture
The SDK implements the Shielded x402 protocol with:- Authoritative sequencer: Real-time nonce/balance enforcement
- Per-chain relayers: Execute only sequencer-authorized payments
- Periodic commitments: Base commitment roots for delayed independent auditability
- Shielded settlement: Onchain settlement as the funding source for credit balances
Protocol Flow
Next Steps
API Reference
Explore detailed API documentation
Quickstart
Build your first shielded payment agent