@shapeshiftoss/swapper 7.8.2 → 7.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.
package/dist/api.d.ts CHANGED
@@ -127,10 +127,6 @@ export interface MinMaxOutput {
127
127
  minimum: string;
128
128
  maximum: string;
129
129
  }
130
- export declare type GetMinMaxInput = {
131
- sellAsset: Asset;
132
- buyAsset: Asset;
133
- };
134
130
  export declare type ApprovalNeededOutput = {
135
131
  approvalNeeded: boolean;
136
132
  };
@@ -168,7 +164,7 @@ export declare enum SwapErrorTypes {
168
164
  }
169
165
  export interface Swapper<T extends ChainId> {
170
166
  /** perform any necessary async initialization */
171
- initialize(): Promise<void>;
167
+ initialize?(): Promise<void>;
172
168
  /** Returns the swapper type */
173
169
  getType(): SwapperType;
174
170
  /**
@@ -17,7 +17,6 @@ export declare class CowSwapper implements Swapper<'eip155:1'> {
17
17
  static swapperName: string;
18
18
  deps: CowSwapperDeps;
19
19
  constructor(deps: CowSwapperDeps);
20
- initialize(): Promise<void>;
21
20
  getType(): SwapperType;
22
21
  buildTrade(args: BuildTradeInput): Promise<Trade<'eip155:1'>>;
23
22
  getTradeQuote(input: GetTradeQuoteInput): Promise<TradeQuote<'eip155:1'>>;
@@ -11,8 +11,6 @@ class CowSwapper {
11
11
  constructor(deps) {
12
12
  this.deps = deps;
13
13
  }
14
- // eslint-disable-next-line @typescript-eslint/no-empty-function
15
- async initialize() { }
16
14
  getType() {
17
15
  return api_1.SwapperType.CowSwap;
18
16
  }
@@ -8,7 +8,7 @@ const getBtcTxFees = async ({ deps, opReturnData, vault, buyAsset, sellAmount, a
8
8
  try {
9
9
  const adapter = adapterManager.get('bip122:000000000019d6689c085ae165831e93');
10
10
  if (!adapter)
11
- throw new api_1.SwapError(`[getBtcTxFees] - No chain adapter found for ${'bip122:000000000019d6689c085ae165831e93'}.`, {
11
+ throw new api_1.SwapError(`[getBtcTxFees] - No chain adapter found for bip122:000000000019d6689c085ae165831e93.`, {
12
12
  code: api_1.SwapErrorTypes.UNSUPPORTED_CHAIN,
13
13
  details: { chainId: 'bip122:000000000019d6689c085ae165831e93' }
14
14
  });
@@ -11,7 +11,6 @@ export declare class ZrxSwapper implements Swapper<'eip155:1'> {
11
11
  static swapperName: string;
12
12
  deps: ZrxSwapperDeps;
13
13
  constructor(deps: ZrxSwapperDeps);
14
- initialize(): Promise<void>;
15
14
  getType(): SwapperType;
16
15
  buildTrade(args: BuildTradeInput): Promise<ZrxTrade>;
17
16
  getTradeQuote(input: GetTradeQuoteInput): Promise<TradeQuote<'eip155:1'>>;
@@ -13,9 +13,6 @@ class ZrxSwapper {
13
13
  constructor(deps) {
14
14
  this.deps = deps;
15
15
  }
16
- // noop for zrx
17
- // eslint-disable-next-line @typescript-eslint/no-empty-function
18
- async initialize() { }
19
16
  getType() {
20
17
  return api_1.SwapperType.Zrx;
21
18
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/swapper",
3
- "version": "7.8.2",
3
+ "version": "7.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",