Repository navigation
x402 Trinity 0.1.0
A drop-in fetch replacement that lets an AI agent pay for things by itself — hard spending limits, no hosted wallet, no changes to the agent's own code.
npm install x402-trinityBase mainnet + USDC. Other EVM chains work through customChains.
What is in it
- Buyer — handles 402, checks limits, signs, retries. Zero runtime dependencies, 7 KB gzipped.
- Seller — charge for an existing resource in three lines. Never holds a key, never touches funds.
- MCP server — three tools (
check_price,pay_and_fetch,wallet_status) so an assistant can buy things. Limits come from the environment, never from the model. - Python — buyer only, standard library only.
Before you use it with real money
This software signs payment authorizations. Set maxAmountPerRequest and totalBudget, and use a dedicated wallet holding only what you would accept losing.