@dhedge/v2-sdk 1.10.16 → 1.11.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/entities/pool.d.ts +5 -5
- package/dist/services/compound/lending.d.ts +4 -3
- package/dist/services/uniswap/V3Liquidity.d.ts +1 -1
- package/dist/test/constants.d.ts +9 -4
- package/dist/test/wallet.d.ts +1 -1
- package/dist/types.d.ts +1 -2
- package/dist/v2-sdk.cjs.development.js +210 -1256
- package/dist/v2-sdk.cjs.development.js.map +1 -1
- package/dist/v2-sdk.cjs.production.min.js +1 -1
- package/dist/v2-sdk.cjs.production.min.js.map +1 -1
- package/dist/v2-sdk.esm.js +210 -1256
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +3 -2
- package/src/abi/fluid/IFToken.json +27 -0
- package/src/config.ts +14 -17
- package/src/entities/pool.ts +64 -58
- package/src/services/compound/lending.ts +50 -11
- package/src/services/uniswap/V3Liquidity.ts +5 -16
- package/src/test/constants.ts +11 -6
- package/src/test/fluid.test.ts +90 -0
- package/src/test/oneInch.test.ts +16 -4
- package/src/test/wallet.ts +1 -1
- package/src/types.ts +1 -2
- package/src/abi/IShadowNonfungiblePositionManager.json +0 -697
package/dist/entities/pool.d.ts
CHANGED
|
@@ -178,8 +178,8 @@ export declare class Pool {
|
|
|
178
178
|
*/
|
|
179
179
|
lend(dapp: Dapp, asset: string, amount: BigNumber | string, referralCode?: number, options?: any, estimateGas?: boolean): Promise<any>;
|
|
180
180
|
/**
|
|
181
|
-
* Lend asset to a Compound V3
|
|
182
|
-
* @param {string} market Address of
|
|
181
|
+
* Lend asset to a Compound V3 or Fluid lending pool
|
|
182
|
+
* @param {string} market Address of cToken or fToken
|
|
183
183
|
* @param {string} asset Asset
|
|
184
184
|
* @param {BigNumber | string} amount Amount of asset to lend
|
|
185
185
|
* @param {any} options Transaction options
|
|
@@ -198,8 +198,8 @@ export declare class Pool {
|
|
|
198
198
|
*/
|
|
199
199
|
withdrawDeposit(dapp: Dapp, asset: string, amount: BigNumber | string, options?: any, estimateGas?: boolean): Promise<any>;
|
|
200
200
|
/**
|
|
201
|
-
* Witdraw asset from a
|
|
202
|
-
* @param {string} market Address of
|
|
201
|
+
* Witdraw asset from a Compound V3 or Fluid lending pool
|
|
202
|
+
* @param {string} market Address of cToken or fToken
|
|
203
203
|
* @param {string} asset Asset
|
|
204
204
|
* @param {BigNumber | string} amount Amount of asset to withdraw
|
|
205
205
|
* @param {any} options Transaction options
|
|
@@ -315,7 +315,7 @@ export declare class Pool {
|
|
|
315
315
|
* @param {boolean} estimateGas Simulate/estimate gas
|
|
316
316
|
* @returns {Promise<any>} Transaction
|
|
317
317
|
*/
|
|
318
|
-
addLiquidityUniswapV3(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL | Dapp.RAMSESCL | Dapp.PANCAKECL
|
|
318
|
+
addLiquidityUniswapV3(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL | Dapp.RAMSESCL | Dapp.PANCAKECL, assetA: string, assetB: string, amountA: BigNumber | string, amountB: BigNumber | string, minPrice: number | null, maxPrice: number | null, minTick: number | null, maxTick: number | null, feeAmountOrTickSpacing: number, options?: any, estimateGas?: boolean): Promise<any>;
|
|
319
319
|
/**
|
|
320
320
|
* Remove liquidity from an UniswapV3 or Arrakis liquidity pool
|
|
321
321
|
* @param {Dapp} dapp Platform either UniswapV3 or Arrakis
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { ethers } from "../..";
|
|
2
|
-
export declare function getCompoundV3LendTxData(asset: string, amount: ethers.BigNumber | string): string
|
|
3
|
-
export declare function getCompoundV3WithdrawTxData(asset: string, amount: ethers.BigNumber | string): string
|
|
1
|
+
import { ethers, Pool } from "../..";
|
|
2
|
+
export declare function getCompoundV3LendTxData(pool: Pool, market: string, asset: string, amount: ethers.BigNumber | string): Promise<string>;
|
|
3
|
+
export declare function getCompoundV3WithdrawTxData(pool: Pool, market: string, asset: string, amount: ethers.BigNumber | string): Promise<string>;
|
|
4
|
+
export declare function isCompoundV3Market(pool: Pool, market: string): Promise<boolean>;
|
|
@@ -4,7 +4,7 @@ import { Dapp, Pool } from "../..";
|
|
|
4
4
|
import BigNumber from "bignumber.js";
|
|
5
5
|
export declare function tryParsePrice(baseToken: Token, quoteToken: Token, value: string): Price<Token, Token>;
|
|
6
6
|
export declare function tryParseTick(baseToken: Token, quoteToken: Token, feeAmount: number, value: string): number;
|
|
7
|
-
export declare function getUniswapV3MintTxData(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL | Dapp.RAMSESCL | Dapp.PANCAKECL
|
|
7
|
+
export declare function getUniswapV3MintTxData(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL | Dapp.RAMSESCL | Dapp.PANCAKECL, pool: Pool, assetA: string, assetB: string, amountA: string | ethers.BigNumber, amountB: string | ethers.BigNumber, minPrice: number | null, maxPrice: number | null, minTick: number | null, maxTick: number | null, feeAmountOrTickSpacing: number): Promise<any>;
|
|
8
8
|
export declare function getUniswapV3Liquidity(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL | Dapp.RAMSESCL | Dapp, tokenId: string, pool: Pool): Promise<BigNumber>;
|
|
9
9
|
export declare function getIncreaseLiquidityTxData(pool: Pool, dapp: Dapp, tokenId: string, amountA: ethers.BigNumber | string, amountB: ethers.BigNumber | string): Promise<any>;
|
|
10
10
|
export declare function getDecreaseLiquidityTxData(pool: Pool, dapp: Dapp, tokenId: string, amount: number | undefined, isStaked: boolean): Promise<any>;
|
package/dist/test/constants.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare const TEST_POOL: {
|
|
|
18
18
|
optimism: string;
|
|
19
19
|
arbitrum: string;
|
|
20
20
|
base: string;
|
|
21
|
-
|
|
21
|
+
ethereum: string;
|
|
22
22
|
};
|
|
23
23
|
export declare const CONTRACT_ADDRESS: {
|
|
24
24
|
polygon: {
|
|
@@ -37,6 +37,7 @@ export declare const CONTRACT_ADDRESS: {
|
|
|
37
37
|
VELODROME_CL_USDC_WETH_GAUGE: string;
|
|
38
38
|
VELO: string;
|
|
39
39
|
COMPOUNDV3_WETH: string;
|
|
40
|
+
FLUID_WETH: string;
|
|
40
41
|
TOROS: string;
|
|
41
42
|
UNIT: string;
|
|
42
43
|
};
|
|
@@ -58,6 +59,7 @@ export declare const CONTRACT_ADDRESS: {
|
|
|
58
59
|
VELODROME_CL_USDC_WETH_GAUGE: string;
|
|
59
60
|
VELO: string;
|
|
60
61
|
COMPOUNDV3_WETH: string;
|
|
62
|
+
FLUID_WETH: string;
|
|
61
63
|
TOROS: string;
|
|
62
64
|
};
|
|
63
65
|
arbitrum: {
|
|
@@ -80,6 +82,7 @@ export declare const CONTRACT_ADDRESS: {
|
|
|
80
82
|
VELODROME_CL_USDC_WETH_GAUGE: string;
|
|
81
83
|
VELO: string;
|
|
82
84
|
COMPOUNDV3_WETH: string;
|
|
85
|
+
FLUID_WETH: string;
|
|
83
86
|
TOROS: string;
|
|
84
87
|
};
|
|
85
88
|
base: {
|
|
@@ -99,9 +102,10 @@ export declare const CONTRACT_ADDRESS: {
|
|
|
99
102
|
VELODROME_CL_USDC_WETH_GAUGE: string;
|
|
100
103
|
VELO: string;
|
|
101
104
|
COMPOUNDV3_WETH: string;
|
|
105
|
+
FLUID_WETH: string;
|
|
102
106
|
TOROS: string;
|
|
103
107
|
};
|
|
104
|
-
|
|
108
|
+
ethereum: {
|
|
105
109
|
USDC: string;
|
|
106
110
|
USDT: string;
|
|
107
111
|
SUSD: string;
|
|
@@ -117,6 +121,7 @@ export declare const CONTRACT_ADDRESS: {
|
|
|
117
121
|
VELODROME_CL_USDC_WETH_GAUGE: string;
|
|
118
122
|
VELO: string;
|
|
119
123
|
COMPOUNDV3_WETH: string;
|
|
124
|
+
FLUID_WETH: string;
|
|
120
125
|
TOROS: string;
|
|
121
126
|
UNIT: string;
|
|
122
127
|
};
|
|
@@ -127,12 +132,12 @@ export declare const USDC_BALANCEOF_SLOT: {
|
|
|
127
132
|
arbitrum: number;
|
|
128
133
|
polygon: number;
|
|
129
134
|
base: number;
|
|
130
|
-
|
|
135
|
+
ethereum: number;
|
|
131
136
|
};
|
|
132
137
|
export declare const WETH_BALANCEOF_SLOT: {
|
|
133
138
|
optimism: number;
|
|
134
139
|
arbitrum: number;
|
|
135
140
|
polygon: number;
|
|
136
141
|
base: number;
|
|
137
|
-
|
|
142
|
+
ethereum: number;
|
|
138
143
|
};
|
package/dist/test/wallet.d.ts
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare enum Network {
|
|
|
5
5
|
OPTIMISM = "optimism",
|
|
6
6
|
ARBITRUM = "arbitrum",
|
|
7
7
|
BASE = "base",
|
|
8
|
-
|
|
8
|
+
ETHEREUM = "ethereum"
|
|
9
9
|
}
|
|
10
10
|
export declare enum Dapp {
|
|
11
11
|
SUSHISWAP = "sushiswap",
|
|
@@ -29,7 +29,6 @@ export declare enum Dapp {
|
|
|
29
29
|
PANCAKECL = "pancakeCL",
|
|
30
30
|
COMPOUNDV3 = "compoundV3",
|
|
31
31
|
ODOS = "odos",
|
|
32
|
-
SHADOWCL = "shadowCL",
|
|
33
32
|
PENDLE = "pendle"
|
|
34
33
|
}
|
|
35
34
|
export declare enum Transaction {
|