# Crypto Calldata Decoder (x402)

> Crypto Calldata Decoder (x402) is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-31).

Decodes raw EVM calldata or a Base transaction hash into human-readable function name, arguments, risk verdict, and security flags — paid per call via x402 USDC micropayment.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/api/chain/decode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-calldata-decoder-x402-660dbb57
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5noRgX1aahlyyg1_p7dR2

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 crypto-calldata-decoder-x402-660dbb57
```

Example prompt: Before I sign this transaction, can you decode this calldata — 0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff — for the USDC contract at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 and tell me if there are any security risks?

## When to prefer this

Use this endpoint when an AI agent or user needs to understand what a raw EVM calldata blob or Base transaction actually does before signing or broadcasting — especially for security screening of token approvals, transfers, and DeFi interactions. Prefer this over generic block explorers when you need structured, machine-readable risk verdicts and labeled spender identification in a pay-per-call, no-API-key flow on Base.

## Known failure modes

- Invalid or malformed calldata hex returns a decode error
- Unknown function selector not in built-in or 4byte database returns partial decode with unknown function name
- Unrecognized Base tx hash returns not-found error
- Missing required 'data' or 'hash' parameter returns 400 validation error
- Payment failure via x402 (insufficient USDC balance) blocks the call

## How this service works

Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.

## Output

Returns the decoded function name and selector, typed argument list with values, a risk verdict (e.g. CAUTION/OK/DANGER), security flags (e.g. unlimited_approval), a plain-English summary of what the call does, a spender label if recognized, and guidance on next steps. Also indicates whether the approval is unlimited and identifies the target token symbol/decimals when a contract address is supplied.

## 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",
     "properties": {
      "to": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "description": "Optional target contract (token) for symbol/decimals + label"
      },
      "data": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{8,}$",
       "examples": [
        "0x095ea7b3000000000000000000000000000000000022d473030f116ddee9f6b43ac78ba3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
       ],
       "description": "Calldata hex (selector + ABI args). Required unless hash given"
      },
      "hash": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{64}$",
       "description": "Optional Base tx hash: decode its input instead of data"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "to": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "args": [
   {
    "type": "address",
    "value": "0x000000000022D473030F116dDEE9F6B43aC78BA3"
   },
   {
    "type": "uint256",
    "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935"
   }
  ],
  "risk": "medium",
  "chain": "base",
  "flags": [
   "unlimited_approval"
  ],
  "amount": "unlimited",
  "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
  "summary": "lets Uniswap Permit2 move ALL USDC from the signer",
  "verdict": "CAUTION",
  "function": "approve(address,uint256)",
  "guidance": "Review the decoded args; simulate with /crypto/base-rpc?method=eth_call before signing.",
  "selector": "0x095ea7b3",
  "unlimited": true,
  "spender_label": "Uniswap Permit2",
  "signature_source": "builtin"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-calldata-decoder-x402-660dbb57/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kr-x402-mvp.kgy5612.workers.dev](https://www.zero.xyz/host/kr-x402-mvp.kgy5612.workers.dev/llms.txt)
