turbos-finance / turbos-clmm-sdk

6 stars 5 forks source link

Lack of adequate code examples and documentation #18

Open MatrixYe opened 4 months ago

MatrixYe commented 4 months ago

I tried to use the sdk to add fluidity, remove fluidity, increase fluidity, and decrease fluidity, but due to the lack of code examples and documentation, I had no idea how many of these parameters were obtained or calculated. At the same time, I also do not know how to get the liquidity list of an account. Can you add some code examples or documentation? thank you!

    await this.sdk.pool.addLiquidity({
      address: this.sender,
      amountA: undefined,
      amountB: undefined,
      pool: poolId,
      slippage: slippage,
      tickLower: 0,
      tickUpper: 0,
    });
    await this.sdk.pool.removeLiquidity({
      address: "",
      amountA: undefined,
      amountB: undefined,
      collectAmountA: undefined,
      collectAmountB: undefined,
      decreaseLiquidity: undefined,
      nft: "",
      pool: "",
      rewardAmounts: [],
      slippage: undefined,
    });
    await this.sdk.pool.increaseLiquidity({
      address: "",
      amountA: undefined,
      amountB: undefined,
      nft: "",
      pool: "",
      slippage: undefined,
    });
    await this.sdk.pool.decreaseLiquidity({
      address: "",
      amountA: undefined,
      amountB: undefined,
      decreaseLiquidity: undefined,
      nft: "",
      pool: "",
      slippage: undefined,
    });
fbettag commented 3 months ago

yeah this is a real bummer, help would be much appreciated!

tacshi commented 1 month ago

I guess maybe no one knows how to correctly call computeSwapResultV2 to get swap amount!