@helios-lang/contract-utils 0.2.47 → 0.2.49
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/package.json +2 -2
- package/src/cast/Cast.js +6 -2
- package/types/cast/Cast.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helios-lang/contract-utils",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.49",
|
|
4
4
|
"description": "Convenience and type-safety utilities for using Helios validators from within Typescript",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@helios-lang/cli-utils": "^0.1.6",
|
|
39
39
|
"@helios-lang/codec-utils": "^0.1.34",
|
|
40
40
|
"@helios-lang/compiler-utils": "^0.1.25",
|
|
41
|
-
"@helios-lang/ledger": "^0.4.
|
|
41
|
+
"@helios-lang/ledger": "^0.4.8",
|
|
42
42
|
"@helios-lang/type-utils": "^0.1.21",
|
|
43
43
|
"@helios-lang/uplc": "^0.3.0"
|
|
44
44
|
}
|
package/src/cast/Cast.js
CHANGED
|
@@ -247,7 +247,8 @@ function schemaToUplc(schema, x, defs = {}) {
|
|
|
247
247
|
}
|
|
248
248
|
})
|
|
249
249
|
|
|
250
|
-
|
|
250
|
+
// wrapped in ConstrData
|
|
251
|
+
return new ConstrData(0, [new MapData(pairs)])
|
|
251
252
|
}
|
|
252
253
|
default:
|
|
253
254
|
throw new Error(
|
|
@@ -426,7 +427,10 @@ function uplcToSchema(schema, data, config, defs = {}) {
|
|
|
426
427
|
)
|
|
427
428
|
}
|
|
428
429
|
case "map": {
|
|
429
|
-
|
|
430
|
+
// wrapped in ConstrData
|
|
431
|
+
const entries = MapData.expect(
|
|
432
|
+
ConstrData.expect(data).fields[0]
|
|
433
|
+
).items
|
|
430
434
|
|
|
431
435
|
if (entries.length != schema.fieldTypes.length) {
|
|
432
436
|
throw new Error(
|
package/types/cast/Cast.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cast.d.ts","sourceRoot":"","sources":["../../src/cast/Cast.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Cast.d.ts","sourceRoot":"","sources":["../../src/cast/Cast.js"],"names":[],"mappings":"AA4gBA;;;;;;GAMG;AACH,kGAHW,UAAU,8BASpB;AArfD;;;GAGG;AAEH;;;;GAIG;AAEH;;;;GAIG;AAEH;;;;;GAKG;AAEH;;;GAGG;AACH;IAaI;;;OAGG;IACH,oBAHW,UAAU,UACV,UAAU,EAKpB;IAnBD;;;OAGG;IACH,iBAFU,UAAU,CAEd;IAEN;;;OAGG;IACH,iBAFU,UAAU,CAEd;IAWN;;;OAGG;IACH,mBAHW,QAAQ,GACN,OAAO,CAInB;IAED;;;OAGG;IACH,cAHW,WAAW,GACT,QAAQ,CAIpB;CACJ;uBAhEY,OAAO,mBAAmB,EAAE,QAAQ;yBACpC,OAAO,qBAAqB,EAAE,UAAU;yBAIxC;IACZ,SAAa,EAAE,OAAO,CAAA;CACnB;8DAMkB,UAAU,KAAK,KAAK,OAAO,EAAE,WAAW,CAAC;;;;6CAOlD,KAAK,OAAO,EAAE,WAAW,CAAC,GAAG,iBAAiB,OAAO,EAAE,WAAW,CAAC"}
|