@cowprotocol/cow-sdk 6.0.0-RC.9 → 6.0.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/README.md +3 -1
- package/dist/README.md +3 -1
- package/dist/bridging/BridgingSdk/BridgingSdk.d.ts +87 -63
- package/dist/bridging/BridgingSdk/findBridgeProviderFromHook.d.ts +2 -0
- package/dist/bridging/BridgingSdk/getBridgeSignedHook.d.ts +8 -0
- package/dist/bridging/BridgingSdk/getCrossChainOrder.d.ts +16 -0
- package/dist/bridging/BridgingSdk/getQuoteWithBridge.d.ts +3 -0
- package/dist/bridging/BridgingSdk/getQuoteWithoutBridge.d.ts +7 -7
- package/dist/bridging/BridgingSdk/mock/bridgeRequestMocks.d.ts +20 -0
- package/dist/bridging/BridgingSdk/types.d.ts +43 -0
- package/dist/bridging/const.d.ts +4 -2
- package/dist/bridging/errors.d.ts +22 -0
- package/dist/bridging/index.d.ts +8 -5
- package/dist/bridging/providers/across/AcrossApi.d.ts +30 -195
- package/dist/bridging/providers/across/AcrossBridgeProvider.d.ts +44 -41
- package/dist/bridging/providers/across/abi.d.ts +154 -154
- package/dist/bridging/providers/across/const/contracts.d.ts +3 -3
- package/dist/bridging/providers/across/const/interfaces.d.ts +3 -0
- package/dist/bridging/providers/across/const/misc.d.ts +2 -0
- package/dist/bridging/providers/across/const/tokens.d.ts +11 -11
- package/dist/bridging/providers/across/createAcrossDepositCall.d.ts +9 -9
- package/dist/bridging/providers/across/getDepositParams.d.ts +4 -0
- package/dist/bridging/providers/across/types.d.ts +242 -0
- package/dist/bridging/providers/across/util.d.ts +43 -39
- package/dist/bridging/providers/bungee/BungeeApi.d.ts +67 -0
- package/dist/bridging/providers/bungee/BungeeBridgeProvider.d.ts +44 -0
- package/dist/bridging/providers/bungee/abi.d.ts +203 -0
- package/dist/bridging/providers/bungee/const/contracts.d.ts +4 -0
- package/dist/bridging/providers/bungee/const/misc.d.ts +8 -0
- package/dist/bridging/providers/bungee/createBungeeDepositCall.d.ts +7 -0
- package/dist/bridging/providers/bungee/getBridgingStatusFromEvents.d.ts +3 -0
- package/dist/bridging/providers/bungee/types.d.ts +267 -0
- package/dist/bridging/providers/bungee/util.d.ts +62 -0
- package/dist/bridging/providers/mock/MockBridgeProvider.d.ts +26 -20
- package/dist/bridging/providers/utils/getGasLimitEstimationForHook.d.ts +4 -0
- package/dist/bridging/types.d.ts +323 -251
- package/dist/bridging/utils.d.ts +9 -6
- package/dist/chains/const/index.d.ts +25 -25
- package/dist/chains/const/path.d.ts +1 -1
- package/dist/chains/details/arbitrum.d.ts +7 -7
- package/dist/chains/details/avalanche.d.ts +2 -0
- package/dist/chains/details/base.d.ts +7 -7
- package/dist/chains/details/gnosis.d.ts +7 -7
- package/dist/chains/details/index.d.ts +8 -0
- package/dist/chains/details/mainnet.d.ts +7 -7
- package/dist/chains/details/optimism.d.ts +2 -2
- package/dist/chains/details/polygon.d.ts +2 -2
- package/dist/chains/details/sepolia.d.ts +7 -7
- package/dist/chains/index.d.ts +4 -3
- package/dist/chains/types.d.ts +127 -122
- package/dist/chains/utils.d.ts +18 -18
- package/dist/common/consts/config.d.ts +9 -9
- package/dist/common/consts/contracts.d.ts +43 -34
- package/dist/common/consts/ipfs.d.ts +2 -2
- package/dist/common/consts/order.d.ts +1 -0
- package/dist/common/consts/path.d.ts +1 -1
- package/dist/common/consts/tokens.d.ts +9 -9
- package/dist/common/generated/CoWShed.d.ts +219 -219
- package/dist/common/generated/CoWShedFactory.d.ts +191 -191
- package/dist/common/generated/ComposableCoW.d.ts +340 -340
- package/dist/common/generated/EthFlow.d.ts +117 -117
- package/dist/common/generated/ExtensibleFallbackHandler.d.ts +282 -282
- package/dist/common/generated/GPv2Settlement.d.ts +107 -107
- package/dist/common/generated/TWAP.d.ts +141 -141
- package/dist/common/generated/common.d.ts +21 -21
- package/dist/common/generated/factories/CoWShedFactory__factory.d.ts +250 -250
- package/dist/common/generated/factories/CoWShed__factory.d.ts +254 -254
- package/dist/common/generated/factories/ComposableCoW__factory.d.ts +475 -475
- package/dist/common/generated/factories/EthFlow__factory.d.ts +124 -124
- package/dist/common/generated/factories/ExtensibleFallbackHandler__factory.d.ts +389 -389
- package/dist/common/generated/factories/GPv2Settlement__factory.d.ts +81 -81
- package/dist/common/generated/factories/TWAP__factory.d.ts +260 -260
- package/dist/common/generated/factories/index.d.ts +7 -7
- package/dist/common/generated/index.d.ts +15 -15
- package/dist/common/index.d.ts +12 -10
- package/dist/common/types/config.d.ts +70 -70
- package/dist/common/types/cow-error.d.ts +4 -4
- package/dist/common/types/ethereum.d.ts +5 -5
- package/dist/common/types/tokens.d.ts +12 -12
- package/dist/common/types/wallets.d.ts +5 -5
- package/dist/common/utils/common.d.ts +1 -0
- package/dist/common/utils/config.d.ts +4 -4
- package/dist/common/utils/log.d.ts +2 -0
- package/dist/common/utils/math.d.ts +19 -0
- package/dist/common/utils/order.d.ts +4 -0
- package/dist/common/utils/serialize.d.ts +1 -1
- package/dist/common/utils/wallet.d.ts +3 -3
- package/dist/composable/ConditionalOrder.d.ts +206 -206
- package/dist/composable/ConditionalOrderFactory.d.ts +19 -19
- package/dist/composable/Multiplexer.d.ts +174 -174
- package/dist/composable/contracts.d.ts +6 -6
- package/dist/composable/generated/ComposableCoW.d.ts +340 -340
- package/dist/composable/generated/ExtensibleFallbackHandler.d.ts +282 -282
- package/dist/composable/generated/TWAP.d.ts +141 -141
- package/dist/composable/generated/common.d.ts +21 -21
- package/dist/composable/generated/factories/ComposableCoW__factory.d.ts +475 -475
- package/dist/composable/generated/factories/ExtensibleFallbackHandler__factory.d.ts +389 -389
- package/dist/composable/generated/factories/TWAP__factory.d.ts +260 -260
- package/dist/composable/generated/factories/index.d.ts +3 -3
- package/dist/composable/generated/index.d.ts +7 -7
- package/dist/composable/index.d.ts +6 -6
- package/dist/composable/orderTypes/Twap.d.ts +242 -242
- package/dist/composable/orderTypes/index.d.ts +3 -3
- package/dist/composable/orderTypes/test/TestConditionalOrder.d.ts +25 -25
- package/dist/composable/types.d.ts +133 -133
- package/dist/composable/utils.d.ts +37 -37
- package/dist/cow-shed/CowShedSdk.d.ts +74 -69
- package/dist/cow-shed/contracts/CoWShedHooks.d.ts +47 -45
- package/dist/cow-shed/contracts/utils.d.ts +4 -4
- package/dist/cow-shed/index.d.ts +3 -2
- package/dist/cow-shed/types.d.ts +17 -17
- package/dist/hooks/utils.d.ts +3 -2
- package/dist/index-847d9333.js +29 -0
- package/dist/index-847d9333.js.map +1 -0
- package/dist/index.d.ts +11 -10
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.mjs +1 -1
- package/dist/index.module.js +4 -4
- package/dist/index.module.js.map +1 -1
- package/dist/order-book/api.d.ts +235 -235
- package/dist/order-book/generated/index.d.ts +55 -55
- package/dist/order-book/generated/models/Address.d.ts +4 -4
- package/dist/order-book/generated/models/AppData.d.ts +7 -7
- package/dist/order-book/generated/models/AppDataHash.d.ts +6 -6
- package/dist/order-book/generated/models/AppDataObject.d.ts +7 -7
- package/dist/order-book/generated/models/Auction.d.ts +30 -30
- package/dist/order-book/generated/models/AuctionOrder.d.ts +92 -92
- package/dist/order-book/generated/models/AuctionPrices.d.ts +6 -6
- package/dist/order-book/generated/models/BigUint.d.ts +4 -4
- package/dist/order-book/generated/models/BuyTokenDestination.d.ts +7 -7
- package/dist/order-book/generated/models/CallData.d.ts +4 -4
- package/dist/order-book/generated/models/CompetitionAuction.d.ts +14 -14
- package/dist/order-book/generated/models/CompetitionOrderStatus.d.ts +29 -29
- package/dist/order-book/generated/models/EcdsaSignature.d.ts +4 -4
- package/dist/order-book/generated/models/EcdsaSigningScheme.d.ts +7 -7
- package/dist/order-book/generated/models/EthflowData.d.ts +20 -20
- package/dist/order-book/generated/models/ExecutedAmounts.d.ts +5 -5
- package/dist/order-book/generated/models/ExecutedProtocolFee.d.ts +8 -8
- package/dist/order-book/generated/models/FeePolicy.d.ts +7 -7
- package/dist/order-book/generated/models/InteractionData.d.ts +11 -11
- package/dist/order-book/generated/models/NativePriceResponse.d.ts +10 -10
- package/dist/order-book/generated/models/OnchainOrderData.d.ts +24 -24
- package/dist/order-book/generated/models/Order.d.ts +3 -3
- package/dist/order-book/generated/models/OrderCancellation.d.ts +14 -14
- package/dist/order-book/generated/models/OrderCancellationError.d.ts +15 -15
- package/dist/order-book/generated/models/OrderCancellations.d.ts +18 -18
- package/dist/order-book/generated/models/OrderClass.d.ts +8 -8
- package/dist/order-book/generated/models/OrderCreation.d.ts +80 -80
- package/dist/order-book/generated/models/OrderKind.d.ts +7 -7
- package/dist/order-book/generated/models/OrderMetaData.d.ts +100 -100
- package/dist/order-book/generated/models/OrderParameters.d.ts +53 -53
- package/dist/order-book/generated/models/OrderPostError.d.ts +35 -35
- package/dist/order-book/generated/models/OrderQuoteRequest.d.ts +58 -58
- package/dist/order-book/generated/models/OrderQuoteResponse.d.ts +27 -27
- package/dist/order-book/generated/models/OrderQuoteSide.d.ts +26 -26
- package/dist/order-book/generated/models/OrderQuoteSideKindBuy.d.ts +3 -3
- package/dist/order-book/generated/models/OrderQuoteSideKindSell.d.ts +3 -3
- package/dist/order-book/generated/models/OrderQuoteValidity.d.ts +14 -14
- package/dist/order-book/generated/models/OrderStatus.d.ts +10 -10
- package/dist/order-book/generated/models/PreSignature.d.ts +4 -4
- package/dist/order-book/generated/models/PriceEstimationError.d.ts +12 -12
- package/dist/order-book/generated/models/PriceImprovement.d.ts +12 -12
- package/dist/order-book/generated/models/PriceQuality.d.ts +16 -16
- package/dist/order-book/generated/models/Quote.d.ts +19 -19
- package/dist/order-book/generated/models/SellTokenSource.d.ts +8 -8
- package/dist/order-book/generated/models/Signature.d.ts +6 -6
- package/dist/order-book/generated/models/SigningScheme.d.ts +9 -9
- package/dist/order-book/generated/models/SolverCompetitionResponse.d.ts +30 -30
- package/dist/order-book/generated/models/SolverSettlement.d.ts +47 -47
- package/dist/order-book/generated/models/Surplus.d.ts +7 -7
- package/dist/order-book/generated/models/TokenAmount.d.ts +4 -4
- package/dist/order-book/generated/models/TotalSurplus.d.ts +10 -10
- package/dist/order-book/generated/models/Trade.d.ts +57 -57
- package/dist/order-book/generated/models/TransactionHash.d.ts +4 -4
- package/dist/order-book/generated/models/UID.d.ts +8 -8
- package/dist/order-book/generated/models/Volume.d.ts +6 -6
- package/dist/order-book/index.d.ts +5 -5
- package/dist/order-book/mock.d.ts +63 -63
- package/dist/order-book/quoteAmountsAndCostsUtils.d.ts +35 -22
- package/dist/order-book/request.d.ts +49 -49
- package/dist/order-book/transformOrder.d.ts +10 -10
- package/dist/order-book/types.d.ts +74 -74
- package/dist/order-signing/index.d.ts +2 -2
- package/dist/order-signing/orderSigningUtils.d.ts +97 -97
- package/dist/order-signing/types.d.ts +55 -55
- package/dist/order-signing/utils.d.ts +49 -49
- package/dist/package.json +31 -32
- package/dist/schemas/trading/LimitOrderAdvancedSettings.ts +151 -12
- package/dist/schemas/trading/LimitTradeParameters.ts +136 -15
- package/dist/schemas/trading/QuoteResultsSerialized.ts +292 -27
- package/dist/schemas/trading/QuoterParameters.ts +10 -0
- package/dist/schemas/trading/SwapAdvancedSettings.ts +331 -12
- package/dist/schemas/trading/TradeParameters.ts +136 -15
- package/dist/src/trading/README.md +99 -7
- package/dist/subgraph/api.d.ts +77 -77
- package/dist/subgraph/graphql.d.ts +3203 -3203
- package/dist/subgraph/index.d.ts +1 -1
- package/dist/subgraph/queries.d.ts +14 -14
- package/dist/test/utils.d.ts +1 -0
- package/dist/trading/appDataUtils.d.ts +5 -4
- package/dist/trading/calculateUniqueOrderId.d.ts +5 -5
- package/dist/trading/consts.d.ts +6 -14
- package/dist/trading/getEthFlowTransaction.d.ts +12 -7
- package/dist/trading/getOrderToSign.d.ts +11 -8
- package/dist/trading/getOrderTypedData.d.ts +4 -4
- package/dist/trading/getPreSignTransaction.d.ts +4 -4
- package/dist/trading/getQuote.d.ts +26 -14
- package/dist/trading/index.d.ts +21 -19
- package/dist/trading/postCoWProtocolTrade.d.ts +4 -4
- package/dist/trading/postLimitOrder.d.ts +3 -3
- package/dist/trading/postSellNativeCurrencyOrder.d.ts +4 -7
- package/dist/trading/postSwapOrder.d.ts +5 -5
- package/dist/trading/suggestSlippageBps.d.ts +13 -0
- package/dist/trading/suggestSlippageFromFee.d.ts +19 -0
- package/dist/trading/suggestSlippageFromVolume.d.ts +10 -0
- package/dist/trading/tradingSdk.d.ts +26 -26
- package/dist/trading/types.d.ts +221 -190
- package/dist/trading/utils/getPartnerFeeBps.d.ts +2 -0
- package/dist/trading/{utils.d.ts → utils/misc.d.ts} +27 -27
- package/dist/trading/utils/slippage.d.ts +16 -0
- package/dist/utils-09dadb80.js +2 -0
- package/dist/utils-09dadb80.js.map +1 -0
- package/dist/utils-0ff3f95e.js +2 -0
- package/dist/utils-0ff3f95e.js.map +1 -0
- package/dist/utils-ddcfac77.js +2 -0
- package/dist/utils-ddcfac77.js.map +1 -0
- package/dist/utils.d.ts +3 -3
- package/dist/weiroll/index.d.ts +23 -23
- package/package.json +31 -32
- package/dist/bridging/BridgingSdk/getErc20Decimals.d.ts +0 -4
- package/dist/bridging/BridgingSdk/getQuoteWithBridging.d.ts +0 -9
- package/dist/index-317c25f1.js +0 -29
- package/dist/index-317c25f1.js.map +0 -1
- package/dist/utils-204a9cbe.js +0 -2
- package/dist/utils-204a9cbe.js.map +0 -1
- package/dist/utils-762ee9c3.js +0 -2
- package/dist/utils-762ee9c3.js.map +0 -1
- package/dist/utils-de2eb543.js +0 -2
- package/dist/utils-de2eb543.js.map +0 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The total surplus.
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
export type TotalSurplus = {
|
|
6
|
-
/**
|
|
7
|
-
* The total surplus.
|
|
8
|
-
*/
|
|
9
|
-
totalSurplus?: string;
|
|
10
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* The total surplus.
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export type TotalSurplus = {
|
|
6
|
+
/**
|
|
7
|
+
* The total surplus.
|
|
8
|
+
*/
|
|
9
|
+
totalSurplus?: string;
|
|
10
|
+
};
|
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import type { Address } from './Address';
|
|
2
|
-
import type { BigUint } from './BigUint';
|
|
3
|
-
import type { ExecutedProtocolFee } from './ExecutedProtocolFee';
|
|
4
|
-
import type { TokenAmount } from './TokenAmount';
|
|
5
|
-
import type { TransactionHash } from './TransactionHash';
|
|
6
|
-
import type { UID } from './UID';
|
|
7
|
-
/**
|
|
8
|
-
* Trade data such as executed amounts, fees, `orderUid` and `block` number.
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export type Trade = {
|
|
12
|
-
/**
|
|
13
|
-
* Block in which trade occurred.
|
|
14
|
-
*/
|
|
15
|
-
blockNumber: number;
|
|
16
|
-
/**
|
|
17
|
-
* Index in which transaction was included in block.
|
|
18
|
-
*/
|
|
19
|
-
logIndex: number;
|
|
20
|
-
/**
|
|
21
|
-
* UID of the order matched by this trade.
|
|
22
|
-
*/
|
|
23
|
-
orderUid: UID;
|
|
24
|
-
/**
|
|
25
|
-
* Address of trader.
|
|
26
|
-
*/
|
|
27
|
-
owner: Address;
|
|
28
|
-
/**
|
|
29
|
-
* Address of token sold.
|
|
30
|
-
*/
|
|
31
|
-
sellToken: Address;
|
|
32
|
-
/**
|
|
33
|
-
* Address of token bought.
|
|
34
|
-
*/
|
|
35
|
-
buyToken: Address;
|
|
36
|
-
/**
|
|
37
|
-
* Total amount of `sellToken` that has been executed for this trade (including fees).
|
|
38
|
-
*/
|
|
39
|
-
sellAmount: TokenAmount;
|
|
40
|
-
/**
|
|
41
|
-
* The total amount of `sellToken` that has been executed for this order without fees.
|
|
42
|
-
*/
|
|
43
|
-
sellAmountBeforeFees: BigUint;
|
|
44
|
-
/**
|
|
45
|
-
* Total amount of `buyToken` received in this trade.
|
|
46
|
-
*/
|
|
47
|
-
buyAmount: TokenAmount;
|
|
48
|
-
/**
|
|
49
|
-
* Transaction hash of the corresponding settlement transaction containing the trade (if available).
|
|
50
|
-
*/
|
|
51
|
-
txHash: TransactionHash | null;
|
|
52
|
-
/**
|
|
53
|
-
* Executed protocol fees for this trade, together with the fee policies used. Listed in the order they got applied.
|
|
54
|
-
*
|
|
55
|
-
*/
|
|
56
|
-
executedProtocolFees?: Array<ExecutedProtocolFee>;
|
|
57
|
-
};
|
|
1
|
+
import type { Address } from './Address';
|
|
2
|
+
import type { BigUint } from './BigUint';
|
|
3
|
+
import type { ExecutedProtocolFee } from './ExecutedProtocolFee';
|
|
4
|
+
import type { TokenAmount } from './TokenAmount';
|
|
5
|
+
import type { TransactionHash } from './TransactionHash';
|
|
6
|
+
import type { UID } from './UID';
|
|
7
|
+
/**
|
|
8
|
+
* Trade data such as executed amounts, fees, `orderUid` and `block` number.
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export type Trade = {
|
|
12
|
+
/**
|
|
13
|
+
* Block in which trade occurred.
|
|
14
|
+
*/
|
|
15
|
+
blockNumber: number;
|
|
16
|
+
/**
|
|
17
|
+
* Index in which transaction was included in block.
|
|
18
|
+
*/
|
|
19
|
+
logIndex: number;
|
|
20
|
+
/**
|
|
21
|
+
* UID of the order matched by this trade.
|
|
22
|
+
*/
|
|
23
|
+
orderUid: UID;
|
|
24
|
+
/**
|
|
25
|
+
* Address of trader.
|
|
26
|
+
*/
|
|
27
|
+
owner: Address;
|
|
28
|
+
/**
|
|
29
|
+
* Address of token sold.
|
|
30
|
+
*/
|
|
31
|
+
sellToken: Address;
|
|
32
|
+
/**
|
|
33
|
+
* Address of token bought.
|
|
34
|
+
*/
|
|
35
|
+
buyToken: Address;
|
|
36
|
+
/**
|
|
37
|
+
* Total amount of `sellToken` that has been executed for this trade (including fees).
|
|
38
|
+
*/
|
|
39
|
+
sellAmount: TokenAmount;
|
|
40
|
+
/**
|
|
41
|
+
* The total amount of `sellToken` that has been executed for this order without fees.
|
|
42
|
+
*/
|
|
43
|
+
sellAmountBeforeFees: BigUint;
|
|
44
|
+
/**
|
|
45
|
+
* Total amount of `buyToken` received in this trade.
|
|
46
|
+
*/
|
|
47
|
+
buyAmount: TokenAmount;
|
|
48
|
+
/**
|
|
49
|
+
* Transaction hash of the corresponding settlement transaction containing the trade (if available).
|
|
50
|
+
*/
|
|
51
|
+
txHash: TransactionHash | null;
|
|
52
|
+
/**
|
|
53
|
+
* Executed protocol fees for this trade, together with the fee policies used. Listed in the order they got applied.
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
executedProtocolFees?: Array<ExecutedProtocolFee>;
|
|
57
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 32 byte digest encoded as a hex with `0x` prefix.
|
|
3
|
-
*/
|
|
4
|
-
export type TransactionHash = string;
|
|
1
|
+
/**
|
|
2
|
+
* 32 byte digest encoded as a hex with `0x` prefix.
|
|
3
|
+
*/
|
|
4
|
+
export type TransactionHash = string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unique identifier for the order: 56 bytes encoded as hex with `0x`
|
|
3
|
-
* prefix.
|
|
4
|
-
*
|
|
5
|
-
* Bytes 0..32 are the order digest, bytes 30..52 the owner address and
|
|
6
|
-
* bytes 52..56 the expiry (`validTo`) as a `uint32` unix epoch timestamp.
|
|
7
|
-
*/
|
|
8
|
-
export type UID = string;
|
|
1
|
+
/**
|
|
2
|
+
* Unique identifier for the order: 56 bytes encoded as hex with `0x`
|
|
3
|
+
* prefix.
|
|
4
|
+
*
|
|
5
|
+
* Bytes 0..32 are the order digest, bytes 30..52 the owner address and
|
|
6
|
+
* bytes 52..56 the expiry (`validTo`) as a `uint32` unix epoch timestamp.
|
|
7
|
+
*/
|
|
8
|
+
export type UID = string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The protocol fee is taken as a percent of the order volume.
|
|
3
|
-
*/
|
|
4
|
-
export type Volume = {
|
|
5
|
-
factor: number;
|
|
6
|
-
};
|
|
1
|
+
/**
|
|
2
|
+
* The protocol fee is taken as a percent of the order volume.
|
|
3
|
+
*/
|
|
4
|
+
export type Volume = {
|
|
5
|
+
factor: number;
|
|
6
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from './api';
|
|
2
|
-
export * from './types';
|
|
3
|
-
export * from './generated';
|
|
4
|
-
export * from './request';
|
|
5
|
-
export * from './quoteAmountsAndCostsUtils';
|
|
1
|
+
export * from './api';
|
|
2
|
+
export * from './types';
|
|
3
|
+
export * from './generated';
|
|
4
|
+
export * from './request';
|
|
5
|
+
export * from './quoteAmountsAndCostsUtils';
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
export declare const AUCTION: {
|
|
2
|
-
auctionId: number;
|
|
3
|
-
transactionHash: string;
|
|
4
|
-
gasPrice: number;
|
|
5
|
-
auctionStartBlock: number;
|
|
6
|
-
liquidityCollectedBlock: number;
|
|
7
|
-
competitionSimulationBlock: number;
|
|
8
|
-
auction: {
|
|
9
|
-
orders: string[];
|
|
10
|
-
prices: {
|
|
11
|
-
'0x6b175474e89094c44da98b954eedeac495271d0f': string;
|
|
12
|
-
'0x853d955acef822db058eb8505911ed77f175b99e': string;
|
|
13
|
-
'0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48': string;
|
|
14
|
-
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2': string;
|
|
15
|
-
'0xdac17f958d2ee523a2206206994597c13d831ec7': string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
solutions: ({
|
|
19
|
-
solver: string;
|
|
20
|
-
solverAddress: string;
|
|
21
|
-
objective: {
|
|
22
|
-
total: number;
|
|
23
|
-
surplus: number;
|
|
24
|
-
fees: number;
|
|
25
|
-
cost: number;
|
|
26
|
-
gas: number;
|
|
27
|
-
};
|
|
28
|
-
scoreDiscounted: string;
|
|
29
|
-
ranking: number;
|
|
30
|
-
clearingPrices: {
|
|
31
|
-
'0x6b175474e89094c44da98b954eedeac495271d0f': string;
|
|
32
|
-
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2': string;
|
|
33
|
-
};
|
|
34
|
-
orders: {
|
|
35
|
-
id: string;
|
|
36
|
-
executedAmount: string;
|
|
37
|
-
}[];
|
|
38
|
-
callData: string;
|
|
39
|
-
score?: undefined;
|
|
40
|
-
} | {
|
|
41
|
-
solver: string;
|
|
42
|
-
solverAddress: string;
|
|
43
|
-
objective: {
|
|
44
|
-
total: number;
|
|
45
|
-
surplus: number;
|
|
46
|
-
fees: number;
|
|
47
|
-
cost: number;
|
|
48
|
-
gas: number;
|
|
49
|
-
};
|
|
50
|
-
score: string;
|
|
51
|
-
ranking: number;
|
|
52
|
-
clearingPrices: {
|
|
53
|
-
'0x6b175474e89094c44da98b954eedeac495271d0f': string;
|
|
54
|
-
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2': string;
|
|
55
|
-
};
|
|
56
|
-
orders: {
|
|
57
|
-
id: string;
|
|
58
|
-
executedAmount: string;
|
|
59
|
-
}[];
|
|
60
|
-
callData: string;
|
|
61
|
-
scoreDiscounted?: undefined;
|
|
62
|
-
})[];
|
|
63
|
-
};
|
|
1
|
+
export declare const AUCTION: {
|
|
2
|
+
auctionId: number;
|
|
3
|
+
transactionHash: string;
|
|
4
|
+
gasPrice: number;
|
|
5
|
+
auctionStartBlock: number;
|
|
6
|
+
liquidityCollectedBlock: number;
|
|
7
|
+
competitionSimulationBlock: number;
|
|
8
|
+
auction: {
|
|
9
|
+
orders: string[];
|
|
10
|
+
prices: {
|
|
11
|
+
'0x6b175474e89094c44da98b954eedeac495271d0f': string;
|
|
12
|
+
'0x853d955acef822db058eb8505911ed77f175b99e': string;
|
|
13
|
+
'0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48': string;
|
|
14
|
+
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2': string;
|
|
15
|
+
'0xdac17f958d2ee523a2206206994597c13d831ec7': string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
solutions: ({
|
|
19
|
+
solver: string;
|
|
20
|
+
solverAddress: string;
|
|
21
|
+
objective: {
|
|
22
|
+
total: number;
|
|
23
|
+
surplus: number;
|
|
24
|
+
fees: number;
|
|
25
|
+
cost: number;
|
|
26
|
+
gas: number;
|
|
27
|
+
};
|
|
28
|
+
scoreDiscounted: string;
|
|
29
|
+
ranking: number;
|
|
30
|
+
clearingPrices: {
|
|
31
|
+
'0x6b175474e89094c44da98b954eedeac495271d0f': string;
|
|
32
|
+
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2': string;
|
|
33
|
+
};
|
|
34
|
+
orders: {
|
|
35
|
+
id: string;
|
|
36
|
+
executedAmount: string;
|
|
37
|
+
}[];
|
|
38
|
+
callData: string;
|
|
39
|
+
score?: undefined;
|
|
40
|
+
} | {
|
|
41
|
+
solver: string;
|
|
42
|
+
solverAddress: string;
|
|
43
|
+
objective: {
|
|
44
|
+
total: number;
|
|
45
|
+
surplus: number;
|
|
46
|
+
fees: number;
|
|
47
|
+
cost: number;
|
|
48
|
+
gas: number;
|
|
49
|
+
};
|
|
50
|
+
score: string;
|
|
51
|
+
ranking: number;
|
|
52
|
+
clearingPrices: {
|
|
53
|
+
'0x6b175474e89094c44da98b954eedeac495271d0f': string;
|
|
54
|
+
'0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2': string;
|
|
55
|
+
};
|
|
56
|
+
orders: {
|
|
57
|
+
id: string;
|
|
58
|
+
executedAmount: string;
|
|
59
|
+
}[];
|
|
60
|
+
callData: string;
|
|
61
|
+
scoreDiscounted?: undefined;
|
|
62
|
+
})[];
|
|
63
|
+
};
|
|
@@ -1,22 +1,35 @@
|
|
|
1
|
-
import { QuoteAmountsAndCosts } from './types';
|
|
2
|
-
import { type OrderParameters } from './generated';
|
|
3
|
-
export interface QuoteAmountsAndCostsParams {
|
|
4
|
-
orderParams: OrderParameters;
|
|
5
|
-
sellDecimals: number;
|
|
6
|
-
buyDecimals: number;
|
|
7
|
-
slippagePercentBps: number;
|
|
8
|
-
partnerFeeBps: number | undefined;
|
|
9
|
-
}
|
|
10
|
-
export declare function
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
1
|
+
import { QuoteAmountsAndCosts } from './types';
|
|
2
|
+
import { type OrderParameters } from './generated';
|
|
3
|
+
export interface QuoteAmountsAndCostsParams {
|
|
4
|
+
orderParams: OrderParameters;
|
|
5
|
+
sellDecimals: number;
|
|
6
|
+
buyDecimals: number;
|
|
7
|
+
slippagePercentBps: number;
|
|
8
|
+
partnerFeeBps: number | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function getQuoteAmountsWithCosts(params: {
|
|
11
|
+
sellDecimals: number;
|
|
12
|
+
buyDecimals: number;
|
|
13
|
+
orderParams: OrderParameters;
|
|
14
|
+
}): {
|
|
15
|
+
isSell: boolean;
|
|
16
|
+
quotePrice: number;
|
|
17
|
+
sellAmountAfterNetworkCosts: bigint;
|
|
18
|
+
buyAmountAfterNetworkCosts: bigint;
|
|
19
|
+
buyAmountBeforeNetworkCosts: bigint;
|
|
20
|
+
networkCostAmount: bigint;
|
|
21
|
+
sellAmountBeforeNetworkCosts: bigint;
|
|
22
|
+
};
|
|
23
|
+
export declare function getQuoteAmountsAndCosts(params: QuoteAmountsAndCostsParams): QuoteAmountsAndCosts;
|
|
24
|
+
type BigNumber = {
|
|
25
|
+
big: bigint;
|
|
26
|
+
num: number;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* BigInt works well with subtraction and addition, but it's not very good with multiplication and division
|
|
30
|
+
* To multiply/divide token amounts we have to convert them to numbers, but we have to be careful with precision
|
|
31
|
+
* @param value
|
|
32
|
+
* @param decimals
|
|
33
|
+
*/
|
|
34
|
+
export declare function getBigNumber(value: string | bigint | number, decimals: number): BigNumber;
|
|
35
|
+
export {};
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { BackoffOptions } from 'exponential-backoff';
|
|
2
|
-
import { RateLimiter, RateLimiterOpts } from 'limiter';
|
|
3
|
-
/**
|
|
4
|
-
* Error thrown when the CoW Protocol OrderBook API returns an error.
|
|
5
|
-
*/
|
|
6
|
-
export declare class OrderBookApiError<T = unknown> extends Error {
|
|
7
|
-
readonly response: Response;
|
|
8
|
-
readonly body: T;
|
|
9
|
-
/**
|
|
10
|
-
* Error thrown when the CoW Protocol OrderBook API returns an error.
|
|
11
|
-
* @param response The response from the CoW Protocol OrderBook API.
|
|
12
|
-
* @param body The body of the response.
|
|
13
|
-
* @constructor
|
|
14
|
-
*/
|
|
15
|
-
constructor(response: Response, body: T);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The default backoff options for CoW Protocol's API
|
|
19
|
-
* @see {@link Backoff configuration: https://www.npmjs.com/package/@insertish/exponential-backoff}
|
|
20
|
-
*/
|
|
21
|
-
export declare const DEFAULT_BACKOFF_OPTIONS: BackoffOptions;
|
|
22
|
-
/**
|
|
23
|
-
* The default rate limiter options for CoW Protocol's API.
|
|
24
|
-
*
|
|
25
|
-
* **CAUTION**: The CoW Protocol OrderBook API is limited to 5 requests per second per IP.
|
|
26
|
-
*/
|
|
27
|
-
export declare const DEFAULT_LIMITER_OPTIONS: RateLimiterOpts;
|
|
28
|
-
/**
|
|
29
|
-
* Describe the parameters for a fetch request.
|
|
30
|
-
*/
|
|
31
|
-
export interface FetchParams {
|
|
32
|
-
path: string;
|
|
33
|
-
method: 'GET' | 'POST' | 'DELETE' | 'PUT';
|
|
34
|
-
body?: unknown;
|
|
35
|
-
query?: URLSearchParams;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Helper function to make a rate-limited request to an API.
|
|
39
|
-
* @param baseUrl The base URL of the API.
|
|
40
|
-
* @param path The path of the request.
|
|
41
|
-
* @param query The query parameters of the request.
|
|
42
|
-
* @param method The HTTP method of the request.
|
|
43
|
-
* @param body The body of the request.
|
|
44
|
-
* @param rateLimiter The rate limiter to use.
|
|
45
|
-
* @param backoffOpts The backoff options to use.
|
|
46
|
-
* @returns The response of the request.
|
|
47
|
-
* @throws If the API returns an error or if the request fails.
|
|
48
|
-
*/
|
|
49
|
-
export declare function request<T>(baseUrl: string, { path, query, method, body }: FetchParams, rateLimiter: RateLimiter, backoffOpts: BackoffOptions): Promise<T>;
|
|
1
|
+
import { BackoffOptions } from 'exponential-backoff';
|
|
2
|
+
import { RateLimiter, RateLimiterOpts } from 'limiter';
|
|
3
|
+
/**
|
|
4
|
+
* Error thrown when the CoW Protocol OrderBook API returns an error.
|
|
5
|
+
*/
|
|
6
|
+
export declare class OrderBookApiError<T = unknown> extends Error {
|
|
7
|
+
readonly response: Response;
|
|
8
|
+
readonly body: T;
|
|
9
|
+
/**
|
|
10
|
+
* Error thrown when the CoW Protocol OrderBook API returns an error.
|
|
11
|
+
* @param response The response from the CoW Protocol OrderBook API.
|
|
12
|
+
* @param body The body of the response.
|
|
13
|
+
* @constructor
|
|
14
|
+
*/
|
|
15
|
+
constructor(response: Response, body: T);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The default backoff options for CoW Protocol's API
|
|
19
|
+
* @see {@link Backoff configuration: https://www.npmjs.com/package/@insertish/exponential-backoff}
|
|
20
|
+
*/
|
|
21
|
+
export declare const DEFAULT_BACKOFF_OPTIONS: BackoffOptions;
|
|
22
|
+
/**
|
|
23
|
+
* The default rate limiter options for CoW Protocol's API.
|
|
24
|
+
*
|
|
25
|
+
* **CAUTION**: The CoW Protocol OrderBook API is limited to 5 requests per second per IP.
|
|
26
|
+
*/
|
|
27
|
+
export declare const DEFAULT_LIMITER_OPTIONS: RateLimiterOpts;
|
|
28
|
+
/**
|
|
29
|
+
* Describe the parameters for a fetch request.
|
|
30
|
+
*/
|
|
31
|
+
export interface FetchParams {
|
|
32
|
+
path: string;
|
|
33
|
+
method: 'GET' | 'POST' | 'DELETE' | 'PUT';
|
|
34
|
+
body?: unknown;
|
|
35
|
+
query?: URLSearchParams;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Helper function to make a rate-limited request to an API.
|
|
39
|
+
* @param baseUrl The base URL of the API.
|
|
40
|
+
* @param path The path of the request.
|
|
41
|
+
* @param query The query parameters of the request.
|
|
42
|
+
* @param method The HTTP method of the request.
|
|
43
|
+
* @param body The body of the request.
|
|
44
|
+
* @param rateLimiter The rate limiter to use.
|
|
45
|
+
* @param backoffOpts The backoff options to use.
|
|
46
|
+
* @returns The response of the request.
|
|
47
|
+
* @throws If the API returns an error or if the request fails.
|
|
48
|
+
*/
|
|
49
|
+
export declare function request<T>(baseUrl: string, { path, query, method, body }: FetchParams, rateLimiter: RateLimiter, backoffOpts: BackoffOptions): Promise<T>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Order } from './generated';
|
|
2
|
-
import { EnrichedOrder } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Apply programmatic transformations to an order.
|
|
5
|
-
*
|
|
6
|
-
* For example, transformations may be applied to an order to recognise it as a Native EthFlow order.
|
|
7
|
-
* @param order to apply transformations to
|
|
8
|
-
* @returns An order with the total fee added.
|
|
9
|
-
*/
|
|
10
|
-
export declare function transformOrder(order: Order): EnrichedOrder;
|
|
1
|
+
import { Order } from './generated';
|
|
2
|
+
import { EnrichedOrder } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Apply programmatic transformations to an order.
|
|
5
|
+
*
|
|
6
|
+
* For example, transformations may be applied to an order to recognise it as a Native EthFlow order.
|
|
7
|
+
* @param order to apply transformations to
|
|
8
|
+
* @returns An order with the total fee added.
|
|
9
|
+
*/
|
|
10
|
+
export declare function transformOrder(order: Order): EnrichedOrder;
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { Order } from './generated';
|
|
2
|
-
/**
|
|
3
|
-
* An order with the total fee added.
|
|
4
|
-
*/
|
|
5
|
-
export interface EnrichedOrder extends Order {
|
|
6
|
-
totalFee: string;
|
|
7
|
-
}
|
|
8
|
-
export interface Amounts<T> {
|
|
9
|
-
sellAmount: T;
|
|
10
|
-
buyAmount: T;
|
|
11
|
-
}
|
|
12
|
-
export interface Costs<T> {
|
|
13
|
-
networkFee: {
|
|
14
|
-
amountInSellCurrency: T;
|
|
15
|
-
amountInBuyCurrency: T;
|
|
16
|
-
};
|
|
17
|
-
partnerFee: {
|
|
18
|
-
amount: T;
|
|
19
|
-
bps: number;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Details about costs and amounts, costs and fees of a quote.
|
|
24
|
-
*
|
|
25
|
-
* CoW Protocol quote has amounts (sell/buy) and costs (network fee), there is also partner fees.
|
|
26
|
-
* Besides that, CoW Protocol supports both sell and buy orders and the fees and costs are calculated differently.
|
|
27
|
-
*
|
|
28
|
-
* The order of adding fees and costs is as follows:
|
|
29
|
-
* 1. Network fee is always added to the sell amount
|
|
30
|
-
* 2. Partner fee is added to the surplus amount (sell amount for sell-orders, buy amount for buy-orders)
|
|
31
|
-
*
|
|
32
|
-
* For sell-orders the partner fee is subtracted from the buy amount after network costs.
|
|
33
|
-
* For buy-orders the partner fee is added on top of the sell amount after network costs.
|
|
34
|
-
*/
|
|
35
|
-
export interface QuoteAmountsAndCosts<T = bigint> {
|
|
36
|
-
/**
|
|
37
|
-
* Whether the quote is a sell or buy order.
|
|
38
|
-
*/
|
|
39
|
-
isSell: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Estimated costs of settling the order.
|
|
42
|
-
*
|
|
43
|
-
* Costs are only payed if the order is executed. They cover the concept of gas costs to pay the solver for settling
|
|
44
|
-
* your order onchain for you.
|
|
45
|
-
*
|
|
46
|
-
* They are payed in the sell token although for convenience, the costs data includes also the buy token
|
|
47
|
-
* so UIs can decide how to show it to the user.
|
|
48
|
-
*/
|
|
49
|
-
costs: Costs<T>;
|
|
50
|
-
/**
|
|
51
|
-
* Amounts before network costs. This amount could be shown to the user to reflect how much they are expected to get
|
|
52
|
-
* before applying any costs or fees (if costs and fees are displayed separately).
|
|
53
|
-
*/
|
|
54
|
-
beforeNetworkCosts: Amounts<T>;
|
|
55
|
-
/**
|
|
56
|
-
* Amounts after including network costs.
|
|
57
|
-
*/
|
|
58
|
-
afterNetworkCosts: Amounts<T>;
|
|
59
|
-
/**
|
|
60
|
-
* Amounts after including partner fees (if any).
|
|
61
|
-
*
|
|
62
|
-
* This amount could be shown to the user, as the expected to receive amount already including any fees or costs.
|
|
63
|
-
*/
|
|
64
|
-
afterPartnerFees: Amounts<T>;
|
|
65
|
-
/**
|
|
66
|
-
* Amounts after including the slippage tolerance.
|
|
67
|
-
*
|
|
68
|
-
* This is the minimum that the user will receive and the amount they will sign.
|
|
69
|
-
*
|
|
70
|
-
* It already accounts for all costs, fees and some slippage tolerance so they can execute the order even in the
|
|
71
|
-
* event of the buy token appreciating.
|
|
72
|
-
*/
|
|
73
|
-
afterSlippage: Amounts<T>;
|
|
74
|
-
}
|
|
1
|
+
import { Order } from './generated';
|
|
2
|
+
/**
|
|
3
|
+
* An order with the total fee added.
|
|
4
|
+
*/
|
|
5
|
+
export interface EnrichedOrder extends Order {
|
|
6
|
+
totalFee: string;
|
|
7
|
+
}
|
|
8
|
+
export interface Amounts<T> {
|
|
9
|
+
sellAmount: T;
|
|
10
|
+
buyAmount: T;
|
|
11
|
+
}
|
|
12
|
+
export interface Costs<T> {
|
|
13
|
+
networkFee: {
|
|
14
|
+
amountInSellCurrency: T;
|
|
15
|
+
amountInBuyCurrency: T;
|
|
16
|
+
};
|
|
17
|
+
partnerFee: {
|
|
18
|
+
amount: T;
|
|
19
|
+
bps: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Details about costs and amounts, costs and fees of a quote.
|
|
24
|
+
*
|
|
25
|
+
* CoW Protocol quote has amounts (sell/buy) and costs (network fee), there is also partner fees.
|
|
26
|
+
* Besides that, CoW Protocol supports both sell and buy orders and the fees and costs are calculated differently.
|
|
27
|
+
*
|
|
28
|
+
* The order of adding fees and costs is as follows:
|
|
29
|
+
* 1. Network fee is always added to the sell amount
|
|
30
|
+
* 2. Partner fee is added to the surplus amount (sell amount for sell-orders, buy amount for buy-orders)
|
|
31
|
+
*
|
|
32
|
+
* For sell-orders the partner fee is subtracted from the buy amount after network costs.
|
|
33
|
+
* For buy-orders the partner fee is added on top of the sell amount after network costs.
|
|
34
|
+
*/
|
|
35
|
+
export interface QuoteAmountsAndCosts<T = bigint> {
|
|
36
|
+
/**
|
|
37
|
+
* Whether the quote is a sell or buy order.
|
|
38
|
+
*/
|
|
39
|
+
isSell: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Estimated costs of settling the order.
|
|
42
|
+
*
|
|
43
|
+
* Costs are only payed if the order is executed. They cover the concept of gas costs to pay the solver for settling
|
|
44
|
+
* your order onchain for you.
|
|
45
|
+
*
|
|
46
|
+
* They are payed in the sell token although for convenience, the costs data includes also the buy token
|
|
47
|
+
* so UIs can decide how to show it to the user.
|
|
48
|
+
*/
|
|
49
|
+
costs: Costs<T>;
|
|
50
|
+
/**
|
|
51
|
+
* Amounts before network costs. This amount could be shown to the user to reflect how much they are expected to get
|
|
52
|
+
* before applying any costs or fees (if costs and fees are displayed separately).
|
|
53
|
+
*/
|
|
54
|
+
beforeNetworkCosts: Amounts<T>;
|
|
55
|
+
/**
|
|
56
|
+
* Amounts after including network costs.
|
|
57
|
+
*/
|
|
58
|
+
afterNetworkCosts: Amounts<T>;
|
|
59
|
+
/**
|
|
60
|
+
* Amounts after including partner fees (if any).
|
|
61
|
+
*
|
|
62
|
+
* This amount could be shown to the user, as the expected to receive amount already including any fees or costs.
|
|
63
|
+
*/
|
|
64
|
+
afterPartnerFees: Amounts<T>;
|
|
65
|
+
/**
|
|
66
|
+
* Amounts after including the slippage tolerance.
|
|
67
|
+
*
|
|
68
|
+
* This is the minimum that the user will receive and the amount they will sign.
|
|
69
|
+
*
|
|
70
|
+
* It already accounts for all costs, fees and some slippage tolerance so they can execute the order even in the
|
|
71
|
+
* event of the buy token appreciating.
|
|
72
|
+
*/
|
|
73
|
+
afterSlippage: Amounts<T>;
|
|
74
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './orderSigningUtils';
|
|
2
|
-
export * from './types';
|
|
1
|
+
export * from './orderSigningUtils';
|
|
2
|
+
export * from './types';
|