@flaunch/sdk 0.5.0 → 0.5.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/index.esm.js CHANGED
@@ -18612,6 +18612,45 @@ class ReadFlaunchSDK {
18612
18612
  slippagePercent: params.slippagePercent,
18613
18613
  });
18614
18614
  }
18615
+ /**
18616
+ * Gets a quote for selling an exact amount of tokens for ETH
18617
+ * @param coinAddress - The address of the token to sell
18618
+ * @param amountIn - The exact amount of tokens to sell
18619
+ * @param isV1Coin - Optional flag to specify if token is V1. If not provided, V1.1 is assumed
18620
+ * @returns Promise<bigint> - The expected amount of ETH to receive
18621
+ */
18622
+ async getSellQuoteExactInput(coinAddress, amountIn, isV1Coin) {
18623
+ if (isV1Coin === undefined) {
18624
+ isV1Coin = await this.isV1Coin(coinAddress);
18625
+ }
18626
+ return this.readQuoter.getSellQuoteExactInput(coinAddress, amountIn, isV1Coin);
18627
+ }
18628
+ /**
18629
+ * Gets a quote for buying tokens with an exact amount of ETH
18630
+ * @param coinAddress - The address of the token to buy
18631
+ * @param ethIn - The exact amount of ETH to spend
18632
+ * @param isV1Coin - Optional flag to specify if token is V1. If not provided, V1.1 is assumed
18633
+ * @returns Promise<bigint> - The expected amount of tokens to receive
18634
+ */
18635
+ async getBuyQuoteExactInput(coinAddress, amountIn, isV1Coin) {
18636
+ if (isV1Coin === undefined) {
18637
+ isV1Coin = await this.isV1Coin(coinAddress);
18638
+ }
18639
+ return this.readQuoter.getBuyQuoteExactInput(coinAddress, amountIn, isV1Coin);
18640
+ }
18641
+ /**
18642
+ * Gets a quote for buying an exact amount of tokens with ETH
18643
+ * @param coinAddress - The address of the token to buy
18644
+ * @param coinOut - The exact amount of tokens to receive
18645
+ * @param isV1Coin - Optional flag to specify if token is V1. If not provided, V1.1 is assumed
18646
+ * @returns Promise<bigint> - The required amount of ETH to spend
18647
+ */
18648
+ async getBuyQuoteExactOutput(coinAddress, amountOut, isV1Coin) {
18649
+ if (isV1Coin === undefined) {
18650
+ isV1Coin = await this.isV1Coin(coinAddress);
18651
+ }
18652
+ return this.readQuoter.getBuyQuoteExactOutput(coinAddress, amountOut, isV1Coin);
18653
+ }
18615
18654
  /**
18616
18655
  * Determines if flETH is currency0 in the pool
18617
18656
  * @param coinAddress - The address of the coin