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