@helios-lang/contract-utils 0.2.6 → 0.2.8

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.2.6",
3
+ "version": "0.2.8",
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",
@@ -35,11 +35,11 @@
35
35
  "@helios-lang/compiler": "*"
36
36
  },
37
37
  "dependencies": {
38
- "@helios-lang/cli-utils": "^0.1.4",
39
- "@helios-lang/codec-utils": "^0.1.29",
40
- "@helios-lang/compiler-utils": "^0.1.22",
41
- "@helios-lang/ledger": "^0.2.4",
42
- "@helios-lang/type-utils": "^0.1.8",
43
- "@helios-lang/uplc": "^0.1.28"
38
+ "@helios-lang/cli-utils": "^0.1.6",
39
+ "@helios-lang/codec-utils": "^0.1.30",
40
+ "@helios-lang/compiler-utils": "^0.1.25",
41
+ "@helios-lang/ledger": "^0.2.6",
42
+ "@helios-lang/type-utils": "^0.1.18",
43
+ "@helios-lang/uplc": "^0.1.31"
44
44
  }
45
45
  }
@@ -26,6 +26,7 @@ import { contractContextCache } from "./ContractContextCache.js"
26
26
  * isMainnet: boolean
27
27
  * expectedHashes?: {[name: string]: string}
28
28
  * parameters?: Record<string, any>
29
+ * dumpHashes?: boolean
29
30
  * }} ContractContextBuildProps
30
31
  */
31
32
 
@@ -127,6 +128,12 @@ export class ContractContextBuilder {
127
128
 
128
129
  contractContextCache.push(hashes)
129
130
 
131
+ if (props.dumpHashes) {
132
+ for (let name in hashes) {
133
+ console.log(`${name}: ${hashes[name].toHex()},`)
134
+ }
135
+ }
136
+
130
137
  /**
131
138
  * @type {any}
132
139
  */
@@ -18,6 +18,7 @@
18
18
  * isMainnet: boolean
19
19
  * expectedHashes?: {[name: string]: string}
20
20
  * parameters?: Record<string, any>
21
+ * dumpHashes?: boolean
21
22
  * }} ContractContextBuildProps
22
23
  */
23
24
  /**
@@ -90,5 +91,6 @@ export type ContractContextBuildProps = {
90
91
  [name: string]: string;
91
92
  } | undefined;
92
93
  parameters?: Record<string, any> | undefined;
94
+ dumpHashes?: boolean | undefined;
93
95
  };
94
96
  //# sourceMappingURL=ContractContextBuilder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContractContextBuilder.d.ts","sourceRoot":"","sources":["../../src/context/ContractContextBuilder.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;;GAMG;AAEH;;;GAGG;AACH;;;;;IAwBI;;OAEG;IACH,gBAFa,uBAAuB,EAAE,EAAE,EAAE,CAAC,CAI1C;IAfD;;;;OAIG;IACH,sBAGC;IArBD;;;;OAIG;IACH,4BAAU;IAEV;;;OAGG;IACH,kBAFU,EAAE,CAEL;IAmBP;;;;;;;OAOG;IACH,8JAaC;IAED;;;;;;;OAOG;IACH,sIAQC;IAED;;;OAGG;IACH,aAHW,yBAAyB,GACvB,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAmDnC;CACJ;yBA3JY,OAAO,kBAAkB,EAAE,UAAU;2BACrC,OAAO,4BAA4B,EAAE,YAAY;8BACjD,OAAO,+BAA+B,EAAE,eAAe;0BACvD,OAAO,sBAAsB,EAAE,WAAW;wFAK1C,OAAO,+BAA+B,EAAE,mBAAmB,CAAC,CAAC,CAAC;;;;;KAM9D,OAAO,sBAAsB,EAAE,eAAe,CAAC,EAAE,EAAE,EAAE,CAAC;;eAKnD,OAAO"}
1
+ {"version":3,"file":"ContractContextBuilder.d.ts","sourceRoot":"","sources":["../../src/context/ContractContextBuilder.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AAEH;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;;;GAOG;AAEH;;;GAGG;AACH;;;;;IAwBI;;OAEG;IACH,gBAFa,uBAAuB,EAAE,EAAE,EAAE,CAAC,CAI1C;IAfD;;;;OAIG;IACH,sBAGC;IArBD;;;;OAIG;IACH,4BAAU;IAEV;;;OAGG;IACH,kBAFU,EAAE,CAEL;IAmBP;;;;;;;OAOG;IACH,8JAaC;IAED;;;;;;;OAOG;IACH,sIAQC;IAED;;;OAGG;IACH,aAHW,yBAAyB,GACvB,gBAAgB,EAAE,EAAE,EAAE,CAAC,CAyDnC;CACJ;yBAlKY,OAAO,kBAAkB,EAAE,UAAU;2BACrC,OAAO,4BAA4B,EAAE,YAAY;8BACjD,OAAO,+BAA+B,EAAE,eAAe;0BACvD,OAAO,sBAAsB,EAAE,WAAW;wFAK1C,OAAO,+BAA+B,EAAE,mBAAmB,CAAC,CAAC,CAAC;;;;;KAM9D,OAAO,sBAAsB,EAAE,eAAe,CAAC,EAAE,EAAE,EAAE,CAAC;;eAKnD,OAAO"}