File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/evolution/src/utils Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -160,10 +160,14 @@ export const hashAuxiliaryData = (aux: AuxiliaryData.AuxiliaryData): AuxiliaryDa
160160}
161161
162162/**
163- * Compute hash of plutus data using default Data encoding.
163+ * Compute hash of plutus data using specified CBOR encoding options.
164+ * Defaults to CML_DATA_DEFAULT_OPTIONS (indefinite-length arrays/maps).
164165 */
165- export const hashPlutusData = ( pd : Data . Data ) : DatumOption . DatumHash => {
166- const bytes = Data . toCBORBytes ( pd )
166+ export const hashPlutusData = (
167+ pd : Data . Data ,
168+ options : CBOR . CodecOptions = CBOR . CML_DATA_DEFAULT_OPTIONS
169+ ) : DatumOption . DatumHash => {
170+ const bytes = Data . toCBORBytes ( pd , options )
167171 const digest = blake2b ( bytes , { dkLen : 32 } )
168172 return new DatumOption . DatumHash ( { hash : digest } )
169173}
You can’t perform that action at this time.
0 commit comments