@hawksightco/hawk-sdk
Advanced tools
Comparing version 0.0.63 to 0.0.64
@@ -46,2 +46,14 @@ import { PriorityFeeEstimate, UtilGetPriorityFeeEstimateBody, UtilFindAltWithTxBody } from "@hawksightco/swagger-client"; | ||
/** | ||
* Overridable jupiter alt function | ||
* | ||
* @param params | ||
* @returns | ||
*/ | ||
private findAltWithTxPostFn; | ||
/** | ||
* Override get priority fee estimate function | ||
* @param getPriorityFeeEstimateFn | ||
*/ | ||
overrideFindAltWithTxPostFn(findAltWithTxPostFn: (params: any) => Promise<ResponseWithStatus<Array<string>>>): void; | ||
/** | ||
* Finds alternative public keys related to a given transaction and returns them along with the response status. | ||
@@ -54,3 +66,3 @@ * | ||
* @param {UtilFindAltWithTxBody} params - The parameters for the function, which include the transaction metadata. | ||
* @returns {Promise<ResponseWithStatus<Array<string>>>>} A promise that resolves to an object containing the response status and an array of public key strings. | ||
* @returns {Promise<ResponseWithStatus<Array<string>>>} A promise that resolves to an object containing the response status and an array of public key strings. | ||
*/ | ||
@@ -57,0 +69,0 @@ findAltWithTxPost(params: UtilFindAltWithTxBody): Promise<ResponseWithStatus<Array<string>>>; |
@@ -41,2 +41,15 @@ "use strict"; | ||
}); | ||
/** | ||
* Overridable jupiter alt function | ||
* | ||
* @param params | ||
* @returns | ||
*/ | ||
this.findAltWithTxPostFn = (params) => __awaiter(this, void 0, void 0, function* () { | ||
const result = yield this.client.generalUtility.utilFindAltWithTxPost(params).catch(e => e.response); | ||
return { | ||
status: result.status, | ||
data: result.data, | ||
}; | ||
}); | ||
} | ||
@@ -69,2 +82,9 @@ /** | ||
/** | ||
* Override get priority fee estimate function | ||
* @param getPriorityFeeEstimateFn | ||
*/ | ||
overrideFindAltWithTxPostFn(findAltWithTxPostFn) { | ||
this.findAltWithTxPostFn = findAltWithTxPostFn; | ||
} | ||
/** | ||
* Finds alternative public keys related to a given transaction and returns them along with the response status. | ||
@@ -77,11 +97,7 @@ * | ||
* @param {UtilFindAltWithTxBody} params - The parameters for the function, which include the transaction metadata. | ||
* @returns {Promise<ResponseWithStatus<Array<string>>>>} A promise that resolves to an object containing the response status and an array of public key strings. | ||
* @returns {Promise<ResponseWithStatus<Array<string>>>} A promise that resolves to an object containing the response status and an array of public key strings. | ||
*/ | ||
findAltWithTxPost(params) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const result = yield this.client.generalUtility.utilFindAltWithTxPost(params).catch(e => e.response); | ||
return { | ||
status: result.status, | ||
data: result.data, | ||
}; | ||
return yield this.findAltWithTxPostFn(params); | ||
}); | ||
@@ -88,0 +104,0 @@ } |
{ | ||
"name": "@hawksightco/hawk-sdk", | ||
"version": "0.0.63", | ||
"version": "0.0.64", | ||
"description": "Hawksight v2 SDK", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
156974
2874