{"name":"onyx_approval_guard","tier":"metered","price_usdc":"0.10","endpoint":"https://onyx-actions.onrender.com/v1/onyx_approval_guard","method":"POST","input_schema":{"type":"object","properties":{"spender":{"type":"string","description":"0x address that will receive spend approval (the `spender` arg of approve()). Required."},"amount_raw":{"type":"string","description":"Optional. The raw approval amount as a base-10 integer string (the uint the agent is about to approve). Pass it to detect unlimited/max approvals. Omit to assess the spender only."},"token":{"type":"string","description":"Optional. The ERC-20 token address being approved, for context."}},"required":["spender"]},"description":"Pre-approval firewall — the safety check before your agent signs a token approve(). Give the spender (and optionally the amount + token); get a SIGNED ALLOW/REVIEW/BLOCK verdict: is the amount unlimited (the #1 drain vector — we recommend a finite amount instead)? is the spender a plain EOA (almost always a drainer)? is it a verified, established contract? Catches the malicious/unlimited approval that empties a wallet BEFORE the agent signs it. Every verdict Ed25519-signed. The highest-frequency safety call an on-chain agent makes.","when_to_use":"Call this the instant before your agent signs ANY ERC-20 approve() — every swap, deposit, or DeFi interaction starts with one. Use the verdict as a hard gate: BLOCK = abort (EOA spender / self-destructed / unlimited-to-unverified), REVIEW = require approval, ALLOW = proceed. This is the single highest-leverage drain-prevention call an on-chain agent can make.","vs_alternatives":"Wallet UIs warn humans about unlimited approvals, but an autonomous agent has no human to see the warning — it just signs. This is that warning, as a signed machine-readable verdict an agent gates on, with the spender screened on-chain (EOA / unverified / self-destructed) and a recommended safe amount returned.","example_request":{"spender":"0x1111111111111111111111111111111111111111","amount_raw":"115792089237316195423570985008687907853269984665640564039457584007913129639935"},"example_response":{"ok":true,"verdict":"BLOCK","risk_score":80,"unlimited":true,"spender_is_contract":false,"flags":["UNLIMITED approval (MAX) — the spender could drain the ENTIRE balance, forever.","spender is a PLAIN WALLET (EOA) — almost always a drainer."],"summary":"BLOCK (risk 80/100): unlimited approval to an EOA spender."},"settle_to":"0x3fD9ee1373562f894D322B37DFFAd7a5D2b2d78f","network":"base","facilitator":"https://facilitator.xpay.sh","payment_required":true,"free_introspection":true,"note":"GET this URL = free introspection card. POST with x402 payment header to call."}