@clonegod/ttd-core 3.1.101 → 3.1.103
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 +5 -1
- package/dist/index.js +12 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -86,7 +86,11 @@ export declare enum DEX_ID {
|
|
|
86
86
|
DYOR_AMM = "DYOR-AMM",
|
|
87
87
|
DYOR_CLMM = "DYOR-CLMM",
|
|
88
88
|
OKIE_AMM = "OKIE-AMM",
|
|
89
|
-
OKIE_CLMM = "OKIE-CLMM"
|
|
89
|
+
OKIE_CLMM = "OKIE-CLMM",
|
|
90
|
+
STONFI = "STONFI",
|
|
91
|
+
STONFI_V2 = "STONFI-V2",
|
|
92
|
+
DEDUST = "DEDUST",
|
|
93
|
+
DEDUST_V2 = "DEDUST-V2"
|
|
90
94
|
}
|
|
91
95
|
export declare enum GROUP_ID {
|
|
92
96
|
TRON_DEV1 = "TRON-DEV1",
|
package/dist/index.js
CHANGED
|
@@ -172,6 +172,10 @@ var DEX_ID;
|
|
|
172
172
|
DEX_ID["DYOR_CLMM"] = "DYOR-CLMM";
|
|
173
173
|
DEX_ID["OKIE_AMM"] = "OKIE-AMM";
|
|
174
174
|
DEX_ID["OKIE_CLMM"] = "OKIE-CLMM";
|
|
175
|
+
DEX_ID["STONFI"] = "STONFI";
|
|
176
|
+
DEX_ID["STONFI_V2"] = "STONFI-V2";
|
|
177
|
+
DEX_ID["DEDUST"] = "DEDUST";
|
|
178
|
+
DEX_ID["DEDUST_V2"] = "DEDUST-V2";
|
|
175
179
|
})(DEX_ID || (exports.DEX_ID = DEX_ID = {}));
|
|
176
180
|
var GROUP_ID;
|
|
177
181
|
(function (GROUP_ID) {
|
|
@@ -231,13 +235,17 @@ const format_token_symbol = (symbol) => {
|
|
|
231
235
|
return /^[A-Z0-9]+$/.test(cleaned) ? cleaned : '';
|
|
232
236
|
};
|
|
233
237
|
exports.format_token_symbol = format_token_symbol;
|
|
238
|
+
const PAIR_SYMBOL_ALIAS = {
|
|
239
|
+
USDC: 'USDT', USD1: 'USDT', USDG: 'USDT',
|
|
240
|
+
WTRX: 'TRX', WSOL: 'SOL', WBTC: 'BTC',
|
|
241
|
+
WETH: 'ETH', WBNB: 'BNB', WOKB: 'OKB',
|
|
242
|
+
};
|
|
234
243
|
const format_pair_symbol = (symbol) => {
|
|
244
|
+
var _a;
|
|
235
245
|
if (!symbol)
|
|
236
246
|
return symbol;
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
.replace('WTRX', 'TRX').replace('WSOL', 'SOL').replace('WBTC', 'BTC')
|
|
240
|
-
.replace('WETH', 'ETH').replace('WBNB', 'BNB').replace('WOKB', 'OKB');
|
|
247
|
+
const s = (0, exports.format_token_symbol)(symbol);
|
|
248
|
+
return (_a = PAIR_SYMBOL_ALIAS[s]) !== null && _a !== void 0 ? _a : s;
|
|
241
249
|
};
|
|
242
250
|
exports.format_pair_symbol = format_pair_symbol;
|
|
243
251
|
const format_unique_orderbook_id = (chain_id, dex_id, pool_id, fee_rate) => {
|