# TxGuard Transaction Preflight

> TxGuard Transaction Preflight is a paid API for AI agents from txguard.schemasure.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-11).

Decodes, explains, and validates an unsigned Base transaction, EIP-712 typed data, or EIP-3009 x402 payment authorization before signing, including proxy resolution, approval classification, and quote verification.

## Facts

- Endpoint: POST https://txguard.schemasure.com/v1/tx/preflight?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/txguard-transaction-preflight-d1bfe174
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_g1uCIeITWpNIFbgv9OVPy

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability txguard-transaction-preflight-d1bfe174 -d '<json body>'
```

Example prompt: Before I sign this transaction, run it through TxGuard to decode what it actually does — here's the unsigned tx with `to: 0xabc...`, `data: 0xdeadbeef...`, `from: 0x123...`, `value: 0` — and check whether it's a token approval or something else.

## When to prefer this

Use TxGuard when an AI agent or user needs to understand and validate a Base transaction, EIP-712 payload, or x402 payment authorization before signing. Particularly valuable in agentic payment flows where an EIP-3009 authorization must be checked against a received quote for recipient, amount, asset, chain, freshness, and nonce replay. Prefer this over generic block explorers when you need structured, machine-readable decode output with explicit approval classification and proxy resolution. Not a replacement for full formal verification or profitability analysis.

## Known failure modes

- Unknown function selector — returns 'unknown' rather than a guess when ABI cannot be matched
- Proxy resolution failure if on-chain state is unavailable
- Authorization nonce already used — flags replay
- Authorization expired or not yet valid — flags time window mismatch
- Quote mismatch — recipient, amount, asset, or chain do not match the authorization
- Simulation timeout — eth_simulateV1 path targets P95 5s and may time out
- Malformed input — invalid hex patterns or missing required fields return validation errors
- Unrecognised EIP-712 primaryType — reported as unrecognised, not analysed

## How this service works

Explain and preflight an unsigned Base transaction, EIP-712 typed data, or an EIP-3009 x402 payment authorization before you sign it. Decodes intent against verified ABIs, resolves proxies, classifies approvals, and checks a payment authorization against the quote it claims to pay: recipient, amount, asset, chain, freshness, and nonce replay. Returns unknown rather than guessing when a selector is ambiguous. Not a guarantee that a transaction is safe or profitable.

## Output

Returns a decoded explanation of what the transaction or typed data intends to do, including resolved proxy contracts, ABI-matched function names, approval type classification, and for EIP-3009 authorizations a detailed comparison against the expected quote (recipient, amount, asset, chain, freshness, nonce replay status). Returns 'unknown' for ambiguous selectors rather than guessing. Optionally returns an asset-traced simulation result. Does not guarantee safety or profitability.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "tx_hash": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{64}$",
   "description": "An existing Base transaction to explain."
  },
  "simulate": {
   "type": "boolean",
   "default": false,
   "description": "Run eth_simulateV1 with asset tracing. Priced at $0.03 instead of $0.02, and targets P50 2s / P95 5s rather than the static path's 500ms / 2s."
  },
  "typed_data": {
   "type": "object",
   "required": [
    "domain",
    "primaryType",
    "message"
   ],
   "properties": {
    "types": {
     "type": "object"
    },
    "domain": {
     "type": "object"
    },
    "message": {
     "type": "object"
    },
    "primaryType": {
     "type": "string"
    }
   },
   "description": "EIP-712 payload. TransferWithAuthorization and ReceiveWithAuthorization get the x402 check table; any other primaryType is reported unrecognised, not analysed."
  },
  "unsigned_tx": {
   "type": "object",
   "properties": {
    "to": {
     "type": [
      "string",
      "null"
     ]
    },
    "data": {
     "type": "string",
     "pattern": "^0x[0-9a-fA-F]*$"
    },
    "from": {
     "type": "string",
     "pattern": "^0x[0-9a-fA-F]{40}$"
    },
    "value": {
     "type": "string",
     "description": "Wei."
    }
   },
   "description": "A transaction you are about to sign. `to: null` is a deployment.",
   "additionalProperties": false
  },
  "authorization": {
   "type": "object",
   "required": [
    "from",
    "to",
    "value",
    "validAfter",
    "validBefore",
    "nonce"
   ],
   "properties": {
    "to": {
     "type": "string",
     "pattern": "^0x[0-9a-fA-F]{40}$"
    },
    "from": {
     "type": "string",
     "pattern": "^0x[0-9a-fA-F]{40}$"
    },
    "kind": {
     "enum": [
      "transfer",
      "receive"
     ],
     "type": "string"
    },
    "asset": {
     "type": "string",
     "pattern": "^0x[0-9a-fA-F]{40}$"
    },
    "nonce": {
     "type": "string",
     "pattern": "^0x[0-9a-fA-F]*$"
    },
    "value": {
     "type": "string"
    },
    "signature": {
     "type": "string",
     "pattern": "^0x[0-9a-fA-F]*$"
    },
    "validAfter": {
     "type": "string"
    },
    "validBefore": {
     "type": "string"
    }
   },
   "description": "An EIP-3009 authorization, which is what an x402 `exact` payment is. value in base units, validAfter/validBefore in unix seconds, nonce 32 random bytes not a counter.",
   "additionalProperties": false
  },
  "expected_quote": {
   "type": "object",
   "prop
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/txguard-transaction-preflight-d1bfe174/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from txguard.schemasure.com](https://www.zero.xyz/host/txguard.schemasure.com/llms.txt)
