> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dzap.io/llms.txt
> Use this file to discover all available pages before exploring further.

# decodeTxnData

> Decode a DZap transaction receipt into a readable structure.

Decodes a DZap transaction's receipt into a readable structure, useful for indexing or debugging. Takes a full transaction receipt object (e.g. from `viem`'s `waitForTransactionReceipt`), not just a hash.

```ts theme={null}
const decoded = await dzap.decodeTxnData({
  data: transactionReceipt, // a viem TransactionReceipt
  service: 'trade',         // 'trade' | 'dca' | 'zap'
  chainId: 42161,
});
// => { swapFailPairs: string[], swapInfo: SwapInfo | SwapInfo[] }
```
