@flaunch/sdk 0.9.6 → 0.9.8

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
@@ -37,6 +37,7 @@ _Note: Add this `llms-full.txt` file into Cursor IDE / LLMs to provide context a
37
37
  - [Importing External Coins into Flaunch](#importing-external-coins-into-flaunch)
38
38
  - [Adding Liquidity to Imported (or flaunch) coins](#adding-liquidity-to-imported-or-flaunch-coins)
39
39
  - [Import AND Add Liquidity calls in a single batch](#import-and-add-liquidity-calls-in-a-single-batch)
40
+ - [Import AND Add Single-Sided Coin Liquidity calls in a single batch](#import-and-add-single-sided-coin-liquidity-calls-in-a-single-batch)
40
41
  - [`createFlaunchCalldata`: alternative to `createFlaunch`](#createflaunchcalldata-alternative-to-createflaunch-that-returns-the-tx-call-object-with-to-data-and-value-instead-of-directly-broadcasting-the-tx-from-walletclient)
41
42
  - [All SDK functions](#all-sdk-functions)
42
43
  - [React Hooks](#react-hooks)
@@ -836,6 +837,20 @@ const calls = addLiqCalls.map((call) => ({
836
837
  await sendCalls({ calls });
837
838
  ```
838
839
 
840
+ 3. **Single-Sided Coin Liquidity (Current Price to Infinity)**
841
+
842
+ You can easily provide single-sided coin liquidity from the current price to infinity.
843
+
844
+ ```ts
845
+ const singleSidedCalls = await flaunchWrite.getSingleSidedCoinAddLiquidityCalls(
846
+ {
847
+ coinAddress: "0x...", // Token contract address
848
+ coinAmount: parseEther("1000000"), // Amount of coins to provide as liquidity
849
+ version: FlaunchVersion.V1_2, // optional (auto-determines if not provided)
850
+ }
851
+ );
852
+ ```
853
+
839
854
  ### Import AND Add Liquidity calls in a single batch
840
855
 
841
856
  1. This allows an external coin to be live on flaunch, and be tradeable instantly with the liquidity being provided in the same transaction batch.
@@ -888,6 +903,57 @@ const importAndAddLiqCalls = await flaunchWrite.getImportAndAddLiquidityCalls({
888
903
  });
889
904
  ```
890
905
 
906
+ ### Import AND Add Single-Sided Coin Liquidity calls in a single batch
907
+
908
+ This allows importing an external coin and providing single-sided coin liquidity (from current price to infinity) in one transaction batch. This is perfect for coin creators who want their imported tokens to be instantly tradeable with single-sided liquidity that doesn't require ETH.
909
+
910
+ 💡 **Key Benefits:**
911
+
912
+ - No ETH required for liquidity provision
913
+ - Liquidity is provided from current price to infinity
914
+ - As price increases, the position automatically sells coins and accumulates ETH
915
+ - Instant tradeability after import
916
+
917
+ 2.1. With Market Cap inputs
918
+
919
+ ```ts
920
+ const importAndSingleSidedCalls =
921
+ await flaunchWrite.getImportAndSingleSidedCoinAddLiquidityCalls({
922
+ coinAddress: "0x...", // ERC20 token contract address
923
+ verifier: Verifier.CLANKER, // Optional verifier
924
+ creatorFeeAllocationPercent: 100, // Fee allocation to creator (0-100%)
925
+ coinAmount: parseEther("1000000"), // Amount of coins to provide as liquidity
926
+ initialMarketCapUSD: 10_000, // Starting market cap in USD
927
+ });
928
+ // Returns: CallWithDescription[] - Array of transaction calls with descriptions
929
+
930
+ // === send these calls to user's wallet as a batch ===
931
+ import { useSendCalls } from "wagmi";
932
+
933
+ const { sendCalls } = useSendCalls();
934
+
935
+ const calls = importAndSingleSidedCalls.map((call) => ({
936
+ to: call.to as `0x${string}`,
937
+ value: call.value,
938
+ data: call.data as `0x${string}`,
939
+ }));
940
+
941
+ await sendCalls({ calls });
942
+ ```
943
+
944
+ 2.2. With Coin Price inputs
945
+
946
+ ```ts
947
+ const importAndSingleSidedCalls =
948
+ await flaunchWrite.getImportAndSingleSidedCoinAddLiquidityCalls({
949
+ coinAddress: "0x...", // ERC20 token contract address
950
+ verifier: Verifier.CLANKER, // Optional verifier
951
+ creatorFeeAllocationPercent: 100, // Fee allocation to creator (0-100%)
952
+ coinAmount: parseEther("1000000"), // Amount of coins to provide as liquidity
953
+ initialPriceUSD: 0.001, // Starting price in USD
954
+ });
955
+ ```
956
+
891
957
  ### `createFlaunchCalldata`: alternative to `createFlaunch` that returns the tx call object with to, data, and value instead of directly broadcasting the tx from walletClient
892
958
 
893
959
  To support custom signers that might not be compatible with our `walletClient` approach, or to enable account abstraction and batching on your wallet signer's end we have `createFlaunchCalldata` that returns the tx object, leaving the tx broadcasting to be flexible & handled on your end.