check_tx
Run on every transaction before signing. Shows what each wallet gains and loses, blocks drainer tricks, and catches failures and expired blockhashes before you pay a fee. Decodes each step, dry-runs it on live mainnet, finds each wallet's SOL and token changes, and answers OK, REVIEW or BLOCK with reasons. Measured: no false BLOCK on 200 real mainnet transactions; with tx_matches it caught 9 of 9 attack cases (benchmark/ in the repo). Example: {"tx": "<base64, before signing>"}. Cost: 25 free calls a day, then $0.02 USDC per call (x402). Outputs explained: GET /api/tools/check_tx.
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": {
"tx": "<tx>"
},
"name": "check_tx"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tx | Yes | Base64 transaction, signed or not, legacy, v0 or v1. Before signing: Buffer.from(tx.serialize({ requireAllSignatures: false })).toString('base64'), or an aggregator's swap tx. | |
| network | No | Default "mainnet-beta" (real money). "devnet" only for test wallets. | mainnet-beta |