@clonegod/ttd-sol-common 1.0.7 → 1.0.8

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
@@ -7,7 +7,7 @@ export declare enum COMMITMENT_LEVEL {
7
7
  CONFIRMED = "confirmed",
8
8
  _FINALIZED = "finalized"
9
9
  }
10
- export declare enum LOCAL_EVENT_KEYS {
11
- EVENT_POOL_ACCOUNT_CAHNGE = "EVENT_POOL_ACCOUNT_CAHNGE"
10
+ export declare enum LOCAL_EVENT_NAME {
11
+ EVENT_POOL_ACCOUNT_CHANGE = "EVENT_POOL_ACCOUNT_CHANGE"
12
12
  }
13
13
  export declare const subscribe_pool_change_by_geyser: (geyser_ws_url: string, pool_list: StandardPoolInfoType[], eventEmitter: EventEmitter) => Promise<void>;
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ 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.subscribe_pool_change_by_geyser = exports.LOCAL_EVENT_KEYS = exports.COMMITMENT_LEVEL = exports.ONE_SOL_IN_LAMPORTS = void 0;
15
+ exports.subscribe_pool_change_by_geyser = exports.LOCAL_EVENT_NAME = exports.COMMITMENT_LEVEL = exports.ONE_SOL_IN_LAMPORTS = void 0;
16
16
  const ws_1 = __importDefault(require("ws"));
17
17
  const dist_1 = require("@clonegod/ttd-common/dist");
18
18
  exports.ONE_SOL_IN_LAMPORTS = 1e9;
@@ -22,10 +22,10 @@ var COMMITMENT_LEVEL;
22
22
  COMMITMENT_LEVEL["CONFIRMED"] = "confirmed";
23
23
  COMMITMENT_LEVEL["_FINALIZED"] = "finalized";
24
24
  })(COMMITMENT_LEVEL || (exports.COMMITMENT_LEVEL = COMMITMENT_LEVEL = {}));
25
- var LOCAL_EVENT_KEYS;
26
- (function (LOCAL_EVENT_KEYS) {
27
- LOCAL_EVENT_KEYS["EVENT_POOL_ACCOUNT_CAHNGE"] = "EVENT_POOL_ACCOUNT_CAHNGE";
28
- })(LOCAL_EVENT_KEYS || (exports.LOCAL_EVENT_KEYS = LOCAL_EVENT_KEYS = {}));
25
+ var LOCAL_EVENT_NAME;
26
+ (function (LOCAL_EVENT_NAME) {
27
+ LOCAL_EVENT_NAME["EVENT_POOL_ACCOUNT_CHANGE"] = "EVENT_POOL_ACCOUNT_CHANGE";
28
+ })(LOCAL_EVENT_NAME || (exports.LOCAL_EVENT_NAME = LOCAL_EVENT_NAME = {}));
29
29
  const subscribe_pool_change_by_geyser = (geyser_ws_url, pool_list, eventEmitter) => __awaiter(void 0, void 0, void 0, function* () {
30
30
  if ((0, dist_1.isEmpty)(geyser_ws_url)) {
31
31
  (0, dist_1.log_warn)(`geyser_ws_url is empty, cann't subscribe`);
@@ -76,7 +76,7 @@ const subscribe_pool_change_by_geyser = (geyser_ws_url, pool_list, eventEmitter)
76
76
  else {
77
77
  const res_data = messageObj['params']['result']['value']['data'];
78
78
  let data_buff = Buffer.from(res_data[0], res_data[1]);
79
- eventEmitter.emit(LOCAL_EVENT_KEYS.EVENT_POOL_ACCOUNT_CAHNGE, data_buff);
79
+ eventEmitter.emit(LOCAL_EVENT_NAME.EVENT_POOL_ACCOUNT_CHANGE, data_buff);
80
80
  }
81
81
  }
82
82
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sol-common",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",