@dhedge/v2-sdk 1.10.2 → 1.10.4

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.
@@ -176,6 +176,16 @@ export declare class Pool {
176
176
  * @returns {Promise<any>} Transaction
177
177
  */
178
178
  lend(dapp: Dapp, asset: string, amount: BigNumber | string, referralCode?: number, options?: any, estimateGas?: boolean): Promise<any>;
179
+ /**
180
+ * Lend asset to a Compound V3 style lending pool
181
+ * @param {string} market Address of market e.g cUSDCv3 address
182
+ * @param {string} asset Asset
183
+ * @param {BigNumber | string} amount Amount of asset to lend
184
+ * @param {any} options Transaction options
185
+ * @param {boolean} estimateGas Simulate/estimate gas
186
+ * @returns {Promise<any>} Transaction
187
+ */
188
+ lendCompoundV3(market: string, asset: string, amount: BigNumber | string, options?: any, estimateGas?: boolean): Promise<any>;
179
189
  /**
180
190
  * Witdraw asset from a lending pool
181
191
  * @param {Dapp} dapp Platform like Aave
@@ -186,6 +196,16 @@ export declare class Pool {
186
196
  * @returns {Promise<any>} Transaction
187
197
  */
188
198
  withdrawDeposit(dapp: Dapp, asset: string, amount: BigNumber | string, options?: any, estimateGas?: boolean): Promise<any>;
199
+ /**
200
+ * Witdraw asset from a COmpound V3 style lending pool
201
+ * @param {string} market Address of market e.g cUSDCv3 address
202
+ * @param {string} asset Asset
203
+ * @param {BigNumber | string} amount Amount of asset to withdraw
204
+ * @param {any} options Transaction options
205
+ * @param {boolean} estimateGas Simulate/estimate gas
206
+ * @returns {Promise<any>} Transaction
207
+ */
208
+ withdrawCompoundV3(market: string, asset: string, amount: BigNumber | string, options?: any, estimateGas?: boolean): Promise<any>;
189
209
  /**
190
210
  * Borrow asset from a lending pool
191
211
  * @param {Dapp} dapp Platform like Aave
@@ -272,7 +292,7 @@ export declare class Pool {
272
292
  harvestAaveV3Rewards(assets: string[], rewardAsset: string, options?: any, estimateGas?: boolean): Promise<any>;
273
293
  /**
274
294
  * Create UniswapV3 liquidity pool
275
- * @param {dapp} Platform either UniswapV3 or VelodromeCL
295
+ * @param {dapp} Platform UniswapV3, VelodromeCL or AerodromeCL
276
296
  * @param {string} assetA First asset
277
297
  * @param {string} assetB Second asset
278
298
  * @param {BigNumber | string} amountA Amount first asset
@@ -286,7 +306,7 @@ export declare class Pool {
286
306
  * @param {boolean} estimateGas Simulate/estimate gas
287
307
  * @returns {Promise<any>} Transaction
288
308
  */
289
- addLiquidityUniswapV3(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL, 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>;
309
+ addLiquidityUniswapV3(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL, 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>;
290
310
  /**
291
311
  * Remove liquidity from an UniswapV3 or Arrakis liquidity pool
292
312
  * @param {Dapp} dapp Platform either UniswapV3 or Arrakis
@@ -0,0 +1,3 @@
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;
@@ -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, 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
- export declare function getUniswapV3Liquidity(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL, tokenId: string, pool: Pool): Promise<BigNumber>;
7
+ export declare function getUniswapV3MintTxData(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL, 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
+ export declare function getUniswapV3Liquidity(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL, 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): Promise<any>;
@@ -1,5 +1,6 @@
1
1
  import { ethers } from "ethers";
2
2
  import { Pool } from "../../entities";
3
+ import { Dapp } from "../../types";
3
4
  export declare function getVelodromeAddLiquidityTxData(pool: Pool, assetA: string, assetB: string, amountA: ethers.BigNumber | string, amountB: ethers.BigNumber | string, isStable: boolean): Promise<any>;
4
5
  export declare function getVelodromeRemoveLiquidityTxData(pool: Pool, assetA: string, assetB: string, amount: ethers.BigNumber | string, isStable: boolean): Promise<any>;
5
- export declare function getVelodromeClOwner(pool: Pool, tokenId: string): Promise<string>;
6
+ export declare function getVelodromeClOwner(pool: Pool, dapp: Dapp.VELODROMECL | Dapp.AERODROMECL, tokenId: string): Promise<string>;
@@ -22,6 +22,7 @@ export declare const TEST_POOL: {
22
22
  export declare const CONTRACT_ADDRESS: {
23
23
  polygon: {
24
24
  USDC: string;
25
+ USDT: string;
25
26
  SWETH: string;
26
27
  WETH: string;
27
28
  WBTC: string;
@@ -33,11 +34,13 @@ export declare const CONTRACT_ADDRESS: {
33
34
  };
34
35
  VELODROME_CL_USDC_WETH_GAUGE: string;
35
36
  VELO: string;
37
+ COMPOUNDV3_WETH: string;
36
38
  };
37
39
  optimism: {
38
40
  USDC: string;
39
- SUSD: string;
41
+ USDT: string;
40
42
  SWETH: string;
43
+ SUSD: string;
41
44
  WETH: string;
42
45
  WBTC: string;
43
46
  KWENTA_ETH_PERP_V2: string;
@@ -49,9 +52,11 @@ export declare const CONTRACT_ADDRESS: {
49
52
  ARRAKIS_USDC_WETH_LP: string;
50
53
  VELODROME_CL_USDC_WETH_GAUGE: string;
51
54
  VELO: string;
55
+ COMPOUNDV3_WETH: string;
52
56
  };
53
57
  arbitrum: {
54
58
  USDC: string;
59
+ USDT: string;
55
60
  SWETH: string;
56
61
  WETH: string;
57
62
  WBTC: string;
@@ -66,9 +71,11 @@ export declare const CONTRACT_ADDRESS: {
66
71
  WMATIC: string;
67
72
  VELODROME_CL_USDC_WETH_GAUGE: string;
68
73
  VELO: string;
74
+ COMPOUNDV3_WETH: string;
69
75
  };
70
76
  base: {
71
77
  USDC: string;
78
+ USDT: string;
72
79
  WETH: string;
73
80
  WBTC: string;
74
81
  SWETH: string;
@@ -80,6 +87,7 @@ export declare const CONTRACT_ADDRESS: {
80
87
  WMATIC: string;
81
88
  VELODROME_CL_USDC_WETH_GAUGE: string;
82
89
  VELO: string;
90
+ COMPOUNDV3_WETH: string;
83
91
  };
84
92
  };
85
93
  export declare const MAX_AMOUNT: ethers.BigNumber;
package/dist/types.d.ts CHANGED
@@ -23,7 +23,8 @@ export declare enum Dapp {
23
23
  LYRA = "lyra",
24
24
  ZEROEX = "0x",
25
25
  RAMSES = "ramses",
26
- AERODROME = "aerodrome"
26
+ AERODROME = "aerodrome",
27
+ AERODROMECL = "aerodromeCL"
27
28
  }
28
29
  export declare enum Transaction {
29
30
  SWAP = "swapExactTokensForTokens",