@helios-lang/contract-utils 0.3.13 → 0.3.15
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helios-lang/contract-utils",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
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",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"@helios-lang/codec-utils": "^0.3.4",
|
|
41
41
|
"@helios-lang/compiler-utils": "^0.5.3",
|
|
42
42
|
"@helios-lang/crypto": "0.2.3",
|
|
43
|
-
"@helios-lang/ledger": "^0.6.
|
|
43
|
+
"@helios-lang/ledger": "^0.6.17",
|
|
44
44
|
"@helios-lang/type-utils": "^0.2.9",
|
|
45
|
-
"@helios-lang/uplc": "^0.7.
|
|
45
|
+
"@helios-lang/uplc": "^0.7.10"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "pnpm run prettify && pnpm run build:types && pnpm run test:suite",
|
|
@@ -54,7 +54,12 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
54
54
|
this.writeDeclLine(`export const $hashHex: string`)
|
|
55
55
|
this.writeDefLine(`export const $hashHex = "${hash.toHex()}"`)
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
const isMixed =
|
|
58
|
+
purpose == "mixed" ||
|
|
59
|
+
/** @type {any} */ (hash.context)?.redeemer?.schema?.id ==
|
|
60
|
+
"__helios__mixedargs"
|
|
61
|
+
|
|
62
|
+
if (isMixed) {
|
|
58
63
|
this.addImport("ValidatorHash", "@helios-lang/ledger", true)
|
|
59
64
|
.addImport("makeValidatorHash", "@helios-lang/ledger", false)
|
|
60
65
|
.addImport("MintingPolicyHash", "@helios-lang/ledger", true)
|
|
@@ -161,7 +166,7 @@ class ValdiatorArtifact extends ModuleArtifact {
|
|
|
161
166
|
program: $program,
|
|
162
167
|
datum: /* @__PURE__ */ makeCast(${JSON.stringify(datum.schema, undefined, 4).split("\n").join("\n ")}, {isMainnet: ${this.isMainnet}}),
|
|
163
168
|
redeemer: /* @__PURE__ */ makeCast(${JSON.stringify(redeemer.schema, undefined, 4).split("\n").join("\n ")}, {isMainnet: ${this.isMainnet}})
|
|
164
|
-
}
|
|
169
|
+
}`
|
|
165
170
|
)
|
|
166
171
|
.writeDefLine(
|
|
167
172
|
`export const $validatorHash = /* @__PURE__ */ makeValidatorHash($hashHex, $context)`
|