@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 +2 -1
- package/dist/swappers/cow/CowSwapper.d.ts +2 -1
- package/dist/swappers/cow/getCowSwapMinMax/getCowSwapMinMax.d.ts +1 -1
- package/dist/swappers/cow/utils/helpers/helpers.d.ts +1 -1
- package/dist/swappers/osmosis/OsmosisSwapper.d.ts +1 -1
- package/dist/swappers/test/TestSwapper.d.ts +1 -1
- package/dist/swappers/thorchain/ThorchainSwapper.d.ts +1 -1
- package/dist/swappers/thorchain/utils/bitcoin/utils/getThorTxData.d.ts +2 -1
- package/dist/swappers/thorchain/utils/ethereum/makeTradeTx.d.ts +2 -1
- package/dist/swappers/thorchain/utils/ethereum/utils/getThorTxData.d.ts +1 -1
- package/dist/swappers/thorchain/utils/getTradeRate/getTradeRate.d.ts +1 -1
- package/dist/swappers/thorchain/utils/getUsdRate/getUsdRate.d.ts +1 -1
- package/dist/swappers/thorchain/utils/txFeeHelpers/btcTxFees/getBtcTxFees.d.ts +2 -1
- package/dist/swappers/thorchain/utils/txFeeHelpers/ethTxFees/getEthTxFees.d.ts +2 -1
- package/dist/swappers/utils/helpers/helpers.d.ts +1 -1
- package/dist/swappers/utils/test-data/assets.d.ts +1 -1
- package/dist/swappers/utils/test-data/setupDeps.d.ts +1 -1
- package/dist/swappers/utils/test-data/setupSwapQuote.d.ts +2 -1
- package/dist/swappers/zrx/ZrxSwapper.d.ts +1 -1
- package/dist/swappers/zrx/getZrxMinMax/getZrxMinMax.d.ts +1 -1
- package/dist/swappers/zrx/utils/helpers/helpers.d.ts +1 -1
- package/dist/swappers/zrx/utils/test-data/setupZrxSwapQuote.d.ts +1 -1
- package/package.json +5 -5
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 {
|
|
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 {
|
|
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/
|
|
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/
|
|
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 {
|
|
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 {
|
|
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/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,5 +1,6 @@
|
|
|
1
|
+
import { Asset } from '@shapeshiftoss/asset-service';
|
|
1
2
|
import { ChainAdapterManager } from '@shapeshiftoss/chain-adapters';
|
|
2
|
-
import {
|
|
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 {
|
|
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,6 @@
|
|
|
1
|
+
import { Asset } from '@shapeshiftoss/asset-service';
|
|
1
2
|
import { HDWallet } from '@shapeshiftoss/hdwallet-core';
|
|
2
|
-
import {
|
|
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,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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapeshiftoss/swapper",
|
|
3
|
-
"version": "
|
|
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": "^
|
|
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": "^
|
|
38
|
+
"@shapeshiftoss/types": "^8.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@shapeshiftoss/asset-service": "^
|
|
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": "^
|
|
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",
|