Pre-sign risk check ($0.01 via x402)
presign_checkPaid ($0.01 via x402 in USDC on Base, Solana, Monad, Polygon, Arbitrum, Avalanche, Algorand, Stellar or NEAR, in RLUSD on the XRP Ledger or in USD₮0 on X Layer): call this before you sign. Send the transaction, token approval, EIP-712 signature (Permit, Permit2, EIP-3009 x402 payment, Seaport) or EIP-7702 authorization (type authorization: delegating the wallet to a contract, the sweeper trap) your agent is about to sign; get back green, orange or red with reason codes: who gets access, whether the spender or recipient is flagged, sanctioned (OFAC SDN) or unverified, unlimited allowances, the token itself (honeypot, fake look-alike, high tax), and for a Uniswap v4 swap or position what the pool's hook may do (keep part of the swap, set the fee, block a withdrawal, be upgraded). On Solana (type solana, the base64 wire transaction): every instruction decoded and the transaction simulated (token account takeovers, System Assign, unlimited delegates, durable nonces, hidden owner or delegate changes). On the XRP Ledger (type xrpl, the unsigned tx JSON): account takeovers (SetRegularKey, SignerListSet, disabling the master key), fake RLUSD, partial payments, missing destination tags, trust-line and issuer risks, and DEX offers far below market. On Algorand (type algorand, base64 msgpack transaction or group in transactions): rekeys, closing the account or an asset to someone else, clawbacks, fake USDC, app update/delete/clear, simulated. On Stellar (type stellar, base64 XDR envelope in transaction): account merges, added signers, a disabled master key, fake USDC/EURC, look-alike recipients (address poisoning), missing required memos, Soroban token approvals (also inside x402 payment authorizations), simulated. Only proceed on green; on orange ask your user; never sign on red. Each orange or red reason carries a fix (what to change to get green; retry "change" means rebuild the request that way and check it again, "never" means don't sign at all). The answer also lists checked and not_checked (each with because: unavailable, not_sent with the field to send, or out_of_scope); green covers only what was checked. Same as POST /v1/check. The answer carries a signed receipt (EIP-191, bound to your arguments) that proves later which verdict you got.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>"
},
"name": "presign_check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | transaction: the target contract | |
| tx | No | near: { signerId, receiverId, actions } as wallet-selector builds it (actions like { type: "FunctionCall", params: { methodName, args, gas, deposit } }). xrpl: the unsigned transaction JSON (TransactionType, Account, Destination, Amount, …), including CredentialCreate, CredentialAccept, DelegateSet, Batch (every inner transaction is judged), vault deposits and withdrawals (VaultDeposit, VaultWithdraw) and loans (LoanSet, LoanPay) | |
| data | No | transaction: 0x-prefixed calldata | |
| from | No | transaction, message or authorization, optional: your wallet address (authorization: its current delegation is shown); the transaction is then simulated (what really leaves and arrives; orange HIDDEN_APPROVAL, SIMULATION_NFT_OUT, SIMULATION_FAILS) and its recipients are compared with who this wallet paid before (red ADDRESS_POISONING for a look-alike) | |
| type | Yes | What the agent is about to sign; near = a NEAR transaction in transaction (base64 borsh) or tx (signerId, receiverId, actions), or a NEAR Intents message in nep413; authorization = an EIP-7702 authorization delegating the wallet to the contract in address; message = a plain personal_sign / eth_sign message in message; solana = a Solana transaction in transaction; xrpl = an unsigned XRP Ledger transaction in tx; algorand = an Algorand transaction in transaction, or a group in transactions; stellar = a Stellar transaction envelope in transaction | |
| x402 | No | optional, EIP-3009 payments only: the x402 payment requirements you are paying ({ accepted: { scheme, network, amount, asset, payTo, maxTimeoutSeconds, extra } }, one entry of the 402's accepts); red when the signature pays more, someone else, another token or chain | |
| nonce | No | authorization, optional: the authorization nonce | |
| token | No | approval: the token contract | |
| value | No | transaction: native value in wei | |
| amount | No | approval: amount in base units (0 = revoke) | |
| intent | No | optional: what you are trying to do, in one sentence (e.g. "swap 10 USDC for ETH on Uniswap"); orange INTENT_MISMATCH when signing would do more or something else | |
| method | No | message: how it is signed (default personal_sign); eth_sign is always red | |
| nep413 | No | near: a NEAR Intents message about to be signed, as passed to signMessage: { message, recipient: "intents.near", nonce } (message = the JSON { signer_id, verifying_contract, deadline, nonce, intents }), or the signed { standard: "nep413", payload }. Red NEAR_INTENTS_GIVES_FOR_NOTHING (a token_diff that only gives), NEAR_INTENTS_KEY_ADDED, NEAR_FAKE_TOKEN received, NEAR_LOOKALIKE_ACCOUNT; orange NEAR_INTENTS_UNKNOWN_VERIFIER, NEAR_INTENTS_LONG_DEADLINE | |
| origin | No | optional: the site asking for the signature or transaction (URL or hostname); a domain under 30 days old is orange | |
| address | No | authorization: the contract the EIP-7702 authorization delegates the wallet to (0x0…0 clears a delegation). Any delegation hands the contract the whole wallet: orange EIP7702_AUTHORIZATION unless the contract is on GoPlus's trust list; red AUTHORIZATION_TO_NO_CONTRACT, AUTHORIZATION_TO_UNVERIFIED_CONTRACT, AUTHORIZATION_TO_FLAGGED_CONTRACT, SANCTIONED_ADDRESS | |
| chainId | No | EVM chain id, required for approval, transaction, signature and authorization: 1, 10, 56, 137, 143, 196, 8453, 42161, 4663, 43114 (8453 = Base); optional for message | |
| message | No | message: the text or 0x-hex about to be signed; a Sign-In with Ethereum message for another site than origin is red, unreadable bytes are orange | |
| network | No | xrpl: xrpl:0 (mainnet, default) or xrpl:1 (testnet); stellar: stellar:pubnet (default) or stellar:testnet; near: near:mainnet (default) or near:testnet | |
| spender | No | approval: who gets the allowance | |
| typedData | No | signature: the exact eth_signTypedData_v4 payload (Permit, Permit2, EIP-3009 x402 payment, Seaport) | |
| transaction | No | solana: the base64 wire transaction about to be signed; decoded and simulated (red SOLANA_TOKEN_ACCOUNT_TAKEOVER, SOLANA_ACCOUNT_ASSIGN; orange SOLANA_UNLIMITED_DELEGATE, SOLANA_DURABLE_NONCE, HIDDEN_APPROVAL, SIMULATION_FAILS). algorand: one base64 msgpack transaction (unsigned or signed); red ALGORAND_REKEY, ALGORAND_CLOSE_ACCOUNT, ALGORAND_ASSET_CLOSE, ALGORAND_FAKE_STABLECOIN; simulated. near: a base64 borsh NEAR transaction (unsigned or signed); red NEAR_FULL_ACCESS_KEY_ADDED, NEAR_ACCOUNT_DELETED, NEAR_CONTRACT_DEPLOYED_ON_WALLET, NEAR_LAST_FULL_ACCESS_KEY_DELETED, NEAR_INTENTS_KEY_ADDED, NEAR_FAKE_TOKEN, NEAR_LOOKALIKE_ACCOUNT; orange NEAR_KEY_UNLIMITED_ALLOWANCE, NEAR_NFT_APPROVAL, NEAR_INTENTS_DEPOSIT_FOR_OTHER. stellar: a base64 XDR transaction envelope (unsigned, signed or a fee bump, as an x402 payment on Stellar); red STELLAR_ACCOUNT_MERGE, STELLAR_SIGNER_ADDED, STELLAR_MASTER_KEY_DISABLED, STELLAR_FAKE_STABLECOIN, ADDRESS_POISONING; orange STELLAR_TOKEN_APPROVE, STELLAR_HIDDEN_APPROVE, STELLAR_MEMO_REQUIRED; Soroban calls simulated. | |
| transactions | No | algorand: an atomic group, each a base64 msgpack transaction; send the whole group so every transaction is checked. near: several transactions (base64 borsh or { signerId, receiverId, actions }), as signAndSendTransactions | |
| authorizationChainId | No | authorization, optional: the chain id inside the authorization, chainId (default) or 0 = valid on every chain (orange AUTHORIZATION_ALL_CHAINS) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| accepts | No | Only on an unpaid call: the x402 payment options | |
| reasons | No | ||
| receipt | No | ||
| verdict | No | green: go ahead; orange: ask the user; red: do not sign or buy (absent on the payment requirement) | |
| version | No |