By following the alonzo-testnet exercises, I'm right now having to build a transaction with cardano-cli
. One of the arguments necessary to consume a script is the datum, another is the redeemer, both of which should be in a JSON file (or value).
Is there any reference of how Data
should be expressed in JSON? Because I tried converting it with Data.Aeson in Haskell, but received the following error
JSON object does not match the schema.
Expected a single field named "int", "bytes", "string", "list" or "map".
Unexpected object field(s): {"contents":{"getPubKeyHash":"3e7181860513a17dfa44d69232429e5c328e79c748d4a176950c42b6"},"tag":"Collect"}
Also, is there any library to make my life easier, so I can be able to easily convert my redeemers into JSON?