@hawksightco/hawk-sdk 0.0.62 → 0.0.64

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.
@@ -42,6 +42,18 @@ export declare class GeneralUtility {
42
42
  * @throws Captures and returns any errors encountered during the API call.
43
43
  */
44
44
  getPriorityFeeEstimate(params: UtilGetPriorityFeeEstimateBody): Promise<ResponseWithStatus<PriorityFeeEstimate>>;
45
+ /**
46
+ * Overridable jupiter alt function
47
+ *
48
+ * @param params
49
+ * @returns
50
+ */
51
+ private findAltWithTxPostFn;
52
+ /**
53
+ * Override get priority fee estimate function
54
+ * @param getPriorityFeeEstimateFn
55
+ */
56
+ overrideFindAltWithTxPostFn(findAltWithTxPostFn: (params: any) => Promise<ResponseWithStatus<Array<string>>>): void;
45
57
  /**
46
58
  * Finds alternative public keys related to a given transaction and returns them along with the response status.
47
59
  *
@@ -50,7 +62,7 @@ export declare class GeneralUtility {
50
62
  * data in the returned object.
51
63
  *
52
64
  * @param {UtilFindAltWithTxBody} params - The parameters for the function, which include the transaction metadata.
53
- * @returns {Promise<ResponseWithStatus<Array<string>>>>} A promise that resolves to an object containing the response status and an array of public key strings.
65
+ * @returns {Promise<ResponseWithStatus<Array<string>>>} A promise that resolves to an object containing the response status and an array of public key strings.
54
66
  */
55
67
  findAltWithTxPost(params: UtilFindAltWithTxBody): Promise<ResponseWithStatus<Array<string>>>;
56
68
  }
@@ -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,C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,2BAA2B,CAAC,mBAAmB,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAI9G;;;;;;;;;OASG;IACG,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;CAGnG"}
@@ -38,6 +38,19 @@ class GeneralUtility {
38
38
  data: result.data,
39
39
  };
40
40
  });
41
+ /**
42
+ * Overridable jupiter alt function
43
+ *
44
+ * @param params
45
+ * @returns
46
+ */
47
+ this.findAltWithTxPostFn = (params) => __awaiter(this, void 0, void 0, function* () {
48
+ const result = yield this.client.generalUtility.utilFindAltWithTxPost(params).catch(e => e.response);
49
+ return {
50
+ status: result.status,
51
+ data: result.data,
52
+ };
53
+ });
41
54
  }
42
55
  /**
43
56
  * Override get priority fee estimate function
@@ -64,6 +77,13 @@ class GeneralUtility {
64
77
  return yield this.getPriorityFeeEstimateFn(params);
65
78
  });
66
79
  }
80
+ /**
81
+ * Override get priority fee estimate function
82
+ * @param getPriorityFeeEstimateFn
83
+ */
84
+ overrideFindAltWithTxPostFn(findAltWithTxPostFn) {
85
+ this.findAltWithTxPostFn = findAltWithTxPostFn;
86
+ }
67
87
  /**
68
88
  * Finds alternative public keys related to a given transaction and returns them along with the response status.
69
89
  *
@@ -72,15 +92,11 @@ class GeneralUtility {
72
92
  * data in the returned object.
73
93
  *
74
94
  * @param {UtilFindAltWithTxBody} params - The parameters for the function, which include the transaction metadata.
75
- * @returns {Promise<ResponseWithStatus<Array<string>>>>} A promise that resolves to an object containing the response status and an array of public key strings.
95
+ * @returns {Promise<ResponseWithStatus<Array<string>>>} A promise that resolves to an object containing the response status and an array of public key strings.
76
96
  */
77
97
  findAltWithTxPost(params) {
78
98
  return __awaiter(this, void 0, void 0, function* () {
79
- const result = yield this.client.generalUtility.utilFindAltWithTxPost(params).catch(e => e.response);
80
- return {
81
- status: result.status,
82
- data: result.data,
83
- };
99
+ return yield this.findAltWithTxPostFn(params);
84
100
  });
85
101
  }
86
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawksightco/hawk-sdk",
3
- "version": "0.0.62",
3
+ "version": "0.0.64",
4
4
  "description": "Hawksight v2 SDK",
5
5
  "main": "dist/src/index.js",
6
6
  "repository": "https://github.com/ghabxph/hawk-api-client.git",
@@ -20,7 +20,7 @@
20
20
  "typescript": "^5.4.5"
21
21
  },
22
22
  "dependencies": {
23
- "@hawksightco/swagger-client": "0.0.23",
23
+ "@hawksightco/swagger-client": "^0.0.24",
24
24
  "@solana/web3.js": "^1.89.1",
25
25
  "bn.js": "^5.2.1"
26
26
  },