@helios-lang/contract-utils 0.2.19 → 0.2.20
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
|
@@ -261,16 +261,26 @@ export class DagCompiler {
|
|
|
261
261
|
}
|
|
262
262
|
|
|
263
263
|
/**
|
|
264
|
+
* Also returns the hash types of any hash-dependencies
|
|
264
265
|
* @private
|
|
265
266
|
* @param {LoadedValidator[]} validators
|
|
266
|
-
* @returns {
|
|
267
|
+
* @returns {Record<string, any>}
|
|
267
268
|
*/
|
|
268
269
|
getHashTypes(validators) {
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
/**
|
|
271
|
+
* @type {Record<string, any>}
|
|
272
|
+
*/
|
|
273
|
+
const res = {}
|
|
274
|
+
|
|
275
|
+
validators.forEach((v) => {
|
|
276
|
+
res[v.$name] = this.lib.getScriptHashType(v.$purpose)
|
|
277
|
+
|
|
278
|
+
v.$hashDependencies.forEach((d) => {
|
|
279
|
+
res[d.$name] = this.lib.getScriptHashType(d.$purpose)
|
|
272
280
|
})
|
|
273
|
-
)
|
|
281
|
+
})
|
|
282
|
+
|
|
283
|
+
return res
|
|
274
284
|
}
|
|
275
285
|
}
|
|
276
286
|
|
|
@@ -74,9 +74,10 @@ export class DagCompiler {
|
|
|
74
74
|
*/
|
|
75
75
|
private getHashDependencies;
|
|
76
76
|
/**
|
|
77
|
+
* Also returns the hash types of any hash-dependencies
|
|
77
78
|
* @private
|
|
78
79
|
* @param {LoadedValidator[]} validators
|
|
79
|
-
* @returns {
|
|
80
|
+
* @returns {Record<string, any>}
|
|
80
81
|
*/
|
|
81
82
|
private getHashTypes;
|
|
82
83
|
}
|
|
@@ -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":"AA8RA;;;GAGG;AACH,iDAHW,eAAe,GACb,MAAM,EAAE,CAsBpB;AA5SD;;;;;;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,qBAeC;CACJ;0BAjRY,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"}
|