{"openapi":"3.1.0","info":{"title":"Base toolbox","version":"1.3.6","description":"Base toolbox: before you sign on Base — Uniswap v3 preflight, leftover allowances, tx explain, transfer check. $0.10 USDC. Also $0.001 price/gas/ENS. GET /v1/constants free. No CoinGecko key.","x-guidance":"Free GET /v1/constants. Paid $0.10: POST /v1/preflight, /v1/allowances, /v1/explain, /v1/send-check. Paid $0.001: /v1/base-price, /v1/base-gas, /v1/base-ens. Do not send opaque approve calldata. No CoinGecko key.","contact":{"name":"Yanis Monnet","email":"orthies@proton.me"}},"servers":[{"url":"https://basetoolbox.cartonpliant.workers.dev"}],"paths":{"/v1/preflight":{"post":{"summary":"Before you sign a Uniswap v3 swap on Base: amountOut, minOut, gas, exact-amount approve calldata (never max uint), simulate revert, sell-check. POST {from, tokenIn, tokenOut, amountIn}. $0.10 USDC.","operationId":"preflight","x-x402":{"amount":"0.10","asset":"USDC","network":"eip155:8453"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.10"},"protocols":["x402"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","description":"Taker 0x on Base"},"tokenIn":{"type":"string","description":"Ticker or 0x (USDC, WETH, cbBTC)"},"tokenOut":{"type":"string","description":"Ticker or 0x"},"amountIn":{"type":"string","description":"Raw integer units of tokenIn"},"amount":{"type":"string","description":"Optional human decimal instead of amountIn"},"slippageBps":{"type":"integer","description":"Default 50 (0.5%)"}},"required":["from","tokenIn","tokenOut"]},"example":{"from":"0xYourWallet","tokenIn":"USDC","tokenOut":"WETH","amountIn":"1000000"}}}},"responses":{"200":{"description":"Paid result","content":{"application/json":{"schema":{"type":"object"},"example":{"ok":true,"next":"swap","amountOut":"…","minOut":"…","sellable":true,"warnings":[]}}}},"402":{"description":"Payment required"}}}},"/v1/allowances":{"post":{"summary":"Leftover Uniswap-family ERC-20 allowances on Base for one token: SwapRouter02, Permit2, Universal Router. Revoke calldata is approve(spender, 0), never max uint. POST {from, token}. $0.10 USDC.","operationId":"allowances","x-x402":{"amount":"0.10","asset":"USDC","network":"eip155:8453"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.10"},"protocols":["x402"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","description":"Owner 0x on Base"},"token":{"type":"string","description":"Ticker or 0x (USDC, WETH, cbBTC)"}},"required":["from","token"]},"example":{"from":"0xYourWallet","token":"USDC"}}}},"responses":{"200":{"description":"Paid result","content":{"application/json":{"schema":{"type":"object"},"example":{"ok":true,"next":"revoke","leftover":1,"spenders":[]}}}},"402":{"description":"Payment required"}}}},"/v1/explain":{"post":{"summary":"Decode a Base tx before you sign: approve, ERC-20 transfer, or Uniswap v3 exactInputSingle. Unknown calldata → abort. POST {to, data, value}. $0.10 USDC.","operationId":"explain","x-x402":{"amount":"0.10","asset":"USDC","network":"eip155:8453"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.10"},"protocols":["x402"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","description":"tx.to 0x"},"data":{"type":"string","description":"tx.data hex"},"value":{"type":"string","description":"native value, default 0"}},"required":["to","data"]},"example":{"to":"0x8335…","data":"0x095ea7b3…","value":"0"}}}},"responses":{"200":{"description":"Paid result","content":{"application/json":{"schema":{"type":"object"},"example":{"ok":true,"kind":"approve","next":"confirm_approve"}}}},"402":{"description":"Payment required"}}}},"/v1/send-check":{"post":{"summary":"Before you send USDC/WETH/ETH on Base: simulate the transfer, reject zero address, flag contract recipients. POST {from, to, token, amountIn}. $0.10 USDC.","operationId":"send_check","x-x402":{"amount":"0.10","asset":"USDC","network":"eip155:8453"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.10"},"protocols":["x402"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","description":"Sender 0x on Base"},"to":{"type":"string","description":"Recipient 0x"},"token":{"type":"string","description":"USDC/WETH/cbBTC/ETH or 0x"},"amountIn":{"type":"string","description":"Raw integer units"},"amount":{"type":"string","description":"Optional human decimal instead of amountIn"}},"required":["from","to","token"]},"example":{"from":"0xYourWallet","to":"0xRecipient","token":"USDC","amountIn":"1000000"}}}},"responses":{"200":{"description":"Paid result","content":{"application/json":{"schema":{"type":"object"},"example":{"ok":true,"kind":"erc20","next":"confirm_send"}}}},"402":{"description":"Payment required"}}}},"/v1/base-price":{"post":{"summary":"Live DEX token price in USD on Base. Uniswap v3 USDC pool. Pass ticker WETH/USDC/cbBTC or 0x contract. No CoinGecko key. $0.001 USDC.","operationId":"base_price","x-x402":{"amount":"0.001","asset":"USDC","network":"eip155:8453"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":["x402"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"Ticker WETH/USDC/cbBTC or 0x address on Base"}},"required":["token"]},"example":{"token":"WETH"}}}},"responses":{"200":{"description":"Paid result","content":{"application/json":{"schema":{"type":"object"},"example":{"ok":true,"usd":2500.12,"pool":"0xd0b5…","quote":"0x8335…"}}}},"402":{"description":"Payment required"}}}},"/v1/base-gas":{"post":{"summary":"Base network EIP-1559 gas oracle: base fee, priority tips, 21k transfer cost. Use before signing a tx. No oracle key. $0.001 USDC.","operationId":"base_gas","x-x402":{"amount":"0.001","asset":"USDC","network":"eip155:8453"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":["x402"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true},"example":{}}}},"responses":{"200":{"description":"Paid result","content":{"application/json":{"schema":{"type":"object"},"example":{"ok":true,"base_fee_gwei":0.02,"transfer_21k_wei":"420000000000"}}}},"402":{"description":"Payment required"}}}},"/v1/base-ens":{"post":{"summary":"ENS resolve: turn a .eth name into a 0x address (vitalik.eth). On-chain L1 records, no CCIP. $0.001 USDC.","operationId":"base_ens","x-x402":{"amount":"0.001","asset":"USDC","network":"eip155:8453"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":["x402"]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"ENS name such as vitalik.eth"}},"required":["name"]},"example":{"name":"vitalik.eth"}}}},"responses":{"200":{"description":"Paid result","content":{"application/json":{"schema":{"type":"object"},"example":{"ok":true,"address":"0xd8da…","resolver":"0x4976…"}}}},"402":{"description":"Payment required"}}}},"/v1/constants":{"get":{"summary":"Free Base constants: tokens, Uniswap spenders, selectors, paid prices.","operationId":"constants","security":[],"responses":{"200":{"description":"Constants","content":{"application/json":{"schema":{"type":"object"}}}}}}}}}