@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,133 +1,133 @@
|
|
|
1
|
-
import { OrderBookApi } from '../order-book';
|
|
2
|
-
import { SupportedChainId } from '../chains';
|
|
3
|
-
import { GPv2Order } from '../common/generated/ComposableCoW';
|
|
4
|
-
import { providers } from 'ethers';
|
|
5
|
-
export interface ConditionalOrderArguments<T> {
|
|
6
|
-
handler: string;
|
|
7
|
-
data: T;
|
|
8
|
-
salt?: string;
|
|
9
|
-
hasOffChainInput?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export type ConditionalOrderParams = {
|
|
12
|
-
readonly handler: string;
|
|
13
|
-
readonly salt: string;
|
|
14
|
-
readonly staticInput: string;
|
|
15
|
-
};
|
|
16
|
-
export declare enum ProofLocation {
|
|
17
|
-
PRIVATE = 0,
|
|
18
|
-
EMITTED = 1,
|
|
19
|
-
SWARM = 2,
|
|
20
|
-
WAKU = 3,
|
|
21
|
-
RESERVED = 4,
|
|
22
|
-
IPFS = 5
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* A factory and it's arguments that are called at transaction mining time to generate the context
|
|
26
|
-
* for a conditional order(s).
|
|
27
|
-
*
|
|
28
|
-
* This allows to support the case where conditional orders may want to *commence* validity at the
|
|
29
|
-
* time of transaction mining, like in the case of a `TWAP` executed by a DAO or `Safe` that takes
|
|
30
|
-
* a reasonable amount of time to aggregate signatures or collect votes.
|
|
31
|
-
*
|
|
32
|
-
* @remarks This is used in conjunction with `setRootWithContext` or `createWithContext`.
|
|
33
|
-
*/
|
|
34
|
-
export type ContextFactory = {
|
|
35
|
-
address: string;
|
|
36
|
-
factoryArgs?: {
|
|
37
|
-
args: unknown[];
|
|
38
|
-
argsType: string[];
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* A struct for a proof that can be used with `setRoot` and `setRootWithContext` on a
|
|
43
|
-
* ComposableCoW-enabled Safe.
|
|
44
|
-
*/
|
|
45
|
-
export type ProofStruct = {
|
|
46
|
-
location: ProofLocation;
|
|
47
|
-
data: string | '0x';
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Payload for emitting a merkle root to a ComposableCoW-enabled Safe.
|
|
51
|
-
*
|
|
52
|
-
* If setting `ProofLocation.EMITTED`, this type should be used as the `data` in the `Proof` struct.
|
|
53
|
-
*/
|
|
54
|
-
export type PayloadLocationEmitted = {
|
|
55
|
-
proofs: ProofWithParams[];
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* A proof for a conditional order and it's parameters.
|
|
59
|
-
*/
|
|
60
|
-
export type ProofWithParams = {
|
|
61
|
-
proof: string[];
|
|
62
|
-
params: ConditionalOrderParams;
|
|
63
|
-
};
|
|
64
|
-
export type OwnerContext = {
|
|
65
|
-
owner: string;
|
|
66
|
-
chainId: SupportedChainId;
|
|
67
|
-
provider: providers.Provider;
|
|
68
|
-
};
|
|
69
|
-
export type PollParams = OwnerContext & {
|
|
70
|
-
orderBookApi: OrderBookApi;
|
|
71
|
-
offchainInput?: string;
|
|
72
|
-
proof?: string[];
|
|
73
|
-
/**
|
|
74
|
-
* If present, it can be used for custom conditional order validations. If not present, the orders will need to get the block info themselves
|
|
75
|
-
*/
|
|
76
|
-
blockInfo?: BlockInfo;
|
|
77
|
-
};
|
|
78
|
-
export type BlockInfo = {
|
|
79
|
-
blockNumber: number;
|
|
80
|
-
blockTimestamp: number;
|
|
81
|
-
};
|
|
82
|
-
export type PollResult = PollResultSuccess | PollResultErrors;
|
|
83
|
-
export type PollResultErrors = PollResultTryNextBlock | PollResultTryOnBlock | PollResultTryAtEpoch | PollResultUnexpectedError | PollResultDontTryAgain;
|
|
84
|
-
export declare enum PollResultCode {
|
|
85
|
-
SUCCESS = "SUCCESS",
|
|
86
|
-
UNEXPECTED_ERROR = "UNEXPECTED_ERROR",
|
|
87
|
-
TRY_NEXT_BLOCK = "TRY_NEXT_BLOCK",
|
|
88
|
-
TRY_ON_BLOCK = "TRY_ON_BLOCK",
|
|
89
|
-
TRY_AT_EPOCH = "TRY_AT_EPOCH",
|
|
90
|
-
DONT_TRY_AGAIN = "DONT_TRY_AGAIN"
|
|
91
|
-
}
|
|
92
|
-
export interface PollResultSuccess {
|
|
93
|
-
readonly result: PollResultCode.SUCCESS;
|
|
94
|
-
readonly order: GPv2Order.DataStruct;
|
|
95
|
-
readonly signature: string;
|
|
96
|
-
}
|
|
97
|
-
export interface PollResultUnexpectedError {
|
|
98
|
-
readonly result: PollResultCode.UNEXPECTED_ERROR;
|
|
99
|
-
readonly error: unknown;
|
|
100
|
-
reason?: string;
|
|
101
|
-
}
|
|
102
|
-
export interface PollResultTryNextBlock {
|
|
103
|
-
readonly result: PollResultCode.TRY_NEXT_BLOCK;
|
|
104
|
-
reason?: string;
|
|
105
|
-
}
|
|
106
|
-
export interface PollResultTryOnBlock {
|
|
107
|
-
readonly result: PollResultCode.TRY_ON_BLOCK;
|
|
108
|
-
readonly blockNumber: number;
|
|
109
|
-
reason?: string;
|
|
110
|
-
}
|
|
111
|
-
export interface PollResultTryAtEpoch {
|
|
112
|
-
readonly result: PollResultCode.TRY_AT_EPOCH;
|
|
113
|
-
/**
|
|
114
|
-
* The epoch after which it is ok to retry to to poll this order.
|
|
115
|
-
* The value is expressed as a Unix timestamp (in seconds).
|
|
116
|
-
*
|
|
117
|
-
* This epoch will be inclusive, meaning that it is ok to retry at the block mined precisely at this epoch or later.
|
|
118
|
-
*/
|
|
119
|
-
readonly epoch: number;
|
|
120
|
-
reason?: string;
|
|
121
|
-
}
|
|
122
|
-
export interface PollResultDontTryAgain {
|
|
123
|
-
readonly result: PollResultCode.DONT_TRY_AGAIN;
|
|
124
|
-
reason?: string;
|
|
125
|
-
}
|
|
126
|
-
export type IsValidResult = IsValid | IsNotValid;
|
|
127
|
-
export interface IsValid {
|
|
128
|
-
isValid: true;
|
|
129
|
-
}
|
|
130
|
-
export interface IsNotValid {
|
|
131
|
-
isValid: false;
|
|
132
|
-
reason: string;
|
|
133
|
-
}
|
|
1
|
+
import { OrderBookApi } from '../order-book';
|
|
2
|
+
import { SupportedChainId } from '../chains';
|
|
3
|
+
import { GPv2Order } from '../common/generated/ComposableCoW';
|
|
4
|
+
import { providers } from 'ethers';
|
|
5
|
+
export interface ConditionalOrderArguments<T> {
|
|
6
|
+
handler: string;
|
|
7
|
+
data: T;
|
|
8
|
+
salt?: string;
|
|
9
|
+
hasOffChainInput?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type ConditionalOrderParams = {
|
|
12
|
+
readonly handler: string;
|
|
13
|
+
readonly salt: string;
|
|
14
|
+
readonly staticInput: string;
|
|
15
|
+
};
|
|
16
|
+
export declare enum ProofLocation {
|
|
17
|
+
PRIVATE = 0,
|
|
18
|
+
EMITTED = 1,
|
|
19
|
+
SWARM = 2,
|
|
20
|
+
WAKU = 3,
|
|
21
|
+
RESERVED = 4,
|
|
22
|
+
IPFS = 5
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* A factory and it's arguments that are called at transaction mining time to generate the context
|
|
26
|
+
* for a conditional order(s).
|
|
27
|
+
*
|
|
28
|
+
* This allows to support the case where conditional orders may want to *commence* validity at the
|
|
29
|
+
* time of transaction mining, like in the case of a `TWAP` executed by a DAO or `Safe` that takes
|
|
30
|
+
* a reasonable amount of time to aggregate signatures or collect votes.
|
|
31
|
+
*
|
|
32
|
+
* @remarks This is used in conjunction with `setRootWithContext` or `createWithContext`.
|
|
33
|
+
*/
|
|
34
|
+
export type ContextFactory = {
|
|
35
|
+
address: string;
|
|
36
|
+
factoryArgs?: {
|
|
37
|
+
args: unknown[];
|
|
38
|
+
argsType: string[];
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A struct for a proof that can be used with `setRoot` and `setRootWithContext` on a
|
|
43
|
+
* ComposableCoW-enabled Safe.
|
|
44
|
+
*/
|
|
45
|
+
export type ProofStruct = {
|
|
46
|
+
location: ProofLocation;
|
|
47
|
+
data: string | '0x';
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Payload for emitting a merkle root to a ComposableCoW-enabled Safe.
|
|
51
|
+
*
|
|
52
|
+
* If setting `ProofLocation.EMITTED`, this type should be used as the `data` in the `Proof` struct.
|
|
53
|
+
*/
|
|
54
|
+
export type PayloadLocationEmitted = {
|
|
55
|
+
proofs: ProofWithParams[];
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* A proof for a conditional order and it's parameters.
|
|
59
|
+
*/
|
|
60
|
+
export type ProofWithParams = {
|
|
61
|
+
proof: string[];
|
|
62
|
+
params: ConditionalOrderParams;
|
|
63
|
+
};
|
|
64
|
+
export type OwnerContext = {
|
|
65
|
+
owner: string;
|
|
66
|
+
chainId: SupportedChainId;
|
|
67
|
+
provider: providers.Provider;
|
|
68
|
+
};
|
|
69
|
+
export type PollParams = OwnerContext & {
|
|
70
|
+
orderBookApi: OrderBookApi;
|
|
71
|
+
offchainInput?: string;
|
|
72
|
+
proof?: string[];
|
|
73
|
+
/**
|
|
74
|
+
* If present, it can be used for custom conditional order validations. If not present, the orders will need to get the block info themselves
|
|
75
|
+
*/
|
|
76
|
+
blockInfo?: BlockInfo;
|
|
77
|
+
};
|
|
78
|
+
export type BlockInfo = {
|
|
79
|
+
blockNumber: number;
|
|
80
|
+
blockTimestamp: number;
|
|
81
|
+
};
|
|
82
|
+
export type PollResult = PollResultSuccess | PollResultErrors;
|
|
83
|
+
export type PollResultErrors = PollResultTryNextBlock | PollResultTryOnBlock | PollResultTryAtEpoch | PollResultUnexpectedError | PollResultDontTryAgain;
|
|
84
|
+
export declare enum PollResultCode {
|
|
85
|
+
SUCCESS = "SUCCESS",
|
|
86
|
+
UNEXPECTED_ERROR = "UNEXPECTED_ERROR",
|
|
87
|
+
TRY_NEXT_BLOCK = "TRY_NEXT_BLOCK",
|
|
88
|
+
TRY_ON_BLOCK = "TRY_ON_BLOCK",
|
|
89
|
+
TRY_AT_EPOCH = "TRY_AT_EPOCH",
|
|
90
|
+
DONT_TRY_AGAIN = "DONT_TRY_AGAIN"
|
|
91
|
+
}
|
|
92
|
+
export interface PollResultSuccess {
|
|
93
|
+
readonly result: PollResultCode.SUCCESS;
|
|
94
|
+
readonly order: GPv2Order.DataStruct;
|
|
95
|
+
readonly signature: string;
|
|
96
|
+
}
|
|
97
|
+
export interface PollResultUnexpectedError {
|
|
98
|
+
readonly result: PollResultCode.UNEXPECTED_ERROR;
|
|
99
|
+
readonly error: unknown;
|
|
100
|
+
reason?: string;
|
|
101
|
+
}
|
|
102
|
+
export interface PollResultTryNextBlock {
|
|
103
|
+
readonly result: PollResultCode.TRY_NEXT_BLOCK;
|
|
104
|
+
reason?: string;
|
|
105
|
+
}
|
|
106
|
+
export interface PollResultTryOnBlock {
|
|
107
|
+
readonly result: PollResultCode.TRY_ON_BLOCK;
|
|
108
|
+
readonly blockNumber: number;
|
|
109
|
+
reason?: string;
|
|
110
|
+
}
|
|
111
|
+
export interface PollResultTryAtEpoch {
|
|
112
|
+
readonly result: PollResultCode.TRY_AT_EPOCH;
|
|
113
|
+
/**
|
|
114
|
+
* The epoch after which it is ok to retry to to poll this order.
|
|
115
|
+
* The value is expressed as a Unix timestamp (in seconds).
|
|
116
|
+
*
|
|
117
|
+
* This epoch will be inclusive, meaning that it is ok to retry at the block mined precisely at this epoch or later.
|
|
118
|
+
*/
|
|
119
|
+
readonly epoch: number;
|
|
120
|
+
reason?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface PollResultDontTryAgain {
|
|
123
|
+
readonly result: PollResultCode.DONT_TRY_AGAIN;
|
|
124
|
+
reason?: string;
|
|
125
|
+
}
|
|
126
|
+
export type IsValidResult = IsValid | IsNotValid;
|
|
127
|
+
export interface IsValid {
|
|
128
|
+
isValid: true;
|
|
129
|
+
}
|
|
130
|
+
export interface IsNotValid {
|
|
131
|
+
isValid: false;
|
|
132
|
+
reason: string;
|
|
133
|
+
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { utils, providers, BigNumber } from 'ethers';
|
|
2
|
-
import { SupportedChainId } from '../chains';
|
|
3
|
-
import { BlockInfo, ConditionalOrderParams, IsValid, IsValidResult } from './types';
|
|
4
|
-
import { Order } from '@cowprotocol/contracts';
|
|
5
|
-
import { GPv2Order } from '../common/generated/ComposableCoW';
|
|
6
|
-
export declare const CONDITIONAL_ORDER_PARAMS_ABI: string[];
|
|
7
|
-
export declare const DEFAULT_TOKEN_FORMATTER: (address: string, amount: BigNumber) => string;
|
|
8
|
-
export declare function isExtensibleFallbackHandler(handler: string, chainId: SupportedChainId): boolean;
|
|
9
|
-
export declare function isComposableCow(handler: string, chainId: SupportedChainId): boolean;
|
|
10
|
-
export declare function getDomainVerifier(safe: string, domain: string, chainId: SupportedChainId, provider: providers.Provider): Promise<string>;
|
|
11
|
-
export declare function createSetDomainVerifierTx(domain: string, verifier: string): string;
|
|
12
|
-
/**
|
|
13
|
-
* Encode the `ConditionalOrderParams` for the conditional order.
|
|
14
|
-
*
|
|
15
|
-
* @param params The `ConditionalOrderParams` struct representing the conditional order as taken from a merkle tree.
|
|
16
|
-
* @returns The ABI-encoded conditional order.
|
|
17
|
-
* @see ConditionalOrderParams
|
|
18
|
-
*/
|
|
19
|
-
export declare function encodeParams(params: ConditionalOrderParams): string;
|
|
20
|
-
/**
|
|
21
|
-
* Decode the `ConditionalOrderParams` for the conditional order.
|
|
22
|
-
*
|
|
23
|
-
* @param encoded The encoded conditional order.
|
|
24
|
-
* @returns The decoded conditional order.
|
|
25
|
-
*/
|
|
26
|
-
export declare function decodeParams(encoded: string): ConditionalOrderParams;
|
|
27
|
-
/**
|
|
28
|
-
* Helper method for validating ABI types.
|
|
29
|
-
* @param types ABI types to validate against.
|
|
30
|
-
* @param values The values to validate.
|
|
31
|
-
* @returns {boolean} Whether the values are valid ABI for the given types.
|
|
32
|
-
*/
|
|
33
|
-
export declare function isValidAbi(types: readonly (string | utils.ParamType)[], values: any[]): boolean;
|
|
34
|
-
export declare function getBlockInfo(provider: providers.Provider): Promise<BlockInfo>;
|
|
35
|
-
export declare function formatEpoch(epoch: number): string;
|
|
36
|
-
export declare function fromStructToOrder(order: GPv2Order.DataStruct): Order;
|
|
37
|
-
export declare function getIsValidResult(result: IsValidResult): result is IsValid;
|
|
1
|
+
import { utils, providers, BigNumber } from 'ethers';
|
|
2
|
+
import { SupportedChainId } from '../chains';
|
|
3
|
+
import { BlockInfo, ConditionalOrderParams, IsValid, IsValidResult } from './types';
|
|
4
|
+
import { Order } from '@cowprotocol/contracts';
|
|
5
|
+
import { GPv2Order } from '../common/generated/ComposableCoW';
|
|
6
|
+
export declare const CONDITIONAL_ORDER_PARAMS_ABI: string[];
|
|
7
|
+
export declare const DEFAULT_TOKEN_FORMATTER: (address: string, amount: BigNumber) => string;
|
|
8
|
+
export declare function isExtensibleFallbackHandler(handler: string, chainId: SupportedChainId): boolean;
|
|
9
|
+
export declare function isComposableCow(handler: string, chainId: SupportedChainId): boolean;
|
|
10
|
+
export declare function getDomainVerifier(safe: string, domain: string, chainId: SupportedChainId, provider: providers.Provider): Promise<string>;
|
|
11
|
+
export declare function createSetDomainVerifierTx(domain: string, verifier: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Encode the `ConditionalOrderParams` for the conditional order.
|
|
14
|
+
*
|
|
15
|
+
* @param params The `ConditionalOrderParams` struct representing the conditional order as taken from a merkle tree.
|
|
16
|
+
* @returns The ABI-encoded conditional order.
|
|
17
|
+
* @see ConditionalOrderParams
|
|
18
|
+
*/
|
|
19
|
+
export declare function encodeParams(params: ConditionalOrderParams): string;
|
|
20
|
+
/**
|
|
21
|
+
* Decode the `ConditionalOrderParams` for the conditional order.
|
|
22
|
+
*
|
|
23
|
+
* @param encoded The encoded conditional order.
|
|
24
|
+
* @returns The decoded conditional order.
|
|
25
|
+
*/
|
|
26
|
+
export declare function decodeParams(encoded: string): ConditionalOrderParams;
|
|
27
|
+
/**
|
|
28
|
+
* Helper method for validating ABI types.
|
|
29
|
+
* @param types ABI types to validate against.
|
|
30
|
+
* @param values The values to validate.
|
|
31
|
+
* @returns {boolean} Whether the values are valid ABI for the given types.
|
|
32
|
+
*/
|
|
33
|
+
export declare function isValidAbi(types: readonly (string | utils.ParamType)[], values: any[]): boolean;
|
|
34
|
+
export declare function getBlockInfo(provider: providers.Provider): Promise<BlockInfo>;
|
|
35
|
+
export declare function formatEpoch(epoch: number): string;
|
|
36
|
+
export declare function fromStructToOrder(order: GPv2Order.DataStruct): Order;
|
|
37
|
+
export declare function getIsValidResult(result: IsValidResult): result is IsValid;
|
|
@@ -1,69 +1,74 @@
|
|
|
1
|
-
import { EvmCall, SignerLike } from '../common';
|
|
2
|
-
import { SupportedChainId } from '../chains';
|
|
3
|
-
import { CowShedHooks } from './contracts/CoWShedHooks';
|
|
4
|
-
import { EcdsaSigningScheme } from '@cowprotocol/contracts';
|
|
5
|
-
import { ICoWShedCall, ICoWShedOptions } from './types';
|
|
6
|
-
export interface SignAndEncodeTxArgs {
|
|
7
|
-
/**
|
|
8
|
-
* Calls to pre-authorize on the cow-shed account
|
|
9
|
-
*/
|
|
10
|
-
calls: ICoWShedCall[];
|
|
11
|
-
/**
|
|
12
|
-
* Signer for the cow-shed's owner account.
|
|
13
|
-
*
|
|
14
|
-
* The signer will be used to pre-authorise the calls.
|
|
15
|
-
* The cow-shed account will be derived from this signer.
|
|
16
|
-
*/
|
|
17
|
-
signer?: SignerLike;
|
|
18
|
-
/**
|
|
19
|
-
* Chain ID to use for the transaction.
|
|
20
|
-
*/
|
|
21
|
-
chainId: SupportedChainId;
|
|
22
|
-
/**
|
|
23
|
-
* Nonce to use for the transaction. If not provided, the current timestamp will be used.
|
|
24
|
-
*/
|
|
25
|
-
nonce?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Deadline to use for the transaction. If not provided, the maximum uint256 will be used.
|
|
28
|
-
*/
|
|
29
|
-
deadline
|
|
30
|
-
/**
|
|
31
|
-
*
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
*
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
1
|
+
import { CoWShedVersion, EvmCall, SignerLike } from '../common';
|
|
2
|
+
import { SupportedChainId } from '../chains';
|
|
3
|
+
import { CowShedHooks } from './contracts/CoWShedHooks';
|
|
4
|
+
import { EcdsaSigningScheme } from '@cowprotocol/contracts';
|
|
5
|
+
import { ICoWShedCall, ICoWShedOptions } from './types';
|
|
6
|
+
export interface SignAndEncodeTxArgs {
|
|
7
|
+
/**
|
|
8
|
+
* Calls to pre-authorize on the cow-shed account
|
|
9
|
+
*/
|
|
10
|
+
calls: ICoWShedCall[];
|
|
11
|
+
/**
|
|
12
|
+
* Signer for the cow-shed's owner account.
|
|
13
|
+
*
|
|
14
|
+
* The signer will be used to pre-authorise the calls.
|
|
15
|
+
* The cow-shed account will be derived from this signer.
|
|
16
|
+
*/
|
|
17
|
+
signer?: SignerLike;
|
|
18
|
+
/**
|
|
19
|
+
* Chain ID to use for the transaction.
|
|
20
|
+
*/
|
|
21
|
+
chainId: SupportedChainId;
|
|
22
|
+
/**
|
|
23
|
+
* Nonce to use for the transaction. If not provided, the current timestamp will be used.
|
|
24
|
+
*/
|
|
25
|
+
nonce?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Deadline to use for the transaction. If not provided, the maximum uint256 will be used.
|
|
28
|
+
*/
|
|
29
|
+
deadline: bigint;
|
|
30
|
+
/**
|
|
31
|
+
* If value is provided, gas won't be estimated and will use the value
|
|
32
|
+
*/
|
|
33
|
+
gasLimit?: bigint;
|
|
34
|
+
/**
|
|
35
|
+
* Default gas limit to use for the transaction. If not provided, it will throw an error if the gas limit cannot be estimated.
|
|
36
|
+
*/
|
|
37
|
+
defaultGasLimit?: bigint;
|
|
38
|
+
/**
|
|
39
|
+
* Signing scheme to use for the transaction.
|
|
40
|
+
*/
|
|
41
|
+
signingScheme?: EcdsaSigningScheme;
|
|
42
|
+
}
|
|
43
|
+
export interface CowShedCall {
|
|
44
|
+
cowShedAccount: string;
|
|
45
|
+
signedMulticall: EvmCall;
|
|
46
|
+
gasLimit: bigint;
|
|
47
|
+
}
|
|
48
|
+
export interface CowShedSdkOptions {
|
|
49
|
+
/**
|
|
50
|
+
* Signer for the cow-shed's owner account.
|
|
51
|
+
*/
|
|
52
|
+
signer?: SignerLike;
|
|
53
|
+
/**
|
|
54
|
+
* Custom options for the cow-shed hooks.
|
|
55
|
+
*/
|
|
56
|
+
factoryOptions?: ICoWShedOptions;
|
|
57
|
+
}
|
|
58
|
+
export declare class CowShedSdk {
|
|
59
|
+
private options;
|
|
60
|
+
readonly version: CoWShedVersion;
|
|
61
|
+
protected hooksCache: Map<SupportedChainId, CowShedHooks>;
|
|
62
|
+
constructor(options?: CowShedSdkOptions, version?: CoWShedVersion);
|
|
63
|
+
getCowShedAccount(chainId: SupportedChainId, ownerAddress: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* Encodes multiple calls into a single pre-authorized call to the cow-shed factory.
|
|
66
|
+
*
|
|
67
|
+
* This single call will create the cow-shed account if it doesn't exist yet, then will execute the calls.
|
|
68
|
+
*
|
|
69
|
+
* @returns pre-authorized multicall details
|
|
70
|
+
*/
|
|
71
|
+
signCalls({ calls, signer: signerParam, chainId, nonce, deadline, gasLimit, defaultGasLimit, signingScheme, }: SignAndEncodeTxArgs): Promise<CowShedCall>;
|
|
72
|
+
protected getCowShedHooks(chainId: SupportedChainId, customOptions?: ICoWShedOptions): CowShedHooks;
|
|
73
|
+
protected static getNonce(): string;
|
|
74
|
+
}
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { EcdsaSigningScheme } from '@cowprotocol/contracts';
|
|
2
|
-
import { SupportedChainId } from '../../chains';
|
|
3
|
-
import type { Signer, TypedDataDomain } from '@ethersproject/abstract-signer';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
private
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
import { EcdsaSigningScheme } from '@cowprotocol/contracts';
|
|
2
|
+
import { SupportedChainId } from '../../chains';
|
|
3
|
+
import type { Signer, TypedDataDomain } from '@ethersproject/abstract-signer';
|
|
4
|
+
import { CoWShedVersion } from '../../common';
|
|
5
|
+
import { ICoWShedCall, ICoWShedOptions } from '../types';
|
|
6
|
+
export declare const COW_SHED_PROXY_INIT_CODE = "0x60a03461009557601f61033d38819003918201601f19168301916001600160401b0383118484101761009957808492604094855283398101031261009557610052602061004b836100ad565b92016100ad565b6080527f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5560405161027b90816100c28239608051818181608b01526101750152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b51906001600160a01b03821682036100955756fe60806040526004361015610018575b3661019757610197565b5f3560e01c8063025b22bc146100375763f851a4400361000e57610116565b346101125760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101125760043573ffffffffffffffffffffffffffffffffffffffff81169081810361011257337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff160361010d577f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc557fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b5f80a2005b61023d565b5f80fd5b34610112575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261011257602061014e61016c565b73ffffffffffffffffffffffffffffffffffffffff60405191168152f35b33300361010d577f000000000000000000000000000000000000000000000000000000000000000090565b60ff7f68df44b1011761f481358c0f49a711192727fb02c377d697bcb0ea8ff8393ac0541615806101f0575b1561023d577ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b507f400ada75000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000005f351614156101c3565b5f807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc54368280378136915af43d5f803e15610277573d5ff35b3d5ffd";
|
|
7
|
+
export declare const COW_SHED_712_TYPES: {
|
|
8
|
+
ExecuteHooks: {
|
|
9
|
+
type: string;
|
|
10
|
+
name: string;
|
|
11
|
+
}[];
|
|
12
|
+
Call: {
|
|
13
|
+
type: string;
|
|
14
|
+
name: string;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
export declare class CowShedHooks {
|
|
18
|
+
private chainId;
|
|
19
|
+
private customOptions?;
|
|
20
|
+
readonly version: CoWShedVersion;
|
|
21
|
+
constructor(chainId: SupportedChainId, customOptions?: ICoWShedOptions | undefined, version?: CoWShedVersion);
|
|
22
|
+
proxyOf(user: string): string;
|
|
23
|
+
encodeExecuteHooksForFactory(calls: ICoWShedCall[], nonce: string, deadline: bigint, user: string, signature: string): string;
|
|
24
|
+
signCalls(calls: ICoWShedCall[], nonce: string, deadline: bigint, signer: Signer, signingScheme: EcdsaSigningScheme): Promise<string>;
|
|
25
|
+
infoToSign(calls: ICoWShedCall[], nonce: string, deadline: bigint, proxy: string): {
|
|
26
|
+
domain: TypedDataDomain;
|
|
27
|
+
types: {
|
|
28
|
+
ExecuteHooks: {
|
|
29
|
+
type: string;
|
|
30
|
+
name: string;
|
|
31
|
+
}[];
|
|
32
|
+
Call: {
|
|
33
|
+
type: string;
|
|
34
|
+
name: string;
|
|
35
|
+
}[];
|
|
36
|
+
};
|
|
37
|
+
message: {
|
|
38
|
+
calls: ICoWShedCall[];
|
|
39
|
+
nonce: string;
|
|
40
|
+
deadline: bigint;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
getDomain(proxy: string): TypedDataDomain;
|
|
44
|
+
proxyCreationCode(): string;
|
|
45
|
+
getFactoryAddress(): string;
|
|
46
|
+
getImplementationAddress(): string;
|
|
47
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CoWShedInterface } from '../../common/generated/CoWShed';
|
|
2
|
-
import { CoWShedFactoryInterface } from '../../common/generated/CoWShedFactory';
|
|
3
|
-
export declare function getCoWShedInterface(): CoWShedInterface;
|
|
4
|
-
export declare function getCoWShedFactoryInterface(): CoWShedFactoryInterface;
|
|
1
|
+
import { CoWShedInterface } from '../../common/generated/CoWShed';
|
|
2
|
+
import { CoWShedFactoryInterface } from '../../common/generated/CoWShedFactory';
|
|
3
|
+
export declare function getCoWShedInterface(): CoWShedInterface;
|
|
4
|
+
export declare function getCoWShedFactoryInterface(): CoWShedFactoryInterface;
|
package/dist/cow-shed/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export * from './CowShedSdk';
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './CowShedSdk';
|
|
3
|
+
export * from './contracts/CoWShedHooks';
|
package/dist/cow-shed/types.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
export interface ICoWShedOptions {
|
|
2
|
-
factoryAddress: string;
|
|
3
|
-
proxyCreationCode?: string;
|
|
4
|
-
implementationAddress: string;
|
|
5
|
-
}
|
|
6
|
-
export interface ICoWShedCall {
|
|
7
|
-
target: string;
|
|
8
|
-
value: bigint;
|
|
9
|
-
callData: string;
|
|
10
|
-
allowFailure: boolean;
|
|
11
|
-
isDelegateCall: boolean;
|
|
12
|
-
}
|
|
13
|
-
export interface ICoWShedOptions {
|
|
14
|
-
factoryAddress: string;
|
|
15
|
-
proxyCreationCode?: string;
|
|
16
|
-
implementationAddress: string;
|
|
17
|
-
}
|
|
1
|
+
export interface ICoWShedOptions {
|
|
2
|
+
factoryAddress: string;
|
|
3
|
+
proxyCreationCode?: string;
|
|
4
|
+
implementationAddress: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ICoWShedCall {
|
|
7
|
+
target: string;
|
|
8
|
+
value: bigint;
|
|
9
|
+
callData: string;
|
|
10
|
+
allowFailure: boolean;
|
|
11
|
+
isDelegateCall: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface ICoWShedOptions {
|
|
14
|
+
factoryAddress: string;
|
|
15
|
+
proxyCreationCode?: string;
|
|
16
|
+
implementationAddress: string;
|
|
17
|
+
}
|
package/dist/hooks/utils.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import { latest } from '@cowprotocol/app-data';
|
|
2
|
-
export declare function getHookMockForCostEstimation(gasLimit: number): latest.
|
|
1
|
+
import { latest } from '@cowprotocol/app-data';
|
|
2
|
+
export declare function getHookMockForCostEstimation(gasLimit: number): latest.CoWHook;
|
|
3
|
+
export declare function areHooksEqual(hookA: latest.CoWHook, hookB: latest.CoWHook): boolean;
|