Pre-sign checks for agent wallets
An agent that signs needs a second opinion first. Simulate a transaction, decode calldata, check an x402 / EIP-3009 authorization, screen an address and verify a payment on Base or Ethereum, $0.02 per check in USDC over x402.
01 / Before you sign
Five questions before a signature
- 01
What will this transaction do?
tx-prechecksimulates it and answers SIGN / CAUTION / BLOCK;calldata-decodenames the function and arguments (an unlimited approve is flagged). - 02
Should I sign this x402 payment?
authorization-checkchecks an EIP-3009 authorization against the quote you were given: payTo, amount, asset, network and validity window. - 03
Is it safe to pay this address?
address-screenchecks the OFAC SDN list and contract facts; look-alike (address-poisoning) addresses are a real pattern on Base. - 04
Is a spender already approved?
erc20-allowanceanswers for how much. - 05
Did my payment land?
payment-verifyandtx-receiptanswer settled / pending with the decoded transfers;tx-unstickexplains a stuck nonce.
02 / Endpoints
Wallet safety endpoints
| Endpoint | USDC per call |
|---|---|
GET /v1/base/tx-precheckBase tx precheck ($0.02): simulate an unsigned transaction before signing: revert, gas USD, transfers, wallet PnL, approval risk, counterparty risk, SIGN / CAUTION / BLOCK | $0.02 |
GET /v1/eth/tx-precheckEthereum tx precheck ($0.02): simulate an unsigned transaction before signing: revert, gas USD, transfers, wallet PnL, approval risk, counterparty risk, SIGN / CAUTION / BLOCK | $0.02 |
GET /v1/base/calldata-decodeBase calldata decode ($0.02): what this unsigned transaction does before you sign it; selector -> verified ABI, arguments by name, nested calls, Universal Router plan, unlimited approval / permit / delegatecall / no-code target flags | $0.02 |
GET /v1/eth/calldata-decodeEthereum calldata decode ($0.02): what this unsigned transaction does before you sign it; selector -> verified ABI, arguments by name, nested calls, Universal Router plan, unlimited approval / permit / delegatecall / no-code target flags | $0.02 |
GET /v1/base/authorization-checkx402 authorization check on Base ($0.02): should I sign this EIP-3009 TransferWithAuthorization; quote match, nonce unused, not expired, domain verified on-chain, decoy flags, the EIP-712 digest | $0.02 |
GET /v1/eth/authorization-checkx402 authorization check on Ethereum ($0.02): should I sign this EIP-3009 TransferWithAuthorization; quote match, nonce unused, not expired, domain verified on-chain, decoy flags, the EIP-712 digest | $0.02 |
GET /v1/base/address-screenBase address screen ($0.02): is it safe to pay this address; OFAC SDN + GoPlus labels + chain state (EOA / contract / proxy / burn / never used), CLEAR / CAUTION / BLOCK | $0.02 |
GET /v1/eth/address-screenEthereum address screen ($0.02): is it safe to pay this address; OFAC SDN + GoPlus labels + chain state (EOA / contract / proxy / burn / never used), CLEAR / CAUTION / BLOCK | $0.02 |
GET /v1/base/erc20-allowanceBase ERC-20 allowance check ($0.02): is the spender approved, for how much, does the owner hold it; approve / revoke calldata | $0.02 |
GET /v1/eth/erc20-allowanceEthereum ERC-20 allowance check ($0.02): is the spender approved, for how much, does the owner hold it; approve / revoke calldata | $0.02 |
GET /v1/base/tx-unstickBase tx unstick ($0.02): is my wallet stuck (nonce gap), why the pending tx does not mine, ready-to-sign cancel + speed-up at a +10 % replacement fee, cost in USD | $0.02 |
GET /v1/eth/tx-unstickEthereum tx unstick ($0.02): is my wallet stuck (nonce gap), why the pending tx does not mine, ready-to-sign cancel + speed-up at a +10 % replacement fee, cost in USD | $0.02 |
GET /v1/base/payment-verifyx402 payment verify on Base ($0.02): did my USDC payment settle, to whom, how much, is it final; by tx hash or by the (from, nonce) of the EIP-3009 authorization you signed | $0.02 |
GET /v1/base/tx-receiptBase tx receipt + status ($0.02): wait for the receipt, decoded transfers, fee in USD, revert reason, or a pending diagnosis | $0.02 |
GET /v1/eth/tx-receiptEthereum tx receipt + status ($0.02): wait for the receipt, decoded transfers, fee in USD, revert reason, or a pending diagnosis | $0.02 |
03 / Example
Check an unlimited approve before signing
curl -i 'https://agents.avasis.ai/v1/base/calldata-decode?to=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&data=0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&value=0&from=0xf977814e90da44bfa03b6295a0616a897441acec&chain=base'
// npm i @x402/fetch @x402/evm viem (wallet needs a little Base USDC, no ETH: the facilitator pays gas)
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(process.env.X402_PRIVATE_KEY);
const pay = wrapFetchWithPayment(fetch, new x402Client().register("eip155:8453", new ExactEvmScheme(signer)));
const r = await pay("https://agents.avasis.ai/v1/base/tx-precheck?from=0xf977814e90da44bfa03b6295a0616a897441acec&to=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&data=0x095ea7b30000000000000000000000002626664c2603336e57b271c5c0b26f421741e481ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff&value=0&chain=base"); // 402 -> sign $0.02 -> 200 JSON
console.log(r.status, await r.json());04 / Questions
Questions builders ask
- Q1
Do these checks sign or send anything?
No. They read and simulate only. Your agent's keys never leave your client; you send the unsigned transaction or authorization fields, and the check answers before you sign. - Q2
Which chains?
Base (eip155:8453) and Ethereum mainnet (eip155:1). Payment for the check itself is always USDC on Base. - Q3
Do I need an account or an API key?
No. Every endpoint is paid per call over x402 with USDC on Base. The 402 quote is free, and any x402 v2 or v1 client can pay it. - Q4
What happens if a call fails?
You are not charged. Settlement runs only after a 2xx answer; 400, 404, 429, 5xx and timeouts are never settled.