---
title: "Transaction Decoding"
method: POST
path: "/v1/tx-decoding"
tags: ["blockchain"]
---

# Transaction Decoding

`POST /v1/tx-decoding`

## Request

- Base URL: `https://agent.pocket.network`
- URL: `https://agent.pocket.network/v1/tx-decoding`
- Auth: none required

Decodes raw EVM transactions and calldata into agent-readable intent: function signature, decoded arguments, and ERC-20 transfers. POST /v1/evm with {tx_hash, chain_id} and get one JSON object back. Fully deterministic: input determines output. Pay per request in USDC; no account, no API key.

## Request body

- object: A transaction or calldata to decode. On the MCP relay route POST /v1/tool these fields are wrapped under an `arguments` object; the direct route takes them at the top level.
  - `tx_hash` string, required: The transaction hash, 0x-prefixed.
  - `chain_id` integer: EVM chain id (default 1).

## Response `200`

The upstream response, served after payment settles.

- object: For POST /v1/evm, a JSON object with the decoded function signature, arguments, ERC-20 transfers, and the chain_id. The exact shape is the service's own and is not pinned here; errors return a JSON object with an `error` field, and the GET routes return their own small JSON documents.

## Other responses

- `400`: Malformed request.
- `402`: Payment required. The x402 v2 terms are in the PAYMENT-REQUIRED header and, identically, in this body; sign the chosen option and retry with the PAYMENT-SIGNATURE header. The receipt arrives in PAYMENT-RESPONSE.
- `503`: This service is not currently available to serve.

---

[API](https://skmtc.dev/pocket/apis/pocket-agentic-portal.md) · [All operations](https://skmtc.dev/pocket/apis/pocket-agentic-portal/llms.txt) · [OpenAPI document](https://skmtc.dev/pocket/apis/pocket-agentic-portal/revisions/96d2176db014?raw)
