@juiceswapxyz/smart-order-router 0.1.0-beta.0 → 0.1.2-beta.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/build/main/providers/caching-subgraph-provider.d.ts +1 -1
- package/build/main/providers/eip-1559-gas-price-provider.d.ts +2 -2
- package/build/main/providers/eth-gas-station-info-gas-price-provider.d.ts +1 -1
- package/build/main/providers/gas-price-provider.d.ts +1 -1
- package/build/main/providers/multicall-provider.d.ts +6 -6
- package/build/main/providers/multicall-uniswap-provider.d.ts +1 -1
- package/build/main/providers/on-chain-quote-provider.d.ts +17 -17
- package/build/main/providers/pool-provider.d.ts +4 -4
- package/build/main/providers/provider.d.ts +2 -2
- package/build/main/providers/simulation-provider.d.ts +1 -1
- package/build/main/providers/subgraph-provider.d.ts +2 -2
- package/build/main/providers/subgraph-provider.js +1 -1
- package/build/main/providers/swap-router-provider.d.ts +1 -1
- package/build/main/providers/tenderly-simulation-provider.d.ts +5 -5
- package/build/main/providers/token-fee-fetcher.d.ts +3 -3
- package/build/main/providers/token-properties-provider.d.ts +3 -3
- package/build/main/providers/token-provider.d.ts +2 -2
- package/build/main/providers/token-provider.js +4 -4
- package/build/main/providers/v2/pool-provider.d.ts +2 -2
- package/build/main/providers/v2/quote-provider.d.ts +2 -2
- package/build/main/providers/v2/subgraph-provider.d.ts +1 -1
- package/build/main/providers/v2/subgraph-provider.js +1 -1
- package/build/main/providers/v3/gas-data-provider.d.ts +1 -1
- package/build/main/providers/v3/pool-provider.d.ts +5 -5
- package/build/main/providers/v3/subgraph-provider.d.ts +1 -1
- package/build/main/providers/v4/euler-swap-hooks-subgraph-provider.js +1 -1
- package/build/main/providers/v4/pool-provider.d.ts +5 -5
- package/build/main/providers/v4/subgraph-provider.d.ts +1 -1
- package/build/main/routers/alpha-router/alpha-router.d.ts +3 -3
- package/build/main/routers/alpha-router/entities/route-with-valid-quote.d.ts +9 -9
- package/build/main/routers/alpha-router/entities/route-with-valid-quote.js +13 -13
- package/build/main/routers/alpha-router/functions/best-swap-route.d.ts +1 -1
- package/build/main/routers/alpha-router/functions/get-candidate-pools.d.ts +14 -14
- package/build/main/routers/alpha-router/gas-models/gas-model.d.ts +7 -7
- package/build/main/routers/alpha-router/gas-models/gas-model.js +1 -1
- package/build/main/routers/legacy-router/bases.d.ts +1 -1
- package/build/main/routers/legacy-router/legacy-router.d.ts +2 -2
- package/build/main/routers/router.d.ts +14 -14
- package/build/main/tsconfig.tsbuildinfo +1 -1
- package/build/main/types/other/commons.d.ts +4 -4
- package/build/main/types/other/factories/Erc20__factory.d.ts +1 -1
- package/build/main/types/other/factories/Erc20__factory.js +1 -1
- package/build/main/types/other/factories/GasDataArbitrum__factory.d.ts +1 -1
- package/build/main/types/other/factories/GasDataArbitrum__factory.js +1 -1
- package/build/main/types/other/factories/IMixedRouteQuoterV1__factory.d.ts +1 -1
- package/build/main/types/other/factories/IMixedRouteQuoterV1__factory.js +1 -1
- package/build/main/types/other/factories/ITokenValidator__factory.d.ts +1 -1
- package/build/main/types/other/factories/ITokenValidator__factory.js +1 -1
- package/build/main/types/other/factories/MixedRouteQuoterV2__factory.d.ts +1 -1
- package/build/main/types/other/factories/MixedRouteQuoterV2__factory.js +1 -1
- package/build/main/types/other/factories/Permit2__factory.d.ts +2 -2
- package/build/main/types/other/factories/Permit2__factory.js +8 -3
- package/build/main/types/other/factories/StateView__factory.d.ts +1 -1
- package/build/main/types/other/factories/StateView__factory.js +1 -1
- package/build/main/types/other/factories/SwapRouter02__factory.d.ts +2 -2
- package/build/main/types/other/factories/SwapRouter02__factory.js +8 -3
- package/build/main/types/other/factories/TokenFeeDetector__factory.d.ts +1 -1
- package/build/main/types/other/factories/TokenFeeDetector__factory.js +1 -1
- package/build/main/types/other/factories/V4Quoter__factory.d.ts +1 -1
- package/build/main/types/other/factories/V4Quoter__factory.js +1 -1
- package/build/main/types/v2/commons.d.ts +4 -4
- package/build/main/types/v2/factories/IUniswapV2Pair__factory.d.ts +1 -1
- package/build/main/types/v2/factories/IUniswapV2Pair__factory.js +1 -1
- package/build/main/types/v3/commons.d.ts +4 -4
- package/build/main/types/v3/factories/IERC20Metadata__factory.d.ts +1 -1
- package/build/main/types/v3/factories/IERC20Metadata__factory.js +1 -1
- package/build/main/types/v3/factories/IQuoterV2__factory.d.ts +1 -1
- package/build/main/types/v3/factories/IQuoterV2__factory.js +1 -1
- package/build/main/types/v3/factories/IUniswapV3PoolState__factory.d.ts +1 -1
- package/build/main/types/v3/factories/IUniswapV3PoolState__factory.js +1 -1
- package/build/main/types/v3/factories/UniswapInterfaceMulticall__factory.d.ts +2 -2
- package/build/main/types/v3/factories/UniswapInterfaceMulticall__factory.js +8 -3
- package/build/main/util/addresses.d.ts +1 -1
- package/build/main/util/onchainQuoteProviderConfigs.d.ts +1 -1
- package/build/module/providers/caching-subgraph-provider.d.ts +1 -1
- package/build/module/providers/eip-1559-gas-price-provider.d.ts +2 -2
- package/build/module/providers/eth-gas-station-info-gas-price-provider.d.ts +1 -1
- package/build/module/providers/gas-price-provider.d.ts +1 -1
- package/build/module/providers/multicall-provider.d.ts +6 -6
- package/build/module/providers/multicall-uniswap-provider.d.ts +1 -1
- package/build/module/providers/on-chain-quote-provider.d.ts +17 -17
- package/build/module/providers/pool-provider.d.ts +4 -4
- package/build/module/providers/provider.d.ts +2 -2
- package/build/module/providers/simulation-provider.d.ts +1 -1
- package/build/module/providers/subgraph-provider.d.ts +2 -2
- package/build/module/providers/subgraph-provider.js +1 -1
- package/build/module/providers/swap-router-provider.d.ts +1 -1
- package/build/module/providers/tenderly-simulation-provider.d.ts +5 -5
- package/build/module/providers/token-fee-fetcher.d.ts +3 -3
- package/build/module/providers/token-properties-provider.d.ts +3 -3
- package/build/module/providers/token-provider.d.ts +2 -2
- package/build/module/providers/token-provider.js +3 -3
- package/build/module/providers/v2/pool-provider.d.ts +2 -2
- package/build/module/providers/v2/quote-provider.d.ts +2 -2
- package/build/module/providers/v2/subgraph-provider.d.ts +1 -1
- package/build/module/providers/v2/subgraph-provider.js +1 -1
- package/build/module/providers/v3/gas-data-provider.d.ts +1 -1
- package/build/module/providers/v3/pool-provider.d.ts +5 -5
- package/build/module/providers/v3/subgraph-provider.d.ts +1 -1
- package/build/module/providers/v4/euler-swap-hooks-subgraph-provider.js +1 -1
- package/build/module/providers/v4/pool-provider.d.ts +5 -5
- package/build/module/providers/v4/subgraph-provider.d.ts +1 -1
- package/build/module/routers/alpha-router/alpha-router.d.ts +3 -3
- package/build/module/routers/alpha-router/entities/route-with-valid-quote.d.ts +9 -9
- package/build/module/routers/alpha-router/entities/route-with-valid-quote.js +12 -12
- package/build/module/routers/alpha-router/functions/best-swap-route.d.ts +1 -1
- package/build/module/routers/alpha-router/functions/get-candidate-pools.d.ts +14 -14
- package/build/module/routers/alpha-router/gas-models/gas-model.d.ts +7 -7
- package/build/module/routers/alpha-router/gas-models/gas-model.js +2 -2
- package/build/module/routers/legacy-router/bases.d.ts +1 -1
- package/build/module/routers/legacy-router/legacy-router.d.ts +2 -2
- package/build/module/routers/router.d.ts +14 -14
- package/build/module/tsconfig.module.tsbuildinfo +1 -1
- package/build/module/types/other/commons.d.ts +4 -4
- package/build/module/types/other/factories/Erc20__factory.d.ts +1 -1
- package/build/module/types/other/factories/Erc20__factory.js +1 -1
- package/build/module/types/other/factories/GasDataArbitrum__factory.d.ts +1 -1
- package/build/module/types/other/factories/GasDataArbitrum__factory.js +1 -1
- package/build/module/types/other/factories/IMixedRouteQuoterV1__factory.d.ts +1 -1
- package/build/module/types/other/factories/IMixedRouteQuoterV1__factory.js +1 -1
- package/build/module/types/other/factories/ITokenValidator__factory.d.ts +1 -1
- package/build/module/types/other/factories/ITokenValidator__factory.js +1 -1
- package/build/module/types/other/factories/MixedRouteQuoterV2__factory.d.ts +1 -1
- package/build/module/types/other/factories/MixedRouteQuoterV2__factory.js +1 -1
- package/build/module/types/other/factories/Permit2__factory.d.ts +2 -2
- package/build/module/types/other/factories/Permit2__factory.js +9 -4
- package/build/module/types/other/factories/StateView__factory.d.ts +1 -1
- package/build/module/types/other/factories/StateView__factory.js +1 -1
- package/build/module/types/other/factories/SwapRouter02__factory.d.ts +2 -2
- package/build/module/types/other/factories/SwapRouter02__factory.js +9 -4
- package/build/module/types/other/factories/TokenFeeDetector__factory.d.ts +1 -1
- package/build/module/types/other/factories/TokenFeeDetector__factory.js +1 -1
- package/build/module/types/other/factories/V4Quoter__factory.d.ts +1 -1
- package/build/module/types/other/factories/V4Quoter__factory.js +1 -1
- package/build/module/types/v2/commons.d.ts +4 -4
- package/build/module/types/v2/factories/IUniswapV2Pair__factory.d.ts +1 -1
- package/build/module/types/v2/factories/IUniswapV2Pair__factory.js +1 -1
- package/build/module/types/v3/commons.d.ts +4 -4
- package/build/module/types/v3/factories/IERC20Metadata__factory.d.ts +1 -1
- package/build/module/types/v3/factories/IERC20Metadata__factory.js +1 -1
- package/build/module/types/v3/factories/IQuoterV2__factory.d.ts +1 -1
- package/build/module/types/v3/factories/IQuoterV2__factory.js +1 -1
- package/build/module/types/v3/factories/IUniswapV3PoolState__factory.d.ts +1 -1
- package/build/module/types/v3/factories/IUniswapV3PoolState__factory.js +1 -1
- package/build/module/types/v3/factories/UniswapInterfaceMulticall__factory.d.ts +2 -2
- package/build/module/types/v3/factories/UniswapInterfaceMulticall__factory.js +9 -4
- package/build/module/util/addresses.d.ts +1 -1
- package/build/module/util/onchainQuoteProviderConfigs.d.ts +1 -1
- package/package.json +6 -6
|
@@ -20,8 +20,8 @@ export declare class V2Route extends V2RouteRaw<Token, Token> {
|
|
|
20
20
|
export declare class MixedRoute extends MixedRouteSDK<Currency, Currency> {
|
|
21
21
|
protocol: Protocol.MIXED;
|
|
22
22
|
}
|
|
23
|
-
export
|
|
24
|
-
export
|
|
23
|
+
export type SupportedRoutes = V4Route | V3Route | V2Route | MixedRoute;
|
|
24
|
+
export type SwapRoute = {
|
|
25
25
|
/**
|
|
26
26
|
* The quote for the swap.
|
|
27
27
|
* For EXACT_IN swaps this will be an amount of token out.
|
|
@@ -95,10 +95,10 @@ export declare type SwapRoute = {
|
|
|
95
95
|
*/
|
|
96
96
|
portionAmount?: CurrencyAmount;
|
|
97
97
|
};
|
|
98
|
-
export
|
|
98
|
+
export type MethodParameters = SDKMethodParameters & {
|
|
99
99
|
to: string;
|
|
100
100
|
};
|
|
101
|
-
export
|
|
101
|
+
export type SwapToRatioRoute = SwapRoute & {
|
|
102
102
|
optimalRatio: Fraction;
|
|
103
103
|
postSwapTargetPool: Pool;
|
|
104
104
|
};
|
|
@@ -107,30 +107,30 @@ export declare enum SwapToRatioStatus {
|
|
|
107
107
|
NO_ROUTE_FOUND = 2,
|
|
108
108
|
NO_SWAP_NEEDED = 3
|
|
109
109
|
}
|
|
110
|
-
export
|
|
110
|
+
export type SwapToRatioSuccess = {
|
|
111
111
|
status: SwapToRatioStatus.SUCCESS;
|
|
112
112
|
result: SwapToRatioRoute;
|
|
113
113
|
};
|
|
114
|
-
export
|
|
114
|
+
export type SwapToRatioFail = {
|
|
115
115
|
status: SwapToRatioStatus.NO_ROUTE_FOUND;
|
|
116
116
|
error: string;
|
|
117
117
|
};
|
|
118
|
-
export
|
|
118
|
+
export type SwapToRatioNoSwapNeeded = {
|
|
119
119
|
status: SwapToRatioStatus.NO_SWAP_NEEDED;
|
|
120
120
|
};
|
|
121
|
-
export
|
|
121
|
+
export type SwapToRatioResponse = SwapToRatioSuccess | SwapToRatioFail | SwapToRatioNoSwapNeeded;
|
|
122
122
|
export declare enum SwapType {
|
|
123
123
|
UNIVERSAL_ROUTER = 0,
|
|
124
124
|
SWAP_ROUTER_02 = 1
|
|
125
125
|
}
|
|
126
|
-
export
|
|
126
|
+
export type SwapOptionsUniversalRouter = UniversalRouterSwapOptions & {
|
|
127
127
|
type: SwapType.UNIVERSAL_ROUTER;
|
|
128
128
|
version: UniversalRouterVersion;
|
|
129
129
|
simulate?: {
|
|
130
130
|
fromAddress: string;
|
|
131
131
|
};
|
|
132
132
|
};
|
|
133
|
-
export
|
|
133
|
+
export type SwapOptionsSwapRouter02 = {
|
|
134
134
|
type: SwapType.SWAP_ROUTER_02;
|
|
135
135
|
recipient: string;
|
|
136
136
|
slippageTolerance: Percent;
|
|
@@ -150,16 +150,16 @@ export declare type SwapOptionsSwapRouter02 = {
|
|
|
150
150
|
expiry: string;
|
|
151
151
|
});
|
|
152
152
|
};
|
|
153
|
-
export
|
|
154
|
-
export
|
|
153
|
+
export type SwapOptions = SwapOptionsUniversalRouter | SwapOptionsSwapRouter02;
|
|
154
|
+
export type SwapAndAddConfig = {
|
|
155
155
|
maxIterations: number;
|
|
156
156
|
ratioErrorTolerance: Fraction;
|
|
157
157
|
};
|
|
158
|
-
export
|
|
158
|
+
export type SwapAndAddOptions = {
|
|
159
159
|
swapOptions: SwapOptionsSwapRouter02;
|
|
160
160
|
addLiquidityOptions: CondensedAddLiquidityOptions;
|
|
161
161
|
};
|
|
162
|
-
export
|
|
162
|
+
export type SwapAndAddParameters = {
|
|
163
163
|
initialBalanceTokenIn: CurrencyAmount;
|
|
164
164
|
initialBalanceTokenOut: CurrencyAmount;
|
|
165
165
|
preLiquidityPosition: Position;
|