mirror of
https://github.com/affaan-m/ECC.git
synced 2026-10-20 15:01:46 +02:00
Adds a third integration path to the agent-payment-x402 skill — Solana plus multi-network EVM via the upstream x402 packages — alongside the existing Base (agentwallet-sdk) and X Layer (OKX) options. The skill had no Solana coverage and no pointer to the canonical implementation. Option C centers on the actively maintained x402-foundation/x402 monorepo and stays facilitator-neutral: - Buyer: wrap the agent's HTTP client with @x402/fetch or @x402/axios and register both eip155:* and solana:* schemes, mirroring the upstream client examples — one client pays whichever chain the 402 offers - Seller: upstream middleware (@x402/express|hono|next|fastify pinned at 2.19.0, Python x402, github.com/x402-foundation/x402/go/v2); one route can advertise Base and Solana simultaneously - Facilitators: x402.org for testnets (the packages' default, testnet only), production via the upstream facilitator list — PayAI suggested (multi-network incl. Solana mainnet, no API keys), CDP noted (KYT/OFAC) - Discovery: bazaar /discovery/resources on CDP and PayAI, plus pay.sh for Solana-payable services - Safety rails: explicit user confirmation before the first paid request (mirroring Option B), a defined fail-closed budget gate invoked before every paid call, USDC mint validation with concrete mainnet/devnet addresses, and no unpinned npx commands Also resyncs the zh-CN translation, which predated the X Layer / Options structure, and mirrors the additions into ja-JP. Package names, versions, facilitator scope, USDC mints, and discovery URLs verified against x402-foundation/x402 main.