The first AA-native x402 payment stack on NERO Chain — facilitator, SDK, audited settlement contract, and a public playground showing AI agents paying APIs in USDC with paymaster-sponsored gas.
nero-x402 is a growing TypeScript project in the AI payments / x402 ecosystem, focused on account-abstrac, x402. It currently has 48 GitHub stars and 0 forks, and sits alongside related tools like nofx, ClawRouter, bitterbot-desktop, internet-court-skill, Franklin, daydreams.
The first AA-native x402 payment stack on NERO Chain — facilitator, SDK, audited settlement contract, and a public playground showing AI agents paying APIs in USDC with paymaster-sponsored gas.
aa-native schemeUpstream x402's default exact scheme settles via EIP-3009 transferWithAuthorization — which only EOAs can sign. Smart contract wallets can't use it (there's no private key the token contract can ecrecover). On NERO Chain every wallet is an SCW, so exact is effectively unusable. NERO 402 contributes a second scheme — aa-native — that closes that gap.
PAYMENT-REQUIRED, advertising scheme: "aa-native", payTo, amount, asset, network.UserOperation whose callData decodes to:SettlementContract.settle(merchant, token, amount, requestHash)
PAYMENT-SIGNATURE carrying the signed UserOp./verify + /settle endpoints.type: 0) — the agent spends zero NERO native.SettlementContract.settle() runs IERC20.transferFrom(SCW → merchant), records isSettled[settlementKey] = true (key bound to (payer, merchant, token, amount, requestHash)), emits ReceiptLog.PAYMENT-RESPONSE carrying the on-chain transactionHash.The agent never holds the chain's native token. The merchant never sees the SCW's private key. Replay protection is on-chain; gas is paymaster-sponsored. Full wire format and validation rules: docs/whitepaper/whitepaper.pdf.
aa-native vs exactexact (upstream) |
aa-native (NERO 402) |
|
|---|---|---|
| Wallet | EOA only | ERC-4337 smart contract wallet |
| Settlement | EIP-3009 transferWithAuthorization on the token |
SettlementContract.settle(...) calls IERC20.transferFrom |
| Token requirements | Must implement EIP-3009 (USDC.e, USDC.arb on NERO) | Any ERC-20 the merchant accepts |
| Gas | Agent's EOA pays in native | NERO Paymaster sponsors; agent pays zero |
| Replay protection | EIP-3009 nonce on the token contract | SettlementContract.isSettled[settlementKey] |
Both schemes are advertised by NERO 402's facilitator (GET /supported); merchants pick which to accept. An unmodified upstream @x402/fetch client can pay an NERO 402 merchant via exact (USDC.e or USDC.arb on mainnet) without forking.
| Path | What it is |
|---|---|
contracts/ |
SettlementContract.sol (UUPS upgradeable) + Foundry tests. |
apps/facilitator/ |
x402 V2 facilitator service (/verify, /settle, /supported). |
apps/playground/ |
Public showcase site at x402.nerochain.io. |
apps/docs/ |
Documentation site (Fumadocs) at docs.x402.nerochain.io. |
packages/x402-types/ |
Wire-format types and Zod schemas for x402 V2. |
packages/x402-server/ |
Express / Hono / Fastify / Next middleware. |
packages/x402-client/ |
fetch + axios HTTP wrappers for paying agents. |
packages/x402-aa/ |
ERC-4337 paymaster-sponsored signer. |
packages/x402-extensions/ |
Access tokens + payment-identifier extensions. |
examples/learn-nero/ |
"An agent pays NERO to learn NERO" — end-to-end demo. |
examples/express-paid-api/ |
Minimal merchant + agent example. |
examples/agent-cost-test/ |
Cost benchmarking script. |
docs/whitepaper/ |
NERO 402 spec — Markdown + PDF. |
| Network | SettlementContract proxy |
EntryPoint (NERO) |
|---|---|---|
| Mainnet (chainId 1689) | 0x5eCfc64f2339992668f555918674B604F97B412D |
0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789 |
| Testnet (chainId 689) | 0x925dbba44570683ac8da99be08bc5ece8cf5a8c6 |
0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789 |
git clone --recursive <this-repo>
cd nero-x402
pnpm install
pnpm -r test # JS test suites
cd contracts && forge test # Foundry test suite
Run the playground locally:
cd apps/playground
cp .env.example .env # edit with your testnet config
pnpm dev
Run the facilitator locally:
cd apps/facilitator
cp .env.example .env # edit with your NERO Paymaster API key
pnpm dev
The canonical end-to-end demo:
cd examples/learn-nero
cp .env.example .env # set NERO_PRIVATE_KEY and NERO_PAYMASTER_API_KEY
pnpm start
docs/whitepaper/whitepaper.pdfpackages/MIT.
Your AI trading terminal assistant for US stocks, commodities, forex, and crypto.
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
A local-first AI agent with persistent memory, emotional intelligence, and a peer-to-peer skills economy.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
Daydreams is a set of tools for building agents for commerce
A payments protocol for the internet. Built on HTTP.
Self-healing infrastructure for AI agent payments. 90.3% auto-recovery.
Open Source AI trading agent that operates autonomously across 1000+ markets - Polymarket, Kalshi, Binance, Hyperliquid, Solana DEXs, 5 EVM chains. Scans for edge, executes instantly, manages risk while you sleep. Agent commerce protocol for machine-to-machine payments. Self-hosted. Built on Claude.
The world's first privacy layer for AI agents on Solana — stealth addresses + x402 payments. Every payment lands at a fresh, unlinkable address.
Live data for AI agents — search, research, markets, crypto, X/Twitter. Pay-per-call via x402 micropayments.
x402 Ecosystem Explorer