@clonegod/ttd-sol-common 1.0.1 → 1.0.3

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,7 +1,3 @@
1
1
  import { StandardPoolInfoType } from '@clonegod/ttd-common';
2
- export declare const enum COMMITMENT_LEVEL {
3
- PROCESSED = "processed",
4
- CONFIRMED = "confirmed",
5
- _FINALIZED = "finalized"
6
- }
2
+ export declare const ONE_SOL_IN_LAMPORTS = 1000000000;
7
3
  export declare const subscibe_pool_change_by_geyser: (geyser_ws_url: string, pool_list: StandardPoolInfoType[], callback: (data_buff: any) => {}) => Promise<void>;
package/dist/index.js CHANGED
@@ -12,9 +12,11 @@ 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.ONE_SOL_IN_LAMPORTS = void 0;
16
16
  const dist_1 = require("@clonegod/ttd-common/dist");
17
17
  const ws_1 = __importDefault(require("ws"));
18
+ const types_1 = require("../types");
19
+ exports.ONE_SOL_IN_LAMPORTS = 1e9;
18
20
  const subscibe_pool_change_by_geyser = (geyser_ws_url, pool_list, callback) => __awaiter(void 0, void 0, void 0, function* () {
19
21
  if ((0, dist_1.isEmpty)(geyser_ws_url)) {
20
22
  (0, dist_1.log_warn)(`geyser_ws_url is empty, cann't subscribe`);
@@ -36,7 +38,7 @@ const subscibe_pool_change_by_geyser = (geyser_ws_url, pool_list, callback) => _
36
38
  pool.pool_address,
37
39
  {
38
40
  encoding: 'jsonParsed',
39
- commitment: "processed",
41
+ commitment: types_1.COMMITMENT_LEVEL.PROCESSED,
40
42
  },
41
43
  ],
42
44
  };
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.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",
package/types/index.d.ts CHANGED
@@ -0,0 +1,6 @@
1
+ export declare enum COMMITMENT_LEVEL {
2
+ PROCESSED = "processed",
3
+ CONFIRMED = "confirmed",
4
+ _FINALIZED = "finalized"
5
+ }
6
+