@shapeshiftoss/swapper 8.7.0 → 9.0.1

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
@@ -1,7 +1,8 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { AssetId, ChainId } from '@shapeshiftoss/caip';
2
3
  import { avalanche, cosmos, ethereum, osmosis } from '@shapeshiftoss/chain-adapters';
3
4
  import { HDWallet } from '@shapeshiftoss/hdwallet-core';
4
- import { Asset, BIP44Params, ChainSpecific, KnownChainIds, UtxoAccountType } from '@shapeshiftoss/types';
5
+ import { BIP44Params, ChainSpecific, KnownChainIds, UtxoAccountType } from '@shapeshiftoss/types';
5
6
  export declare const SwapError: {
6
7
  new <V extends {
7
8
  cause?: unknown;
@@ -1,6 +1,7 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { AssetId } from '@shapeshiftoss/caip';
2
3
  import { ethereum } from '@shapeshiftoss/chain-adapters';
3
- import { Asset, KnownChainIds } from '@shapeshiftoss/types';
4
+ import { KnownChainIds } from '@shapeshiftoss/types';
4
5
  import Web3 from 'web3';
5
6
  import { ApprovalNeededInput, ApprovalNeededOutput, ApproveInfiniteInput, BuildTradeInput, BuyAssetBySellIdInput, ExecuteTradeInput, GetTradeQuoteInput, Swapper, SwapperType, TradeQuote, TradeResult, TradeTxs } from '../../api';
6
7
  import { CowTrade } from './types';
@@ -1,4 +1,4 @@
1
- import { Asset } from '@shapeshiftoss/types';
1
+ import { Asset } from '@shapeshiftoss/asset-service';
2
2
  import { MinMaxOutput } from '../../../api';
3
3
  import { CowSwapperDeps } from '../CowSwapper';
4
4
  export declare const getCowSwapMinMax: (deps: CowSwapperDeps, sellAsset: Asset, buyAsset: Asset) => Promise<MinMaxOutput>;
@@ -1,5 +1,5 @@
1
1
  import { TypedDataDomain, TypedDataField } from '@ethersproject/abstract-signer';
2
- import { Asset } from '@shapeshiftoss/types';
2
+ import { Asset } from '@shapeshiftoss/asset-service';
3
3
  import { CowSwapperDeps } from '../../CowSwapper';
4
4
  export declare const ORDER_TYPE_FIELDS: {
5
5
  name: string;
@@ -1,5 +1,5 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { AssetId, ChainId } from '@shapeshiftoss/caip';
2
- import { Asset } from '@shapeshiftoss/types';
3
3
  import { ApprovalNeededOutput, BuildTradeInput, BuyAssetBySellIdInput, ExecuteTradeInput, GetTradeQuoteInput, MinMaxOutput, Swapper, SwapperType, Trade, TradeQuote, TradeResult, TradeTxs } from '../../api';
4
4
  import { OsmoSwapperDeps } from './utils/types';
5
5
  export declare class OsmosisSwapper implements Swapper<ChainId> {
@@ -1,5 +1,5 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { AssetId, ChainId } from '@shapeshiftoss/caip';
2
- import { Asset } from '@shapeshiftoss/types';
3
3
  import { ApprovalNeededOutput, BuyAssetBySellIdInput, Swapper, SwapperType, Trade, TradeQuote, TradeResult, TradeTxs } from '../../api';
4
4
  /**
5
5
  * Playground for testing different scenarios of multiple swappers in the manager.
@@ -1,5 +1,5 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { AssetId, ChainId } from '@shapeshiftoss/caip';
2
- import type { Asset } from '@shapeshiftoss/types';
3
3
  import { KnownChainIds } from '@shapeshiftoss/types';
4
4
  import { ApprovalNeededInput, ApprovalNeededOutput, ApproveInfiniteInput, BuyAssetBySellIdInput, ExecuteTradeInput, GetTradeQuoteInput, Swapper, SwapperType, Trade, TradeQuote, TradeResult, TradeTxs } from '../../api';
5
5
  import { ThorchainSwapperDeps } from './types';
@@ -1,5 +1,6 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { HDWallet } from '@shapeshiftoss/hdwallet-core';
2
- import { Asset, BIP44Params, UtxoAccountType } from '@shapeshiftoss/types';
3
+ import { BIP44Params, UtxoAccountType } from '@shapeshiftoss/types';
3
4
  import { ThorchainSwapperDeps } from '../../../types';
4
5
  declare type GetBtcThorTxInfoArgs = {
5
6
  deps: ThorchainSwapperDeps;
@@ -1,6 +1,7 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { ethereum } from '@shapeshiftoss/chain-adapters';
2
3
  import { ETHSignTx, HDWallet } from '@shapeshiftoss/hdwallet-core';
3
- import { Asset, BIP44Params } from '@shapeshiftoss/types';
4
+ import { BIP44Params } from '@shapeshiftoss/types';
4
5
  import { ThorchainSwapperDeps } from '../../types';
5
6
  export declare const makeTradeTx: ({ wallet, bip44Params, sellAmount, buyAsset, sellAsset, destinationAddress, adapter, maxFeePerGas, maxPriorityFeePerGas, gasPrice, slippageTolerance, deps, gasLimit }: {
6
7
  wallet: HDWallet;
@@ -1,4 +1,4 @@
1
- import { Asset } from '@shapeshiftoss/types';
1
+ import { Asset } from '@shapeshiftoss/asset-service';
2
2
  import { ThorchainSwapperDeps } from '../../../types';
3
3
  declare type GetBtcThorTxInfoArgs = {
4
4
  deps: ThorchainSwapperDeps;
@@ -1,4 +1,4 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { AssetId } from '@shapeshiftoss/caip';
2
- import { Asset } from '@shapeshiftoss/types';
3
3
  import { ThorchainSwapperDeps } from '../../types';
4
4
  export declare const getTradeRate: (sellAsset: Asset, buyAssetId: AssetId, sellAmount: string, deps: ThorchainSwapperDeps) => Promise<string>;
@@ -1,4 +1,4 @@
1
- import { Asset } from '@shapeshiftoss/types';
1
+ import { Asset } from '@shapeshiftoss/asset-service';
2
2
  import { ThorchainSwapperDeps } from '../../types';
3
3
  export declare const getUsdRate: ({ deps, input }: {
4
4
  deps: ThorchainSwapperDeps;
@@ -1,5 +1,6 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters';
2
- import { Asset, KnownChainIds } from '@shapeshiftoss/types';
3
+ import { KnownChainIds } from '@shapeshiftoss/types';
3
4
  import { QuoteFeeData } from '../../../../../api';
4
5
  import { ThorchainSwapperDeps } from '../../../types';
5
6
  export declare const getBtcTxFees: ({ deps, opReturnData, vault, buyAsset, sellAmount, adapterManager, pubkey }: {
@@ -1,6 +1,7 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { AssetReference } from '@shapeshiftoss/caip';
2
3
  import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters';
3
- import { Asset, KnownChainIds } from '@shapeshiftoss/types';
4
+ import { KnownChainIds } from '@shapeshiftoss/types';
4
5
  import { QuoteFeeData } from '../../../../../api';
5
6
  import { ThorchainSwapperDeps } from '../../../types';
6
7
  export declare const getEthTxFees: ({ deps, data, router, buyAsset, sellAmount, adapterManager, receiveAddress, sellAssetReference }: {
@@ -1,5 +1,5 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { HDWallet } from '@shapeshiftoss/hdwallet-core';
2
- import { Asset } from '@shapeshiftoss/types';
3
3
  import BigNumber from 'bignumber.js';
4
4
  import Web3 from 'web3';
5
5
  import { AbiItem } from 'web3-utils';
@@ -1,4 +1,4 @@
1
- import { Asset } from '@shapeshiftoss/types';
1
+ import { Asset } from '@shapeshiftoss/asset-service';
2
2
  export declare const BTC: Asset;
3
3
  export declare const WETH: Asset;
4
4
  export declare const FOX: Asset;
@@ -3,5 +3,5 @@ import Web3 from 'web3';
3
3
  export declare const setupDeps: () => {
4
4
  web3: Web3;
5
5
  adapter: ethereum.ChainAdapter;
6
- feeAsset: import("@shapeshiftoss/types").Asset;
6
+ feeAsset: import("@shapeshiftoss/asset-service").Asset;
7
7
  };
@@ -1,5 +1,6 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { HDWallet } from '@shapeshiftoss/hdwallet-core';
2
- import { Asset, KnownChainIds } from '@shapeshiftoss/types';
3
+ import { KnownChainIds } from '@shapeshiftoss/types';
3
4
  import { TradeQuote } from '../../../api';
4
5
  export declare const setupQuote: () => {
5
6
  quoteInput: import("../../../api").GetEvmTradeQuoteInput;
@@ -1,5 +1,5 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { AssetId, ChainId } from '@shapeshiftoss/caip';
2
- import { Asset } from '@shapeshiftoss/types';
3
3
  import { ApprovalNeededInput, ApprovalNeededOutput, ApproveInfiniteInput, BuildTradeInput, BuyAssetBySellIdInput, EvmSupportedChainIds, GetEvmTradeQuoteInput, Swapper, SwapperType, TradeQuote, TradeResult, TradeTxs } from '../../api';
4
4
  import { ZrxExecuteTradeInput, ZrxSwapperDeps, ZrxTrade } from './types';
5
5
  export declare class ZrxSwapper<T extends EvmSupportedChainIds> implements Swapper<T> {
@@ -1,3 +1,3 @@
1
- import { Asset } from '@shapeshiftoss/types';
1
+ import { Asset } from '@shapeshiftoss/asset-service';
2
2
  import { MinMaxOutput } from '../../../api';
3
3
  export declare const getZrxMinMax: (sellAsset: Asset, buyAsset: Asset) => Promise<MinMaxOutput>;
@@ -1,5 +1,5 @@
1
+ import { Asset } from '@shapeshiftoss/asset-service';
1
2
  import { AssetId } from '@shapeshiftoss/caip';
2
- import { Asset } from '@shapeshiftoss/types';
3
3
  export declare const baseUrlFromChainId: (chainId: string) => string;
4
4
  export declare const usdcContractFromChainId: (chainId: string) => string;
5
5
  export declare const isNativeEvmAsset: (assetId: AssetId) => boolean;
@@ -1,4 +1,4 @@
1
- import { Asset } from '@shapeshiftoss/types';
1
+ import { Asset } from '@shapeshiftoss/asset-service';
2
2
  import { ZrxQuoteResponse } from '../../types';
3
3
  export declare const setupZrxTradeQuoteResponse: () => {
4
4
  quoteResponse: ZrxQuoteResponse;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/swapper",
3
- "version": "8.7.0",
3
+ "version": "9.0.1",
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",
@@ -30,20 +30,20 @@
30
30
  "web3": "1.7.4"
31
31
  },
32
32
  "peerDependencies": {
33
- "@shapeshiftoss/asset-service": "^6.2.1",
33
+ "@shapeshiftoss/asset-service": "^7.0.0",
34
34
  "@shapeshiftoss/caip": "^6.2.0",
35
35
  "@shapeshiftoss/chain-adapters": "^7.2.0",
36
36
  "@shapeshiftoss/errors": "^1.1.2",
37
37
  "@shapeshiftoss/hdwallet-core": "^1.27.0",
38
- "@shapeshiftoss/types": "^7.0.0"
38
+ "@shapeshiftoss/types": "^8.0.0"
39
39
  },
40
40
  "devDependencies": {
41
- "@shapeshiftoss/asset-service": "^6.2.1",
41
+ "@shapeshiftoss/asset-service": "^7.0.0",
42
42
  "@shapeshiftoss/caip": "^6.2.0",
43
43
  "@shapeshiftoss/chain-adapters": "^7.2.0",
44
44
  "@shapeshiftoss/errors": "^1.1.2",
45
45
  "@shapeshiftoss/hdwallet-core": "^1.27.0",
46
- "@shapeshiftoss/types": "^7.0.0",
46
+ "@shapeshiftoss/types": "^8.0.0",
47
47
  "@types/readline-sync": "^1.4.4",
48
48
  "readline-sync": "^1.4.10",
49
49
  "web3-utils": "1.7.4",