@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.
- package/package.json +1 -1
- package/src/cast/Cast.js +4 -0
package/package.json
CHANGED
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":
|