@hawksightco/hawk-sdk 0.0.57 → 0.0.58

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.
@@ -16,6 +16,18 @@ export declare class GeneralUtility {
16
16
  * @param client The client instance used for making HTTP requests.
17
17
  */
18
18
  constructor(client: Client);
19
+ /**
20
+ * Overridable get priority fee estiamte function
21
+ *
22
+ * @param params
23
+ * @returns
24
+ */
25
+ private getPriorityFeeEstimateFn;
26
+ /**
27
+ * Override get priority fee estimate function
28
+ * @param getPriorityFeeEstimateFn
29
+ */
30
+ overrideGetPriorityFeeEstimateFn(getPriorityFeeEstimateFn: (params: any) => Promise<ResponseWithStatus<PriorityFeeEstimate>>): void;
19
31
  /**
20
32
  * Fetches the priority fee estimate based on the provided parameters.
21
33
  *
@@ -1 +1 @@
1
- {"version":3,"file":"GeneralUtility.d.ts","sourceRoot":"","sources":["../../../src/classes/GeneralUtility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzH,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;;GAMG;AACH,qBAAa,cAAc;IAQvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IANzB;;;;OAIG;gBAEgB,MAAM,EAAE,MAAM;IAGjC;;;;;;;;;;;;OAYG;IACG,sBAAsB,CAAC,MAAM,EAAE,8BAA8B,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAQtH;;;;;;;;;OASG;IACG,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CAOnG"}
1
+ {"version":3,"file":"GeneralUtility.d.ts","sourceRoot":"","sources":["../../../src/classes/GeneralUtility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACzH,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC;;;;;;GAMG;AACH,qBAAa,cAAc;IAQvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IANzB;;;;OAIG;gBAEgB,MAAM,EAAE,MAAM;IAGjC;;;;;OAKG;IACH,OAAO,CAAC,wBAAwB,CAM9B;IAEF;;;OAGG;IACH,gCAAgC,CAAC,wBAAwB,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAI5H;;;;;;;;;;;;OAYG;IACG,sBAAsB,CAAC,MAAM,EAAE,8BAA8B,GAAG,OAAO,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;IAItH;;;;;;;;;OASG;IACG,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CAOnG"}
@@ -25,6 +25,26 @@ class GeneralUtility {
25
25
  */
26
26
  constructor(client) {
27
27
  this.client = client;
28
+ /**
29
+ * Overridable get priority fee estiamte function
30
+ *
31
+ * @param params
32
+ * @returns
33
+ */
34
+ this.getPriorityFeeEstimateFn = (params) => __awaiter(this, void 0, void 0, function* () {
35
+ const result = yield this.client.generalUtility.utilGetPriorityFeeEstimatePost(params).catch(e => e.response);
36
+ return {
37
+ status: result.status,
38
+ data: result.data,
39
+ };
40
+ });
41
+ }
42
+ /**
43
+ * Override get priority fee estimate function
44
+ * @param getPriorityFeeEstimateFn
45
+ */
46
+ overrideGetPriorityFeeEstimateFn(getPriorityFeeEstimateFn) {
47
+ this.getPriorityFeeEstimateFn = getPriorityFeeEstimateFn;
28
48
  }
29
49
  /**
30
50
  * Fetches the priority fee estimate based on the provided parameters.
@@ -41,11 +61,7 @@ class GeneralUtility {
41
61
  */
42
62
  getPriorityFeeEstimate(params) {
43
63
  return __awaiter(this, void 0, void 0, function* () {
44
- const result = yield this.client.generalUtility.utilGetPriorityFeeEstimatePost(params).catch(e => e.response);
45
- return {
46
- status: result.status,
47
- data: result.data,
48
- };
64
+ return yield this.getPriorityFeeEstimateFn(params);
49
65
  });
50
66
  }
51
67
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawksightco/hawk-sdk",
3
- "version": "0.0.57",
3
+ "version": "0.0.58",
4
4
  "description": "Hawksight v2 SDK",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": "https://github.com/ghabxph/hawk-api-client.git",