@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,97 +1,97 @@
|
|
|
1
|
-
import type { SupportedChainId } from '../chains';
|
|
2
|
-
import type { Signer } from '@ethersproject/abstract-signer';
|
|
3
|
-
import type { Order, TypedDataDomain, OrderUidParams } from '@cowprotocol/contracts';
|
|
4
|
-
import type { SigningResult, UnsignedOrder } from './types';
|
|
5
|
-
/**
|
|
6
|
-
* Utility class for signing order intents and cancellations.
|
|
7
|
-
*
|
|
8
|
-
* @remarks This class only supports `eth_sign` and wallet-native EIP-712 signing. For use of
|
|
9
|
-
* `presign` and `eip1271` {@link https://docs.cow.fi/ | see the docs}.
|
|
10
|
-
* @example
|
|
11
|
-
*
|
|
12
|
-
* ```typescript
|
|
13
|
-
* import { OrderSigningUtils, SupportedChainId, UnsignedOrder } from '@cowprotocol/cow-sdk'
|
|
14
|
-
* import { Web3Provider } from '@ethersproject/providers'
|
|
15
|
-
*
|
|
16
|
-
* const account = 'YOUR_WALLET_ADDRESS'
|
|
17
|
-
* const chainId = 100 // Gnosis chain
|
|
18
|
-
* const provider = new Web3Provider(window.ethereum)
|
|
19
|
-
* const signer = provider.getSigner()
|
|
20
|
-
*
|
|
21
|
-
* async function main() {
|
|
22
|
-
* const orderToSign: UnsignedOrder = { ... }
|
|
23
|
-
* const orderSigningResult = await OrderSigningUtils.signOrder(orderToSign, chainId, signer)
|
|
24
|
-
*
|
|
25
|
-
* const orderId = await orderBookApi.sendOrder({ ...orderToSign, ...orderSigningResult })
|
|
26
|
-
*
|
|
27
|
-
* const order = await orderBookApi.getOrder(orderId)
|
|
28
|
-
*
|
|
29
|
-
* const trades = await orderBookApi.getTrades({ orderId })
|
|
30
|
-
*
|
|
31
|
-
* const orderCancellationSigningResult = await OrderSigningUtils.signOrderCancellations([orderId], chainId, signer)
|
|
32
|
-
*
|
|
33
|
-
* const cancellationResult = await orderBookApi.sendSignedOrderCancellations({...orderCancellationSigningResult, orderUids: [orderId] })
|
|
34
|
-
*
|
|
35
|
-
* console.log('Results: ', { orderId, order, trades, orderCancellationSigningResult, cancellationResult })
|
|
36
|
-
* }
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export declare class OrderSigningUtils {
|
|
40
|
-
/**
|
|
41
|
-
* Sign the order intent with the specified signer.
|
|
42
|
-
*
|
|
43
|
-
* @remarks If the API reports an error with the signature, it is likely to be due to an incorrectly
|
|
44
|
-
* specified `chainId`. Please ensure that the `chainId` is correct for the network you are
|
|
45
|
-
* using.
|
|
46
|
-
* @param {UnsignedOrder} order The unsigned order intent to be placed.
|
|
47
|
-
* @param {SupportedChainId} chainId The CoW Protocol `chainId` context that's being used.
|
|
48
|
-
* @param {Signer} signer The signer who is placing the order intent.
|
|
49
|
-
* @returns {Promise<SigningResult>} Encoded signature including signing scheme for the order.
|
|
50
|
-
*/
|
|
51
|
-
static signOrder(order: UnsignedOrder, chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
52
|
-
/**
|
|
53
|
-
* Sign a cancellation message of an order intent with the specified signer.
|
|
54
|
-
* @param {string} orderUid The unique identifier of the order to cancel.
|
|
55
|
-
* @param {SupportedChainId} chainId The CoW Protocol `chainid` context that's being used.
|
|
56
|
-
* @param {Signer} signer The signer who initially placed the order intent.
|
|
57
|
-
* @returns {Promise<SigningResult>} Encoded signature including signing scheme for the cancellation.
|
|
58
|
-
*/
|
|
59
|
-
static signOrderCancellation(orderUid: string, chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
60
|
-
/**
|
|
61
|
-
* Sign a cancellation message of multiple order intents with the specified signer.
|
|
62
|
-
* @param {string[]} orderUids An array of `orderUid` to cancel.
|
|
63
|
-
* @param {SupportedChainId} chainId The CoW Protocol `chainId` context that's being used.
|
|
64
|
-
* @param {Signer} signer The signer who initially placed the order intents.
|
|
65
|
-
* @returns {Promise<SigningResult>} Encoded signature including signing scheme for the cancellation.
|
|
66
|
-
*/
|
|
67
|
-
static signOrderCancellations(orderUids: string[], chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
68
|
-
/**
|
|
69
|
-
* Get the EIP-712 typed domain data being used for signing.
|
|
70
|
-
* @param {SupportedChainId} chainId The CoW Protocol `chainId` context that's being used.
|
|
71
|
-
* @return The EIP-712 typed domain data.
|
|
72
|
-
* @see https://eips.ethereum.org/EIPS/eip-712
|
|
73
|
-
*/
|
|
74
|
-
static getDomain(chainId: SupportedChainId): Promise<TypedDataDomain>;
|
|
75
|
-
/**
|
|
76
|
-
* Hashes the order intent and generate deterministic order ID.
|
|
77
|
-
* @param {SupportedChainId} chainId The CoW Protocol `chainId` context that's being used.
|
|
78
|
-
* @param {Order} order order to sign
|
|
79
|
-
* @param {Pick<OrderUidParams, 'owner'>} params order unique identifier parameters.
|
|
80
|
-
*/
|
|
81
|
-
static generateOrderId(chainId: SupportedChainId, order: Order, params: Pick<OrderUidParams, 'owner'>): Promise<{
|
|
82
|
-
orderId: string;
|
|
83
|
-
orderDigest: string;
|
|
84
|
-
}>;
|
|
85
|
-
/**
|
|
86
|
-
* Get the domain separator hash for the EIP-712 typed domain data being used for signing.
|
|
87
|
-
* @param chainId {SupportedChainId} chainId The CoW Protocol protocol `chainId` context that's being used.
|
|
88
|
-
* @returns A string representation of the EIP-712 typed domain data hash.
|
|
89
|
-
*/
|
|
90
|
-
static getDomainSeparator(chainId: SupportedChainId): Promise<string>;
|
|
91
|
-
/**
|
|
92
|
-
* Get the EIP-712 types used for signing a GPv2Order.Data struct. This is useful for when
|
|
93
|
-
* signing orders using smart contracts, whereby this SDK cannot do the EIP-1271 signing for you.
|
|
94
|
-
* @returns The EIP-712 types used for signing.
|
|
95
|
-
*/
|
|
96
|
-
static getEIP712Types(): Record<string, unknown>;
|
|
97
|
-
}
|
|
1
|
+
import type { SupportedChainId } from '../chains';
|
|
2
|
+
import type { Signer } from '@ethersproject/abstract-signer';
|
|
3
|
+
import type { Order, TypedDataDomain, OrderUidParams } from '@cowprotocol/contracts';
|
|
4
|
+
import type { SigningResult, UnsignedOrder } from './types';
|
|
5
|
+
/**
|
|
6
|
+
* Utility class for signing order intents and cancellations.
|
|
7
|
+
*
|
|
8
|
+
* @remarks This class only supports `eth_sign` and wallet-native EIP-712 signing. For use of
|
|
9
|
+
* `presign` and `eip1271` {@link https://docs.cow.fi/ | see the docs}.
|
|
10
|
+
* @example
|
|
11
|
+
*
|
|
12
|
+
* ```typescript
|
|
13
|
+
* import { OrderSigningUtils, SupportedChainId, UnsignedOrder } from '@cowprotocol/cow-sdk'
|
|
14
|
+
* import { Web3Provider } from '@ethersproject/providers'
|
|
15
|
+
*
|
|
16
|
+
* const account = 'YOUR_WALLET_ADDRESS'
|
|
17
|
+
* const chainId = 100 // Gnosis chain
|
|
18
|
+
* const provider = new Web3Provider(window.ethereum)
|
|
19
|
+
* const signer = provider.getSigner()
|
|
20
|
+
*
|
|
21
|
+
* async function main() {
|
|
22
|
+
* const orderToSign: UnsignedOrder = { ... }
|
|
23
|
+
* const orderSigningResult = await OrderSigningUtils.signOrder(orderToSign, chainId, signer)
|
|
24
|
+
*
|
|
25
|
+
* const orderId = await orderBookApi.sendOrder({ ...orderToSign, ...orderSigningResult })
|
|
26
|
+
*
|
|
27
|
+
* const order = await orderBookApi.getOrder(orderId)
|
|
28
|
+
*
|
|
29
|
+
* const trades = await orderBookApi.getTrades({ orderId })
|
|
30
|
+
*
|
|
31
|
+
* const orderCancellationSigningResult = await OrderSigningUtils.signOrderCancellations([orderId], chainId, signer)
|
|
32
|
+
*
|
|
33
|
+
* const cancellationResult = await orderBookApi.sendSignedOrderCancellations({...orderCancellationSigningResult, orderUids: [orderId] })
|
|
34
|
+
*
|
|
35
|
+
* console.log('Results: ', { orderId, order, trades, orderCancellationSigningResult, cancellationResult })
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare class OrderSigningUtils {
|
|
40
|
+
/**
|
|
41
|
+
* Sign the order intent with the specified signer.
|
|
42
|
+
*
|
|
43
|
+
* @remarks If the API reports an error with the signature, it is likely to be due to an incorrectly
|
|
44
|
+
* specified `chainId`. Please ensure that the `chainId` is correct for the network you are
|
|
45
|
+
* using.
|
|
46
|
+
* @param {UnsignedOrder} order The unsigned order intent to be placed.
|
|
47
|
+
* @param {SupportedChainId} chainId The CoW Protocol `chainId` context that's being used.
|
|
48
|
+
* @param {Signer} signer The signer who is placing the order intent.
|
|
49
|
+
* @returns {Promise<SigningResult>} Encoded signature including signing scheme for the order.
|
|
50
|
+
*/
|
|
51
|
+
static signOrder(order: UnsignedOrder, chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
52
|
+
/**
|
|
53
|
+
* Sign a cancellation message of an order intent with the specified signer.
|
|
54
|
+
* @param {string} orderUid The unique identifier of the order to cancel.
|
|
55
|
+
* @param {SupportedChainId} chainId The CoW Protocol `chainid` context that's being used.
|
|
56
|
+
* @param {Signer} signer The signer who initially placed the order intent.
|
|
57
|
+
* @returns {Promise<SigningResult>} Encoded signature including signing scheme for the cancellation.
|
|
58
|
+
*/
|
|
59
|
+
static signOrderCancellation(orderUid: string, chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
60
|
+
/**
|
|
61
|
+
* Sign a cancellation message of multiple order intents with the specified signer.
|
|
62
|
+
* @param {string[]} orderUids An array of `orderUid` to cancel.
|
|
63
|
+
* @param {SupportedChainId} chainId The CoW Protocol `chainId` context that's being used.
|
|
64
|
+
* @param {Signer} signer The signer who initially placed the order intents.
|
|
65
|
+
* @returns {Promise<SigningResult>} Encoded signature including signing scheme for the cancellation.
|
|
66
|
+
*/
|
|
67
|
+
static signOrderCancellations(orderUids: string[], chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
68
|
+
/**
|
|
69
|
+
* Get the EIP-712 typed domain data being used for signing.
|
|
70
|
+
* @param {SupportedChainId} chainId The CoW Protocol `chainId` context that's being used.
|
|
71
|
+
* @return The EIP-712 typed domain data.
|
|
72
|
+
* @see https://eips.ethereum.org/EIPS/eip-712
|
|
73
|
+
*/
|
|
74
|
+
static getDomain(chainId: SupportedChainId): Promise<TypedDataDomain>;
|
|
75
|
+
/**
|
|
76
|
+
* Hashes the order intent and generate deterministic order ID.
|
|
77
|
+
* @param {SupportedChainId} chainId The CoW Protocol `chainId` context that's being used.
|
|
78
|
+
* @param {Order} order order to sign
|
|
79
|
+
* @param {Pick<OrderUidParams, 'owner'>} params order unique identifier parameters.
|
|
80
|
+
*/
|
|
81
|
+
static generateOrderId(chainId: SupportedChainId, order: Order, params: Pick<OrderUidParams, 'owner'>): Promise<{
|
|
82
|
+
orderId: string;
|
|
83
|
+
orderDigest: string;
|
|
84
|
+
}>;
|
|
85
|
+
/**
|
|
86
|
+
* Get the domain separator hash for the EIP-712 typed domain data being used for signing.
|
|
87
|
+
* @param chainId {SupportedChainId} chainId The CoW Protocol protocol `chainId` context that's being used.
|
|
88
|
+
* @returns A string representation of the EIP-712 typed domain data hash.
|
|
89
|
+
*/
|
|
90
|
+
static getDomainSeparator(chainId: SupportedChainId): Promise<string>;
|
|
91
|
+
/**
|
|
92
|
+
* Get the EIP-712 types used for signing a GPv2Order.Data struct. This is useful for when
|
|
93
|
+
* signing orders using smart contracts, whereby this SDK cannot do the EIP-1271 signing for you.
|
|
94
|
+
* @returns The EIP-712 types used for signing.
|
|
95
|
+
*/
|
|
96
|
+
static getEIP712Types(): Record<string, unknown>;
|
|
97
|
+
}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import type { SupportedChainId } from '../chains';
|
|
2
|
-
import type { Signer } from '@ethersproject/abstract-signer';
|
|
3
|
-
import type { OrderParameters, EcdsaSigningScheme } from '../order-book';
|
|
4
|
-
/**
|
|
5
|
-
* Unsigned order intent to be placed.
|
|
6
|
-
*/
|
|
7
|
-
export type UnsignedOrder = Omit<OrderParameters, 'receiver'> & {
|
|
8
|
-
receiver: string;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Encoded signature including signing scheme for the order.
|
|
12
|
-
*/
|
|
13
|
-
export type SigningResult = {
|
|
14
|
-
signature: string;
|
|
15
|
-
signingScheme: EcdsaSigningScheme;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Parameters for signing an order intent.
|
|
19
|
-
* @param chainId The CoW Protocol `chainId` context that's being used.
|
|
20
|
-
* @param signer The signer who is placing the order intent.
|
|
21
|
-
* @param order The unsigned order intent to be placed.
|
|
22
|
-
* @param signingScheme The signing scheme to use for the signature.
|
|
23
|
-
*/
|
|
24
|
-
export interface SignOrderParams {
|
|
25
|
-
chainId: SupportedChainId;
|
|
26
|
-
signer: Signer;
|
|
27
|
-
order: UnsignedOrder;
|
|
28
|
-
signingScheme: EcdsaSigningScheme;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Parameters for signing an order cancellation.
|
|
32
|
-
* @param chainId The CoW Protocol `chainId` context that's being used.
|
|
33
|
-
* @param signer The signer who initially placed the order intent.
|
|
34
|
-
* @param orderUid The unique identifier of the order to cancel.
|
|
35
|
-
* @param signingScheme The signing scheme to use for the signature.
|
|
36
|
-
*/
|
|
37
|
-
export interface SignOrderCancellationParams {
|
|
38
|
-
chainId: SupportedChainId;
|
|
39
|
-
signer: Signer;
|
|
40
|
-
orderUid: string;
|
|
41
|
-
signingScheme: EcdsaSigningScheme;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Parameters for signing multiple bulk order cancellations.
|
|
45
|
-
* @param chainId The CoW Protocol `chainId` context that's being used.
|
|
46
|
-
* @param signer The signer who initially placed the order intents.
|
|
47
|
-
* @param orderUids An array of `orderUid` to cancel.
|
|
48
|
-
* @param signingScheme The signing scheme to use for the signature.
|
|
49
|
-
*/
|
|
50
|
-
export interface SignOrderCancellationsParams {
|
|
51
|
-
chainId: SupportedChainId;
|
|
52
|
-
signer: Signer;
|
|
53
|
-
orderUids: string[];
|
|
54
|
-
signingScheme: EcdsaSigningScheme;
|
|
55
|
-
}
|
|
1
|
+
import type { SupportedChainId } from '../chains';
|
|
2
|
+
import type { Signer } from '@ethersproject/abstract-signer';
|
|
3
|
+
import type { OrderParameters, EcdsaSigningScheme } from '../order-book';
|
|
4
|
+
/**
|
|
5
|
+
* Unsigned order intent to be placed.
|
|
6
|
+
*/
|
|
7
|
+
export type UnsignedOrder = Omit<OrderParameters, 'receiver'> & {
|
|
8
|
+
receiver: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Encoded signature including signing scheme for the order.
|
|
12
|
+
*/
|
|
13
|
+
export type SigningResult = {
|
|
14
|
+
signature: string;
|
|
15
|
+
signingScheme: EcdsaSigningScheme;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Parameters for signing an order intent.
|
|
19
|
+
* @param chainId The CoW Protocol `chainId` context that's being used.
|
|
20
|
+
* @param signer The signer who is placing the order intent.
|
|
21
|
+
* @param order The unsigned order intent to be placed.
|
|
22
|
+
* @param signingScheme The signing scheme to use for the signature.
|
|
23
|
+
*/
|
|
24
|
+
export interface SignOrderParams {
|
|
25
|
+
chainId: SupportedChainId;
|
|
26
|
+
signer: Signer;
|
|
27
|
+
order: UnsignedOrder;
|
|
28
|
+
signingScheme: EcdsaSigningScheme;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Parameters for signing an order cancellation.
|
|
32
|
+
* @param chainId The CoW Protocol `chainId` context that's being used.
|
|
33
|
+
* @param signer The signer who initially placed the order intent.
|
|
34
|
+
* @param orderUid The unique identifier of the order to cancel.
|
|
35
|
+
* @param signingScheme The signing scheme to use for the signature.
|
|
36
|
+
*/
|
|
37
|
+
export interface SignOrderCancellationParams {
|
|
38
|
+
chainId: SupportedChainId;
|
|
39
|
+
signer: Signer;
|
|
40
|
+
orderUid: string;
|
|
41
|
+
signingScheme: EcdsaSigningScheme;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Parameters for signing multiple bulk order cancellations.
|
|
45
|
+
* @param chainId The CoW Protocol `chainId` context that's being used.
|
|
46
|
+
* @param signer The signer who initially placed the order intents.
|
|
47
|
+
* @param orderUids An array of `orderUid` to cancel.
|
|
48
|
+
* @param signingScheme The signing scheme to use for the signature.
|
|
49
|
+
*/
|
|
50
|
+
export interface SignOrderCancellationsParams {
|
|
51
|
+
chainId: SupportedChainId;
|
|
52
|
+
signer: Signer;
|
|
53
|
+
orderUids: string[];
|
|
54
|
+
signingScheme: EcdsaSigningScheme;
|
|
55
|
+
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import type { TypedDataDomain, Order, OrderUidParams } from '@cowprotocol/contracts';
|
|
2
|
-
import type { Signer } from '@ethersproject/abstract-signer';
|
|
3
|
-
import type { SigningResult, UnsignedOrder } from './types';
|
|
4
|
-
import type { SupportedChainId } from '../chains';
|
|
5
|
-
/**
|
|
6
|
-
* Returns the signature for the specified order with the signing scheme encoded
|
|
7
|
-
* into the signature.
|
|
8
|
-
* @param {UnsignedOrder} order The order to sign.
|
|
9
|
-
* @param {SupportedChainId} chainId The chain Id
|
|
10
|
-
* @param {Signer} signer The owner for the order used to sign.
|
|
11
|
-
* @return {*} Encoded signature including signing scheme for the order.
|
|
12
|
-
*/
|
|
13
|
-
export declare function signOrder(order: UnsignedOrder, chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
14
|
-
/**
|
|
15
|
-
* Returns the signature for the Order Cancellation with the signing scheme encoded
|
|
16
|
-
* into the signature.
|
|
17
|
-
* @param {string} orderUid The unique identifier of the order being cancelled.
|
|
18
|
-
* @param {SupportedChainId} chainId The chain Id
|
|
19
|
-
* @param {Signer} signer The owner for the order used to sign.
|
|
20
|
-
* @return {*} Encoded signature including signing scheme for the order.
|
|
21
|
-
*/
|
|
22
|
-
export declare function signOrderCancellation(orderUid: string, chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
23
|
-
/**
|
|
24
|
-
* Returns the signature for the Order Cancellations with the signing scheme encoded
|
|
25
|
-
* into the signature.
|
|
26
|
-
*
|
|
27
|
-
* @param {string[]} orderUids The unique identifiers of the orders being cancelled.
|
|
28
|
-
* @param {SupportedChainId} chainId The CoW Protocol protocol `chainId` context that's being used.
|
|
29
|
-
* @param {Signer} signer The owner that had placed the orders used to sign.
|
|
30
|
-
* @returns {*} Encoded signature including signing scheme for the order.
|
|
31
|
-
*/
|
|
32
|
-
export declare function signOrderCancellations(orderUids: string[], chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
33
|
-
/**
|
|
34
|
-
* Returns the TypedDataDomain used for signing for the specified chainId.
|
|
35
|
-
* @param {SupportedChainId} chainId The chain Id
|
|
36
|
-
* @return {*} The TypedDataDomain for the specified chainId.
|
|
37
|
-
* @throws {CowError} If the chainId is not supported.
|
|
38
|
-
*/
|
|
39
|
-
export declare function getDomain(chainId: SupportedChainId): TypedDataDomain;
|
|
40
|
-
/**
|
|
41
|
-
* Generate a deterministic order ID for the specified order.
|
|
42
|
-
* @param {SupportedChainId} chainId The chain Id
|
|
43
|
-
* @param {Order} order order to sign
|
|
44
|
-
* @param {Pick<OrderUidParams, 'owner'>} params order unique identifier parameters.
|
|
45
|
-
*/
|
|
46
|
-
export declare function generateOrderId(chainId: SupportedChainId, order: Order, params: Pick<OrderUidParams, 'owner'>): Promise<{
|
|
47
|
-
orderId: string;
|
|
48
|
-
orderDigest: string;
|
|
49
|
-
}>;
|
|
1
|
+
import type { TypedDataDomain, Order, OrderUidParams } from '@cowprotocol/contracts';
|
|
2
|
+
import type { Signer } from '@ethersproject/abstract-signer';
|
|
3
|
+
import type { SigningResult, UnsignedOrder } from './types';
|
|
4
|
+
import type { SupportedChainId } from '../chains';
|
|
5
|
+
/**
|
|
6
|
+
* Returns the signature for the specified order with the signing scheme encoded
|
|
7
|
+
* into the signature.
|
|
8
|
+
* @param {UnsignedOrder} order The order to sign.
|
|
9
|
+
* @param {SupportedChainId} chainId The chain Id
|
|
10
|
+
* @param {Signer} signer The owner for the order used to sign.
|
|
11
|
+
* @return {*} Encoded signature including signing scheme for the order.
|
|
12
|
+
*/
|
|
13
|
+
export declare function signOrder(order: UnsignedOrder, chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
14
|
+
/**
|
|
15
|
+
* Returns the signature for the Order Cancellation with the signing scheme encoded
|
|
16
|
+
* into the signature.
|
|
17
|
+
* @param {string} orderUid The unique identifier of the order being cancelled.
|
|
18
|
+
* @param {SupportedChainId} chainId The chain Id
|
|
19
|
+
* @param {Signer} signer The owner for the order used to sign.
|
|
20
|
+
* @return {*} Encoded signature including signing scheme for the order.
|
|
21
|
+
*/
|
|
22
|
+
export declare function signOrderCancellation(orderUid: string, chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the signature for the Order Cancellations with the signing scheme encoded
|
|
25
|
+
* into the signature.
|
|
26
|
+
*
|
|
27
|
+
* @param {string[]} orderUids The unique identifiers of the orders being cancelled.
|
|
28
|
+
* @param {SupportedChainId} chainId The CoW Protocol protocol `chainId` context that's being used.
|
|
29
|
+
* @param {Signer} signer The owner that had placed the orders used to sign.
|
|
30
|
+
* @returns {*} Encoded signature including signing scheme for the order.
|
|
31
|
+
*/
|
|
32
|
+
export declare function signOrderCancellations(orderUids: string[], chainId: SupportedChainId, signer: Signer): Promise<SigningResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the TypedDataDomain used for signing for the specified chainId.
|
|
35
|
+
* @param {SupportedChainId} chainId The chain Id
|
|
36
|
+
* @return {*} The TypedDataDomain for the specified chainId.
|
|
37
|
+
* @throws {CowError} If the chainId is not supported.
|
|
38
|
+
*/
|
|
39
|
+
export declare function getDomain(chainId: SupportedChainId): TypedDataDomain;
|
|
40
|
+
/**
|
|
41
|
+
* Generate a deterministic order ID for the specified order.
|
|
42
|
+
* @param {SupportedChainId} chainId The chain Id
|
|
43
|
+
* @param {Order} order order to sign
|
|
44
|
+
* @param {Pick<OrderUidParams, 'owner'>} params order unique identifier parameters.
|
|
45
|
+
*/
|
|
46
|
+
export declare function generateOrderId(chainId: SupportedChainId, order: Order, params: Pick<OrderUidParams, 'owner'>): Promise<{
|
|
47
|
+
orderId: string;
|
|
48
|
+
orderDigest: string;
|
|
49
|
+
}>;
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cowprotocol/cow-sdk",
|
|
3
|
-
"version": "6.0.0
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"files": [
|
|
6
6
|
"/dist"
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"start": "microbundle -f modern,esm,cjs watch",
|
|
20
20
|
"copy-md-files": "npx cpx \"**/*.md\" dist",
|
|
21
21
|
"postbuild": "cp package.json dist && yarn copy-md-files && yarn run trading:generateSchemas",
|
|
22
|
-
"lint": "eslint src",
|
|
22
|
+
"lint": "eslint ./src",
|
|
23
23
|
"format": "prettier --write \"src/**/*.+(ts|json)\"",
|
|
24
24
|
"test": "jest",
|
|
25
25
|
"test:coverage": "jest --coverage --json --outputFile=jest.results.json && cat ./coverage/lcov.info | coveralls",
|
|
@@ -33,14 +33,15 @@
|
|
|
33
33
|
"trading:generateSchemas": "ts-node scripts/generateTradingSchemas.ts"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@cowprotocol/app-data": "^2.
|
|
37
|
-
"@cowprotocol/contracts": "^1.
|
|
38
|
-
"@ethersproject/abstract-signer": "^5.
|
|
39
|
-
"@openzeppelin/merkle-tree": "^1.0.
|
|
36
|
+
"@cowprotocol/app-data": "^3.2.0",
|
|
37
|
+
"@cowprotocol/contracts": "^1.8.0",
|
|
38
|
+
"@ethersproject/abstract-signer": "^5.8.0",
|
|
39
|
+
"@openzeppelin/merkle-tree": "^1.0.8",
|
|
40
40
|
"@weiroll/weiroll.js": "^0.3.0",
|
|
41
|
-
"cross-fetch": "^3.
|
|
42
|
-
"
|
|
43
|
-
"
|
|
41
|
+
"cross-fetch": "^3.2.0",
|
|
42
|
+
"deepmerge": "^4.3.1",
|
|
43
|
+
"exponential-backoff": "^3.1.2",
|
|
44
|
+
"graphql": "^16.11.0",
|
|
44
45
|
"graphql-request": "^4.3.0",
|
|
45
46
|
"limiter": "^3.0.0"
|
|
46
47
|
},
|
|
@@ -50,37 +51,34 @@
|
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
|
52
53
|
"@babel/plugin-proposal-private-methods": "^7.18.6",
|
|
53
|
-
"@babel/preset-env": "^7.
|
|
54
|
-
"@babel/preset-typescript": "^7.
|
|
55
|
-
"@
|
|
56
|
-
"@graphql-codegen/
|
|
57
|
-
"@graphql-codegen/typescript
|
|
58
|
-
"@
|
|
59
|
-
"@
|
|
60
|
-
"@types/
|
|
61
|
-
"@
|
|
62
|
-
"@typescript-eslint/parser": "^5.51.0",
|
|
54
|
+
"@babel/preset-env": "^7.27.2",
|
|
55
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
56
|
+
"@eslint/js": "^9.26.0",
|
|
57
|
+
"@graphql-codegen/cli": "5.0.6",
|
|
58
|
+
"@graphql-codegen/typescript": "4.1.6",
|
|
59
|
+
"@graphql-codegen/typescript-operations": "^4.6.1",
|
|
60
|
+
"@typechain/ethers-v5": "^11.1.2",
|
|
61
|
+
"@types/jest": "^29.5.14",
|
|
62
|
+
"@types/node": "^22.15.17",
|
|
63
63
|
"babel-plugin-inline-import": "^3.0.0",
|
|
64
64
|
"coveralls": "^3.1.1",
|
|
65
65
|
"cpx": "^1.5.0",
|
|
66
|
-
"eslint": "^
|
|
67
|
-
"eslint-
|
|
68
|
-
"
|
|
69
|
-
"eslint-plugin-unused-imports": "^3.0.0",
|
|
70
|
-
"ethers": "^5.8.0",
|
|
71
|
-
"jest": "^29.6.4",
|
|
66
|
+
"eslint": "^9.26.0",
|
|
67
|
+
"eslint-plugin-unused-imports": "^4.1.4",
|
|
68
|
+
"jest": "^29.7.0",
|
|
72
69
|
"jest-fetch-mock": "^3.0.3",
|
|
73
70
|
"microbundle": "^0.15.1",
|
|
74
|
-
"openapi-typescript-codegen": "^0.
|
|
75
|
-
"prettier": "^
|
|
76
|
-
"ts-json-schema-generator": "^2.
|
|
71
|
+
"openapi-typescript-codegen": "^0.29.0",
|
|
72
|
+
"prettier": "^3.5.3",
|
|
73
|
+
"ts-json-schema-generator": "^2.4.0",
|
|
77
74
|
"ts-mockito": "^2.6.1",
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"
|
|
75
|
+
"ts-node": "^10.9.2",
|
|
76
|
+
"tsc-watch": "^6.2.1",
|
|
77
|
+
"typechain": "^8.3.2",
|
|
78
|
+
"typescript": "^5.8.3",
|
|
79
|
+
"typescript-eslint": "^8.32.1"
|
|
81
80
|
},
|
|
82
81
|
"jest": {
|
|
83
|
-
"maxWorkers": 1,
|
|
84
82
|
"automock": false,
|
|
85
83
|
"resetMocks": false,
|
|
86
84
|
"setupFiles": [
|
|
@@ -90,6 +88,7 @@
|
|
|
90
88
|
"src/**/*.{ts,tsx}"
|
|
91
89
|
],
|
|
92
90
|
"coveragePathIgnorePatterns": [
|
|
91
|
+
"src/common/generated",
|
|
93
92
|
"src/composable/generated"
|
|
94
93
|
],
|
|
95
94
|
"moduleDirectories": [
|