@helios-lang/contract-utils 0.2.20 → 0.2.21
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
|
@@ -12,6 +12,7 @@ import { UserFunc } from "../cast/UserFunc.js"
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
+
* * Note: `$hashDependencies` doesn't contain the indirect dependencies! It must be kept to a minimum in order to inform in which order the validators must be compiled
|
|
15
16
|
* @typedef {{
|
|
16
17
|
* $name: string
|
|
17
18
|
* $sourceCode: string
|
|
@@ -272,13 +272,18 @@ export class DagCompiler {
|
|
|
272
272
|
*/
|
|
273
273
|
const res = {}
|
|
274
274
|
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
/**
|
|
276
|
+
* @param {ReadonlyArray<LoadedValidator>} vs
|
|
277
|
+
*/
|
|
278
|
+
const addHashes = (vs) => {
|
|
279
|
+
vs.forEach((v) => {
|
|
280
|
+
res[v.$name] = this.lib.getScriptHashType(v.$purpose)
|
|
277
281
|
|
|
278
|
-
|
|
279
|
-
res[d.$name] = this.lib.getScriptHashType(d.$purpose)
|
|
282
|
+
addHashes(v.$hashDependencies)
|
|
280
283
|
})
|
|
281
|
-
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
addHashes(validators)
|
|
282
287
|
|
|
283
288
|
return res
|
|
284
289
|
}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export type CastLike<TStrict, TPermissive> = import("../cast/Cast.js").CastLike<TStrict, TPermissive>;
|
|
2
2
|
export type UplcProgram = import("@helios-lang/uplc").UplcProgram;
|
|
3
3
|
export type LoadedModule = import("./LoadedModule.js").LoadedModule;
|
|
4
|
+
/**
|
|
5
|
+
* * Note: `$hashDependencies` doesn't contain the indirect dependencies! It must be kept to a minimum in order to inform in which order the validators must be compiled
|
|
6
|
+
*/
|
|
4
7
|
export type LoadedValidator = {
|
|
5
8
|
$name: string;
|
|
6
9
|
$sourceCode: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadedValidator.d.ts","sourceRoot":"","sources":["../../src/codegen/LoadedValidator.js"],"names":[],"mappings":"6CAKa,OAAO,iBAAiB,EAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;0BAIxD,OAAO,mBAAmB,EAAE,WAAW;2BACvC,OAAO,mBAAmB,EAAE,YAAY
|
|
1
|
+
{"version":3,"file":"LoadedValidator.d.ts","sourceRoot":"","sources":["../../src/codegen/LoadedValidator.js"],"names":[],"mappings":"6CAKa,OAAO,iBAAiB,EAAE,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;0BAIxD,OAAO,mBAAmB,EAAE,WAAW;2BACvC,OAAO,mBAAmB,EAAE,YAAY;;;;;WAMzC,MAAM;iBACA,MAAM;mBACJ,cAAc,YAAY,CAAC;uBACvB,cAAc,eAAe,CAAC;uBAC9B,OAAO;;;;;+BAEU,WAAW,KAAK,SAAS,GAAG,CAAC;;eACtD,SAAS,GAAG,EAAE,GAAG,CAAC;;cAGjB,UAAU,GAAG,OAAO;YACtB,SAAS,GAAG,EAAE,GAAG,CAAC;;cAEhB,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS;;;WAM7C,MAAM;;;;;WAOQ,MAAM;;;;6DAM7B,0BAA0B,CAAC,CAAC,eAAe,CAAC,CAAC;yBAhDjC,qBAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DagCompiler.d.ts","sourceRoot":"","sources":["../../src/context/DagCompiler.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DagCompiler.d.ts","sourceRoot":"","sources":["../../src/context/DagCompiler.js"],"names":[],"mappings":"AAmSA;;;GAGG;AACH,iDAHW,eAAe,GACb,MAAM,EAAE,CAsBpB;AAjTD;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;GAEG;AACH;IA6BI;;;OAGG;IACH,iBAHW,WAAW,cACX,UAAU,EAOpB;IArCD;;;;OAIG;IACH,qBAAG;IAEH;;;;OAIG;IACH,wBAAM;IAEN;;;;OAIG;IACH,kCAAgB;IAEhB;;;;OAIG;IACH,iCAAe;IAQX,iDAA4B;IAKhC;;;;;;OAMG;IACH,kBANW,eAAe,EAAE,cACjB,OAAO,MAAM,EAAE,GAAG,CAAC,aACnB,OAAO;;SAEL,iBAAiB,CA2H7B;IAED;;;;;OAKG;IACH,4BA6BC;IAED;;;;OAIG;IACH,4BAoBC;IAED;;;;;OAKG;IACH,qBAoBC;CACJ;0BAtRY,OAAO,mBAAmB,EAAE,WAAW;yBACvC,OAAO,kBAAkB,EAAE,UAAU;8BACrC,OAAO,+BAA+B,EAAE,eAAe;0BACvD,OAAO,sBAAsB,EAAE,WAAW;0CAC1C,OAAO,sBAAsB,EAAE,2BAA2B"}
|