cardano-multiplatform-lib
cardano-multiplatform-lib copied to clipboard
Add method to add full datum to transaction in output_builder
Currently, the output builder provides a with_data_hash function. This is all you need for the majority of use cases, but in some cases people may want to provide the full Plutus datum into the transaction witness even though it only shows up in the output (communication datum)
We should enable this as a possibility while also making it clear from the function name that this isn't the usual way to do it.
Isn't this already possible by calling add_plutus_datum in the TransactionWitnessSetBuilder ?, my project is one of those such cases in which the validator needs both the full current and the next datum values (to enforce state transition rules on the datum data).
I am looking to migrate to this library from the serialization lib, I was hoping this was already supported.
If I understand correctly, you must call with_data_hash on the TransactionOutputBuilder and then make sure to include the full datum on the witness set by calling add_plutus_datum in the TransactionWitnessSetBuilder.
This would emulate the tx-out-datum-value on the cardano cli.
Hi!, I wrote a posible workaround in this issue:
https://github.com/Emurgo/cardano-serialization-lib/issues/443#issuecomment-1195619916