@flaunch/sdk 0.9.0-beta.3 → 0.9.0
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 +631 -73
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2 -2
- 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 +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -26412,13 +26412,13 @@ class ReadFlaunchSDK {
|
|
|
26412
26412
|
* Calculates the coin price in USD based on the current ETH/USDC price
|
|
26413
26413
|
* @param coinAddress - The address of the coin
|
|
26414
26414
|
* @param version - Optional specific version to use. If not provided, will be determined automatically
|
|
26415
|
-
* @returns Promise<string> - The price of the coin in USD with
|
|
26415
|
+
* @returns Promise<string> - The price of the coin in USD with 18 decimal precision
|
|
26416
26416
|
*/
|
|
26417
26417
|
async coinPriceInUSD({ coinAddress, version, drift, }) {
|
|
26418
26418
|
const coinVersion = version || (await this.getCoinVersion(coinAddress));
|
|
26419
26419
|
const ethPerCoin = await this.coinPriceInETH(coinAddress, coinVersion);
|
|
26420
26420
|
const ethPrice = await this.getETHUSDCPrice(drift);
|
|
26421
|
-
return (parseFloat(ethPerCoin) * ethPrice).toFixed(
|
|
26421
|
+
return (parseFloat(ethPerCoin) * ethPrice).toFixed(18);
|
|
26422
26422
|
}
|
|
26423
26423
|
async coinMarketCapInUSD({ coinAddress, version, drift, }) {
|
|
26424
26424
|
const totalSupply = 100000000000; // 100 Billion tokens
|