@helios-lang/contract-utils 0.1.31 → 0.1.32

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/cast/Cast.js +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helios-lang/contract-utils",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
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",
package/src/cast/Cast.js CHANGED
@@ -99,6 +99,8 @@ function schemaToUplc(schema, x) {
99
99
  return DatumHash.fromAlike(x).toUplcData()
100
100
  case "DCert":
101
101
  return x.toUplcData()
102
+ case "Int":
103
+ return new IntData(x)
102
104
  case "MintingPolicyHash":
103
105
  return MintingPolicyHash.fromAlike(x).toUplcData()
104
106
  case "PubKeyHash":
@@ -217,6 +219,8 @@ function uplcToSchema(schema, data) {
217
219
  throw new Error(
218
220
  "can't convert UplcData back into DCert (significant loss of information)"
219
221
  )
222
+ case "Int":
223
+ return IntData.expect(data).value
220
224
  case "MintingPolicyHash":
221
225
  return MintingPolicyHash.fromUplcData(data)
222
226
  case "PubKeyHash":