@dhedge/v2-sdk 1.10.6 → 1.10.8
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 +9 -1
- package/dist/services/compound/rewards.d.ts +2 -0
- package/dist/services/pancake/staking.d.ts +4 -0
- package/dist/services/uniswap/V3Liquidity.d.ts +3 -3
- package/dist/services/velodrome/liquidity.d.ts +1 -1
- package/dist/types.d.ts +3 -1
- package/dist/v2-sdk.cjs.development.js +1110 -503
- 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 +1110 -503
- package/dist/v2-sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/abi/INonfungiblePositionManager.json +0 -28
- package/src/abi/IPancakeMasterChefV3.json +115 -0
- package/src/abi/compound/ICometRewards.json +241 -0
- package/src/config.ts +10 -4
- package/src/entities/pool.ts +79 -14
- package/src/services/compound/rewards.ts +9 -0
- package/src/services/pancake/staking.ts +46 -0
- package/src/services/uniswap/V3Liquidity.ts +28 -5
- package/src/services/velodrome/liquidity.ts +2 -2
- package/src/test/compoundV3.test.ts +4 -0
- package/src/test/pancakeCL.test.ts +200 -0
- package/src/types.ts +3 -1
package/dist/entities/pool.d.ts
CHANGED
|
@@ -290,6 +290,14 @@ export declare class Pool {
|
|
|
290
290
|
* @returns {Promise<any>} Transaction
|
|
291
291
|
*/
|
|
292
292
|
harvestAaveV3Rewards(assets: string[], rewardAsset: string, options?: any, estimateGas?: boolean): Promise<any>;
|
|
293
|
+
/**
|
|
294
|
+
* Claim rewards from CompoundV3
|
|
295
|
+
* @param {string} asset Compound lending asset
|
|
296
|
+
* @param {any} options Transaction options
|
|
297
|
+
* @param {boolean} estimateGas Simulate/estimate gas
|
|
298
|
+
* @returns {Promise<any>} Transaction
|
|
299
|
+
*/
|
|
300
|
+
harvestCompoundV3Rewards(asset: string, options?: any, estimateGas?: boolean): Promise<any>;
|
|
293
301
|
/**
|
|
294
302
|
* Create UniswapV3 liquidity pool
|
|
295
303
|
* @param {dapp} Platform UniswapV3, VelodromeCL, AerodromeCL or RamesesCL
|
|
@@ -306,7 +314,7 @@ export declare class Pool {
|
|
|
306
314
|
* @param {boolean} estimateGas Simulate/estimate gas
|
|
307
315
|
* @returns {Promise<any>} Transaction
|
|
308
316
|
*/
|
|
309
|
-
addLiquidityUniswapV3(dapp: Dapp.UNISWAPV3 | Dapp.VELODROMECL | Dapp.AERODROMECL | Dapp.RAMSESCL, 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>;
|
|
317
|
+
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>;
|
|
310
318
|
/**
|
|
311
319
|
* Remove liquidity from an UniswapV3 or Arrakis liquidity pool
|
|
312
320
|
* @param {Dapp} dapp Platform either UniswapV3 or Arrakis
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Pool } from "../../entities";
|
|
2
|
+
export declare function getPancakeStakeTxData(pool: Pool, tokenId: string, stakingAddress: string): string;
|
|
3
|
+
export declare function getPancakeUnStakeTxData(pool: Pool, tokenId: string): string;
|
|
4
|
+
export declare function getPancakeHarvestClaimTxData(pool: Pool, tokenId: 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 | Dapp.AERODROMECL | Dapp.RAMSESCL, 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 | Dapp.RAMSESCL, tokenId: string, pool: Pool): Promise<BigNumber>;
|
|
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
|
+
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
|
-
export declare function getDecreaseLiquidityTxData(pool: Pool, dapp: Dapp, tokenId: string, amount
|
|
10
|
+
export declare function getDecreaseLiquidityTxData(pool: Pool, dapp: Dapp, tokenId: string, amount: number | undefined, isStaked: boolean): Promise<any>;
|
|
@@ -3,4 +3,4 @@ import { Pool } from "../../entities";
|
|
|
3
3
|
import { Dapp } from "../../types";
|
|
4
4
|
export declare function getVelodromeAddLiquidityTxData(pool: Pool, assetA: string, assetB: string, amountA: ethers.BigNumber | string, amountB: ethers.BigNumber | string, isStable: boolean): Promise<any>;
|
|
5
5
|
export declare function getVelodromeRemoveLiquidityTxData(pool: Pool, assetA: string, assetB: string, amount: ethers.BigNumber | string, isStable: boolean): Promise<any>;
|
|
6
|
-
export declare function
|
|
6
|
+
export declare function getClOwner(pool: Pool, dapp: Dapp.VELODROMECL | Dapp.AERODROMECL | Dapp.PANCAKECL, tokenId: string): Promise<string>;
|
package/dist/types.d.ts
CHANGED
|
@@ -25,7 +25,9 @@ export declare enum Dapp {
|
|
|
25
25
|
RAMSES = "ramses",
|
|
26
26
|
AERODROME = "aerodrome",
|
|
27
27
|
AERODROMECL = "aerodromeCL",
|
|
28
|
-
RAMSESCL = "ramsesCL"
|
|
28
|
+
RAMSESCL = "ramsesCL",
|
|
29
|
+
PANCAKECL = "pancakeCL",
|
|
30
|
+
COMPOUNDV3 = "compoundV3"
|
|
29
31
|
}
|
|
30
32
|
export declare enum Transaction {
|
|
31
33
|
SWAP = "swapExactTokensForTokens",
|