@dhedge/v2-sdk 1.10.4 → 1.10.5

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/README.md CHANGED
@@ -361,6 +361,9 @@ const tx = await pool.decreaseLiquidity(
361
361
  );
362
362
  ```
363
363
 
364
+ Removing 100% will burn the NFT position.
365
+ Burning a Ramses CL NFT position won't claim rewards, so `getRewards` needs to be called before.
366
+
364
367
  3. Increase liquidity in the existing WETH/USDC pool
365
368
 
366
369
  ```ts
@@ -378,6 +381,12 @@ const result = await pool.increaseLiquidity(
378
381
  const tx = await pool.claimFees(Dapp.UNISWAPV3, tokenId);
379
382
  ```
380
383
 
384
+ 4. Claim rewards (e.g. for Ramses CL)
385
+
386
+ ```ts
387
+ const tx = await pool.getRewards(Dapp.RAMSESCL, tokenId, [RAM_ADDRESS]);
388
+ ```
389
+
381
390
  #### VelodromeV2 / Ramses / Aerodrome
382
391
 
383
392
  For VelodromeV2 / Ramses / Aerodrome , we use `addLiquidityV2`, `stakeInGauge`, `unstakeFromGauge`, `removeLiquidityV2`, and `claimFees`.
@@ -292,7 +292,7 @@ export declare class Pool {
292
292
  harvestAaveV3Rewards(assets: string[], rewardAsset: string, options?: any, estimateGas?: boolean): Promise<any>;
293
293
  /**
294
294
  * Create UniswapV3 liquidity pool
295
- * @param {dapp} Platform UniswapV3, VelodromeCL or AerodromeCL
295
+ * @param {dapp} Platform UniswapV3, VelodromeCL, AerodromeCL or RamesesCL
296
296
  * @param {string} assetA First asset
297
297
  * @param {string} assetB Second asset
298
298
  * @param {BigNumber | string} amountA Amount first asset
@@ -306,7 +306,7 @@ export declare class Pool {
306
306
  * @param {boolean} estimateGas Simulate/estimate gas
307
307
  * @returns {Promise<any>} Transaction
308
308
  */
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>;
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>;
310
310
  /**
311
311
  * Remove liquidity from an UniswapV3 or Arrakis liquidity pool
312
312
  * @param {Dapp} dapp Platform either UniswapV3 or Arrakis
@@ -337,6 +337,16 @@ export declare class Pool {
337
337
  * @returns {Promise<any>} Transaction
338
338
  */
339
339
  claimFees(dapp: Dapp, tokenId: string, options?: any, estimateGas?: boolean): Promise<any>;
340
+ /**
341
+ * Get rewards of an NFT position
342
+ * @param {Dapp} dapp Platform e.g. Ramses CL
343
+ * @param {string} tokenId Token Id
344
+ * @param {string[]} rewards Reward tokens
345
+ * @param {any} options Transaction option
346
+ * @param {boolean} estimateGas Simulate/estimate gas
347
+ * @returns {Promise<any>} Transaction
348
+ */
349
+ getRewards(dapp: Dapp, tokenId: string, rewards: string[], options?: any, estimateGas?: boolean): Promise<any>;
340
350
  /**
341
351
  * Trade an asset into another asset
342
352
  * @param {Dapp} dapp Platform like Sushiswap or Uniswap
@@ -1,3 +1,4 @@
1
1
  import { BigNumber } from "ethers";
2
2
  export declare function getCreateVestTxData(amount: BigNumber | string): string;
3
3
  export declare function getExitVestTxData(vestId: number): string;
4
+ export declare function getRewardsTxDta(tokenId: string, rewards: 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, 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>;
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>;
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>;
package/dist/types.d.ts CHANGED
@@ -24,7 +24,8 @@ export declare enum Dapp {
24
24
  ZEROEX = "0x",
25
25
  RAMSES = "ramses",
26
26
  AERODROME = "aerodrome",
27
- AERODROMECL = "aerodromeCL"
27
+ AERODROMECL = "aerodromeCL",
28
+ RAMSESCL = "ramsesCL"
28
29
  }
29
30
  export declare enum Transaction {
30
31
  SWAP = "swapExactTokensForTokens",