@swapkit/core 1.0.0-rc.9 → 1.0.0-rc.90
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.cjs +3 -2
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +11 -5
- package/dist/index.es.js +6080 -783
- package/dist/index.es.js.map +1 -0
- package/package.json +19 -24
- package/src/aggregator/contracts/index.ts +2 -0
- package/src/aggregator/contracts/routers/index.ts +58 -0
- package/src/aggregator/contracts/routers/kyber.ts +402 -0
- package/src/aggregator/contracts/routers/oneinch.ts +2188 -0
- package/src/aggregator/contracts/routers/pancakeswap.ts +340 -0
- package/src/aggregator/contracts/routers/pangolin.ts +340 -0
- package/src/aggregator/contracts/routers/sushiswap.ts +340 -0
- package/src/aggregator/contracts/routers/traderJoe.ts +340 -0
- package/src/aggregator/contracts/routers/uniswapv2.ts +340 -0
- package/src/aggregator/contracts/routers/uniswapv3.ts +254 -0
- package/src/aggregator/contracts/routers/woofi.ts +171 -0
- package/src/aggregator/getSwapParams.ts +1 -1
- package/src/client/__tests__/helpers.test.ts +41 -33
- package/src/client/explorerUrls.ts +7 -8
- package/src/client/index.ts +224 -145
- package/src/client/thornode.ts +3 -3
- package/src/client/types.ts +1 -2
- package/dist/index-9e36735e.cjs +0 -1
- package/dist/index-cf1865cd.js +0 -649
package/dist/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import type { KujiraToolbox } from '@swapkit/toolbox-cosmos';
|
|
|
17
17
|
import type { LTCToolbox } from '@swapkit/toolbox-utxo';
|
|
18
18
|
import type { MATICToolbox } from '@swapkit/toolbox-evm';
|
|
19
19
|
import type { OPToolbox } from '@swapkit/toolbox-evm';
|
|
20
|
-
import type { QuoteRoute } from '@swapkit/
|
|
20
|
+
import type { QuoteRoute } from '@swapkit/helpers';
|
|
21
21
|
import type { SwapKitNumber } from '@swapkit/helpers';
|
|
22
22
|
import type { ThorchainToolboxType } from '@swapkit/toolbox-cosmos';
|
|
23
23
|
import type { ThornameRegisterParam } from '@swapkit/helpers';
|
|
@@ -69,9 +69,9 @@ export declare class SwapKitCore<T = ''> {
|
|
|
69
69
|
getExplorerTxUrl: (chain: Chain, txHash: string) => string;
|
|
70
70
|
getWallet: <T_1 extends Chain>(chain: Chain) => WalletMethods[T_1];
|
|
71
71
|
getExplorerAddressUrl: (chain: Chain, address: string) => string;
|
|
72
|
-
getBalance: (chain: Chain,
|
|
72
|
+
getBalance: (chain: Chain, potentialScamFilter?: boolean) => Promise<AssetValue[]>;
|
|
73
73
|
swap: ({ streamSwap, recipient, route, feeOptionKey }: SwapParams) => Promise<string>;
|
|
74
|
-
getWalletByChain: (chain: Chain) => Promise<{
|
|
74
|
+
getWalletByChain: (chain: Chain, potentialScamFilter?: boolean) => Promise<{
|
|
75
75
|
address?: string | undefined;
|
|
76
76
|
balance?: AssetValue[] | undefined;
|
|
77
77
|
walletType?: WalletOption | undefined;
|
|
@@ -98,8 +98,7 @@ export declare class SwapKitCore<T = ''> {
|
|
|
98
98
|
runeTx: string;
|
|
99
99
|
assetTx: string;
|
|
100
100
|
}>;
|
|
101
|
-
addLiquidity: ({
|
|
102
|
-
poolIdentifier: string;
|
|
101
|
+
addLiquidity: ({ runeAssetValue, assetValue, runeAddr, assetAddr, isPendingSymmAsset, mode, }: {
|
|
103
102
|
runeAssetValue: AssetValue;
|
|
104
103
|
assetValue: AssetValue;
|
|
105
104
|
isPendingSymmAsset?: boolean | undefined;
|
|
@@ -110,6 +109,12 @@ export declare class SwapKitCore<T = ''> {
|
|
|
110
109
|
runeTx: string | undefined;
|
|
111
110
|
assetTx: string | undefined;
|
|
112
111
|
}>;
|
|
112
|
+
addLiquidityPart: ({ assetValue, poolAddress, address, symmetric, }: {
|
|
113
|
+
assetValue: AssetValue;
|
|
114
|
+
address?: string | undefined;
|
|
115
|
+
poolAddress: string;
|
|
116
|
+
symmetric: boolean;
|
|
117
|
+
}) => Promise<string>;
|
|
113
118
|
withdraw: ({ memo, assetValue, percent, from, to, }: {
|
|
114
119
|
memo?: string | undefined;
|
|
115
120
|
assetValue: AssetValue;
|
|
@@ -160,6 +165,7 @@ export declare class SwapKitCore<T = ''> {
|
|
|
160
165
|
connectXDEFI: (_chains: Chain[]) => Promise<void>;
|
|
161
166
|
connectEVMWallet: (_chains: Chain[] | Chain, _wallet: EVMWalletOptions) => Promise<void>;
|
|
162
167
|
connectWalletconnect: (_chains: Chain[], _options?: any) => Promise<void>;
|
|
168
|
+
connectKeepkey: (_chains: Chain[], _derivationPath: number[][]) => Promise<string>;
|
|
163
169
|
connectKeystore: (_chains: Chain[], _phrase: string) => Promise<void>;
|
|
164
170
|
connectLedger: (_chains: Chain, _derivationPath: number[]) => Promise<void>;
|
|
165
171
|
connectTrezor: (_chains: Chain, _derivationPath: number[]) => Promise<void>;
|