@cowprotocol/sdk-contracts-ts 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1312,6 +1312,6 @@ declare function getTypedDataV3Signer(signer: Signer): AbstractSigner<unknown>;
1312
1312
  */
1313
1313
  declare function getIntChainIdTypedDataV4Signer(signer: Signer): AbstractSigner<unknown>;
1314
1314
 
1315
- declare const CONTRACTS_PKG_VERSION = "0.1.0";
1315
+ declare const CONTRACTS_PKG_VERSION = "0.2.0";
1316
1316
 
1317
1317
  export { AllowListReader, Api, type ApiCall, type ApiError, type ArtifactDeployment, BUY_ETH_ADDRESS, type BatchSwapStep, type BuyAmountAfterFee, CANCELLATIONS_TYPE_FIELDS, CONTRACTS_PKG_VERSION, CONTRACT_NAMES, type CallError, type CommonQuoteQuery, type ContractName, type EcdsaSignature as ContractsEcdsaSignature, type EcdsaSigningScheme as ContractsEcdsaSigningScheme, type Order as ContractsOrder, type OrderCancellations as ContractsOrderCancellations, OrderKind as ContractsOrderKind, type Signature as ContractsSignature, SigningScheme as ContractsSigningScheme, type Trade as ContractsTrade, ContractsTs, DEPLOYER_CONTRACT, type DeploymentArguments, EIP1271_MAGICVALUE, EIP173_PROXY_ABI, type Eip1271Signature, type Eip1271SignatureData, type EncodedSettlement, type EncodedSwap, Environment, type EstimateTradeAmountQuery, FLAG_MASKS, type FlagKey, type FlagOptions, type FlagValue, type GetExecutedSellAmountQuery, GetQuoteErrorType, type GetQuoteResponse, type HashLike, type Interaction, type InteractionLike, InteractionStage, LIMIT_CONCURRENT_REQUESTS, type MaybeNamedArtifactArtifactDeployment, type NamedArtifactDeployment, type NormalizedOrder, ORDER_TYPE_FIELDS, ORDER_TYPE_HASH, ORDER_UID_LENGTH, OrderBalance, type OrderDetailResponse, type OrderFlags, type OrderRefunds, type OrderUidParams, PRE_SIGNED, type PlaceOrderQuery, type PreSignSignature, type Prices, QuotePriceQuality, type QuoteQuery, SALT, type SellAmountAfterFee, type SellAmountBeforeFee, SettlementEncoder, SettlementReader, type Swap, SwapEncoder, type SwapExecution, type Timestamp, TokenRegistry, type TradeExecution, type TradeFlags, type TradeSimulation, type TradeSimulationBalanceDelta, type TradeSimulationResult, TradeSimulator, apiUrl, computeOrderUid, decodeEip1271SignatureData, decodeOrder, decodeOrderFlags, decodeSignatureOwner, decodeSigningScheme, decodeTradeFlags, deterministicDeploymentAddress, ecdsaSignTypedData, encodeEip1271SignatureData, encodeOrderFlags, encodeSignatureData, encodeSigningScheme, encodeSwapStep, encodeTrade, encodeTradeFlags, extractOrderUidParams, getIntChainIdTypedDataV4Signer, getTypedDataV3Signer, getTypedDataVersionedSigner, grantRequiredRoles, hashOrder, hashOrderCancellation, hashOrderCancellations, hashTypedData, hashify, implementationAddress, normalizeBuyTokenBalance, normalizeInteraction, normalizeInteractions, normalizeOrder, ownerAddress, packOrderUidParams, signOrder, signOrderCancellation, signOrderCancellations, timestamp };
package/dist/index.d.ts CHANGED
@@ -1312,6 +1312,6 @@ declare function getTypedDataV3Signer(signer: Signer): AbstractSigner<unknown>;
1312
1312
  */
1313
1313
  declare function getIntChainIdTypedDataV4Signer(signer: Signer): AbstractSigner<unknown>;
1314
1314
 
1315
- declare const CONTRACTS_PKG_VERSION = "0.1.0";
1315
+ declare const CONTRACTS_PKG_VERSION = "0.2.0";
1316
1316
 
1317
1317
  export { AllowListReader, Api, type ApiCall, type ApiError, type ArtifactDeployment, BUY_ETH_ADDRESS, type BatchSwapStep, type BuyAmountAfterFee, CANCELLATIONS_TYPE_FIELDS, CONTRACTS_PKG_VERSION, CONTRACT_NAMES, type CallError, type CommonQuoteQuery, type ContractName, type EcdsaSignature as ContractsEcdsaSignature, type EcdsaSigningScheme as ContractsEcdsaSigningScheme, type Order as ContractsOrder, type OrderCancellations as ContractsOrderCancellations, OrderKind as ContractsOrderKind, type Signature as ContractsSignature, SigningScheme as ContractsSigningScheme, type Trade as ContractsTrade, ContractsTs, DEPLOYER_CONTRACT, type DeploymentArguments, EIP1271_MAGICVALUE, EIP173_PROXY_ABI, type Eip1271Signature, type Eip1271SignatureData, type EncodedSettlement, type EncodedSwap, Environment, type EstimateTradeAmountQuery, FLAG_MASKS, type FlagKey, type FlagOptions, type FlagValue, type GetExecutedSellAmountQuery, GetQuoteErrorType, type GetQuoteResponse, type HashLike, type Interaction, type InteractionLike, InteractionStage, LIMIT_CONCURRENT_REQUESTS, type MaybeNamedArtifactArtifactDeployment, type NamedArtifactDeployment, type NormalizedOrder, ORDER_TYPE_FIELDS, ORDER_TYPE_HASH, ORDER_UID_LENGTH, OrderBalance, type OrderDetailResponse, type OrderFlags, type OrderRefunds, type OrderUidParams, PRE_SIGNED, type PlaceOrderQuery, type PreSignSignature, type Prices, QuotePriceQuality, type QuoteQuery, SALT, type SellAmountAfterFee, type SellAmountBeforeFee, SettlementEncoder, SettlementReader, type Swap, SwapEncoder, type SwapExecution, type Timestamp, TokenRegistry, type TradeExecution, type TradeFlags, type TradeSimulation, type TradeSimulationBalanceDelta, type TradeSimulationResult, TradeSimulator, apiUrl, computeOrderUid, decodeEip1271SignatureData, decodeOrder, decodeOrderFlags, decodeSignatureOwner, decodeSigningScheme, decodeTradeFlags, deterministicDeploymentAddress, ecdsaSignTypedData, encodeEip1271SignatureData, encodeOrderFlags, encodeSignatureData, encodeSigningScheme, encodeSwapStep, encodeTrade, encodeTradeFlags, extractOrderUidParams, getIntChainIdTypedDataV4Signer, getTypedDataV3Signer, getTypedDataVersionedSigner, grantRequiredRoles, hashOrder, hashOrderCancellation, hashOrderCancellations, hashTypedData, hashify, implementationAddress, normalizeBuyTokenBalance, normalizeInteraction, normalizeInteractions, normalizeOrder, ownerAddress, packOrderUidParams, signOrder, signOrderCancellation, signOrderCancellations, timestamp };
package/dist/index.js CHANGED
@@ -137,14 +137,13 @@ function normalizeBuyTokenBalance(balance) {
137
137
  }
138
138
  }
139
139
  function normalizeOrder(order) {
140
- const adapter = (0, import_sdk_common.getGlobalAdapter)();
141
- if (order.receiver === adapter.ZERO_ADDRESS) {
140
+ if (order.receiver === import_sdk_common.ZERO_ADDRESS) {
142
141
  throw new Error("receiver cannot be address(0)");
143
142
  }
144
143
  const normalizedOrder = {
145
144
  ...order,
146
145
  sellTokenBalance: order.sellTokenBalance ?? "erc20" /* ERC20 */,
147
- receiver: order.receiver ?? adapter.ZERO_ADDRESS,
146
+ receiver: order.receiver ?? import_sdk_common.ZERO_ADDRESS,
148
147
  validTo: timestamp(order.validTo),
149
148
  appData: hashify(order.appData),
150
149
  buyTokenBalance: normalizeBuyTokenBalance(order.buyTokenBalance)
@@ -1177,7 +1176,7 @@ function getIntChainIdTypedDataV4Signer(signer) {
1177
1176
  }
1178
1177
 
1179
1178
  // src/generated/packageVersion.ts
1180
- var CONTRACTS_PKG_VERSION = "0.1.0";
1179
+ var CONTRACTS_PKG_VERSION = "0.2.0";
1181
1180
  // Annotate the CommonJS export names for ESM import in node:
1182
1181
  0 && (module.exports = {
1183
1182
  AllowListReader,
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  import { setGlobalAdapter as setGlobalAdapter3 } from "@cowprotocol/sdk-common";
3
3
 
4
4
  // src/order.ts
5
- import { getGlobalAdapter } from "@cowprotocol/sdk-common";
5
+ import { getGlobalAdapter, ZERO_ADDRESS } from "@cowprotocol/sdk-common";
6
6
  var BUY_ETH_ADDRESS = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
7
7
  var OrderBalance = /* @__PURE__ */ ((OrderBalance3) => {
8
8
  OrderBalance3["ERC20"] = "erc20";
@@ -45,14 +45,13 @@ function normalizeBuyTokenBalance(balance) {
45
45
  }
46
46
  }
47
47
  function normalizeOrder(order) {
48
- const adapter = getGlobalAdapter();
49
- if (order.receiver === adapter.ZERO_ADDRESS) {
48
+ if (order.receiver === ZERO_ADDRESS) {
50
49
  throw new Error("receiver cannot be address(0)");
51
50
  }
52
51
  const normalizedOrder = {
53
52
  ...order,
54
53
  sellTokenBalance: order.sellTokenBalance ?? "erc20" /* ERC20 */,
55
- receiver: order.receiver ?? adapter.ZERO_ADDRESS,
54
+ receiver: order.receiver ?? ZERO_ADDRESS,
56
55
  validTo: timestamp(order.validTo),
57
56
  appData: hashify(order.appData),
58
57
  buyTokenBalance: normalizeBuyTokenBalance(order.buyTokenBalance)
@@ -1090,7 +1089,7 @@ function getIntChainIdTypedDataV4Signer(signer) {
1090
1089
  }
1091
1090
 
1092
1091
  // src/generated/packageVersion.ts
1093
- var CONTRACTS_PKG_VERSION = "0.1.0";
1092
+ var CONTRACTS_PKG_VERSION = "0.2.0";
1094
1093
  export {
1095
1094
  AllowListReader,
1096
1095
  Api,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cowprotocol/sdk-contracts-ts",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "TypeScript contract bindings for CoW Protocol SDK",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -30,8 +30,8 @@
30
30
  "viem": "^2.28.4",
31
31
  "@cow-sdk/typescript-config": "0.0.0-beta.0",
32
32
  "@cowprotocol/sdk-ethers-v5-adapter": "0.1.0",
33
- "@cowprotocol/sdk-viem-adapter": "0.1.0",
34
- "@cowprotocol/sdk-ethers-v6-adapter": "0.1.0"
33
+ "@cowprotocol/sdk-ethers-v6-adapter": "0.1.0",
34
+ "@cowprotocol/sdk-viem-adapter": "0.1.0"
35
35
  },
36
36
  "scripts": {
37
37
  "build": "tsup src/index.ts --format esm,cjs --dts",