@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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import { StandardPoolInfoType } from '@clonegod/ttd-common';
2
- export declare const enum COMMITMENT_LEVEL {
2
+ export declare enum COMMITMENT_LEVEL {
3
3
  PROCESSED = "processed",
4
4
  CONFIRMED = "confirmed",
5
5
  _FINALIZED = "finalized"
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: "processed",
45
+ commitment: COMMITMENT_LEVEL.PROCESSED,
40
46
  },
41
47
  ],
42
48
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sol-common",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",