@clonegod/ttd-core 2.0.12 → 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.
- package/dist/app_config/env_args.d.ts +10 -11
- package/dist/app_config/env_args.js +20 -20
- package/package.json +1 -1
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
import { CHAIN_ID, DEX_ID } from "..";
|
|
2
2
|
export declare class EnvArgs {
|
|
3
|
+
app_name: string;
|
|
4
|
+
app_base_dir: string;
|
|
3
5
|
chain_id: CHAIN_ID;
|
|
4
6
|
dex_id: DEX_ID;
|
|
5
|
-
app_base_dir: string;
|
|
6
|
-
app_name: string;
|
|
7
7
|
redis_host: string;
|
|
8
8
|
redis_port: string;
|
|
9
|
+
config_center_host: string;
|
|
10
|
+
trade_analyze_url: string;
|
|
9
11
|
rpc_endpoint: string;
|
|
10
12
|
ws_endpoint: string;
|
|
11
13
|
grpc_endpoint: string;
|
|
12
14
|
grpc_token: string;
|
|
13
|
-
config_center_host: string;
|
|
14
|
-
token_market_price_url: string;
|
|
15
|
-
trade_analyze_url: string;
|
|
16
|
-
quote_pair: string;
|
|
17
|
-
quote_amount_usd: number;
|
|
18
15
|
auto_quote_enable: boolean;
|
|
19
16
|
auto_quote_interval_mills: number;
|
|
17
|
+
quote_pair: string;
|
|
18
|
+
quote_amount_usd: number;
|
|
19
|
+
quote_pool_address: string;
|
|
20
|
+
quote_pool_name: string;
|
|
21
|
+
quote_pool_fee_rate: number;
|
|
20
22
|
trade_group_id: string;
|
|
21
23
|
trade_pair: string;
|
|
22
|
-
trade_dex_id: DEX_ID;
|
|
23
|
-
trade_pool_address: string;
|
|
24
|
-
trade_pool_name: string;
|
|
25
|
-
trade_pool_fee_rate: number;
|
|
26
24
|
token_price_cache_seconds: number;
|
|
27
25
|
constructor(chain_id?: CHAIN_ID, dex_id?: DEX_ID);
|
|
26
|
+
print(): void;
|
|
28
27
|
}
|
|
@@ -4,8 +4,9 @@ exports.EnvArgs = void 0;
|
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
class EnvArgs {
|
|
6
6
|
constructor(chain_id, dex_id) {
|
|
7
|
-
var _a, _b
|
|
7
|
+
var _a, _b;
|
|
8
8
|
this.app_name = process.env.APP_NAME || '';
|
|
9
|
+
this.app_base_dir = process.env.APP_BASE_DIR || '';
|
|
9
10
|
this.chain_id = chain_id || ((_a = process.env.CHAIN_ID) === null || _a === void 0 ? void 0 : _a.toUpperCase());
|
|
10
11
|
if ((0, __1.isEmpty)(this.chain_id)) {
|
|
11
12
|
throw new Error(`environment: CHAIN_ID is empty!!!`);
|
|
@@ -13,28 +14,27 @@ class EnvArgs {
|
|
|
13
14
|
this.dex_id = dex_id || ((_b = process.env.DEX_ID) === null || _b === void 0 ? void 0 : _b.toUpperCase());
|
|
14
15
|
if ((0, __1.isEmpty)(this.dex_id)) {
|
|
15
16
|
}
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.token_market_price_url = process.env.TOKEN_PRICE_URL || process.env.TOKEN_MARKET_PRICE_URL;
|
|
25
|
-
this.trade_analyze_url = process.env.TRADE_ANALYZE_URL;
|
|
26
|
-
this.quote_pair = process.env.QUOTE_PAIR;
|
|
27
|
-
this.quote_amount_usd = parseInt(process.env.QUOTE_AMOUNT_USD || '100');
|
|
17
|
+
this.redis_host = process.env.REDIS_HOST || '127.0.0.1';
|
|
18
|
+
this.redis_port = process.env.REDIS_PORT || '6379';
|
|
19
|
+
this.config_center_host = process.env.CONFIG_CENTER_HOST || '';
|
|
20
|
+
this.trade_analyze_url = process.env.TRADE_ANALYZE_URL || '';
|
|
21
|
+
this.rpc_endpoint = process.env.RPC_ENDPOINT || '';
|
|
22
|
+
this.ws_endpoint = process.env.WS_ENDPOINT || '';
|
|
23
|
+
this.grpc_endpoint = process.env.GRPC_ENDPOINT || '';
|
|
24
|
+
this.grpc_token = process.env.GRPC_TOKEN || '';
|
|
28
25
|
this.auto_quote_enable = process.env.AUTO_QUOTE_ENABLE === 'true';
|
|
29
26
|
this.auto_quote_interval_mills = parseInt(process.env.AUTO_QUOTE_INTERVAL_MILLS || '60000');
|
|
30
|
-
this.
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
27
|
+
this.quote_pair = process.env.QUOTE_PAIR || '';
|
|
28
|
+
this.quote_amount_usd = parseInt(process.env.QUOTE_AMOUNT_USD || '100');
|
|
29
|
+
this.quote_pool_address = process.env.QUOTE_POOL_ADDRESS || '';
|
|
30
|
+
this.quote_pool_name = process.env.QUOTE_POOL_NAME || '';
|
|
31
|
+
this.quote_pool_fee_rate = parseInt(process.env.QUOTE_POOL_FEE_RATE || '0');
|
|
32
|
+
this.trade_group_id = process.env.TRADE_GROUP_ID || '';
|
|
33
|
+
this.trade_pair = process.env.TRADE_PAIR || '';
|
|
36
34
|
this.token_price_cache_seconds = parseInt(process.env.TOKEN_PRICE_CACHE_SECONDS || '600');
|
|
37
|
-
|
|
35
|
+
}
|
|
36
|
+
print() {
|
|
37
|
+
console.log('>>> EnvArgs', this);
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
exports.EnvArgs = EnvArgs;
|