solana-meme-kit 0.3.1 → 0.4.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 +493 -3
- package/dist/core/MemeKit.d.ts.map +1 -1
- package/dist/core/MemeKit.js +34 -9
- package/dist/core/MemeKit.js.map +1 -1
- package/dist/managers/JitoManager.d.ts +1 -1
- package/dist/managers/JitoManager.d.ts.map +1 -1
- package/dist/managers/JitoManager.js +2 -2
- package/dist/managers/JitoManager.js.map +1 -1
- package/dist/strategies/LiquidityStrategy.d.ts +22 -2
- package/dist/strategies/LiquidityStrategy.d.ts.map +1 -1
- package/dist/strategies/meteora/DLMMManager.d.ts +6 -1
- package/dist/strategies/meteora/DLMMManager.d.ts.map +1 -1
- package/dist/strategies/meteora/DLMMManager.js +282 -38
- package/dist/strategies/meteora/DLMMManager.js.map +1 -1
- package/dist/strategies/meteora/index.d.ts +2 -1
- package/dist/strategies/meteora/index.d.ts.map +1 -1
- package/dist/strategies/meteora/index.js +2 -1
- package/dist/strategies/meteora/index.js.map +1 -1
- package/dist/strategies/meteora/presets.d.ts +32 -0
- package/dist/strategies/meteora/presets.d.ts.map +1 -0
- package/dist/strategies/meteora/presets.js +43 -0
- package/dist/strategies/meteora/presets.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,20 @@
|
|
|
7
7
|
|
|
8
8
|
A unified, open-source TypeScript SDK that abstracts the complexity of Solana token launches. It provides a **Strategy Pattern** allowing you to choose different DEX backends for liquidity provision with a single code path.
|
|
9
9
|
|
|
10
|
+
## Table of Contents
|
|
11
|
+
|
|
12
|
+
- Installation
|
|
13
|
+
- Requirements
|
|
14
|
+
- Quickstart
|
|
15
|
+
- Strategy Comparison
|
|
16
|
+
- API Reference
|
|
17
|
+
- Meteora DLMM Guide
|
|
18
|
+
- Raydium Guide
|
|
19
|
+
- Jito Smart Tipping
|
|
20
|
+
- Cost Estimation + Fund Recovery
|
|
21
|
+
- Troubleshooting / FAQ
|
|
22
|
+
- Development
|
|
23
|
+
|
|
10
24
|
## ✨ Core Features
|
|
11
25
|
|
|
12
26
|
- **Protocol:Strategy Selection**: Choose your DEX backend using `protocol:strategy` format.
|
|
@@ -16,6 +30,74 @@ A unified, open-source TypeScript SDK that abstracts the complexity of Solana to
|
|
|
16
30
|
- **Standardized Interface**: Switch DEXs without changing your business logic.
|
|
17
31
|
- **Jito Smart Tipping**: Use `jitoTip: "auto"` (or a manual tip) with optional block engine region routing.
|
|
18
32
|
|
|
33
|
+
## 📦 Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm i solana-meme-kit
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Or:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pnpm add solana-meme-kit
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Or:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
bun add solana-meme-kit
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## ✅ Requirements
|
|
52
|
+
|
|
53
|
+
- **Node.js**: 18+ recommended
|
|
54
|
+
- **TypeScript**: peer dependency
|
|
55
|
+
- **RPC**: provide a reliable mainnet RPC for production usage
|
|
56
|
+
|
|
57
|
+
## 🔐 Security & Key Management
|
|
58
|
+
|
|
59
|
+
- Never hardcode private keys in source code.
|
|
60
|
+
- Prefer environment variables or a secret manager.
|
|
61
|
+
- Treat the `privateKey` as a **base58 secret key** (full keypair secret), not a public key.
|
|
62
|
+
|
|
63
|
+
Example:
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
import { MemeKit } from "solana-meme-kit";
|
|
67
|
+
|
|
68
|
+
const kit = new MemeKit({
|
|
69
|
+
rpcUrl: process.env.RPC_URL!,
|
|
70
|
+
privateKey: process.env.PRIVATE_KEY!,
|
|
71
|
+
cluster: "mainnet-beta",
|
|
72
|
+
});
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## 🚀 Quickstart
|
|
76
|
+
|
|
77
|
+
The SDK is designed so you can launch with a single `launch()` call.
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
import { MemeKit } from "solana-meme-kit";
|
|
81
|
+
|
|
82
|
+
const kit = new MemeKit({
|
|
83
|
+
rpcUrl: "https://api.mainnet-beta.solana.com",
|
|
84
|
+
privateKey: "YOUR_PRIVATE_KEY",
|
|
85
|
+
cluster: "mainnet-beta",
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const result = await kit.launch({
|
|
89
|
+
name: "Super Gem",
|
|
90
|
+
symbol: "SGEM",
|
|
91
|
+
image: "https://arweave.net/metadata",
|
|
92
|
+
supply: 1_000_000_000,
|
|
93
|
+
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
94
|
+
dex: "meteora",
|
|
95
|
+
jitoTip: "auto",
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
console.log(result);
|
|
99
|
+
```
|
|
100
|
+
|
|
19
101
|
## 📊 Strategy Comparison
|
|
20
102
|
|
|
21
103
|
| Strategy | Cost (est) | Anti-Snipe | Features |
|
|
@@ -43,12 +125,372 @@ const result = await kit.launch({
|
|
|
43
125
|
image: "https://arweave.net/metadata",
|
|
44
126
|
supply: 1_000_000_000,
|
|
45
127
|
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
46
|
-
dex: "meteora
|
|
128
|
+
dex: "meteora", // Default (alias for meteora:dlmm)
|
|
47
129
|
});
|
|
48
130
|
|
|
49
131
|
console.log(`Token: ${result.mint}, Pool: ${result.poolId}`);
|
|
50
132
|
```
|
|
51
133
|
|
|
134
|
+
## 📚 API Reference
|
|
135
|
+
|
|
136
|
+
### `new MemeKit(config)`
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
type MemeKitConfig = {
|
|
140
|
+
rpcUrl: string;
|
|
141
|
+
privateKey?: string;
|
|
142
|
+
cluster?: "mainnet-beta" | "devnet";
|
|
143
|
+
};
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
- **`rpcUrl`**: Solana RPC endpoint
|
|
147
|
+
- **`privateKey`**: base58 secret key (recommended to load from env in production)
|
|
148
|
+
- **`cluster`**: defaults to `mainnet-beta`
|
|
149
|
+
|
|
150
|
+
### `kit.launch(options)`
|
|
151
|
+
|
|
152
|
+
`launch()` orchestrates:
|
|
153
|
+
|
|
154
|
+
- Token mint + metadata
|
|
155
|
+
- Authority revocations
|
|
156
|
+
- Pool creation + initial liquidity (via your selected DEX strategy)
|
|
157
|
+
- Optional Jito bundle submission
|
|
158
|
+
|
|
159
|
+
Key `LaunchOptions` fields:
|
|
160
|
+
|
|
161
|
+
- **Token fields**
|
|
162
|
+
- `name`, `symbol`, `image`
|
|
163
|
+
- `decimals` (default depends on token manager)
|
|
164
|
+
- `supply` (defaults to `1_000_000_000`)
|
|
165
|
+
- **Liquidity fields**
|
|
166
|
+
- `liquidity: { solAmount, tokenAmount }` (recommended)
|
|
167
|
+
- Legacy support: `solLiquidityAmount`, `tokenLiquidityAmount`
|
|
168
|
+
- **Strategy selection**
|
|
169
|
+
- `dex`: `"meteora" | "meteora:dlmm" | "raydium:cpmm" | "raydium:amm"`
|
|
170
|
+
- `strategy`: legacy alias mapping is supported
|
|
171
|
+
- **Jito**
|
|
172
|
+
- `jitoTip`: number (SOL) or `"auto"`
|
|
173
|
+
- `blockEngine`: region routing
|
|
174
|
+
- **Meteora activation (optional)**
|
|
175
|
+
- `meteoraOptions.activationType`: `"timestamp" | "slot"`
|
|
176
|
+
- `meteoraOptions.activationPoint`: number
|
|
177
|
+
- `meteoraOptions.activationDate`: `Date` (convenience; converted to unix seconds)
|
|
178
|
+
- **Meteora DLMM config (optional)**
|
|
179
|
+
- `meteora.binStep`: number (basis points between bins)
|
|
180
|
+
- `meteora.width`: number (how many bins to seed)
|
|
181
|
+
- `meteora.strategyType`: `StrategyType.Spot | StrategyType.Curve | StrategyType.BidAsk`
|
|
182
|
+
- `meteora.lfg`: `{ minPrice, maxPrice, curvature }` (LFG seeding mode)
|
|
183
|
+
- **Raydium AMM market (optional)**
|
|
184
|
+
- `marketMode`: `"low-cost" | "standard"`
|
|
185
|
+
|
|
186
|
+
Return value (high level):
|
|
187
|
+
|
|
188
|
+
```typescript
|
|
189
|
+
type LaunchResult = {
|
|
190
|
+
mint: string;
|
|
191
|
+
poolId: string;
|
|
192
|
+
marketId: string;
|
|
193
|
+
strategy: string;
|
|
194
|
+
signature: string;
|
|
195
|
+
};
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### What happens during `launch()`
|
|
199
|
+
|
|
200
|
+
At a high level, `launch()` will:
|
|
201
|
+
|
|
202
|
+
- Create the SPL token + metadata
|
|
203
|
+
- Revoke mint and freeze authorities (so supply can’t be changed)
|
|
204
|
+
- Create the liquidity pool (based on `dex`)
|
|
205
|
+
- Seed initial liquidity
|
|
206
|
+
- Optionally submit everything as a single Jito bundle when `jitoTip` is set
|
|
207
|
+
|
|
208
|
+
The returned `poolId` is the pool address created/derived by the selected strategy.
|
|
209
|
+
|
|
210
|
+
## ✅ After launch (what to do next)
|
|
211
|
+
|
|
212
|
+
- **Save `mint`, `poolId`, and `signature`**.
|
|
213
|
+
- Use the official DEX UI (Meteora/Raydium) to manage/adjust your position after initialization.
|
|
214
|
+
- If you schedule a Meteora activation point, make sure you understand whether it’s a slot or timestamp.
|
|
215
|
+
|
|
216
|
+
## 🧠 Meteora DLMM Guide
|
|
217
|
+
|
|
218
|
+
### What the SDK does for DLMM
|
|
219
|
+
|
|
220
|
+
When you select `dex: "meteora"` (alias for `meteora:dlmm`), `DLMMManager.initialize()` generates instructions for:
|
|
221
|
+
|
|
222
|
+
- Creating the permissionless DLMM pool
|
|
223
|
+
- Initializing only the bin arrays needed for your chosen range
|
|
224
|
+
- Creating a position
|
|
225
|
+
- Seeding initial liquidity using a strategy
|
|
226
|
+
|
|
227
|
+
If you use Jito bundling, the SDK signs the bundle with any additional required signers automatically.
|
|
228
|
+
|
|
229
|
+
Notes:
|
|
230
|
+
|
|
231
|
+
- The SDK keeps DLMM initialization cost-efficient by only creating bin arrays covering your configured range.
|
|
232
|
+
- The SDK creates a position account internally; this requires an additional signer, handled for you.
|
|
233
|
+
|
|
234
|
+
### Meteora Configuration (Advanced)
|
|
235
|
+
|
|
236
|
+
You can customize DLMM pool configuration via `meteora`.
|
|
237
|
+
|
|
238
|
+
Fee controls (sniper tax):
|
|
239
|
+
|
|
240
|
+
- **`meteora.feeBps`**: override the pool fee (in basis points). Example: `500` = 5%.
|
|
241
|
+
- **`meteora.baseFactor`**: convenience input (defaults to `10000`). If you don’t set `feeBps`, the SDK derives a fee from `(baseFactor, binStep)`.
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
import { MemeKit } from "solana-meme-kit";
|
|
245
|
+
import { StrategyType } from "@meteora-ag/dlmm";
|
|
246
|
+
|
|
247
|
+
const kit = new MemeKit({
|
|
248
|
+
rpcUrl: "https://api.mainnet-beta.solana.com",
|
|
249
|
+
privateKey: "YOUR_PRIVATE_KEY",
|
|
250
|
+
cluster: "mainnet-beta",
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
const result = await kit.launch({
|
|
254
|
+
name: "Super Gem",
|
|
255
|
+
symbol: "SGEM",
|
|
256
|
+
image: "https://arweave.net/metadata",
|
|
257
|
+
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
258
|
+
dex: "meteora",
|
|
259
|
+
meteora: {
|
|
260
|
+
binStep: 100,
|
|
261
|
+
width: 60,
|
|
262
|
+
strategyType: StrategyType.Spot,
|
|
263
|
+
feeBps: 500,
|
|
264
|
+
},
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
console.log(result.poolId);
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Meteora Presets
|
|
271
|
+
|
|
272
|
+
If you want a safe default configuration without tuning numbers, use `MeteoraPresets`.
|
|
273
|
+
|
|
274
|
+
Presets are simple configuration objects that you pass into `launch()` as `meteora: ...`.
|
|
275
|
+
|
|
276
|
+
Available presets:
|
|
277
|
+
|
|
278
|
+
- **`MeteoraPresets.MEMECOIN_VOLATILE`**
|
|
279
|
+
- `binStep: 100` (1%)
|
|
280
|
+
- `width: 80`
|
|
281
|
+
- `strategyType: StrategyType.Spot`
|
|
282
|
+
- **`MeteoraPresets.ANTI_SNIPE_FEE`**
|
|
283
|
+
- `binStep: 100` (1%)
|
|
284
|
+
- `width: 80`
|
|
285
|
+
- `strategyType: StrategyType.Spot`
|
|
286
|
+
- `feeBps: 500` (5%)
|
|
287
|
+
- **`MeteoraPresets.COMMUNITY_TOKEN`**
|
|
288
|
+
- `binStep: 25` (0.25%)
|
|
289
|
+
- `width: 60`
|
|
290
|
+
- `strategyType: StrategyType.Spot`
|
|
291
|
+
- **`MeteoraPresets.STABLE_PEGGED`**
|
|
292
|
+
- `binStep: 5` (0.05%)
|
|
293
|
+
- `width: 10`
|
|
294
|
+
- `strategyType: StrategyType.BidAsk`
|
|
295
|
+
|
|
296
|
+
How to choose:
|
|
297
|
+
|
|
298
|
+
- **Memecoins / high volatility launches**: start with `MEMECOIN_VOLATILE`.
|
|
299
|
+
- **Anti-snipe fee mode**: start with `ANTI_SNIPE_FEE`.
|
|
300
|
+
- **Slower / organic launches**: start with `COMMUNITY_TOKEN`.
|
|
301
|
+
- **Pegged assets**: start with `STABLE_PEGGED`.
|
|
302
|
+
|
|
303
|
+
You can always start from a preset and override fields by passing a custom object instead.
|
|
304
|
+
|
|
305
|
+
### Launch Styles (Recommended)
|
|
306
|
+
|
|
307
|
+
`LaunchStyles` is the abstraction layer for common launch types. It bundles multiple low-level parameters into a single, human-readable choice.
|
|
308
|
+
|
|
309
|
+
```typescript
|
|
310
|
+
import { MemeKit, LaunchStyles } from "solana-meme-kit";
|
|
311
|
+
|
|
312
|
+
const kit = new MemeKit({
|
|
313
|
+
rpcUrl: "https://api.mainnet-beta.solana.com",
|
|
314
|
+
privateKey: "YOUR_PRIVATE_KEY",
|
|
315
|
+
cluster: "mainnet-beta",
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
// Instant “viral memecoin” style
|
|
319
|
+
await kit.launch({
|
|
320
|
+
name: "Super Gem",
|
|
321
|
+
symbol: "SGEM",
|
|
322
|
+
image: "https://arweave.net/metadata",
|
|
323
|
+
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
324
|
+
dex: "meteora",
|
|
325
|
+
meteora: LaunchStyles.VIRAL,
|
|
326
|
+
});
|
|
327
|
+
|
|
328
|
+
// Fair launch style (pool is created but trading is paused until the activation time)
|
|
329
|
+
await kit.launch({
|
|
330
|
+
name: "Super Gem",
|
|
331
|
+
symbol: "SGEM",
|
|
332
|
+
image: "https://arweave.net/metadata",
|
|
333
|
+
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
334
|
+
dex: "meteora",
|
|
335
|
+
meteora: LaunchStyles.FAIR_LAUNCH(new Date(Date.now() + 60_000)),
|
|
336
|
+
});
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
```typescript
|
|
340
|
+
import { MemeKit, MeteoraPresets } from "solana-meme-kit";
|
|
341
|
+
|
|
342
|
+
const kit = new MemeKit({
|
|
343
|
+
rpcUrl: "https://api.mainnet-beta.solana.com",
|
|
344
|
+
privateKey: "YOUR_PRIVATE_KEY",
|
|
345
|
+
cluster: "mainnet-beta",
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
const result = await kit.launch({
|
|
349
|
+
name: "Super Gem",
|
|
350
|
+
symbol: "SGEM",
|
|
351
|
+
image: "https://arweave.net/metadata",
|
|
352
|
+
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
353
|
+
dex: "meteora",
|
|
354
|
+
meteora: MeteoraPresets.MEMECOIN_VOLATILE,
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
console.log(result.poolId);
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Meteora Activation Scheduling (Optional)
|
|
361
|
+
|
|
362
|
+
You can schedule the pool activation with `meteoraOptions`:
|
|
363
|
+
|
|
364
|
+
```typescript
|
|
365
|
+
import { MemeKit } from "solana-meme-kit";
|
|
366
|
+
|
|
367
|
+
const kit = new MemeKit({
|
|
368
|
+
rpcUrl: "https://api.mainnet-beta.solana.com",
|
|
369
|
+
privateKey: "YOUR_PRIVATE_KEY",
|
|
370
|
+
cluster: "mainnet-beta",
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
const result = await kit.launch({
|
|
374
|
+
name: "Super Gem",
|
|
375
|
+
symbol: "SGEM",
|
|
376
|
+
image: "https://arweave.net/metadata",
|
|
377
|
+
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
378
|
+
dex: "meteora",
|
|
379
|
+
meteoraOptions: {
|
|
380
|
+
activationType: "timestamp",
|
|
381
|
+
activationPoint: Math.floor(Date.now() / 1000) + 60,
|
|
382
|
+
},
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
console.log(result.signature);
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
You can also use `activationDate` as a convenience:
|
|
389
|
+
|
|
390
|
+
```typescript
|
|
391
|
+
import { MemeKit } from "solana-meme-kit";
|
|
392
|
+
|
|
393
|
+
const kit = new MemeKit({
|
|
394
|
+
rpcUrl: "https://api.mainnet-beta.solana.com",
|
|
395
|
+
privateKey: "YOUR_PRIVATE_KEY",
|
|
396
|
+
cluster: "mainnet-beta",
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
const result = await kit.launch({
|
|
400
|
+
name: "Super Gem",
|
|
401
|
+
symbol: "SGEM",
|
|
402
|
+
image: "https://arweave.net/metadata",
|
|
403
|
+
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
404
|
+
dex: "meteora",
|
|
405
|
+
meteoraOptions: {
|
|
406
|
+
activationDate: new Date(Date.now() + 60_000),
|
|
407
|
+
},
|
|
408
|
+
});
|
|
409
|
+
|
|
410
|
+
console.log(result.signature);
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### LFG Seeding (Liquidity For Growth)
|
|
414
|
+
|
|
415
|
+
LFG mode allows you to seed liquidity across a specific price range (`minPrice` -> `maxPrice`) using a curved distribution.
|
|
416
|
+
|
|
417
|
+
```typescript
|
|
418
|
+
import { MemeKit } from "solana-meme-kit";
|
|
419
|
+
|
|
420
|
+
const kit = new MemeKit({
|
|
421
|
+
rpcUrl: "https://api.mainnet-beta.solana.com",
|
|
422
|
+
privateKey: "YOUR_PRIVATE_KEY",
|
|
423
|
+
cluster: "mainnet-beta",
|
|
424
|
+
});
|
|
425
|
+
|
|
426
|
+
const result = await kit.launch({
|
|
427
|
+
name: "Super Gem",
|
|
428
|
+
symbol: "SGEM",
|
|
429
|
+
image: "https://arweave.net/metadata",
|
|
430
|
+
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
431
|
+
dex: "meteora",
|
|
432
|
+
meteora: {
|
|
433
|
+
binStep: 100,
|
|
434
|
+
lfg: {
|
|
435
|
+
minPrice: 0.0000000009,
|
|
436
|
+
maxPrice: 0.0000000011,
|
|
437
|
+
curvature: 0.6,
|
|
438
|
+
},
|
|
439
|
+
},
|
|
440
|
+
});
|
|
441
|
+
|
|
442
|
+
console.log(result.poolId);
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
## 💧 Raydium Guide
|
|
446
|
+
|
|
447
|
+
### Raydium CPMM (`raydium:cpmm`)
|
|
448
|
+
|
|
449
|
+
```typescript
|
|
450
|
+
import { MemeKit } from "solana-meme-kit";
|
|
451
|
+
|
|
452
|
+
const kit = new MemeKit({
|
|
453
|
+
rpcUrl: "https://api.mainnet-beta.solana.com",
|
|
454
|
+
privateKey: "YOUR_PRIVATE_KEY",
|
|
455
|
+
cluster: "mainnet-beta",
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
const result = await kit.launch({
|
|
459
|
+
name: "Super Gem",
|
|
460
|
+
symbol: "SGEM",
|
|
461
|
+
image: "https://arweave.net/metadata",
|
|
462
|
+
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
463
|
+
dex: "raydium:cpmm",
|
|
464
|
+
});
|
|
465
|
+
|
|
466
|
+
console.log(result.poolId);
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### Raydium AMM (`raydium:amm`)
|
|
470
|
+
|
|
471
|
+
Raydium AMM requires an OpenBook market. The SDK can generate a low-cost market with `marketMode`.
|
|
472
|
+
|
|
473
|
+
```typescript
|
|
474
|
+
import { MemeKit } from "solana-meme-kit";
|
|
475
|
+
|
|
476
|
+
const kit = new MemeKit({
|
|
477
|
+
rpcUrl: "https://api.mainnet-beta.solana.com",
|
|
478
|
+
privateKey: "YOUR_PRIVATE_KEY",
|
|
479
|
+
cluster: "mainnet-beta",
|
|
480
|
+
});
|
|
481
|
+
|
|
482
|
+
const result = await kit.launch({
|
|
483
|
+
name: "Super Gem",
|
|
484
|
+
symbol: "SGEM",
|
|
485
|
+
image: "https://arweave.net/metadata",
|
|
486
|
+
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
487
|
+
dex: "raydium:amm",
|
|
488
|
+
marketMode: "low-cost",
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
console.log(result.marketId);
|
|
492
|
+
```
|
|
493
|
+
|
|
52
494
|
### Smart Tipping (Jito)
|
|
53
495
|
|
|
54
496
|
`jitoTip` can be a number (SOL) or `"auto"`.
|
|
@@ -67,7 +509,7 @@ const result = await kit.launch({
|
|
|
67
509
|
symbol: "SGEM",
|
|
68
510
|
image: "https://arweave.net/metadata",
|
|
69
511
|
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
70
|
-
dex: "meteora
|
|
512
|
+
dex: "meteora",
|
|
71
513
|
jitoTip: "auto",
|
|
72
514
|
blockEngine: "ny",
|
|
73
515
|
});
|
|
@@ -84,6 +526,22 @@ Available `blockEngine` regions:
|
|
|
84
526
|
- **tokyo**
|
|
85
527
|
- **slc**
|
|
86
528
|
|
|
529
|
+
Notes:
|
|
530
|
+
|
|
531
|
+
- `jitoTip: "auto"` queries a tip floor endpoint and uses a conservative percentile.
|
|
532
|
+
- Jito bundling is mainly relevant on **mainnet**.
|
|
533
|
+
|
|
534
|
+
## 🧾 Result fields (practical)
|
|
535
|
+
|
|
536
|
+
- **`mint`**: the SPL token mint address
|
|
537
|
+
- **`poolId`**: the created pool address (DLMM LB pair for Meteora; pool id for Raydium)
|
|
538
|
+
- **`marketId`**:
|
|
539
|
+
- Raydium AMM: created OpenBook market id (if applicable)
|
|
540
|
+
- Other strategies: “Not Required”
|
|
541
|
+
- **`signature`**:
|
|
542
|
+
- With Jito: bundle id or engine response
|
|
543
|
+
- Without Jito: standard Solana tx signature
|
|
544
|
+
|
|
87
545
|
### Smart Tip Quote (for UI)
|
|
88
546
|
|
|
89
547
|
```typescript
|
|
@@ -103,7 +561,7 @@ const estimatedSol = MemeKit.estimateLaunchCost({
|
|
|
103
561
|
symbol: "SGEM",
|
|
104
562
|
image: "https://arweave.net/metadata",
|
|
105
563
|
liquidity: { solAmount: 5, tokenAmount: 800_000_000 },
|
|
106
|
-
dex: "meteora
|
|
564
|
+
dex: "meteora",
|
|
107
565
|
jitoTip: "auto",
|
|
108
566
|
});
|
|
109
567
|
|
|
@@ -123,6 +581,38 @@ const txid = await kit.recoverFunds("DESTINATION_WALLET_ADDRESS");
|
|
|
123
581
|
console.log(txid);
|
|
124
582
|
```
|
|
125
583
|
|
|
584
|
+
## 🔧 Troubleshooting / FAQ
|
|
585
|
+
|
|
586
|
+
### “My launch fails when using Jito”
|
|
587
|
+
|
|
588
|
+
- Ensure you are on **mainnet-beta** and using a block engine region.
|
|
589
|
+
- Ensure your wallet has enough SOL for:
|
|
590
|
+
- token creation
|
|
591
|
+
- pool rent + liquidity
|
|
592
|
+
- tip
|
|
593
|
+
|
|
594
|
+
### “Why did I get a signer error?”
|
|
595
|
+
|
|
596
|
+
Some strategies (notably Meteora DLMM) require creating additional accounts (like a position account), which requires additional signatures.
|
|
597
|
+
|
|
598
|
+
- If you call `MemeKit.launch()`, this is handled automatically.
|
|
599
|
+
- If you directly use `DLMMManager.initialize()`, you must also sign with `result.signers`.
|
|
600
|
+
|
|
601
|
+
### “My RPC is rate-limiting / failing”
|
|
602
|
+
|
|
603
|
+
- Use a dedicated RPC provider for mainnet.
|
|
604
|
+
- Some strategies need multiple account reads during instruction building.
|
|
605
|
+
|
|
606
|
+
### “How do I pick a binStep?”
|
|
607
|
+
|
|
608
|
+
- Higher `binStep` (e.g. 100 = 1%) supports more volatility but results in larger price jumps.
|
|
609
|
+
- Lower `binStep` (e.g. 5 = 0.05%) is only appropriate for stable/pegged assets.
|
|
610
|
+
|
|
611
|
+
### “What does width mean?”
|
|
612
|
+
|
|
613
|
+
- `width` is the number of bins you seed liquidity across.
|
|
614
|
+
- Larger width covers more price movement; smaller width concentrates liquidity tighter.
|
|
615
|
+
|
|
126
616
|
## 🛠️ Architecture
|
|
127
617
|
|
|
128
618
|
```text
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemeKit.d.ts","sourceRoot":"","sources":["../../src/core/MemeKit.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAOtD,qBAAa,OAAO;IAClB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,OAAO,CAA4B;IAEpC,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,WAAW,EAAE,WAAW,CAAC;gBAEpB,MAAM,EAAE;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,cAAc,GAAG,QAAQ,CAAC;KACrC;IA2BD,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM;
|
|
1
|
+
{"version":3,"file":"MemeKit.d.ts","sourceRoot":"","sources":["../../src/core/MemeKit.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAOtD,qBAAa,OAAO;IAClB,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,MAAM,CAAU;IACxB,OAAO,CAAC,OAAO,CAA4B;IAEpC,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,WAAW,EAAE,WAAW,CAAC;gBAEpB,MAAM,EAAE;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,cAAc,GAAG,QAAQ,CAAC;KACrC;IA2BD,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM;WAsE5C,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAIrC,YAAY,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAuCzD,MAAM,CAAC,OAAO,EAAE,aAAa;;;;;;;CAiIpC"}
|
package/dist/core/MemeKit.js
CHANGED
|
@@ -38,14 +38,15 @@ export class MemeKit {
|
|
|
38
38
|
}
|
|
39
39
|
static estimateLaunchCost(options) {
|
|
40
40
|
const solLiquidity = options.liquidity?.solAmount ?? options.solLiquidityAmount ?? 0;
|
|
41
|
-
const
|
|
41
|
+
const selected = options.dex ??
|
|
42
42
|
(options.strategy === "meteora"
|
|
43
|
-
? "meteora
|
|
43
|
+
? "meteora"
|
|
44
44
|
: options.strategy === "raydium-cpmm"
|
|
45
45
|
? "raydium:cpmm"
|
|
46
46
|
: options.strategy === "raydium-amm"
|
|
47
47
|
? "raydium:amm"
|
|
48
|
-
: "meteora
|
|
48
|
+
: "meteora");
|
|
49
|
+
const dex = selected === "meteora" ? "meteora:dlmm" : selected;
|
|
49
50
|
let baseFees = 0;
|
|
50
51
|
switch (dex) {
|
|
51
52
|
case "meteora:dlmm":
|
|
@@ -62,6 +63,29 @@ export class MemeKit {
|
|
|
62
63
|
baseFees = 0.025;
|
|
63
64
|
break;
|
|
64
65
|
}
|
|
66
|
+
// LFG can involve a larger bin range which increases rent due to more bin arrays.
|
|
67
|
+
// Keep the default (non-LFG) estimate unchanged, and add a small increment when the
|
|
68
|
+
// estimated bin range exceeds the default width.
|
|
69
|
+
const lfg = options.meteora?.lfg;
|
|
70
|
+
if (dex === "meteora:dlmm" &&
|
|
71
|
+
lfg?.minPrice !== undefined &&
|
|
72
|
+
lfg?.maxPrice !== undefined) {
|
|
73
|
+
const binStep = options.meteora?.binStep ?? 100;
|
|
74
|
+
const minPrice = Math.min(lfg.minPrice, lfg.maxPrice);
|
|
75
|
+
const maxPrice = Math.max(lfg.minPrice, lfg.maxPrice);
|
|
76
|
+
if (minPrice > 0 && maxPrice > 0 && binStep > 0) {
|
|
77
|
+
const step = binStep / 10000;
|
|
78
|
+
const ratio = maxPrice / minPrice;
|
|
79
|
+
const binCount = Math.max(1, Math.floor(Math.log(ratio) / Math.log(1 + step)) + 1);
|
|
80
|
+
const binsPerArray = 70;
|
|
81
|
+
const defaultWidth = 80;
|
|
82
|
+
const defaultBinArrays = Math.ceil(defaultWidth / binsPerArray);
|
|
83
|
+
const binArrays = Math.ceil(binCount / binsPerArray);
|
|
84
|
+
const extraBinArrays = Math.max(0, binArrays - defaultBinArrays);
|
|
85
|
+
const rentPerExtraBinArraySol = 0.001;
|
|
86
|
+
baseFees += extraBinArrays * rentPerExtraBinArraySol;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
65
89
|
const jitoTip = typeof options.jitoTip === "number" ? options.jitoTip : 0.01;
|
|
66
90
|
const buffer = 0.005;
|
|
67
91
|
return baseFees + solLiquidity + jitoTip + buffer;
|
|
@@ -96,14 +120,15 @@ export class MemeKit {
|
|
|
96
120
|
return signature;
|
|
97
121
|
}
|
|
98
122
|
async launch(options) {
|
|
99
|
-
const
|
|
123
|
+
const selected = options.dex ??
|
|
100
124
|
(options.strategy === "meteora"
|
|
101
|
-
? "meteora
|
|
125
|
+
? "meteora"
|
|
102
126
|
: options.strategy === "raydium-cpmm"
|
|
103
127
|
? "raydium:cpmm"
|
|
104
128
|
: options.strategy === "raydium-amm"
|
|
105
129
|
? "raydium:amm"
|
|
106
|
-
: "meteora
|
|
130
|
+
: "meteora");
|
|
131
|
+
const dex = selected === "meteora" ? "meteora:dlmm" : selected;
|
|
107
132
|
Logger.info(`Starting Launch on strategy: ${dex}`);
|
|
108
133
|
// 1. Create Token
|
|
109
134
|
const { mint } = await this.tokenManager.createToken({
|
|
@@ -131,7 +156,7 @@ export class MemeKit {
|
|
|
131
156
|
default:
|
|
132
157
|
throw new Error(`Unknown DEX strategy: ${dex}`);
|
|
133
158
|
}
|
|
134
|
-
const { poolId, instructions } = await strategy.initialize(options, mint.publicKey);
|
|
159
|
+
const { poolId, instructions, signers } = await strategy.initialize(options, mint.publicKey);
|
|
135
160
|
Logger.info(`Liquidity Setup Instructions Generated. Pool: ${poolId.toBase58()}`);
|
|
136
161
|
// 4. Send Transaction (Jito or Real SOL)
|
|
137
162
|
let signature = "Dry-run (not sent)";
|
|
@@ -145,7 +170,7 @@ export class MemeKit {
|
|
|
145
170
|
}
|
|
146
171
|
Logger.info(`Launching with Jito Bundle (Tip: ${tipSol} SOL)...`);
|
|
147
172
|
try {
|
|
148
|
-
const bundleId = await this.jitoManager.sendBundle(instructions, tipSol, options.blockEngine);
|
|
173
|
+
const bundleId = await this.jitoManager.sendBundle(instructions, tipSol, options.blockEngine, signers ?? []);
|
|
149
174
|
signature = bundleId;
|
|
150
175
|
Logger.info(`Bundle Submitted: ${bundleId}`);
|
|
151
176
|
}
|
|
@@ -162,7 +187,7 @@ export class MemeKit {
|
|
|
162
187
|
instructions,
|
|
163
188
|
}).compileToV0Message();
|
|
164
189
|
const versionedTx = new VersionedTransaction(messageV0);
|
|
165
|
-
versionedTx.sign([this.wallet]);
|
|
190
|
+
versionedTx.sign([this.wallet, ...(signers ?? [])]);
|
|
166
191
|
Logger.info("Sending Liquidity Setup Transaction...");
|
|
167
192
|
try {
|
|
168
193
|
signature = await this.connection.sendTransaction(versionedTx);
|
package/dist/core/MemeKit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MemeKit.js","sourceRoot":"","sources":["../../src/core/MemeKit.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAKhE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;A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,CAAC,KAAK,CAAC,uBAAuB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;oBACnD,SAAS,GAAG,WAAW,GAAG,CAAC,OAAO,EAAE,CAAC;gBACvC,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE;YAC/B,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE;YACzB,QAAQ,EAAE,GAAG,KAAK,aAAa,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,cAAc;YACzE,QAAQ,EAAE,GAAG;YACb,SAAS;SACV,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -12,6 +12,6 @@ export declare class JitoManager {
|
|
|
12
12
|
* Sends a bundle of instructions with a Jito tip
|
|
13
13
|
*/
|
|
14
14
|
sendBundle(instructions: any[], // TransactionInstruction[]
|
|
15
|
-
tipSol?: number, region?: BlockEngineRegion): Promise<string>;
|
|
15
|
+
tipSol?: number, region?: BlockEngineRegion, extraSigners?: Keypair[]): Promise<string>;
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=JitoManager.d.ts.map
|