@lucid-evolution/utils 0.1.51 → 0.1.52

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
@@ -353,7 +353,10 @@ function mintingPolicyToId(mintingPolicy) {
353
353
  return validatorToScriptHash(mintingPolicy);
354
354
  }
355
355
  function applyParamsToScript(plutusScript, params, type) {
356
- const program = (0, import_uplc.parseUPLC)((0, import_cborg2.decode)((0, import_cborg2.decode)((0, import_core_utils2.fromHex)(plutusScript))), "flat");
356
+ const program = (0, import_uplc.parseUPLC)(
357
+ (0, import_cborg2.decode)((0, import_cborg2.decode)((0, import_core_utils2.fromHex)(applyDoubleCborEncoding(plutusScript)))),
358
+ "flat"
359
+ );
357
360
  const parameters = type ? import_plutus.Data.castTo(params, type) : params;
358
361
  const appliedProgram = parameters.reduce((body, currentParameter) => {
359
362
  const data = import_uplc.UPLCConst.data((0, import_plutus_data.dataFromCbor)(import_plutus.Data.to(currentParameter)));
package/dist/index.js CHANGED
@@ -267,7 +267,10 @@ function mintingPolicyToId(mintingPolicy) {
267
267
  return validatorToScriptHash(mintingPolicy);
268
268
  }
269
269
  function applyParamsToScript(plutusScript, params, type) {
270
- const program = parseUPLC(decode2(decode2(fromHex2(plutusScript))), "flat");
270
+ const program = parseUPLC(
271
+ decode2(decode2(fromHex2(applyDoubleCborEncoding(plutusScript)))),
272
+ "flat"
273
+ );
271
274
  const parameters = type ? Data.castTo(params, type) : params;
272
275
  const appliedProgram = parameters.reduce((body, currentParameter) => {
273
276
  const data = UPLCConst.data(dataFromCbor(Data.to(currentParameter)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucid-evolution/utils",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
4
4
  "description": "",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",