@clonegod/ttd-core 3.0.3 → 3.0.4

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,15 +1,14 @@
1
- export declare const SERVICE_PORTS: {
2
- readonly CONFIG_CENTER_HTTP: 4000;
3
- readonly ORDERBOOK_HTTP: 7999;
4
- readonly ORDERBOOK_WS: 8000;
5
- readonly TRADE_PROXY_HTTP: 8001;
6
- readonly TRADE_PROXY_WS: 8002;
7
- readonly TRADE_MGT_HTTP: 8003;
8
- readonly TRADE_ANALYZE_HTTP: 8004;
9
- readonly SOL_JITO_TIP_TX_HTTP: 8005;
10
- readonly WALLET_ASSETS_HTTP: 8006;
11
- readonly STREAM_QUOTE_WS: 8011;
12
- readonly SEND_TX_WS: 8012;
13
- readonly STREAM_TRADE_WS: 8013;
14
- };
15
- export declare function getServicePort(key: keyof typeof SERVICE_PORTS): number;
1
+ export declare enum SERVICE_PORT {
2
+ CONFIG_CENTER_HTTP = 4000,
3
+ ORDERBOOK_HTTP = 7999,
4
+ ORDERBOOK_WS = 8000,
5
+ TRADE_PROXY_HTTP = 8001,
6
+ TRADE_PROXY_WS = 8002,
7
+ TRADE_MGT_HTTP = 8003,
8
+ TRADE_ANALYZE_HTTP = 8004,
9
+ SOL_JITO_TIP_TX_HTTP = 8005,
10
+ WALLET_ASSETS_HTTP = 8006,
11
+ STREAM_QUOTE_WS = 8011,
12
+ SEND_TX_WS = 8012,
13
+ STREAM_TRADE_WS = 8013
14
+ }
@@ -1,27 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SERVICE_PORTS = void 0;
4
- exports.getServicePort = getServicePort;
5
- exports.SERVICE_PORTS = {
6
- CONFIG_CENTER_HTTP: 4000,
7
- ORDERBOOK_HTTP: 7999,
8
- ORDERBOOK_WS: 8000,
9
- TRADE_PROXY_HTTP: 8001,
10
- TRADE_PROXY_WS: 8002,
11
- TRADE_MGT_HTTP: 8003,
12
- TRADE_ANALYZE_HTTP: 8004,
13
- SOL_JITO_TIP_TX_HTTP: 8005,
14
- WALLET_ASSETS_HTTP: 8006,
15
- STREAM_QUOTE_WS: 8011,
16
- SEND_TX_WS: 8012,
17
- STREAM_TRADE_WS: 8013,
18
- };
19
- function getServicePort(key) {
20
- const envVal = process.env[`SERVICE_PORT_${key}`];
21
- if (envVal) {
22
- const parsed = parseInt(envVal, 10);
23
- if (!isNaN(parsed))
24
- return parsed;
25
- }
26
- return exports.SERVICE_PORTS[key];
27
- }
3
+ exports.SERVICE_PORT = void 0;
4
+ var SERVICE_PORT;
5
+ (function (SERVICE_PORT) {
6
+ SERVICE_PORT[SERVICE_PORT["CONFIG_CENTER_HTTP"] = 4000] = "CONFIG_CENTER_HTTP";
7
+ SERVICE_PORT[SERVICE_PORT["ORDERBOOK_HTTP"] = 7999] = "ORDERBOOK_HTTP";
8
+ SERVICE_PORT[SERVICE_PORT["ORDERBOOK_WS"] = 8000] = "ORDERBOOK_WS";
9
+ SERVICE_PORT[SERVICE_PORT["TRADE_PROXY_HTTP"] = 8001] = "TRADE_PROXY_HTTP";
10
+ SERVICE_PORT[SERVICE_PORT["TRADE_PROXY_WS"] = 8002] = "TRADE_PROXY_WS";
11
+ SERVICE_PORT[SERVICE_PORT["TRADE_MGT_HTTP"] = 8003] = "TRADE_MGT_HTTP";
12
+ SERVICE_PORT[SERVICE_PORT["TRADE_ANALYZE_HTTP"] = 8004] = "TRADE_ANALYZE_HTTP";
13
+ SERVICE_PORT[SERVICE_PORT["SOL_JITO_TIP_TX_HTTP"] = 8005] = "SOL_JITO_TIP_TX_HTTP";
14
+ SERVICE_PORT[SERVICE_PORT["WALLET_ASSETS_HTTP"] = 8006] = "WALLET_ASSETS_HTTP";
15
+ SERVICE_PORT[SERVICE_PORT["STREAM_QUOTE_WS"] = 8011] = "STREAM_QUOTE_WS";
16
+ SERVICE_PORT[SERVICE_PORT["SEND_TX_WS"] = 8012] = "SEND_TX_WS";
17
+ SERVICE_PORT[SERVICE_PORT["STREAM_TRADE_WS"] = 8013] = "STREAM_TRADE_WS";
18
+ })(SERVICE_PORT || (exports.SERVICE_PORT = SERVICE_PORT = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clonegod/ttd-core",
3
- "version": "3.0.3",
3
+ "version": "3.0.4",
4
4
  "description": "Common types and utilities for trading systems - use `npm run push` to publish",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",