0

I need to decode a redeemer hash (such as c4f0f65e1a03560608800ab884a2ed37377361e64462d14645610ac88b4aebd3) to the readable JSON format, just like cexplorer 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...

1 Answer 1

3

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 (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, kupo or marconi.

1
  • 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
    Commented May 11, 2023 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.