@hawksightco/hawk-sdk 0.0.56 → 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.
- package/dist/src/classes/CreateTxMetadata.d.ts.map +1 -1
- package/dist/src/classes/CreateTxMetadata.js +2 -0
- package/dist/src/classes/GeneralUtility.d.ts +12 -0
- package/dist/src/classes/GeneralUtility.d.ts.map +1 -1
- package/dist/src/classes/GeneralUtility.js +21 -5
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateTxMetadata.d.ts","sourceRoot":"","sources":["../../../src/classes/CreateTxMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,qBAAa,gBAAgB;IAE3B,OAAO;IAEP,OAAO,CAAC,UAAU,CAAC,CAAkB;IAErC;;;;OAIG;IACH,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU;IAEzC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAmB;IAE3C;;;;OAIG;IACH,MAAM,CAAC,QAAQ,IAAI,gBAAgB;IAOnC,OAAO,CAAC,IAAI,CAaV;IAEF;;OAEG;IACG,IAAI;IAIV;;OAEG;IACG,UAAU;
|
|
1
|
+
{"version":3,"file":"CreateTxMetadata.d.ts","sourceRoot":"","sources":["../../../src/classes/CreateTxMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,qBAAa,gBAAgB;IAE3B,OAAO;IAEP,OAAO,CAAC,UAAU,CAAC,CAAkB;IAErC;;;;OAIG;IACH,aAAa,CAAC,UAAU,EAAE,IAAI,CAAC,UAAU;IAEzC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAmB;IAE3C;;;;OAIG;IACH,MAAM,CAAC,QAAQ,IAAI,gBAAgB;IAOnC,OAAO,CAAC,IAAI,CAaV;IAEF;;OAEG;IACG,IAAI;IAIV;;OAEG;IACG,UAAU;IAUhB;;;;;;;OAOG;IACG,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,yBAAyB,CAAC;IAcvG;;;;;OAKG;IACG,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAIzE;;;;;;;;;;;;;;;OAeG;IACG,gBAAgB,CACpB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,2BAA2B,GAChC,OAAO,CAAC,mBAAmB,CAAC;CAyDhC"}
|
|
@@ -91,7 +91,9 @@ class CreateTxMetadata {
|
|
|
91
91
|
for (const alt in this.alts) {
|
|
92
92
|
this.alts[alt] = (yield this.connection.getAddressLookupTable(new web3.PublicKey(alt))).value;
|
|
93
93
|
}
|
|
94
|
+
return;
|
|
94
95
|
}
|
|
96
|
+
setTimeout(() => __awaiter(this, void 0, void 0, function* () { return yield this.updateAlts(); }), 1000); // Update until done
|
|
95
97
|
});
|
|
96
98
|
}
|
|
97
99
|
/**
|
|
@@ -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;
|
|
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
|
-
|
|
45
|
-
return {
|
|
46
|
-
status: result.status,
|
|
47
|
-
data: result.data,
|
|
48
|
-
};
|
|
64
|
+
return yield this.getPriorityFeeEstimateFn(params);
|
|
49
65
|
});
|
|
50
66
|
}
|
|
51
67
|
/**
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,4 +2,5 @@ export * from "./types";
|
|
|
2
2
|
export { HawkAPI } from "./classes/HawkAPI";
|
|
3
3
|
export { TxGenerator } from "./classes/TxGenerator";
|
|
4
4
|
export { Client } from "./classes/Client";
|
|
5
|
+
export { CreateTxMetadata } from "./classes/CreateTxMetadata";
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/src/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Client = exports.TxGenerator = exports.HawkAPI = void 0;
|
|
17
|
+
exports.CreateTxMetadata = exports.Client = exports.TxGenerator = exports.HawkAPI = void 0;
|
|
18
18
|
__exportStar(require("./types"), exports);
|
|
19
19
|
var HawkAPI_1 = require("./classes/HawkAPI");
|
|
20
20
|
Object.defineProperty(exports, "HawkAPI", { enumerable: true, get: function () { return HawkAPI_1.HawkAPI; } });
|
|
@@ -22,3 +22,5 @@ var TxGenerator_1 = require("./classes/TxGenerator");
|
|
|
22
22
|
Object.defineProperty(exports, "TxGenerator", { enumerable: true, get: function () { return TxGenerator_1.TxGenerator; } });
|
|
23
23
|
var Client_1 = require("./classes/Client");
|
|
24
24
|
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return Client_1.Client; } });
|
|
25
|
+
var CreateTxMetadata_1 = require("./classes/CreateTxMetadata");
|
|
26
|
+
Object.defineProperty(exports, "CreateTxMetadata", { enumerable: true, get: function () { return CreateTxMetadata_1.CreateTxMetadata; } });
|