@shapeshiftoss/swapper 9.6.1 → 9.9.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.
@@ -25,3 +25,5 @@ export declare class CowSwapper implements Swapper<KnownChainIds.EthereumMainnet
25
25
  filterAssetIdsBySellable(assetIds: AssetId[]): AssetId[];
26
26
  getTradeTxs(args: TradeResult): Promise<TradeTxs>;
27
27
  }
28
+ export * from './utils';
29
+ export * from './types';
@@ -1,4 +1,18 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  exports.CowSwapper = void 0;
4
18
  const caip_1 = require("@shapeshiftoss/caip");
@@ -55,3 +69,5 @@ class CowSwapper {
55
69
  }
56
70
  }
57
71
  exports.CowSwapper = CowSwapper;
72
+ __exportStar(require("./utils"), exports);
73
+ __exportStar(require("./types"), exports);
@@ -6,7 +6,7 @@ export declare const DEFAULT_SOURCE: {
6
6
  proportion: string;
7
7
  }[];
8
8
  export declare const DEFAULT_ADDRESS = "0x0000000000000000000000000000000000000000";
9
- export declare const DEFAULT_APP_DATA = "0x0000000000000000000000000000000000000000000000000000000000000000";
9
+ export declare const DEFAULT_APP_DATA = "0x68a7b5781dfe48bd5d7aeb11261c17517f5c587da682e4fade9b6a00a59b8970";
10
10
  export declare const COW_SWAP_VAULT_RELAYER_ADDRESS = "0xc92e8bdf79f0507f65a392b0ab4667716bfe0110";
11
11
  export declare const COW_SWAP_SETTLEMENT_ADDRESS = "0x9008D19f58AAbD9eD0D60971565AA8510560ab41";
12
12
  export declare const WETH_ASSET_ID = "eip155:1/erc20:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
@@ -7,7 +7,7 @@ exports.MAX_COWSWAP_TRADE = '100000000000000000000000000';
7
7
  exports.MIN_COWSWAP_VALUE_USD = 20;
8
8
  exports.DEFAULT_SOURCE = [{ name: 'CowSwap', proportion: '1' }];
9
9
  exports.DEFAULT_ADDRESS = constants_1.AddressZero;
10
- exports.DEFAULT_APP_DATA = constants_1.HashZero;
10
+ exports.DEFAULT_APP_DATA = '0x68a7b5781dfe48bd5d7aeb11261c17517f5c587da682e4fade9b6a00a59b8970';
11
11
  exports.COW_SWAP_VAULT_RELAYER_ADDRESS = '0xc92e8bdf79f0507f65a392b0ab4667716bfe0110';
12
12
  exports.COW_SWAP_SETTLEMENT_ADDRESS = '0x9008D19f58AAbD9eD0D60971565AA8510560ab41';
13
13
  exports.WETH_ASSET_ID = 'eip155:1/erc20:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
@@ -0,0 +1,4 @@
1
+ import { ChainId } from '@shapeshiftoss/caip';
2
+ import { Trade } from '../../api';
3
+ import { CowTrade } from './types';
4
+ export declare const isCowTrade: <C extends ChainId>(trade: CowTrade<C> | Trade<C>) => trade is CowTrade<C>;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isCowTrade = void 0;
4
+ const isCowTrade = (trade) => Boolean(trade.feeAmountInSellToken);
5
+ exports.isCowTrade = isCowTrade;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/swapper",
3
- "version": "9.6.1",
3
+ "version": "9.9.0",
4
4
  "description": "An interface and implementations to trade coins via various protocols",
5
5
  "repository": "https://github.com/shapeshift/lib",
6
6
  "license": "MIT",