@lucid-evolution/utils 0.1.39 → 0.1.40
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 +9 -0
- package/dist/index.js +9 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -309,6 +309,12 @@ function toScriptRef(script) {
|
|
|
309
309
|
applyDoubleCborEncoding(script.script)
|
|
310
310
|
)
|
|
311
311
|
);
|
|
312
|
+
case "PlutusV3":
|
|
313
|
+
return CML.Script.new_plutus_v3(
|
|
314
|
+
CML.PlutusV3Script.from_cbor_hex(
|
|
315
|
+
applyDoubleCborEncoding(script.script)
|
|
316
|
+
)
|
|
317
|
+
);
|
|
312
318
|
default:
|
|
313
319
|
throw new Error("No variant matched.");
|
|
314
320
|
}
|
|
@@ -545,6 +551,9 @@ function createCostModels(costModels) {
|
|
|
545
551
|
for (const cost of Object.values(costModels.PlutusV2)) {
|
|
546
552
|
costmodel[1]?.push(cost);
|
|
547
553
|
}
|
|
554
|
+
for (const cost of Object.values(costModels.PlutusV3)) {
|
|
555
|
+
costmodel[2]?.push(cost);
|
|
556
|
+
}
|
|
548
557
|
return CML.CostModels.from_json(JSON.stringify(costmodel));
|
|
549
558
|
}
|
|
550
559
|
var PROTOCOL_PARAMETERS_DEFAULT = {
|
package/dist/index.js
CHANGED
|
@@ -226,6 +226,12 @@ function toScriptRef(script) {
|
|
|
226
226
|
applyDoubleCborEncoding(script.script)
|
|
227
227
|
)
|
|
228
228
|
);
|
|
229
|
+
case "PlutusV3":
|
|
230
|
+
return CML.Script.new_plutus_v3(
|
|
231
|
+
CML.PlutusV3Script.from_cbor_hex(
|
|
232
|
+
applyDoubleCborEncoding(script.script)
|
|
233
|
+
)
|
|
234
|
+
);
|
|
229
235
|
default:
|
|
230
236
|
throw new Error("No variant matched.");
|
|
231
237
|
}
|
|
@@ -462,6 +468,9 @@ function createCostModels(costModels) {
|
|
|
462
468
|
for (const cost of Object.values(costModels.PlutusV2)) {
|
|
463
469
|
costmodel[1]?.push(cost);
|
|
464
470
|
}
|
|
471
|
+
for (const cost of Object.values(costModels.PlutusV3)) {
|
|
472
|
+
costmodel[2]?.push(cost);
|
|
473
|
+
}
|
|
465
474
|
return CML.CostModels.from_json(JSON.stringify(costmodel));
|
|
466
475
|
}
|
|
467
476
|
var PROTOCOL_PARAMETERS_DEFAULT = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucid-evolution/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.40",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@lucid-evolution/core-utils": "0.1.15",
|
|
41
41
|
"@lucid-evolution/crc8": "0.1.8",
|
|
42
42
|
"@lucid-evolution/plutus": "0.1.23",
|
|
43
|
-
"@lucid-evolution/uplc": "0.2.
|
|
43
|
+
"@lucid-evolution/uplc": "0.2.12"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/node": "^20.12.8",
|