I want to understand a bit better the hash-script-data functionality from cardano-cli. I checked the source code but had no luck in understanding how this hash is made.
From the examples, if we run:
cardano-cli transaction hash-script-data --script-data-value 42
We get the following hash:
9e1199a988ba72ffd6e9c269cadb3b53b5f360ff99f112d9b2ee30c4d74ad88b
However if we try to do a simple SHA256 hash of a 42 value we get:
73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049
Also tried in the Plutus object format:
{
"constructor": 0,
"fields": [{
"int": 42
}]
}
but none of those match the hash generated by cardano-cli.
Also tried innumerous other alternatives but obviously I'm missing something, anyone knows what's the process for generating this hash?
Thank you!