# EVM Decode Signature

> EVM Decode Signature is a paid API for AI agents from api.agentstools.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Reverse a 4-byte function selector, event topic0 hash, or raw calldata into its human-readable ABI signature using the 4byte database, with collision detection and parameter type parsing.

## Facts

- Endpoint: GET https://api.agentstools.dev/evm/decode-signature
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/evm-decode-signature-1293518c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yFHnmoMvCpCNFtgO9vt6X

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 evm-decode-signature-1293518c
```

Example prompt: What Solidity function does the selector 0xa9059cbb correspond to? Decode it using the 4byte database and give me the full signature with parameter types, flagging any collisions.

## When to prefer this

Choose this endpoint when you need to reverse-engineer an unknown EVM function selector or event topic hash into a human-readable signature, especially when security matters and collision detection is important. Prefer it over manual 4byte.directory lookups when you need structured output with parameter types parsed and collisions ranked. Ideal for transaction analysis, smart contract auditing, calldata inspection, and any workflow where raw hex must be made human-interpretable.

## Known failure modes

- Selector not found in 4byte database — returns no match or empty results
- Invalid hex format for selector/topic0/calldata — returns validation error
- Ambiguous collisions with no clear canonical entry — all candidates returned without definitive resolution
- Rate limiting or payment failure via x402 — returns 402 Payment Required
- Network timeout from 4byte upstream — returns 503 or gateway error

## How this service works

Reverse a 4-byte function selector, an event topic hash, or raw calldata into its human-readable signature using the 4byte database, with collisions resolved so the real signature (the oldest registered) is returned first and the attacker-registered lookalikes are flagged. Parameter types are parsed out.

## Output

Returns the canonical human-readable ABI signature (e.g. 'transfer(address,uint256)') corresponding to the input selector or topic0 hash, with parsed parameter types. Collisions from the 4byte database are listed, with the oldest-registered (most likely authentic) signature ranked first and any lookalike entries flagged. For raw calldata input, the first 4 bytes are extracted as the selector automatically.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "input": {
       "type": "string",
       "description": "Raw calldata or hex; the first 4 bytes are taken as the selector (alternative to selector/topic0)"
      },
      "topic0": {
       "type": "string",
       "description": "Event topic0 hash (0x + 64 hex)"
      },
      "selector": {
       "type": "string",
       "description": "4-byte function selector (0x + 8 hex)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/evm-decode-signature-1293518c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
