@clonegod/ttd-sol-common 2.0.13 → 2.0.14

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.
@@ -1,2 +1,3 @@
1
1
  export * from './constants';
2
2
  export * from './get_wallet_token_account';
3
+ export * from './subscribe_account_update';
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./constants"), exports);
18
18
  __exportStar(require("./get_wallet_token_account"), exports);
19
+ __exportStar(require("./subscribe_account_update"), exports);
@@ -1,4 +1,4 @@
1
1
  import { StandardPoolInfoType } from "@clonegod/ttd-core";
2
2
  import { DEX_ID } from "@clonegod/ttd-core/dist";
3
3
  import { SolanaPoolAccountUpdateEventData } from "../types";
4
- export declare function subscribe_account_update(dex_id: DEX_ID, pool_list: StandardPoolInfoType[], callback: (eventData: SolanaPoolAccountUpdateEventData) => void): void;
4
+ export declare function subscribe_pool_account_update(dex_id: DEX_ID, pool_list: StandardPoolInfoType[], callback: (eventData: SolanaPoolAccountUpdateEventData) => void): void;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.subscribe_account_update = subscribe_account_update;
3
+ exports.subscribe_pool_account_update = subscribe_pool_account_update;
4
4
  const dist_1 = require("@clonegod/ttd-core/dist");
5
- function subscribe_account_update(dex_id, pool_list, callback) {
5
+ function subscribe_pool_account_update(dex_id, pool_list, callback) {
6
6
  const ws_url = process.env.SUBSCIBE_MULTIPLE_PROVIDERS_WS_URL || 'ws://127.0.0.1:10000';
7
7
  const ws_client = new dist_1.WebSocketClient(ws_url);
8
8
  ws_client.onOpen(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-sol-common",
3
- "version": "2.0.13",
3
+ "version": "2.0.14",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",
@@ -1,3 +1,3 @@
1
1
  export * from './constants'
2
2
  export * from './get_wallet_token_account'
3
-
3
+ export * from './subscribe_account_update'
@@ -7,7 +7,7 @@ import { SolanaPoolAccountUpdateEventData } from "../types";
7
7
  * - 询价:基于池子数据计算价格
8
8
  * - 交易使用:交易中需要池子的最新状态
9
9
  */
10
- export function subscribe_account_update(dex_id: DEX_ID, pool_list: StandardPoolInfoType[], callback: (eventData: SolanaPoolAccountUpdateEventData) => void) {
10
+ export function subscribe_pool_account_update(dex_id: DEX_ID, pool_list: StandardPoolInfoType[], callback: (eventData: SolanaPoolAccountUpdateEventData) => void) {
11
11
  const ws_url = process.env.SUBSCIBE_MULTIPLE_PROVIDERS_WS_URL || 'ws://127.0.0.1:10000';
12
12
  const ws_client = new WebSocketClient(ws_url)
13
13
  ws_client.onOpen(() => {