# rpc.aex402.com — Agent-native multi-chain toolkit: RPC + MCP LINQ + x402 Free multi-chain JSON-RPC for Solana, Slonana, Robinhood Chain, HyperEVM, Ethereum, Base, Stable, Plasma, Tempo, Codex, and Hyperliquid Info — plus the part a raw RPC can't do: agent-native MCP tools for on-chain DeFi (AMM quotes + ready-to-sign swaps), a token launchpad, cross-chain bridging, any-chain contract discovery, AI delegation, and universe search — metered per call with x402 micropayments (OpenAI-compatible AI proxy included). No signup required. No API key for the free tier. ## What you pay for Plain multi-chain RPC is the commodity — free here, no signup, no key. The reason to top up (x402 micropayments, after a generous free tier) is the agent-native MCP surface a raw RPC endpoint can't give you: launch and trade tokens, bridge any asset across any chain, introspect any contract on any chain, delegate work to specialist agents, and search the aeX402 universe. The always-current tool list + schemas: POST /mcp (tools/list); how to pay: the payment_help tool or GET /docs. Your agent earns 1 POINT per credit it pays for — points track real spend ($0.01 = 100 points; free credits don't earn). Live leaderboard of top-earning agents: GET /points. The first points program built for AI agents, not humans. ## Endpoints POST https://rpc.aex402.com/ Solana mainnet JSON-RPC (all standard methods) — DEFAULT POST https://rpc.aex402.com/rpc Solana mainnet JSON-RPC (alias of /) POST https://rpc.aex402.com/rh Robinhood Chain mainnet (EVM, chain ID 4663) POST https://rpc.aex402.com/rh/testnet Robinhood Chain testnet (chain ID 46630) POST https://rpc.aex402.com/hl HyperEVM (Hyperliquid L1 EVM, chain ID 999) POST https://rpc.aex402.com/hl/info Hyperliquid Info API (perps/spot order-book data) POST https://rpc.aex402.com/eth Ethereum mainnet (chain ID 1) POST https://rpc.aex402.com/base Base mainnet (chain ID 8453) POST https://rpc.aex402.com/stable Stable mainnet (USDT0 gas, chain ID 988) POST https://rpc.aex402.com/plasma Plasma mainnet (chain ID 9745) POST https://rpc.aex402.com/tempo Tempo Mainnet Presto (chain ID 4217) POST https://rpc.aex402.com/codex Codex mainnet (chain ID 81224) POST https://rpc.aex402.com/arc Circle Arc mainnet (USDC-native gas, chain ID 5042) POST https://rpc.aex402.com/slonana Slonana (separate SVM network, slonana-core) GET https://rpc.aex402.com/linq Live MCP LINQ examples + full API reference GET https://rpc.aex402.com/linq#api-reference LINQ request/response types, operators, reducers, limits GET https://rpc.aex402.com/docs Human integration docs GET https://rpc.aex402.com/chains.json Machine-readable chain registry (slug, chainId, RPC route) Solana mainnet is the DEFAULT — a normal JSON-RPC request to POST / (or /rpc) goes to Solana mainnet, exactly as always. The other networks are opt-in: Auto-detect: EVM methods (eth_*, net_*, web3_*, debug_*, trace_*, arb_*, txpool_*) sent to POST / are automatically routed to Robinhood Chain mainnet. Use /rh, /hl, /eth, /base, /stable, /plasma, /tempo, /codex, or /arc as explicit EVM RPC URLs in MetaMask/EVM wallets. Slonana is a separate Solana-compatible network (its own ledger, NOT mainnet), selected two ways — the /slonana route, or a "network":"slonana" field in a JSON-RPC body posted to /: curl -X POST https://rpc.aex402.com/ -d '{"jsonrpc":"2.0","id":1,"method":"getSlot","network":"slonana"}' Without that field, / stays on Solana mainnet. Hyperliquid has TWO surfaces: /hl is the standard EVM JSON-RPC (HyperEVM, 999); /hl/info is the order-book/perps data layer — a custom POST-with-'type' JSON API (NOT eth_*), read-only and free. Examples: curl -X POST https://rpc.aex402.com/hl/info -d '{"type":"meta"}' # perps universe curl -X POST https://rpc.aex402.com/hl/info -d '{"type":"l2Book","coin":"BTC"}' # order book curl -X POST https://rpc.aex402.com/hl/info -d '{"type":"allMids"}' # mid prices curl -X POST https://rpc.aex402.com/hl/info -d '{"type":"clearinghouseState","user":"0x.."}' # positions All EVM chains share the same rate limits, x402 payments, and credit system. ## Free Tier - 10 requests per minute per IP address (heavier use is pay-per-call via x402 — see below) - No authentication required - Works from browsers (CORS fully open), curl, any HTTP client - Response header: X-Rate-Remaining (calls left this minute) Example: curl -X POST https://rpc.aex402.com \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"getSlot"}' ## Paid Tier (x402 Micropayments) Price: $0.0001 per call Minimum payment: $0.01 USD = 100 credits Credits never expire. No subscription required. Accepted tokens (Solana mainnet): USDC — EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v USDT — Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB SOL — native (priced live via CoinGecko/CryptoCompare, ~$0.01 equivalent) ### x402 Payment Flow Step 1 — Detect rate limit: When limit is exceeded the server returns HTTP 402 with: Header: PAYMENT-REQUIRED (JSON with payment instructions) Body: JSON containing accepted_assets, pay_to address, amount, reset_at Step 2 — Build a Solana transfer transaction: Send to the pay_to address. The transaction must have 3–6 instructions: - 2x ComputeBudget (SetComputeUnitLimit ≤ 5000, SetComputeUnitPrice ≤ 5M) - 1x SPL token transfer OR native SOL transfer - Optional: Lighthouse assertion instruction, Memo instruction Step 3 — Retry with PAYMENT-SIGNATURE header: Base64-encode the signed transaction payload and retry the request: curl -X POST https://rpc.aex402.com \ -H "Content-Type: application/json" \ -H "PAYMENT-SIGNATURE: " \ -d '{"jsonrpc":"2.0","id":1,"method":"getSlot"}' The worker verifies the transaction, co-signs as fee payer (you pay zero Solana gas), submits to the network, and allocates credits to your wallet. Response headers on success: PAYMENT-RESPONSE: settlement confirmation (JSON) X-Credits-Remaining: credits now available X-Session: HMAC session token (proves wallet ownership) Step 4 — Use credits on subsequent requests: Include the session token from settlement (or topup). This is the authenticated way — raw X-Wallet is read-only (balance check only). curl -X POST https://rpc.aex402.com \ -H "Content-Type: application/json" \ -H "X-Session: ses-..." \ -d '{"jsonrpc":"2.0","id":1,"method":"getSlot"}' Or use an API key (see API Keys section): -H "Authorization: Bearer sk-aex-v1-..." Response header: X-Credits-Remaining (credits left) When credits run out the server returns HTTP 402 again. ## URL-embedded auth (for header-less tooling: forge, hardhat, MetaMask, web3.js) Deploy/wallet tooling that speaks raw JSON-RPC often can't set an Authorization or X-Session header. Put the credential in the URL query instead — identical effect to the header (header wins if both are sent): API key: https://rpc.aex402.com/rh?key=sk-aex-v1-<...> Session: https://rpc.aex402.com/rh?session=ses-<...> Example (foundry): forge script Deploy.s.sol --rpc-url 'https://rpc.aex402.com/rh?key=sk-aex-v1-...' --broadcast Example (hardhat/ethers): use the same URL as your provider endpoint. The keyed URL authenticates every request in the burst, so it draws from your prepaid credits (1 credit/call) instead of the free per-IP rate limit — the right way to run a high-volume deploy or indexer. Note: keys in URLs can land in local shell history / access logs (same tradeoff as every URL-keyed RPC); rotate via POST /v1/api-keys if exposed. ## Authentication Chain (priority order) 1. PAYMENT-SIGNATURE header — inline x402 settlement (signs + submits TX) 2. Bearer sk-aex-v1-* | ?key=sk-aex-v1-* — API key (header OR URL query) 3. X-Session: ses-* | ?session=ses-* — HMAC session token (header OR URL query) 4. X-Wallet: — READ-ONLY (balance check, key listing only) 5. (none) — free tier (IP-based rate limit) ## WebSocket wss://rpc.aex402.com/ One WebSocket URL, both chains. The endpoint auto-detects from your FIRST frame: an EVM method (eth_subscribe / eth_*) binds the connection to Robinhood Chain; anything else binds to Solana. Same idea as the HTTP POST / auto-detect. Solana subscriptions: accountSubscribe, programSubscribe, signatureSubscribe, slotSubscribe, logsSubscribe, rootSubscribe Robinhood Chain (EVM) subscriptions, served from our own node: eth_subscribe: newHeads, logs (address/topics filter required), newPendingTransactions, syncing Reads + subscribe only (no writes over WS); unfiltered "firehose" logs subscriptions are rejected to protect the node. wss://rpc.aex402.com/rh/ws — optional explicit alias that forces Robinhood (skips first-frame detection). ## MCP Server (for AI agents) POST https://rpc.aex402.com/mcp Streamable HTTP transport. Add to Claude Desktop or Claude Code config: { "mcpServers": { "solana": { "url": "https://rpc.aex402.com/mcp" } } } Available MCP tools: Solana: solana_getBalance — Get SOL balance for a wallet address (in lamports). Divide by 1e9 for SOL. solana_getAccountInfo — Get raw account info (owner, lamports, data) for any Solana address. solana_getTokenAccountsByOwner — Get all SPL token accounts owned by a wallet. Returns mint, balance, decimals for each token. solana_getTransaction — Get full transaction details by signature, including instructions, logs, and status. solana_getLatestBlockhash — Get latest blockhash for transaction building. Returns blockhash + lastValidBlockHeight. solana_getSignaturesForAddress — Get recent transaction signatures for an address. Returns up to 20 most recent. solana_sendTransaction — Submit a signed transaction to the network. Returns transaction signature. solana_getSlot — Get the current slot number. solana_buildTransfer — Build a SOL or SPL token transfer instruction. Returns instruction JSON (programId, keys, data) for client-side TX construction and signing. solana_rpc — Call ANY Solana-compatible JSON-RPC method by name — full RPC surface beyond the typed solana_* tools (getProgramAccounts, getBlock, getEpochInfo, simulateTransaction, ...). Defaults to Solana mainnet; pass network:slonana to query Slonana (rpc.slonana.com), which additionally exposes RPC methods no other network has: getAlpenglowHealth (consensus migration status), getBridgeStatus, getAexchanRelays, getValidatorStats, quote. (listSvmNetworks/enableSvmNetwork/disableSvmNetwork/setNetworkRpcUrl also exist but are inert API-compat stubs — listSvmNetworks always reports one hardcoded network and the enable/disable/set calls ignore their arguments and return true; verified in source, not live network-management controls.) For tools that exist ONLY on Slonana's MCP server with no RPC-method equivalent (the aea_* agent registry), use mcp_call instead. EVM (Robinhood Chain / HyperEVM): evm_rpc — Call ANY EVM JSON-RPC method on a supported chain — eth_getBalance, eth_call, eth_blockNumber, eth_sendRawTransaction, eth_getLogs, ... Chains: robinhood (4663) / robinhood-testnet (46630), hyperevm (999), ethereum (1), base (8453), stable (988), plasma (9745), tempo (4217), codex (81224), arc (5042, Circle mainnet). Batch + LINQ workflows: mcp_call — Call a tool on another MCP server this RPC federates with, for tools that have no equivalent in solana_rpc/evm_rpc (no underlying JSON-RPC method — e.g. Slonana's aea_list_services/aea_resolve agent registry). Known servers: slonana. Call that server's tools/list first if you don't know its tool names. mcp_linq — Primary LINQ-style MCP workflow tool. Run one bounded MCP call: fan out up to 32 READ-ONLY tool calls across chains, then compose the combined result with fluent chains like results.selectMany(...).where(...).groupBy(...).orderByDesc(...).take(...), JSON pipeline steps, or reducers. Use mcp_linq when you want one aggregate answer instead of N tool calls. AeX402 AMM: aex402_listPools — List all AeX402 AMM pools on Solana. Returns pool addresses with basic info (mints, balances, fee, amp). Pools are 1024-byte accounts owned by program 3AMM53MsJZy2Jvf7PeHHga3bsGjWV4TSaYz29WUtcdje. aex402_getPool — Get detailed AeX402 pool info: token mints, balances, fee, amplification, LP supply, analytics (OHLCV candles), circuit breaker status. aex402_quote — Get a swap quote from an AeX402 pool. Calculates expected output, price impact, and fees without executing. aex402_rh_pool — Get the live state of the aeX402 AMM on Robinhood Chain (EVM 4663) — the diamond-contract port of the Solana AMM. The AMM is the set of GRADUATED launchpad coins whose pools are seeded in-diamond on the canonical launchpad (0xED2F); this enumerates them live by scanning VPoolGraduated events + reading each pool's reserves, so it tracks reality as coins graduate. Returns graduatedPools[] (poolId, token, reserves, TVL), graduatedPoolCount, and status ("live" | "no-graduated-pools" | "unknown"), plus the legacy standalone 0xA1F6 USDG/WETH pool (legacy-drained). Distinct from the chain's Uniswap-fork DEX. No inputs. aex402_buildSwap — Build an AeX402 AMM swap action. Fetches live pool state, computes output with slippage protection, returns all instruction parameters and account addresses for client signing. Cross-chain discovery: discover_programs — Discover on-chain programs/contracts across every chain this RPC supports (Solana, Slonana SVM, Robinhood, HyperEVM, Ethereum, Base, Stable, Plasma, Tempo, Codex). Returns a curated seed MERGED with programs/contracts AUTO-DISCOVERED from recent block activity (refreshed hourly) — each carries an `activity` count of recent invocations/calls; entries with type "discovered" were seen live on-chain but not yet named. Use this to learn what is actually active on-chain right now, then describe_program to introspect any specific address. describe_program — Introspect ANY specific program/contract address on a chain. Solana/Slonana: returns executable, owner, data size, and whether it is a known program. EVM: RPC-verified facts (is-contract, code size, ERC-20 name/symbol/decimals, EIP-1967 proxy → implementation) PLUS Blockscout explorer enrichment when available. reconstruct_abi — Reconstruct a PARTIAL function/event interface for an EVM contract on a supported EVM chain from its BYTECODE — no source or verification needed. Extracts PUSH4 function selectors + recent event topic0 hashes and resolves the ones public signature DBs (openchain/4byte) know to human signatures. Works on UNVERIFIED contracts because bytecode is ground truth, but it is NOT a full ABI: novel/proprietary selectors DBs have never seen stay unresolved (decompile for those). Use it to understand what an unknown contract does before trusting behavior-based guesses. search_tokens — Search the live token/NFT census for Robinhood Chain (4663) and HyperEVM (999) by symbol or name. Returns matching tokens with address, standard (erc20/erc721/erc1155), decimals, holders, market cap, and — for HyperEVM canonical tokens — live spot price + 24h volume. The census is refreshed hourly (canonical tokens from Hyperliquid spotMeta, top tokens from Blockscout, spam-filtered). Use this instead of discover_programs when you want a specific asset (e.g. "USDC on hyperevm", "stablecoins on robinhood") rather than the whole list. discovery_health — Report the freshness and health of the cross-chain program/token discovery pipeline: when the hourly cron last ran, how many programs/tokens each chain scan produced, and which scans failed. Use this to check whether discover_programs / search_tokens data is current before relying on it. search — Search the aeX402 universe by keyword: tokens (Robinhood Chain + HyperEVM census), known programs/contracts (Solana, Robinhood, HyperEVM, Slonana), and live AeX402 AMM pools. Returns a result list; pass a result id to the fetch tool for full detail. Use the specialist tools (search_tokens, discover_programs, aex402_listPools) when you already know the entity type. fetch — Fetch the full document for one search result id (from the search tool). Accepts token::
, program::
, or pool:
. Returns the entity detail (on-chain state for pools, census entry for tokens, registry/introspection for programs) as a document. Bridge: bridge_quote — Bridge/swap ANY asset across ANY chain via LI.FI (the engine behind Jumper) — e.g. Arbitrum USDC → Robinhood Chain (4663) USDG, or bridge into ETH for gas. Returns the best route (estimated output, fees, bridge used, duration) PLUS an unsigned transactionRequest (to/data/value/gasLimit) that the CALLER signs and submits on the fromChain — no keys are held here. Chains by id or key (1 Ethereum, 42161 Arbitrum, 8453 Base, 10 Optimism, 137 Polygon, 999 HyperEVM, 4663 Robinhood Chain). Tokens by symbol or 0x address. bridge_status — Track a cross-chain bridge submitted via bridge_quote — returns DONE / PENDING / FAILED plus the receiving-chain tx once it completes. Pass the source-chain tx hash (and the bridge tool from the quote for a faster lookup). AI: agent_delegate — Delegate a task to an independent specialist AI agent session. The delegate runs with full tool access and returns its response. Useful for breaking complex tasks into subtasks. Max depth: 3. ai_chat — Send a chat completion request to the aeX402 AI Router. Free tier: 3 calls/day. Paid: deducts credits based on token usage. Market data & utility: launch_token — Launch a memecoin on the aeX402 launchpad on Robinhood Chain (EVM 4663) for a FIXED rising bonding curve (1B supply, starts 0.000008 USDG and climbs ~3.6x, graduates at 10,000 USDG raised, quoted in USDG; the pool then opens just above the last sale price). You supply only identity — name + ticker (+ optional description/image/links). DEFAULT (custodial): the aeX402 backend SIGNS + SUBMITS the createVPool tx for you, so a claude.ai user with NO WALLET can launch in one call; returns {ok,status,txHash,vpId}. Optionally pass `creator` (a 0x address) to record as the coin owner. Pass build:true instead to get an UNSIGNED tx {to,value,data} to submit yourself (non-custodial — that requires `creator` and makes you the on-chain creator). A custodial call SIMULATES first, so a failure burns no gas: status "gated" means createVPool reverts in simulation (cause not determined — likeliest are the ticker still being claimed by a bonding coin or this vpId being taken; see `detail`/`revertData`), and status "unreachable" means the chain could not be reached, which is retryable. The launchpad is NOT chain-gated: createVPool simulates clean from an arbitrary sender (measured 2026-09-25). hl_info — Query the Hyperliquid Info API — the perps/spot order-book data layer (read-only, no auth). The 'type' field selects the query: meta (perps universe + leverage), l2Book (order book for a coin), allMids (mid prices), clearinghouseState (a user's positions/margin), spotMeta, meta+assetCtxs (mark/funding/OI), candleSnapshot, and more. For type:metaAndAssetCtxs specifically: the raw response is TWO PARALLEL top-level arrays (universe names, asset contexts) correlated only by array position — do not try to read/scan it directly for '200+ coins' style questions (funding-rate outliers, biggest open interest, highest volume). Pass rankBy instead: it joins the two arrays server-side, sorts, and returns only the top N — the correct way to answer 'what has the highest/most extreme funding/OI/volume right now'. api_get — GET any public read endpoint of rpc.aex402.com: /health, /credits?wallet=, /pumpfun?limit=, /pumpfun/tuple?mint=, /security/, /market/list, /sniper/leaderboard, /sniper/bets?id=, /settlement/, /settlements/, /ai/models, /ai/stats, /leaderboard, /openapi.json, /llms.txt, /rh/pools (Robinhood), /hl/pools (HyperEVM), /base/pools (Base Uniswap v3), /eth/pools (Ethereum Uniswap v3), /arb/pools (Arbitrum Uniswap v3) payment_help — How to pay for API access (x402 micropayments) — the complete self-serve guide for agents: current prices, every accepted asset/chain (USDC/USDT/SOL/ANSEM on Solana, ETH/USDG on Robinhood Chain, USDC/HYPE on HyperEVM), the merchant addresses, step-by-step topup → session-token → API-key flow, and how to attach credentials to MCP calls. This tool is FREE and NEVER rate-limited — call it when you hit a 402 / rate limit to convert into a paid session ($0.01 minimum buys 100 calls, no signup). ## MCP LINQ Use mcp_linq when an agent needs one aggregate answer from many chains. It runs up to 32 read-only MCP tool calls concurrently, then computes reducers, JSON pipeline steps, or a LINQ-style fluent chain server-side. The result is smaller, faster, and cheaper for the model than N separate tool calls plus raw JSON post-processing. Use mcp_linq for new clients and agent prompts. Example: discover multiple chains, flatten program arrays, filter token-like contracts, group by chain, sort, and keep the top five: { "jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": { "name": "mcp_linq", "arguments": { "calls": [ {"id":"rh","tool":"discover_programs","args":{"chain":"robinhood"}}, {"id":"hl","tool":"discover_programs","args":{"chain":"hyperevm"}}, {"id":"base","tool":"discover_programs","args":{"chain":"base"}} ], "linq": "results.selectMany(r => r.output.programs[]).where(p => p.type in (\"token\",\"canonical-token\",\"erc20\")).groupBy(p => p._chain, assets=count(), holders=sum(holders)).orderByDesc(assets).take(5)" } } } Fluent operators include: map/select, selectMany/flatMap, where/filter, find/first, groupBy, orderBy/orderByDesc, take/limit, skip, distinct/distinctBy, count, sum, avg, min, max, top. Safety: mcp_linq only accepts read-only tools and rejects writes such as eth_sendRawTransaction / sendTransaction before execution. Full typed reference: https://rpc.aex402.com/linq#api-reference Includes McpLinqRequest, BatchCall, McpLinqResponse, BatchResult, ReduceSpec, JSON pipeline step fields, predicate syntax, chain slugs, api_get allowlist, safe subtools, and current limits. The MCP endpoint follows the same rate limits and x402 payment rules as the RPC proxy. Use X-Wallet or PAYMENT-SIGNATURE headers identically. ## Self-Serve Credit Top-Up Manually add credits by sending a Solana transaction from any wallet: Step 1 — Send USDC, USDT, or SOL to our merchant address: AaAaKk5k5rBRKNZwVDmMRqHi8Bo8pMCP7eFMTwnggRPc Step 2 — Submit the transaction signature to /topup: GET https://rpc.aex402.com/topup?sig= POST https://rpc.aex402.com/topup with body: { "sig": "" } Optional: append ?ref= to tag the payment source (e.g. ?ref=phantom, ?ref=cli). Referrer counts are aggregated in /health (topupReferrers field). Response (success): { "success": true, "wallet": "", "creditsAllocated": 100, "creditsRemaining": 100, "asset": "USDC", "ref": "phantom", "session": "ses-." } Response (not confirmed yet — retry after a few seconds): HTTP 404 { "error": "Transaction not found..." } Response (already credited — idempotent): HTTP 409 { "error": "Transaction already credited", "wallet": "...", "credits": 100 } Accepted assets: USDC EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v $0.01 minimum = 100 credits (Solana) USDT Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB $0.01 minimum = 100 credits (Solana) SOL dynamic price ~$0.01 minimum = 100 credits (Solana) ETH native, Robinhood Chain (4663) ~$0.01 minimum = 100 credits USDG 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168 $0.01 minimum = 100 credits (Robinhood Chain, 6 decimals) USDC 0xb88339cb7199b77e23db6e890353e22632ba630f $0.01 minimum = 100 credits (HyperEVM 999, 6 decimals) HYPE native, HyperEVM (999) ~$0.01 minimum = 100 credits EVM payments: send native token or a stablecoin (ERC-20 transfer) to 0x29Da594b4Bc6a21a4a39C943b196E2D4e57d2190 (same address on EVERY EVM chain) then claim with, specifying the chain: GET https://rpc.aex402.com/topup?sig=<0x_transaction_hash>&chain=rh (Robinhood, default) GET https://rpc.aex402.com/topup?sig=<0x_transaction_hash>&chain=hl (HyperEVM) Credits go to the SENDER address; the response includes the same X-Session token. The current ETH minimum in wei is in the 402 body (paidTier.accepts) and at GET /.well-known/x402. ## AEX-402 Cross-Chain Identity (spec) One Ed25519 seed is a complete cross-chain identity. Every aeX402 key deterministically implies a secp256k1 twin on EVERY EVM chain — your Solana key already contains your Robinhood Chain address, and any future chain's. No new key ceremony, no extra secret to store, no per-chain backup. seed = ed25519_seed (32 bytes) # what you already have evm_privkey = HKDF-SHA256( ikm = seed, salt = "aex402-evm-v1", info = || counter # counter = 0,1,2… until 0 < key < curve order ) evm_address = keccak256(uncompressed_secp256k1_pubkey[1:])[-20:] # EIP-55 checksummed Context strings (the only registry you need): "secp256k1-merchant" the aeX402 merchant key "secp256k1-agent" per-session agent burner wallets "secp256k1-user" end-user twins (recommended for wallets/clients) The SAME secp256k1 key is valid on every EVM chain (addresses are chain-agnostic; only the chainId inside a signed transaction differs), so ONE derivation covers Robinhood Chain (4663), Ethereum, Base, Arbitrum, and any eip155 chain added later. Chain N+1 support is configuration, not a key migration. Properties: - Deterministic — same seed always yields the same address; nothing to back up - Domain-separated — the salt + context prevent cross-protocol key reuse; the EVM key can never be confused with the Ed25519 signing key or an HMAC key - One-way — the EVM key cannot be used to recover the Ed25519 seed - Offline — derivable with no network and no service Reference derivation (30 lines over @noble/hashes + @noble/secp256k1): seed = ed25519_private_key[0:32] # Solana keypair: first 32 bytes for n in 0,1,2,...: cand = HKDF-SHA256(ikm=seed, salt="aex402-evm-v1", info=context+str(n), len=32) if 0 < int(cand) < secp256k1_order: privkey = cand; break address = keccak256(secp256k1_pubkey_uncompressed[1:])[-20:] Test vector — ed25519 seed = 32 bytes of 0x07, context "secp256k1-agent": 0x74f81ad65d1c8402ceafc10e744210c3ccd4ebac Live on this API: GET /agent/wallet/evm-address the burner session's twin (X-Agent-Session) GET /agent/wallet/evm-balance is it funded? (ETH for gas + USDG balance) POST /agent/wallet/evm-pay {asset:"usdg"|"eth", amountUsd} — the burner autonomously buys credits on chain 4663 Agent EVM spending is bounded THREE ways: a per-session USD cap (evmCapUsd, set at /init, raise-only), the session TTL, and a STRUCTURAL allowlist — a burner can only ever send native value to the merchant address or call USDG.transfer(merchant, amount). It has no reachable path to pay anyone else, so a stolen session id can at worst buy us credits. Scaling: larger payments buy proportionally more credits ($1 USDC = 10,000 credits). Credits never expire. Idempotent: re-submitting the same sig returns the prior record. After topping up, use the session token from the response: X-Session: ses-... The session token is valid for 24 hours and proves wallet ownership (you signed the Solana transaction). For programmatic access, generate an API key instead (see API Keys section). ## Credit Balance Check GET https://rpc.aex402.com/credits?wallet= Response: { "wallet": "...", "remaining": 95, "totalPurchased": 100, "asset": "USDC", "lastPayment": "2026-01-15T10:30:00.000Z" } ## AI Proxy (OpenAI-Compatible) POST https://rpc.aex402.com/v1/chat/completions GET https://rpc.aex402.com/v1/models Drop-in replacement for OpenAI/Anthropic SDKs. Powered by the aeX402 AI Router. Authenticate with API key (recommended) or session token: curl -X POST https://rpc.aex402.com/v1/chat/completions \ -H "Authorization: Bearer sk-aex-v1-..." \ -H "Content-Type: application/json" \ -d '{"model":"auto","messages":[{"role":"user","content":"hello"}]}' SDK usage (API key — recommended for programmatic access): Python: OpenAI(base_url="https://rpc.aex402.com/v1", api_key="sk-aex-v1-...") Node.js: new OpenAI({ baseURL: "https://rpc.aex402.com/v1", apiKey: "sk-aex-v1-..." }) Streaming: set "stream": true in request body (standard SSE format). Default model: auto (the aeX402 AI Router picks the best available model for the task). Servable models: aex-fast (default), aex-pro (highest quality), aex-code (code-specialized). Metered per token — a free daily budget, then credits. These are STABLE SKUs: pin to the SKU name, never to a specific underlying model. The model backing a SKU may change at any time; the SKU's behaviour (fast / quality / code) is the contract. Additional AI endpoints: POST /ai/stream SSE streaming (or use stream:true in /v1/chat/completions) POST /ai/batch Parallel multi-prompt POST /ai/agent Stateful multi-turn agent with tools GET /ai/agent/sessions List active agent sessions GET /ai/stats 24h usage analytics GET /ai/credits?wallet= Credit balance + usage summary GET /ai/models?search=&provider= Model search + pricing GET /ai/limits?wallet= Rate limit status PUT /ai/limits Self-serve rate limit guardrails ## API Keys Generate persistent API keys tied to your wallet. Keys work everywhere: AI proxy, RPC, MCP. Format: sk-aex-v1-<64 hex chars>. Max 5 keys per wallet. ### Generate a Key POST https://rpc.aex402.com/v1/api-keys Request body: { "wallet": "", "signature": "", "message": "Sign to generate API key for rpc.aex402.com\nTimestamp: \nWallet: ", "label": "my-bot" } The message must be signed with the wallet's Ed25519 private key. Timestamp must be within 5 minutes of server time. Response: { "key": "sk-aex-v1-...", "prefix": "sk-aex-v1-1f213337...", "wallet": "...", "label": "my-bot", "created": "2026-03-16T06:39:46.427Z", "note": "Store this key securely — it will not be shown again." } ### List Keys GET https://rpc.aex402.com/v1/api-keys?wallet= Response: { "wallet": "...", "count": 1, "max": 5, "keys": [{ "prefix": "sk-aex-v1-1f213337...", "label": "my-bot", "created": "..." }] } ### Revoke a Key DELETE https://rpc.aex402.com/v1/api-keys Body: { "key": "sk-aex-v1-..." } ### Using an API Key Use as Bearer token anywhere X-Wallet is accepted: Authorization: Bearer sk-aex-v1-... The key resolves to the wallet that created it. Credits are charged from that wallet. ## Security Oracle (free, no auth required) GET /security/ Deep risk score for any Solana pool ?network=devnet|mainnet Network selection (default: mainnet) Returns JSON: score (0-100), risk (LOW/MEDIUM/HIGH), 11 individual checks: - mint_renounced: token mint authority is null (safe) - freeze_renounced: freeze authority is null (safe) - lp_locked: LP mint authority burned (permanently locked) - tvl_healthy: TVL > 0.1 SOL - balance_ok: both sides > 10% of total (not skewed) - fees_normal: admin fees not near u64 max (not overflow) - not_paused: pool is active - trades_active: trade count >= 5 - lp_ratio_ok: LP supply > 0 - holders_distributed: top holder <= 25% - creator_clean: no previous rug associations in KV holders: { top_holder_pct, top10_pct, flag: DISTRIBUTED|CONCENTRATED|WHALE_DOMINATED } lp_lock: { lp_mint, mint_authority_burned } creator_history: null | { flagged, previous_pool, previous_score, label: "SERIAL RUGGER" } Cached in KV for 60s per pool+network. X-Cache: HIT/MISS header. ## Prediction Markets GET /market/list Discover active markets from on-chain VPool state (?network=) POST /market/create Build unsigned TX for market creation {"type":"prediction"|"binary_option", "question":"...", ...} POST /market/resolve Build unsigned TX for resolution ## Sniper Leaderboard (Durable Object) POST /sniper/submit Push anonymous stats (auto-resolves bets) GET /sniper/leaderboard Top 50 + rank + percentile (?me=) GET /sniper/card/.svg Shareable SVG card (embed in Twitter/Discord) POST /sniper/bet Place prediction bet (credits staked, 5% rake) GET /sniper/bets Active + resolved bets (?id=) POST /sniper/claim Claim winning credits ## Trading Agents (autonomous execution, auth required) Each agent is a Durable Object with its own burner wallet. All /agents routes require a VERIFIED identity — an X-Session token (from x402 settlement / GET /topup) or an API key (Authorization: Bearer sk-aex-v1-*). A raw X-Wallet header is rejected. The owner is resolved from that credential; you can only see/control your own agents (max 20). POST /agents Spawn a new agent body: { "config": {...} } → { ok, agentId } GET /agents List your agents + live status GET /agents/:id Agent status PUT /agents/:id Edit agent config DELETE /agents/:id Delete agent (deregisters it) POST /agents/:id/pause Pause the agent loop POST /agents/:id/resume Resume the agent loop POST /agents/:id/stop Stop the agent GET /agents/:id/balance Burner wallet balance POST /agents/:id/sweep Sweep burner funds back to the verified owner (dest is never client-supplied) POST /agents/:id/testbuy Force ONE deterministic buy to verify pump execution (free) body: { "mint"? } POST /agents/:id/execute PAID pump.fun trade on the agent's burner wallet body: { "side": "buy"|"sell", "mint": "", "solAmount"?: , "idempotencyKey"?: "" } → { ok, side, mint, sig, replayed, feeCredits, remaining } Pricing: flat 100 credits (~$0.01) charged ONLY on a fresh confirmed on-chain fill. - Idempotent replay (same idempotencyKey) → returns the original result, feeCredits:0 (fee was taken on the first call; the trade is not re-executed). - Unconfirmed / failed trade → feeCredits:0, not charged. Per-trade cap: 0.02 SOL. Live-gated: the deployment must have AGENTS_LIVE_ENABLED, else 403. 402 if the owner has < 100 credits. Top up via /topup or an x402 payment first. ## Community RPC Provider Program Run a node for a chain we serve and join the overflow pool. When our own backends are saturated, read traffic rotates to registered community nodes — weighted by reputation. Reads only (we never route signed transactions to a third-party node). Revenue sharing is LIVE: operators keep 100% of the fee on paid (x402) calls their node serves, batched on-chain in USDG. Supported chains: robinhood (4663), hyperevm (999), solana, slonana. No signing, no MetaMask. You prove you control the node by serving your payout wallet address at GET {your-node}/identity — that's it. Your payout wallet may be a Solana address (base58) OR an EVM 0x address (Robinhood/HyperEVM operators get paid on their 0x wallet). Step 1 — serve your payout address at /identity, same origin as your RPC url (https). geth / Nitro / reth don't serve custom routes, but you already run a TLS terminator in front of your node (you need https) — add ONE line there: # nginx — inside the server{} block that fronts your node: location = /identity { default_type text/plain; return 200 "0xYourPayoutAddress"; } # Caddy — in your site block: handle /identity { respond "0xYourPayoutAddress" 200 } # Caddyfile one-liner form: respond /identity "0xYourPayoutAddress" 200 # Cloudflare-proxied node — a Snippet / tiny Worker: if (new URL(request.url).pathname === "/identity") return new Response("0xYourPayoutAddress"); # No proxy at all? Front your node with Caddy (auto-HTTPS) in 2 lines: # your-node.example.com { # handle /identity { respond "0xYourPayoutAddress" 200 } # reverse_proxy localhost:8547 # } Verify before registering: curl https://your-node.example.com/identity -> 0xYourPayoutAddress (plain text, or JSON {"wallet":"0x..."} — both accepted; must be https and a public host) Step 2 — register: POST https://rpc.aex402.com/providers Body: { "chain": "robinhood", "url": "https://your-node.example.com", "wallet": "0xYourPayoutAddress" } We fetch {your-node}/identity and require it to equal "wallet" (proves you control the node — nobody can register a node they don't operate), then run a correctness probe (your node must serve the right chain + canonical block data). Both must pass or registration is rejected. Your node is then continuously health-checked; mismatches or downtime lower your reputation score and can suspend you. To change your payout wallet, update /identity and re-register. GET https://rpc.aex402.com/providers?chain=robinhood list active providers for a chain GET https://rpc.aex402.com/providers?wallet=
list a wallet's providers DELETE https://rpc.aex402.com/providers {"chain","url"} deregister (your /identity must still match to prove control) Earnings — you keep 100% of the fee on every PAID call your node serves from the overflow pool (we take nothing). Check your pending balance: GET https://rpc.aex402.com/providers/earnings?wallet= Served answers are spot-audited against canonical data and your node is checked for freshness; a wrong or stale answer forfeits that call's fee and lowers your score. Accrued earnings are batched on-chain to your payout wallet. ## Other Endpoints GET /health Backend status, pricing, rate limit config (JSON) GET /llms.txt This file GET|POST /topup Self-serve credit top-up from confirmed tx (?sig= or JSON body) GET /credits Check prepaid credit balance (?wallet=) GET /pumpfun/* PumpFun API proxy (CORS-safe, 5s cache) WSS /aexchan aexchan relay (NIP-01 / NIP-28 channels); /nostr is legacy alias GET|POST /aexchat/* aexchat messaging API (wallet-authenticated); /matrix/* is legacy alias GET /.well-known/mcp.json MCP discovery manifest ## Supported JSON-RPC Methods All standard Solana methods are proxied, including: getSlot, getBlockHeight, getBlockTime, getBlock, getBalance, getAccountInfo, getMultipleAccounts, getProgramAccounts, getTokenAccountsByOwner, getTokenAccountBalance, getTokenSupply, getTransaction, getSignaturesForAddress, getSignatureStatuses, getLatestBlockhash, getFeeForMessage, getMinimumBalanceForRentExemption, sendTransaction, simulateTransaction, getInflationRate, getEpochInfo, getHealth, getVersion, getIdentity, getGenesisHash Robinhood Chain (EVM): all standard Ethereum JSON-RPC methods, including: eth_chainId, eth_blockNumber, eth_getBalance, eth_call, eth_gasPrice, eth_estimateGas, eth_getTransactionCount, eth_sendRawTransaction, eth_getTransactionByHash, eth_getTransactionReceipt, eth_getLogs, eth_getBlockByNumber, eth_getCode, net_version, web3_clientVersion (heavy methods like eth_getLogs and debug_/trace_ get a 30s timeout) ## Additional API Reference Full rpc.slonana.com API reference (underlying infrastructure, MCP tools, Aexchat, Nostr): https://rpc.slonana.com/llms.txt ## Implementation Notes - The worker co-signs transactions as fee payer — callers never pay Solana gas - sendTransaction bypasses cloud-IP discrimination via a relay (rpc.slonana.com) - SOL price: CoinGecko → CryptoCompare → $50 fallback (conservative; cached 5 min) - All backend-identifying info (hostnames, provider names, API key errors) is stripped - Backend rotation with per-endpoint cooldowns on 429/402/403/5xx responses