<p>A hash is the product of a one way function. It is not possible to decode the redeemer hash.</p>
<p>The redeemer itself is stored onchain inside the witness set of the transaction, see <a href="https://github.com/input-output-hk/cardano-ledger/blob/f500346e6d04f0d576afbd272b79e0afee7a1f32/eras/alonzo/test-suite/cddl-files/alonzo.cddl#L275" rel="nofollow noreferrer">cddl spec</a> (rfc8610). This also shows you how <code>plutus_data</code> is encoded.</p>
<p>Explorers such as cexplore obtain this information using a chain-index service which stores transaction data for efficient querying such as <a href="https://github.com/input-output-hk/cardano-db-sync" rel="nofollow noreferrer">db-sync</a>, <a href="https://github.com/CardanoSolutions/kupo" rel="nofollow noreferrer">kupo</a> or <a href="https://github.com/input-output-hk/marconi" rel="nofollow noreferrer">marconi</a>.</p>

CC BY-SA 4.0
2023-05-11T14:40:09.200Z
That is really helpful to know! I was unaware that the redeemer hash not what contains the data but I guess it's in the name (hash is data one way encoded).
Duco
CC BY-SA 4.0
2023-05-10T15:55:51.377Z
2023-05-10T15:55:51.377Z
james
<p>I need to decode a redeemer hash (such as <code>c4f0f65e1a03560608800ab884a2ed37377361e64462d14645610ac88b4aebd3</code>) to the readable JSON format, just like <a href="https://preview.cexplorer.io/tx/e9d68fbf8685d7db563a1df3c075f2987c0a9e7c2ebb18e1b74e287b387c092a/contract#data" rel="nofollow noreferrer">cexplorer</a> does, preferably using Javascript/Typescript. Tools such as cardano-cli are not an option.</p>
<p>How is the redeemer encoded anyway? I was unable to find a clear definition of what this hash exactly is, which makes it difficult to find information on decoding...</p>

<redeemer>
Decoding transaction redeemers to JSON
# Decoding transaction redeemers to JSON

(Asked by: username_0 on 2023-05-10)

I need to decode a redeemer hash (such as `c4f0f65e1a03560608800ab884a2ed37377361e64462d14645610ac88b4aebd3`) to the readable JSON format, just like [cexplorer](https://preview.cexplorer.io/tx/e9d68fbf8685d7db563a1df3c075f2987c0a9e7c2ebb18e1b74e287b387c092a/contract#data) does, preferably using Javascript/Typescript. Tools such as cardano-cli are not an option.

How is the redeemer encoded anyway? I was unable to find a clear definition of what this hash exactly is, which makes it difficult to find information on decoding...

**Tags:** redeemer

---

## 1 answers

### Answer by username_1 on 2023-05-10. Score: 3 | Accepted answer

A hash is the product of a one way function. It is not possible to decode the redeemer hash.

The redeemer itself is stored onchain inside the witness set of the transaction, see [cddl spec](https://github.com/input-output-hk/cardano-ledger/blob/f500346e6d04f0d576afbd272b79e0afee7a1f32/eras/alonzo/test-suite/cddl-files/alonzo.cddl#L275) (rfc8610). This also shows you how `plutus_data` is encoded.

Explorers such as cexplore obtain this information using a chain-index service which stores transaction data for efficient querying such as [db-sync](https://github.com/input-output-hk/cardano-db-sync), [kupo](https://github.com/CardanoSolutions/kupo) or [marconi](https://github.com/input-output-hk/marconi).

> **Comments:**
> **username_0**: That is really helpful to know! I was unaware that the redeemer hash not what contains the data but I guess it's in the name (hash is data one way encoded).  

---

