@clonegod/ttd-sol-common 1.0.1 → 1.0.2
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/index.d.ts +1 -1
- package/dist/index.js +8 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -12,9 +12,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.subscibe_pool_change_by_geyser = void 0;
|
|
15
|
+
exports.subscibe_pool_change_by_geyser = exports.COMMITMENT_LEVEL = void 0;
|
|
16
16
|
const dist_1 = require("@clonegod/ttd-common/dist");
|
|
17
17
|
const ws_1 = __importDefault(require("ws"));
|
|
18
|
+
var COMMITMENT_LEVEL;
|
|
19
|
+
(function (COMMITMENT_LEVEL) {
|
|
20
|
+
COMMITMENT_LEVEL["PROCESSED"] = "processed";
|
|
21
|
+
COMMITMENT_LEVEL["CONFIRMED"] = "confirmed";
|
|
22
|
+
COMMITMENT_LEVEL["_FINALIZED"] = "finalized";
|
|
23
|
+
})(COMMITMENT_LEVEL || (exports.COMMITMENT_LEVEL = COMMITMENT_LEVEL = {}));
|
|
18
24
|
const subscibe_pool_change_by_geyser = (geyser_ws_url, pool_list, callback) => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
25
|
if ((0, dist_1.isEmpty)(geyser_ws_url)) {
|
|
20
26
|
(0, dist_1.log_warn)(`geyser_ws_url is empty, cann't subscribe`);
|
|
@@ -36,7 +42,7 @@ const subscibe_pool_change_by_geyser = (geyser_ws_url, pool_list, callback) => _
|
|
|
36
42
|
pool.pool_address,
|
|
37
43
|
{
|
|
38
44
|
encoding: 'jsonParsed',
|
|
39
|
-
commitment:
|
|
45
|
+
commitment: COMMITMENT_LEVEL.PROCESSED,
|
|
40
46
|
},
|
|
41
47
|
],
|
|
42
48
|
};
|