{"uid":"cap_oUKKrNcxs5USR6OEURzyZ","slug":"kushbitx-agentproof-preflight-1aa97b3e","name":"KushBitx AgentProof Preflight","description":"One check before money moves on Base. Simulates the unsigned transaction, decodes approvals and transfers, screens the token and the recipient or spender, and applies a protected SpendGuard policy when given. Returns ALLOW, REVIEW or BLOCK with sourced findings. Fail-closed: no ALLOW unless every check ran. Does not detect prompt injection; Protected SpendGuard can cap what an agent pays, but does not detect it either.","url":"https://kushbitx.com/api/preflight?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Transaction destination (contract or wallet)."},"data":{"type":"string","pattern":"^0x([a-fA-F0-9]{2})*$","description":"Unsigned calldata."},"from":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Wallet that will sign. Required in practice: without it the verdict is REVIEW (sender_unknown), because the transaction cannot be simulated from the signing wallet."},"calls":{"type":"array","items":{"type":"object","required":["to"],"properties":{"to":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"data":{"type":"string","pattern":"^0x([a-fA-F0-9]{2})*$"},"value":{"type":"string","pattern":"^[0-9]+$"},"intent":{"enum":["swap","transfer","approve","buy_token","contract_call"],"type":"string"},"minAmountOut":{"type":"string"},"tokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"expectedTokenOut":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"expectedRecipient":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"}}},"maxItems":10,"minItems":1,"description":"Beta. A batch of 1 to 10 calls from one account (from required; no to). Each call: to, value, data, and optionally intent, tokenAddress, expectedRecipient, minAmountOut, expectedTokenOut. Any call KushBitx does not interpret makes the batch REVIEW."},"value":{"type":"string","pattern":"^[0-9]+$","description":"Native ETH value in wei."},"amount":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{1,18})?$","description":"Amount in token units, for the record."},"intent":{"enum":["swap","transfer","approve","buy_token","contract_call"],"type":"string","description":"What the agent means to do."},"policy":{"type":"object","required":["policyId","agentId","requestId"],"properties":{"agentId":{"type":"string"},"policyId":{"type":"string"},"requestId":{"type":"string"}},"description":"Protected SpendGuard policy (send the agent key as Authorization: Bearer). Base USDC transfers only.","additionalProperties":false},"chainId":{"enum":[8453],"type":"integer","description":"Base mainnet."},"entryPoint":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Beta. With userOperation: the official EntryPoint v0.6, v0.7 or v0.8 address."},"minAmountOut":{"type":"string","pattern":"^[0-9]+(\\.[0-9]{1,36})?$","description":"Swap: smallest acceptable output, in token units (for example 25.5)."},"tokenAddress":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Token to screen, when it is not the transaction destination (for example the token being bought)."},"userOperation":{"type":"object","required":["sender","callData"],"properties":{"nonce":{"type":"string"},"sender":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"factory":{"type":"string"},"callData":{"type":"string","pattern":"^0x([a-fA-F0-9]{2})*$"},"initCode":{"type":"string"},"paymaster":{"type":"string"},"signature":{"type":"string"},"factoryData":{"type":"string"},"callGasLimit":{"type":"string"},"maxFeePerGas":{"type":"string"},"paymasterData":{"type":"string"},"paymasterAndData":{"type":"string"},"preVerificationGas":{"type":"string"},"maxPriorityFeePerGas":{"type":"string"},"verificationGasLimit":{"type":"string"}},"description":"Beta. An ERC-4337 UserOperation for a deployed account, with entryPoint (no to)."},"safeTransaction":{"type":"object","required":["safe","to"],"properties":{"to":{"type":"string"},"data":{"type":"string"},"safe":{"type":"string"},"nonce":{"type":"string"},"value":{"type":"string"},"operation":{"enum":[0,1],"type":"integer"}},"description":"Beta. A Safe transaction (instead of to and data). On ALLOW the response carries safeCoSignature (Safe Policy Engine CoSignerPolicy format); a delegatecall is never co-signed.","additionalProperties":false},"expectedTokenOut":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Swap: token the swap must deliver; 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE for native ETH. For buy_token, tokenAddress is used when this is absent."},"authorizationList":{"type":"array","items":{"type":"object","required":["chainId","address"],"properties":{"r":{"type":"string"},"s":{"type":"string"},"nonce":{"type":["string","integer"]},"address":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$"},"chainId":{"type":"integer"},"yParity":{"type":["string","integer"]},"authority":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Optional: the signer of the authorization, when known."}}},"maxItems":5,"minItems":1,"description":"Beta. EIP-7702 authorizations {chainId, address, nonce, yParity, r, s} of a type-4 transaction."},"expectedRecipient":{"type":"string","pattern":"^0x[a-fA-F0-9]{40}$","description":"Swap: who must receive the output (default: from). ETH or ERC-20 transfer: who must be paid; a different recipient is BLOCK (EXPECTED_RECIPIENT_MISMATCH)."}}},"responseSchema":{"type":"json","example":{"input":{"to":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","from":"0x0d68028d06af13379C872FEE032568B4Be712f22","value":"0","intent":"transfer"},"chainId":8453,"effects":{"approvals":[],"simulated":true,"transfers":[{"to":"0xd2db751a2fdba554706fb535438d81d3a0b42979","from":"0x0d68028d06af13379c872fee032568b4be712f22","asset":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","amount":"1000"}]},"reports":{},"service":"preflight","verdict":"ALLOW","findings":[],"validity":"The verdict applies only to this exact transaction (transactionDigest) until expiresAt. If any field changes or the time passes, the verdict is void; check again.","checkedAt":"2026-11-01T12:00:00.000Z","expiresAt":"2026-11-01T12:01:00.000Z","riskLevel":"low","notChecked":["prompt_injection: Preflight checks the transaction, not the instructions that produced it. Bound what an agent can pay with Protected SpendGuard, a server-side policy the model cannot change."],"generatedAt":"2026-11-01T12:00:00.000Z","limitations":["Advisory result, not financial advice and not a guarantee of safety. Simulation uses current chain state."],"reasonCodes":[],"onchainBlock":37000000,"reportVersion":"1.1","requiredChecks":["sender","simulation","calldata_decode","recipient","token","effects"],"checksPerformed":["simulation","calldata_decode","destination","recipient","token","sender","effects"],"transactionType":"erc20_transfer","checksUnavailable":[],"transactionDigest":"0x0000000000000000000000000000000000000000000000000000000000000000","transactionDigestMethod":"sha256 of JSON.stringify({chainId,from,to,value,data}) in that key order; from, to and data lowercase; value as a decimal wei string; from null when absent; data 0x when empty. Hex result with 0x prefix."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_4FlFxdVN3G6cmkBKgJEvv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Simulates an unsigned Base transaction, decodes approvals and transfers, screens token and recipient/spender, and applies SpendGuard policy — returning ALLOW, REVIEW, or BLOCK with sourced findings before any money moves.","exampleAgentPrompt":"Before you sign that USDC transfer of 500 USDC from my wallet 0xAbC...123 to 0xDeF...456 on Base, run a preflight check using my SpendGuard policy so we get an ALLOW, REVIEW, or BLOCK verdict with the full findings.","exampleUseCases":[{"title":"Block risky ERC-20 approval before signing","prompt":"I'm about to approve a new DeFi contract at 0x1234...abcd to spend my USDC — can you simulate that approval transaction from my wallet 0xAaaa...bbbb on Base and tell me if it's safe to sign, or if it should be blocked?"},{"title":"Swap safety check with slippage guard","prompt":"Before my agent executes this swap on Base — buying the token at 0xTokn...1234 using calldata 0xabc...def from 0xMyWa...llet — simulate it and confirm at least 25.5 token units come out to my wallet, and give me a ALLOW or BLOCK verdict."},{"title":"Policy-gated USDC payment verification","prompt":"My agent is about to send USDC on Base; check transaction calldata 0xdata...1234 from 0xFrom...5678 to 0xTo...9abc against my SpendGuard policy ID pol_abc123 for agent agt_xyz and request req_001, and tell me if it's approved to go through."}],"resultDescription":"Returns a structured verdict of ALLOW, REVIEW, or BLOCK, along with decoded transfer and approval details, token risk screening results (e.g. honeypot detection), recipient/spender risk findings, and SpendGuard policy outcome. Fail-closed: an ALLOW is only returned when every check completed successfully; any failed check results in REVIEW or BLOCK.","failureModes":["Missing 'from' field causes automatic REVIEW (sender_unknown) because simulation cannot run without signer","Token not on Base mainnet or unsupported chain returns error (only chainId 8453 accepted)","Malformed calldata (odd-length hex) rejected before simulation","SpendGuard policy evaluation fails if Authorization Bearer token is missing or invalid","RPC simulation failure (e.g. reverted transaction) surfaces as BLOCK with simulation_error finding","Token address is unverifiable or contract is not deployed, causing REVIEW verdict","Network timeout during eth_call simulation may cause fail-closed BLOCK"],"whenToPreferThis":"Choose this endpoint when an AI agent needs a single, comprehensive pre-signing safety gate for Base transactions — especially when combining token risk screening, recipient vetting, decoded calldata analysis, and optional policy enforcement in one atomic check. Prefer it over separate token screeners or standalone simulators when you need a single ALLOW/REVIEW/BLOCK verdict with fail-closed semantics before any value-transferring transaction is signed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T00:35:05.797Z","isFirstParty":false,"canonicalSlug":"kushbitx-agentproof-preflight-1aa97b3e"}