@rabby-wallet/rabby-swap 0.0.39-beta.0 → 0.0.39-beta.2
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/dexs/wrapToken.d.ts +1 -1
- package/dist/dexs/wrapToken.js +3 -3
- package/dist/list.d.ts +1 -1
- package/dist/quote.js +5 -0
- package/package.json +1 -1
package/dist/dexs/wrapToken.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CHAINS_ENUM } from "@debank/common";
|
|
2
2
|
import { QuoteParams, QuoteResult } from "../quote";
|
|
3
|
-
export declare const SUPPORT_CHAINS:
|
|
3
|
+
export declare const SUPPORT_CHAINS: CHAINS_ENUM[];
|
|
4
4
|
export declare const getQuote: (options: QuoteParams) => Promise<QuoteResult>;
|
package/dist/dexs/wrapToken.js
CHANGED
|
@@ -30,9 +30,9 @@ export const SUPPORT_CHAINS = [
|
|
|
30
30
|
CHAINS_ENUM.ERA,
|
|
31
31
|
CHAINS_ENUM.PZE,
|
|
32
32
|
// CHAINS_ENUM.ROSE,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
CHAINS_ENUM.SCRL,
|
|
34
|
+
CHAINS_ENUM.MODE,
|
|
35
|
+
CHAINS_ENUM.MANTLE,
|
|
36
36
|
];
|
|
37
37
|
export const getQuote = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
38
|
const chain = CHAINS[options.chain];
|
package/dist/list.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export declare const WrapTokenAddressMap: {
|
|
|
20
20
|
MODE: string;
|
|
21
21
|
};
|
|
22
22
|
export declare const DEX_SUPPORT_CHAINS: {
|
|
23
|
-
WrapToken:
|
|
23
|
+
WrapToken: CHAINS_ENUM[];
|
|
24
24
|
"1inch": CHAINS_ENUM[];
|
|
25
25
|
ParaSwap: CHAINS_ENUM[];
|
|
26
26
|
"0xAPI": CHAINS_ENUM[];
|
package/dist/quote.js
CHANGED
|
@@ -16,6 +16,7 @@ import { getQuote as openOceanGetQuote, decodeCalldata as openOceanDecodeCalldat
|
|
|
16
16
|
import { getQuote as uniswapGetQuote, decodeCalldata as uniswapDecodeCalldata, } from "./dexs/uniswap";
|
|
17
17
|
import { getQuote as kyberswapGetQuote, decodeCalldata as kyberswapDecodeCalldata, } from "./dexs/kyberswap";
|
|
18
18
|
import { getQuote as paraSwapV6GetQuote, decodeCalldata as paraSwapV6DecodeCalldata, } from "./dexs/paraswap_v6";
|
|
19
|
+
import { getQuote as odosGetQuote, decodeCalldata as odosDecodeCalldata, } from "./dexs/odos";
|
|
19
20
|
export const getQuote = (id, params, api) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
21
|
switch (id) {
|
|
21
22
|
case DEX_ENUM.WRAPTOKEN:
|
|
@@ -34,6 +35,8 @@ export const getQuote = (id, params, api) => __awaiter(void 0, void 0, void 0, f
|
|
|
34
35
|
return yield kyberswapGetQuote(params, api);
|
|
35
36
|
case DEX_ENUM.PARASWAPV6:
|
|
36
37
|
return yield paraSwapV6GetQuote(params, api);
|
|
38
|
+
case DEX_ENUM.ODOS:
|
|
39
|
+
return yield odosGetQuote(params, api);
|
|
37
40
|
default:
|
|
38
41
|
throw new Error(`${id} is not supported!`);
|
|
39
42
|
}
|
|
@@ -54,6 +57,8 @@ export const decodeCalldata = (id, tx) => {
|
|
|
54
57
|
return kyberswapDecodeCalldata(tx);
|
|
55
58
|
case DEX_ENUM.PARASWAPV6:
|
|
56
59
|
return paraSwapV6DecodeCalldata(tx);
|
|
60
|
+
case DEX_ENUM.ODOS:
|
|
61
|
+
return odosDecodeCalldata(tx);
|
|
57
62
|
default:
|
|
58
63
|
throw new Error(`${id} is not supported!`);
|
|
59
64
|
}
|