@uniswap/router-sdk 1.9.2 → 1.10.0
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/constants.d.ts +1 -0
- package/dist/entities/mixedRoute/route.d.ts +6 -4
- package/dist/entities/mixedRoute/trade.d.ts +5 -2
- package/dist/entities/protocol.d.ts +1 -0
- package/dist/entities/route.d.ts +11 -5
- package/dist/entities/trade.d.ts +13 -4
- package/dist/router-sdk.cjs.development.js +308 -154
- package/dist/router-sdk.cjs.development.js.map +1 -1
- package/dist/router-sdk.cjs.production.min.js +1 -1
- package/dist/router-sdk.cjs.production.min.js.map +1 -1
- package/dist/router-sdk.esm.js +320 -168
- package/dist/router-sdk.esm.js.map +1 -1
- package/dist/utils/getOutputAmount.d.ts +7 -0
- package/dist/utils/index.d.ts +7 -4
- package/package.json +4 -3
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Currency, CurrencyAmount } from '@uniswap/sdk-core';
|
|
2
|
+
import { Pool as V4Pool } from '@uniswap/v4-sdk';
|
|
3
|
+
import { Pair } from '@uniswap/v2-sdk';
|
|
4
|
+
import { Pool as V3Pool } from '@uniswap/v3-sdk';
|
|
5
|
+
declare type TPool = Pair | V3Pool | V4Pool;
|
|
6
|
+
export declare function getOutputAmount(pool: TPool, amountIn: CurrencyAmount<Currency>): Promise<[CurrencyAmount<Currency>, TPool]>;
|
|
7
|
+
export {};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
import { Currency
|
|
1
|
+
import { Currency } from '@uniswap/sdk-core';
|
|
2
2
|
import { Pair } from '@uniswap/v2-sdk';
|
|
3
|
-
import { Pool } from '@uniswap/v3-sdk';
|
|
3
|
+
import { Pool as V3Pool } from '@uniswap/v3-sdk';
|
|
4
|
+
import { Pool as V4Pool } from '@uniswap/v4-sdk';
|
|
4
5
|
import { MixedRouteSDK } from '../entities/mixedRoute/route';
|
|
6
|
+
declare type TPool = Pair | V3Pool | V4Pool;
|
|
5
7
|
/**
|
|
6
8
|
* Utility function to return each consecutive section of Pools or Pairs in a MixedRoute
|
|
7
9
|
* @param route
|
|
8
10
|
* @returns a nested array of Pools or Pairs in the order of the route
|
|
9
11
|
*/
|
|
10
|
-
export declare const partitionMixedRouteByProtocol: (route: MixedRouteSDK<Currency, Currency>) =>
|
|
12
|
+
export declare const partitionMixedRouteByProtocol: (route: MixedRouteSDK<Currency, Currency>) => TPool[][];
|
|
11
13
|
/**
|
|
12
14
|
* Simple utility function to get the output of an array of Pools or Pairs
|
|
13
15
|
* @param pools
|
|
14
16
|
* @param firstInputToken
|
|
15
17
|
* @returns the output token of the last pool in the array
|
|
16
18
|
*/
|
|
17
|
-
export declare const getOutputOfPools: (pools:
|
|
19
|
+
export declare const getOutputOfPools: (pools: TPool[], firstInputToken: Currency) => Currency;
|
|
20
|
+
export {};
|
package/package.json
CHANGED
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@ethersproject/abi": "^5.5.0",
|
|
24
|
-
"@uniswap/sdk-core": "^5.
|
|
24
|
+
"@uniswap/sdk-core": "^5.3.1",
|
|
25
25
|
"@uniswap/swap-router-contracts": "^1.3.0",
|
|
26
26
|
"@uniswap/v2-sdk": "^4.3.2",
|
|
27
|
-
"@uniswap/v3-sdk": "^3.11.2"
|
|
27
|
+
"@uniswap/v3-sdk": "^3.11.2",
|
|
28
|
+
"@uniswap/v4-sdk": "^1.0.0"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|
|
30
31
|
"@types/jest": "^24.0.25",
|
|
@@ -68,5 +69,5 @@
|
|
|
68
69
|
]
|
|
69
70
|
]
|
|
70
71
|
},
|
|
71
|
-
"version": "1.
|
|
72
|
+
"version": "1.10.0"
|
|
72
73
|
}
|