@meshsdk/core-cst 1.9.0-beta.2 → 1.9.0-beta.3

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
@@ -1699,9 +1699,14 @@ var fromPlutusDataToJson = (data) => {
1699
1699
  const plutusData = data.asConstrPlutusData();
1700
1700
  if (plutusData) {
1701
1701
  const fields = plutusData.getData();
1702
+ const list = [];
1703
+ for (let i = 0; i < fields.getLength(); i++) {
1704
+ const element = fields.get(i);
1705
+ list.push(fromPlutusDataToJson(element));
1706
+ }
1702
1707
  return {
1703
1708
  constructor: plutusData.getAlternative(),
1704
- fields: fromPlutusDataToJson(PlutusData.newList(fields))
1709
+ fields: list
1705
1710
  };
1706
1711
  } else {
1707
1712
  throw new Error("Invalid constructor data found");
@@ -1735,7 +1740,7 @@ var fromPlutusDataToJson = (data) => {
1735
1740
  const element = plutusList.get(i);
1736
1741
  list.push(fromPlutusDataToJson(element));
1737
1742
  }
1738
- return list;
1743
+ return { list };
1739
1744
  } else {
1740
1745
  throw new Error("Invalid list data found");
1741
1746
  }
package/dist/index.js CHANGED
@@ -1508,9 +1508,14 @@ var fromPlutusDataToJson = (data) => {
1508
1508
  const plutusData = data.asConstrPlutusData();
1509
1509
  if (plutusData) {
1510
1510
  const fields = plutusData.getData();
1511
+ const list = [];
1512
+ for (let i = 0; i < fields.getLength(); i++) {
1513
+ const element = fields.get(i);
1514
+ list.push(fromPlutusDataToJson(element));
1515
+ }
1511
1516
  return {
1512
1517
  constructor: plutusData.getAlternative(),
1513
- fields: fromPlutusDataToJson(PlutusData.newList(fields))
1518
+ fields: list
1514
1519
  };
1515
1520
  } else {
1516
1521
  throw new Error("Invalid constructor data found");
@@ -1544,7 +1549,7 @@ var fromPlutusDataToJson = (data) => {
1544
1549
  const element = plutusList.get(i);
1545
1550
  list.push(fromPlutusDataToJson(element));
1546
1551
  }
1547
- return list;
1552
+ return { list };
1548
1553
  } else {
1549
1554
  throw new Error("Invalid list data found");
1550
1555
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshsdk/core-cst",
3
- "version": "1.9.0-beta.2",
3
+ "version": "1.9.0-beta.3",
4
4
  "description": "Types and utilities functions between Mesh and cardano-js-sdk",
5
5
  "main": "./dist/index.cjs",
6
6
  "browser": "./dist/index.js",
@@ -46,7 +46,7 @@
46
46
  "@harmoniclabs/crypto": "0.2.4",
47
47
  "@harmoniclabs/pair": "1.0.0",
48
48
  "@harmoniclabs/bytestring": "1.0.0",
49
- "@meshsdk/common": "1.9.0-beta.2",
49
+ "@meshsdk/common": "1.9.0-beta.3",
50
50
  "@stricahq/bip32ed25519": "^1.1.0",
51
51
  "@stricahq/cbors": "^1.0.0",
52
52
  "@types/base32-encoding": "^1.0.2",