@lucid-evolution/utils 0.1.61 → 0.1.62

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1606,9 +1606,9 @@ var buildOutput = (utxo) => {
1606
1606
  return utxo.scriptRef ? buildDatum(utxo, builder).with_reference_script(toScriptRef(utxo.scriptRef)).next() : buildDatum(utxo, builder).next();
1607
1607
  };
1608
1608
  var buildDatum = (utxo, builder) => {
1609
- if (utxo.datumHash)
1610
- return builder.with_data(
1611
- CML.DatumOption.new_hash(CML.DatumHash.from_hex(utxo.datumHash))
1609
+ if (utxo.datumHash && utxo.datum)
1610
+ return builder.with_communication_data(
1611
+ CML.PlutusData.from_cbor_hex(utxo.datum)
1612
1612
  );
1613
1613
  if (utxo.datum)
1614
1614
  return builder.with_data(
package/dist/index.js CHANGED
@@ -1522,9 +1522,9 @@ var buildOutput = (utxo) => {
1522
1522
  return utxo.scriptRef ? buildDatum(utxo, builder).with_reference_script(toScriptRef(utxo.scriptRef)).next() : buildDatum(utxo, builder).next();
1523
1523
  };
1524
1524
  var buildDatum = (utxo, builder) => {
1525
- if (utxo.datumHash)
1526
- return builder.with_data(
1527
- CML.DatumOption.new_hash(CML.DatumHash.from_hex(utxo.datumHash))
1525
+ if (utxo.datumHash && utxo.datum)
1526
+ return builder.with_communication_data(
1527
+ CML.PlutusData.from_cbor_hex(utxo.datum)
1528
1528
  );
1529
1529
  if (utxo.datum)
1530
1530
  return builder.with_data(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucid-evolution/utils",
3
- "version": "0.1.61",
3
+ "version": "0.1.62",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",