# Blockchain Transaction Decoder API

> Blockchain Transaction Decoder API is a paid API for AI agents from ai-policy-kit.moneymaker-ai.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-28).

Decodes an on-chain transaction hash into human-readable details including events, token flows, method calls, and gas info across 8 EVM-compatible chains

## Facts

- Endpoint: GET https://ai-policy-kit.moneymaker-ai.workers.dev/api/tx-decode?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockchain-transaction-decoder-api-dd4a0724
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PEHiyRPqV7oD2EbwT_6aa

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 blockchain-transaction-decoder-api-dd4a0724
```

Example prompt: Can you decode this Base transaction for me — 0x71aa55e3a2cbfe57d1707997a21f13d7026e17e7f3536c24e86f14144fffc67d — and tell me what tokens were transferred, who sent them, and whether the transaction succeeded?

## When to prefer this

Use this endpoint when you need to decode an EVM transaction hash into structured, human-readable data across Base, Ethereum, BSC, Arbitrum, Optimism, Polygon, Gnosis, or Celo. It is ideal for agents that need to verify payments, audit token transfers, debug contract calls, or extract event logs without running a full node. Prefer this over block explorer scraping or raw RPC calls when you need normalized output with decoded ABI events and token flow accounting.

## Known failure modes

- Invalid or malformed transaction hash returns an error
- Transaction not found on specified chain
- If chain is omitted and tx exists on multiple chains, ambiguous result
- Rate limit or payment failure (x402) if USDC micropayment not provided
- Unsupported chain identifier returns validation error
- Very recent transactions may not yet be indexed

## How this service works

Generate an AI_POLICY.md and a pull request template with an AI-disclosure section for your open-source repo. Free, runs in your browser.

## Output

Returns a JSON object with full transaction details including: from/to addresses, transaction type, block number and timestamp, chain ID, status (success/revert), gas used and limit, effective gas price, L1 fee inclusion flag, decoded method signature and arguments, all emitted events (ERC-20/721/1155 transfers, approvals, WETH wraps), per-token sender flow deltas, native currency, nonce, and a block explorer link.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "tx"
     ],
     "properties": {
      "tx": {
       "type": "string",
       "description": "0x transaction hash"
      },
      "chain": {
       "enum": [
        "base",
        "ethereum",
        "bsc",
        "arbitrum",
        "optimism",
        "polygon",
        "gnosis",
        "celo"
       ],
       "type": "string",
       "description": "optional; omit to search all 8"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "tx": "0x71aa55e3a2cbfe57d1707997a21f13d7026e17e7f3536c24e86f14144fffc67d",
  "fee": "0.000000270866308811",
  "from": "0x9F8951CB8b060f52fdf87297b3c5B00f7aa18f52",
  "note": "Events decoded from the receipt with a fixed ABI table (ERC-20/721/1155 transfers and approvals, WETH deposit/withdraw, ...",
  "type": 2,
  "block": 52774331,
  "chain": "base",
  "nonce": 10,
  "value": "0",
  "events": [
   {
    "to": "0x5b4Ca59741DE12DC212982b342392a063492a021",
    "from": "0x9F8951CB8b060f52fdf87297b3c5B00f7aa18f52",
    "event": "Transfer (ERC-20)",
    "amount": "1",
    "symbol": "USDC",
    "contract": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "log_index": 430,
    "amount_raw": "1000000"
   }
  ],
  "method": {
   "args": [
    "0x5b4Ca59741DE12DC212982b342392a063492a021",
    "1000000"
   ],
   "selector": "0xa9059cbb",
   "signature": "transfer(address,uint256)"
  },
  "native": "ETH",
  "revert": null,
  "status": "success",
  "chainId": 8453,
  "explorer": "https://basescan.org/tx/0x71aa55e3a2cbfe57d1707997a21f13d7026e17e7f3536c24e86f14144fffc67d",
  "gas_used": "45059",
  "gas_limit": "45439",
  "event_count": 1,
  "confirmations": 157979,
  "decoded_count": 1,
  "block_time_utc": "2026-10-18T15:40:09.000Z",
  "fee_includes_l1": true,
  "contract_created": null,
  "sender_token_flows": [
   {
    "delta": "-1",
    "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "symbol": "USDC",
    "delta_raw": "-1000000"
   }
  ],
  "effective_gas_price_gwei": 0.006
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockchain-transaction-decoder-api-dd4a0724/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai-policy-kit.moneymaker-ai.workers.dev](https://www.zero.xyz/host/ai-policy-kit.moneymaker-ai.workers.dev/llms.txt)
