txpipe / pallas

Rust-native building blocks for the Cardano blockchain ecosystem
Apache License 2.0
150 stars 60 forks source link

refactor: support roundtrip encoding for script data hash components #526

Closed scarmuega closed 4 weeks ago

scarmuega commented 4 weeks ago

Computing "script data hash" requires redemeers, witness-set datums and language views.

To make the hash consistent across encoding roundtrips, this PR replaces some internal structs in the primitives with CBOR-aware structs (eg: MaybeIndexArray).

A following PR will introduce the hash compute logic.