@flaunch/sdk 0.9.7 → 0.9.8-beta.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 +52 -0
- package/dist/addresses/index.cjs +5 -0
- package/dist/addresses/index.cjs.map +1 -1
- package/dist/addresses/index.js +5 -1
- package/dist/addresses/index.js.map +1 -1
- package/dist/addresses.d.ts +1 -0
- package/dist/addresses.d.ts.map +1 -1
- package/dist/clients/TokenImporter.d.ts.map +1 -1
- package/dist/helpers/index.cjs +1 -0
- package/dist/helpers/index.cjs.map +1 -1
- package/dist/helpers/index.js +1 -0
- package/dist/helpers/index.js.map +1 -1
- package/dist/index.cjs.js +121 -43
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +122 -45
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +3 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/sdk/FlaunchSDK.d.ts +100 -8
- package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
- package/dist/types.d.ts +65 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
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)
|
|
@@ -902,6 +903,57 @@ const importAndAddLiqCalls = await flaunchWrite.getImportAndAddLiquidityCalls({
|
|
|
902
903
|
});
|
|
903
904
|
```
|
|
904
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
|
+
|
|
905
957
|
### `createFlaunchCalldata`: alternative to `createFlaunch` that returns the tx call object with to, data, and value instead of directly broadcasting the tx from walletClient
|
|
906
958
|
|
|
907
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.
|
package/dist/addresses/index.cjs
CHANGED
|
@@ -5408,6 +5408,10 @@ const ZoraVerifierAddress = {
|
|
|
5408
5408
|
[base.id]: "0x656047fd43d2c3a121f2ef859d7171d7dd59f8b9",
|
|
5409
5409
|
[baseSepolia.id]: "0x05a5763e9199b88bb591c6b112d0424b2cd7a99e",
|
|
5410
5410
|
};
|
|
5411
|
+
const SolanaVerifierAddress = {
|
|
5412
|
+
[base.id]: "0x0000000000000000000000000000000000000000",
|
|
5413
|
+
[baseSepolia.id]: "0x47226918E518f205584bd75Bf81E0b532B0B3Ea7",
|
|
5414
|
+
};
|
|
5411
5415
|
/** ======== */
|
|
5412
5416
|
/** Permissions */
|
|
5413
5417
|
const ClosedPermissionsAddress = {
|
|
@@ -5508,6 +5512,7 @@ exports.PoolManagerAddress = PoolManagerAddress;
|
|
|
5508
5512
|
exports.QuoterAddress = QuoterAddress;
|
|
5509
5513
|
exports.ReferralEscrowAddress = ReferralEscrowAddress;
|
|
5510
5514
|
exports.RevenueManagerAddress = RevenueManagerAddress;
|
|
5515
|
+
exports.SolanaVerifierAddress = SolanaVerifierAddress;
|
|
5511
5516
|
exports.StakingManagerAddress = StakingManagerAddress;
|
|
5512
5517
|
exports.StateViewAddress = StateViewAddress;
|
|
5513
5518
|
exports.TokenImporterAddress = TokenImporterAddress;
|