@gala-chain/launchpad-mcp-server 2.0.4 → 4.0.4-beta.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/README.md +6 -4
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.d.ts.map +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/generated/version.js.map +1 -1
- package/dist/tools/utils/explainSdkUsage.d.ts.map +1 -1
- package/dist/tools/utils/explainSdkUsage.js +935 -9
- package/dist/tools/utils/explainSdkUsage.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# @gala-chain/launchpad-mcp-server
|
|
2
2
|
|
|
3
|
+
**Version: 2.0.5-beta.0 (Beta)**
|
|
4
|
+
|
|
3
5
|
MCP (Model Context Protocol) server for Gala Launchpad SDK - Enables AI agents to interact with Gala Launchpad.
|
|
4
6
|
|
|
5
7
|
## 🚀 Features
|
|
6
8
|
|
|
7
|
-
- **
|
|
9
|
+
- **89 AI-accessible tools** for complete Gala Launchpad integration (includes 19 pool management & event watcher tools, 13 trading operation tools, 6 balance & portfolio tools, 4 token creation tools, 2 transfer tools, 2 lock/unlock tools, 16 utility tools, 26 DEX/GalaSwap tools, 1 cleanup tool)
|
|
8
10
|
- **83 slash commands** (prompts) for streamlined workflows - 94% tool coverage (every major operation has a corresponding slash command)
|
|
9
11
|
- **Type-safe** - Full TypeScript support with validated inputs
|
|
10
12
|
- **Production-ready** - Built on [@gala-chain/launchpad-sdk ](https://www.npmjs.com/package/@gala-chain/launchpad-sdk)
|
|
@@ -13,7 +15,7 @@ MCP (Model Context Protocol) server for Gala Launchpad SDK - Enables AI agents t
|
|
|
13
15
|
- **Optimized** - Local bonding curve calculations and DEX quote calculations for instant results
|
|
14
16
|
- **Real-time monitoring** - WebSocket-based watchers for pool and token creation events
|
|
15
17
|
|
|
16
|
-
## What's New in v2.0.0
|
|
18
|
+
## What's New in v2.0.5-beta.0
|
|
17
19
|
|
|
18
20
|
### New Tools (9 Total)
|
|
19
21
|
|
|
@@ -44,7 +46,7 @@ MCP (Model Context Protocol) server for Gala Launchpad SDK - Enables AI agents t
|
|
|
44
46
|
|
|
45
47
|
### Tool Coverage
|
|
46
48
|
|
|
47
|
-
- **
|
|
49
|
+
- **89 total MCP tools** (full coverage of Gala Launchpad features)
|
|
48
50
|
- **83 total prompts** (up from 75 in v1.x)
|
|
49
51
|
- **94% tool→prompt coverage** (78/83 tools have dedicated prompts)
|
|
50
52
|
- **New focus**: DEX ecosystem integration, real-time monitoring, advanced quote calculations
|
|
@@ -153,7 +155,7 @@ Use the wallet management tools to upgrade or switch wallets at runtime:
|
|
|
153
155
|
- `gala_launchpad_set_wallet` - Upgrade from read-only to full-access mode
|
|
154
156
|
- `gala_launchpad_get_wallet` - Retrieve wallet information
|
|
155
157
|
|
|
156
|
-
## 🛠️ Available Tools (
|
|
158
|
+
## 🛠️ Available Tools (89 Total)
|
|
157
159
|
|
|
158
160
|
### Pool Management, Pricing & Event Watchers (19 tools)
|
|
159
161
|
- `gala_launchpad_fetch_pools` - Fetch token pools with filtering
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/generated/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/generated/version.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,kBAAkB,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/generated/version.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEU,QAAA,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/generated/version.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEU,QAAA,kBAAkB,GAAG,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explainSdkUsage.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"explainSdkUsage.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CA6DzD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,aAS3B,CAAC;AA8/FH;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OA8DjC,CAAC"}
|
|
@@ -24,15 +24,16 @@ exports.TOPIC_METHOD_MAPPING = {
|
|
|
24
24
|
'fetchVolumeData', 'fetchTokenPrice', 'fetchLaunchpadTokenSpotPrice',
|
|
25
25
|
'fetchTokenDistribution', 'fetchTokenBadges', 'resolveVaultAddress', 'resolveTokenClassKey'
|
|
26
26
|
],
|
|
27
|
-
'balances': ['fetchGalaBalance', 'fetchTokenBalance', 'fetchTokensHeld', 'fetchTokensCreated'],
|
|
27
|
+
'balances': ['fetchGalaBalance', 'fetchTokenBalance', 'fetchTokensHeld', 'fetchTokensCreated', 'fetchAvailableBalance'],
|
|
28
28
|
// Token Creation & Management
|
|
29
29
|
'token-creation': ['isTokenNameAvailable', 'isTokenSymbolAvailable', 'fetchLaunchTokenFee', 'uploadTokenImage', 'launchToken'],
|
|
30
30
|
'token-details': ['fetchTokenDetails'],
|
|
31
31
|
'token-distribution': ['fetchTokenDistribution'],
|
|
32
|
+
'token-status': ['isTokenGraduated', 'onDexPoolCreation', 'onLaunchpadTokenCreation'],
|
|
32
33
|
// Portfolio Management
|
|
33
34
|
'multi-wallet': [], // Composite workflow topic
|
|
34
35
|
'transfers': ['transferGala', 'transferToken'],
|
|
35
|
-
'locks': ['lockToken', 'unlockToken'],
|
|
36
|
+
'locks': ['lockToken', 'unlockToken', 'fetchLockedBalance'],
|
|
36
37
|
// DEX Trading
|
|
37
38
|
'dex-trading': ['getSwapQuoteExactInput', 'getSwapQuoteExactOutput', 'executeSwap', 'getSwapUserAssets', 'getAllSwapUserAssets', 'getSwapPoolInfo'],
|
|
38
39
|
'error-handling': [], // Cross-cutting concern
|
|
@@ -49,12 +50,18 @@ exports.TOPIC_METHOD_MAPPING = {
|
|
|
49
50
|
// Advanced Analysis
|
|
50
51
|
'advanced-dex-analysis': ['fetchCompositePoolData', 'calculateDexPoolQuoteExactAmountLocal', 'calculateDexPoolQuoteExactAmountExternal', 'calculateDexPoolQuoteExactAmount'],
|
|
51
52
|
'trading-analytics': ['fetchTrades'],
|
|
52
|
-
'utilities-and-helpers': ['fetchGalaPrice', 'fetchTokenClassesWithSupply', 'calculateInitialBuyAmount', 'getBundlerTransactionResult', 'getSwapPoolPrice', 'fetchSwapPositionDirect', 'getAllSwapUserAssets', 'cleanup'],
|
|
53
|
+
'utilities-and-helpers': ['fetchGalaPrice', 'fetchTokenClassesWithSupply', 'calculateInitialBuyAmount', 'getBundlerTransactionResult', 'getSwapPoolPrice', 'fetchSwapPositionDirect', 'getAllSwapUserAssets', 'cleanup', 'clearCache', 'getCacheInfo'],
|
|
54
|
+
'utilities-system': ['getAddress', 'getConfig', 'getEthereumAddress', 'getUrlByTokenName', 'getVersion', 'getWallet', 'hasWallet', 'setWallet', 'createWallet', 'connectWebSocket', 'disconnectWebSocket', 'isWebSocketConnected'],
|
|
53
55
|
// DEX Leaderboards & Metrics
|
|
54
|
-
'fetch-all-dex-seasons': ['fetchAllDexSeasons'
|
|
56
|
+
'fetch-all-dex-seasons': ['fetchAllDexSeasons'],
|
|
57
|
+
'fetch-current-dex-season': ['fetchCurrentDexSeason'],
|
|
55
58
|
'fetch-dex-leaderboard-by-season-id': ['fetchDexLeaderboardBySeasonId', 'fetchCurrentDexLeaderboard'],
|
|
56
59
|
'fetch-dex-aggregated-volume-summary': ['fetchDexAggregatedVolumeSummary'],
|
|
57
60
|
'fetch-dex-pools': ['fetchDexPools', 'fetchAllDexPools'],
|
|
61
|
+
// Event Subscriptions
|
|
62
|
+
'event-subscriptions': ['subscribeToEvent', 'subscribeToDexLiquidityAdded', 'subscribeToDexLiquidityChanged', 'subscribeToDexLiquidityRemoved', 'subscribeToDexPoolAdded', 'subscribeToDexSwapExecuted', 'subscribeToTokenCreations'],
|
|
63
|
+
// MCP Integration
|
|
64
|
+
'mcp-to-sdk-mapping': [], // Composite workflow topic
|
|
58
65
|
};
|
|
59
66
|
/**
|
|
60
67
|
* Composite topics that don't map 1:1 to SDK methods
|
|
@@ -62,13 +69,13 @@ exports.TOPIC_METHOD_MAPPING = {
|
|
|
62
69
|
*/
|
|
63
70
|
exports.COMPOSITE_TOPICS = new Set([
|
|
64
71
|
'buy-tokens', 'sell-tokens', 'pool-graduation', 'fetch-pools', 'balances',
|
|
65
|
-
'token-creation', 'multi-wallet', 'transfers', 'locks', 'dex-trading', 'error-handling',
|
|
72
|
+
'token-creation', 'token-status', 'multi-wallet', 'transfers', 'locks', 'dex-trading', 'error-handling',
|
|
66
73
|
'installation', 'local-calculations', 'price-history', 'token-details',
|
|
67
74
|
'spot-prices-smart-routing', 'profile-management', 'token-distribution',
|
|
68
75
|
'liquidity-positions', 'advanced-dex-analysis',
|
|
69
|
-
'trading-analytics', 'utilities-and-helpers', 'fetch-all-dex-seasons',
|
|
70
|
-
'fetch-dex-leaderboard-by-season-id', 'fetch-dex-aggregated-volume-summary',
|
|
71
|
-
'fetch-dex-pools',
|
|
76
|
+
'trading-analytics', 'utilities-and-helpers', 'utilities-system', 'fetch-all-dex-seasons',
|
|
77
|
+
'fetch-current-dex-season', 'fetch-dex-leaderboard-by-season-id', 'fetch-dex-aggregated-volume-summary',
|
|
78
|
+
'fetch-dex-pools', 'event-subscriptions', 'mcp-to-sdk-mapping',
|
|
72
79
|
]);
|
|
73
80
|
/**
|
|
74
81
|
* SDK code examples organized by topic
|
|
@@ -2173,6 +2180,921 @@ async function queryDexPools() {
|
|
|
2173
2180
|
**MCP Tool Equivalents:**
|
|
2174
2181
|
- \`gala_launchpad_fetch_dex_pools\`
|
|
2175
2182
|
- \`gala_launchpad_fetch_all_dex_pools\`
|
|
2183
|
+
`,
|
|
2184
|
+
// ============================================================================
|
|
2185
|
+
// TOKEN STATUS CHECKING: Graduation & Event Monitoring
|
|
2186
|
+
// ============================================================================
|
|
2187
|
+
// - token-status: Check token graduation status and monitor events
|
|
2188
|
+
// ============================================================================
|
|
2189
|
+
'token-status': `
|
|
2190
|
+
## Token Status and Event Monitoring
|
|
2191
|
+
|
|
2192
|
+
**Covers Methods:**
|
|
2193
|
+
- \`isTokenGraduated()\`
|
|
2194
|
+
- \`onDexPoolCreation()\`
|
|
2195
|
+
- \`onLaunchpadTokenCreation()\`
|
|
2196
|
+
|
|
2197
|
+
Check token graduation status and monitor real-time token/pool creation events.
|
|
2198
|
+
|
|
2199
|
+
\`\`\`typescript
|
|
2200
|
+
import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
|
|
2201
|
+
|
|
2202
|
+
async function monitorTokenStatus() {
|
|
2203
|
+
const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
|
|
2204
|
+
|
|
2205
|
+
// ============================================================================
|
|
2206
|
+
// CHECK GRADUATION STATUS - Determine if token is on DEX or bonding curve
|
|
2207
|
+
// ============================================================================
|
|
2208
|
+
|
|
2209
|
+
// Check if token has graduated from bonding curve to DEX
|
|
2210
|
+
const isGraduated = await sdk.isTokenGraduated('anime');
|
|
2211
|
+
|
|
2212
|
+
if (isGraduated) {
|
|
2213
|
+
console.log('Token has graduated to DEX - trade via GalaSwap');
|
|
2214
|
+
// Use DEX trading methods: executeSwap(), getSwapQuoteExactInput(), etc.
|
|
2215
|
+
} else {
|
|
2216
|
+
console.log('Token on bonding curve - trade via launchpad');
|
|
2217
|
+
// Use bonding curve methods: buy(), sell(), calculateBuyAmount(), etc.
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2220
|
+
// ============================================================================
|
|
2221
|
+
// MONITOR DEX POOL CREATION - Real-time notifications
|
|
2222
|
+
// ============================================================================
|
|
2223
|
+
|
|
2224
|
+
// Set up listener for new DEX pools
|
|
2225
|
+
const cleanupDexPool = sdk.onDexPoolCreation((poolData) => {
|
|
2226
|
+
console.log('New DEX pool created!');
|
|
2227
|
+
console.log(\` Token: \${poolData.tokenName}\`);
|
|
2228
|
+
console.log(\` Token0: \${poolData.token0}\`);
|
|
2229
|
+
console.log(\` Token1: \${poolData.token1}\`);
|
|
2230
|
+
console.log(\` Fee Tier: \${poolData.feeTier}\`);
|
|
2231
|
+
console.log(\` Initial TVL: \${poolData.tvl}\`);
|
|
2232
|
+
|
|
2233
|
+
// Take action on new pool
|
|
2234
|
+
// Example: Automatically provide liquidity or execute arbitrage
|
|
2235
|
+
});
|
|
2236
|
+
|
|
2237
|
+
// ============================================================================
|
|
2238
|
+
// MONITOR TOKEN LAUNCHES - Real-time notifications
|
|
2239
|
+
// ============================================================================
|
|
2240
|
+
|
|
2241
|
+
// Set up listener for new token launches
|
|
2242
|
+
const cleanupTokenCreation = sdk.onLaunchpadTokenCreation((tokenData) => {
|
|
2243
|
+
console.log('New token launched!');
|
|
2244
|
+
console.log(\` Name: \${tokenData.tokenName}\`);
|
|
2245
|
+
console.log(\` Symbol: \${tokenData.tokenSymbol}\`);
|
|
2246
|
+
console.log(\` Creator: \${tokenData.creator}\`);
|
|
2247
|
+
console.log(\` Max Supply: \${tokenData.maxSupply}\`);
|
|
2248
|
+
console.log(\` Base Price: \${tokenData.basePrice}\`);
|
|
2249
|
+
|
|
2250
|
+
// Take action on new token
|
|
2251
|
+
// Example: Automatically buy early or analyze opportunity
|
|
2252
|
+
});
|
|
2253
|
+
|
|
2254
|
+
// ============================================================================
|
|
2255
|
+
// COMPLETE WORKFLOW: Monitoring + Trading
|
|
2256
|
+
// ============================================================================
|
|
2257
|
+
|
|
2258
|
+
async function autoTrade() {
|
|
2259
|
+
// Monitor new tokens
|
|
2260
|
+
sdk.onLaunchpadTokenCreation(async (token) => {
|
|
2261
|
+
console.log(\`New token: \${token.tokenName}\`);
|
|
2262
|
+
|
|
2263
|
+
// Wait for graduation
|
|
2264
|
+
const checkGraduation = setInterval(async () => {
|
|
2265
|
+
const graduated = await sdk.isTokenGraduated(token.tokenName);
|
|
2266
|
+
|
|
2267
|
+
if (graduated) {
|
|
2268
|
+
clearInterval(checkGraduation);
|
|
2269
|
+
console.log(\`\${token.tokenName} graduated! Switching to DEX trading.\`);
|
|
2270
|
+
|
|
2271
|
+
// Now use DEX methods instead of bonding curve
|
|
2272
|
+
const quote = await sdk.getSwapQuoteExactInput('GALA', token.tokenName, '100');
|
|
2273
|
+
console.log(\`DEX quote: \${quote.estimatedOutput}\`);
|
|
2274
|
+
}
|
|
2275
|
+
}, 60000); // Check every minute
|
|
2276
|
+
});
|
|
2277
|
+
|
|
2278
|
+
// Monitor new DEX pools
|
|
2279
|
+
sdk.onDexPoolCreation(async (pool) => {
|
|
2280
|
+
console.log(\`New pool: \${pool.tokenName}\`);
|
|
2281
|
+
|
|
2282
|
+
// Analyze liquidity opportunity
|
|
2283
|
+
const poolInfo = await sdk.getSwapPoolInfo(pool.token0, pool.token1);
|
|
2284
|
+
console.log(\`Pool liquidity: \${poolInfo.liquidity}\`);
|
|
2285
|
+
});
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
// Keep process running
|
|
2289
|
+
console.log('Monitoring events... Press Ctrl+C to stop');
|
|
2290
|
+
await new Promise(() => {}); // Run forever
|
|
2291
|
+
|
|
2292
|
+
// Cleanup when done
|
|
2293
|
+
cleanupDexPool();
|
|
2294
|
+
cleanupTokenCreation();
|
|
2295
|
+
}
|
|
2296
|
+
\`\`\`
|
|
2297
|
+
|
|
2298
|
+
**Use Cases:**
|
|
2299
|
+
- **Arbitrage Bots**: Detect graduation events and switch trading strategies
|
|
2300
|
+
- **Early Bird Trading**: Monitor new token launches and trade immediately
|
|
2301
|
+
- **Liquidity Provision**: Detect new DEX pools and provide liquidity
|
|
2302
|
+
- **Portfolio Automation**: Automatically adjust positions on graduation
|
|
2303
|
+
- **Price Discovery**: Track token lifecycle from launch to DEX
|
|
2304
|
+
|
|
2305
|
+
**Event Data:**
|
|
2306
|
+
- **DEX Pool Creation**: tokenName, token0, token1, feeTier, tvl, timestamp
|
|
2307
|
+
- **Token Launch**: tokenName, tokenSymbol, creator, maxSupply, basePrice, timestamp
|
|
2308
|
+
|
|
2309
|
+
**MCP Tool Equivalents:**
|
|
2310
|
+
- \`gala_launchpad_is_token_graduated\`
|
|
2311
|
+
- \`gala_launchpad_on_dex_pool_creation\` (WebSocket event)
|
|
2312
|
+
- \`gala_launchpad_on_launchpad_token_creation\` (WebSocket event)
|
|
2313
|
+
`,
|
|
2314
|
+
// ============================================================================
|
|
2315
|
+
// UTILITIES & SYSTEM: SDK Configuration & Wallet Management
|
|
2316
|
+
// ============================================================================
|
|
2317
|
+
// - utilities-system: Core SDK utilities for configuration and wallet access
|
|
2318
|
+
// ============================================================================
|
|
2319
|
+
'utilities-system': `
|
|
2320
|
+
## SDK Configuration and Wallet Utilities
|
|
2321
|
+
|
|
2322
|
+
**Covers Methods:**
|
|
2323
|
+
- \`getAddress()\`
|
|
2324
|
+
- \`getConfig()\`
|
|
2325
|
+
- \`getEthereumAddress()\`
|
|
2326
|
+
- \`getUrlByTokenName()\`
|
|
2327
|
+
- \`getVersion()\`
|
|
2328
|
+
- \`getWallet()\`
|
|
2329
|
+
- \`hasWallet()\`
|
|
2330
|
+
- \`setWallet()\`
|
|
2331
|
+
|
|
2332
|
+
Essential utilities for SDK configuration, wallet management, and system information.
|
|
2333
|
+
|
|
2334
|
+
\`\`\`typescript
|
|
2335
|
+
import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
|
|
2336
|
+
|
|
2337
|
+
async function sdkUtilities() {
|
|
2338
|
+
// ============================================================================
|
|
2339
|
+
// ADDRESS MANAGEMENT - Get wallet addresses in different formats
|
|
2340
|
+
// ============================================================================
|
|
2341
|
+
|
|
2342
|
+
const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
|
|
2343
|
+
|
|
2344
|
+
// Get GalaChain address (eth|0x... format)
|
|
2345
|
+
const galaAddress = sdk.getAddress();
|
|
2346
|
+
console.log(\`GalaChain address: \${galaAddress}\`); // "eth|0x1234..."
|
|
2347
|
+
|
|
2348
|
+
// Get Ethereum address (0x... format)
|
|
2349
|
+
const ethAddress = sdk.getEthereumAddress();
|
|
2350
|
+
console.log(\`Ethereum address: \${ethAddress}\`); // "0x1234..."
|
|
2351
|
+
|
|
2352
|
+
// ============================================================================
|
|
2353
|
+
// WALLET MANAGEMENT - Check and update wallet
|
|
2354
|
+
// ============================================================================
|
|
2355
|
+
|
|
2356
|
+
// Check if SDK has wallet configured
|
|
2357
|
+
if (sdk.hasWallet()) {
|
|
2358
|
+
console.log('Wallet configured - can execute trades');
|
|
2359
|
+
|
|
2360
|
+
// Get wallet instance (for advanced use)
|
|
2361
|
+
const wallet = sdk.getWallet();
|
|
2362
|
+
console.log(\`Wallet address: \${wallet.address}\`);
|
|
2363
|
+
} else {
|
|
2364
|
+
console.log('Read-only mode - cannot execute trades');
|
|
2365
|
+
}
|
|
2366
|
+
|
|
2367
|
+
// Update wallet at runtime
|
|
2368
|
+
sdk.setWallet('new-private-key');
|
|
2369
|
+
console.log(\`New address: \${sdk.getAddress()}\`);
|
|
2370
|
+
|
|
2371
|
+
// ============================================================================
|
|
2372
|
+
// CONFIGURATION ACCESS - Get SDK config
|
|
2373
|
+
// ============================================================================
|
|
2374
|
+
|
|
2375
|
+
// Get SDK configuration
|
|
2376
|
+
const config = sdk.getConfig();
|
|
2377
|
+
console.log(\`Base URL: \${config.baseUrl}\`);
|
|
2378
|
+
console.log(\`Environment: \${config.env}\`);
|
|
2379
|
+
console.log(\`Debug: \${config.debug}\`);
|
|
2380
|
+
console.log(\`Timeout: \${config.timeout}ms\`);
|
|
2381
|
+
|
|
2382
|
+
// ============================================================================
|
|
2383
|
+
// VERSION INFORMATION - Get SDK version
|
|
2384
|
+
// ============================================================================
|
|
2385
|
+
|
|
2386
|
+
// Get SDK version
|
|
2387
|
+
const version = sdk.getVersion();
|
|
2388
|
+
console.log(\`SDK Version: \${version}\`); // "4.0.4-beta.0"
|
|
2389
|
+
|
|
2390
|
+
// ============================================================================
|
|
2391
|
+
// URL GENERATION - Get frontend URLs for tokens
|
|
2392
|
+
// ============================================================================
|
|
2393
|
+
|
|
2394
|
+
// Generate frontend URL for token
|
|
2395
|
+
const url = sdk.getUrlByTokenName('anime');
|
|
2396
|
+
console.log(\`Token URL: \${url}\`);
|
|
2397
|
+
// "https://launchpad.gala.com/token/anime" (production)
|
|
2398
|
+
// "https://lpad-dev1.defi.gala.com/token/anime" (development)
|
|
2399
|
+
|
|
2400
|
+
// Complete workflow: Launch token + share URL
|
|
2401
|
+
const launchResult = await sdk.launchToken({
|
|
2402
|
+
tokenName: 'mytoken',
|
|
2403
|
+
tokenSymbol: 'MTK',
|
|
2404
|
+
tokenDescription: 'My awesome token'
|
|
2405
|
+
});
|
|
2406
|
+
|
|
2407
|
+
const tokenUrl = sdk.getUrlByTokenName('mytoken');
|
|
2408
|
+
console.log(\`Share your token: \${tokenUrl}\`);
|
|
2409
|
+
|
|
2410
|
+
// ============================================================================
|
|
2411
|
+
// MULTI-WALLET SCENARIO - Check multiple addresses
|
|
2412
|
+
// ============================================================================
|
|
2413
|
+
|
|
2414
|
+
async function compareWallets() {
|
|
2415
|
+
const wallet1 = createLaunchpadSDK({ wallet: 'private-key-1' });
|
|
2416
|
+
const wallet2 = createLaunchpadSDK({ wallet: 'private-key-2' });
|
|
2417
|
+
|
|
2418
|
+
console.log(\`Wallet 1: \${wallet1.getAddress()}\`);
|
|
2419
|
+
console.log(\`Wallet 2: \${wallet2.getAddress()}\`);
|
|
2420
|
+
|
|
2421
|
+
// Compare balances
|
|
2422
|
+
const balance1 = await wallet1.fetchGalaBalance();
|
|
2423
|
+
const balance2 = await wallet2.fetchGalaBalance();
|
|
2424
|
+
|
|
2425
|
+
console.log(\`Wallet 1 balance: \${balance1.balance}\`);
|
|
2426
|
+
console.log(\`Wallet 2 balance: \${balance2.balance}\`);
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
// ============================================================================
|
|
2430
|
+
// READ-ONLY SDK - Public data without wallet
|
|
2431
|
+
// ============================================================================
|
|
2432
|
+
|
|
2433
|
+
async function readOnlyMode() {
|
|
2434
|
+
// Create SDK without wallet (read-only mode)
|
|
2435
|
+
const readOnlySdk = createLaunchpadSDK();
|
|
2436
|
+
|
|
2437
|
+
console.log(\`Has wallet: \${readOnlySdk.hasWallet()}\`); // false
|
|
2438
|
+
|
|
2439
|
+
// Can fetch public data
|
|
2440
|
+
const pools = await readOnlySdk.fetchPools({ type: 'recent', limit: 10 });
|
|
2441
|
+
console.log(\`Found \${pools.total} pools\`);
|
|
2442
|
+
|
|
2443
|
+
// Cannot execute trades (will throw error)
|
|
2444
|
+
try {
|
|
2445
|
+
await readOnlySdk.buy({ tokenName: 'anime', amount: '100', type: 'native' });
|
|
2446
|
+
} catch (error) {
|
|
2447
|
+
console.error('Cannot trade without wallet');
|
|
2448
|
+
}
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
// ============================================================================
|
|
2452
|
+
// ENVIRONMENT SWITCHING - Change environments at runtime
|
|
2453
|
+
// ============================================================================
|
|
2454
|
+
|
|
2455
|
+
async function switchEnvironments() {
|
|
2456
|
+
// Production SDK
|
|
2457
|
+
const prodSdk = createLaunchpadSDK({
|
|
2458
|
+
wallet: 'your-private-key',
|
|
2459
|
+
config: { env: 'production' }
|
|
2460
|
+
});
|
|
2461
|
+
|
|
2462
|
+
console.log(\`Prod config: \${prodSdk.getConfig().baseUrl}\`);
|
|
2463
|
+
console.log(\`Prod URL: \${prodSdk.getUrlByTokenName('anime')}\`);
|
|
2464
|
+
|
|
2465
|
+
// Development SDK
|
|
2466
|
+
const devSdk = createLaunchpadSDK({
|
|
2467
|
+
wallet: 'your-private-key',
|
|
2468
|
+
config: { env: 'development' }
|
|
2469
|
+
});
|
|
2470
|
+
|
|
2471
|
+
console.log(\`Dev config: \${devSdk.getConfig().baseUrl}\`);
|
|
2472
|
+
console.log(\`Dev URL: \${devSdk.getUrlByTokenName('anime')}\`);
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
\`\`\`
|
|
2476
|
+
|
|
2477
|
+
**Key Methods:**
|
|
2478
|
+
|
|
2479
|
+
| Method | Returns | Use Case |
|
|
2480
|
+
|--------|---------|----------|
|
|
2481
|
+
| \`getAddress()\` | GalaChain address (eth\|0x...) | Trading, transfers, profile |
|
|
2482
|
+
| \`getEthereumAddress()\` | Ethereum address (0x...) | DEX trading, external systems |
|
|
2483
|
+
| \`getConfig()\` | SDK configuration object | Debug, environment info |
|
|
2484
|
+
| \`getVersion()\` | SDK version string | Compatibility checks |
|
|
2485
|
+
| \`getUrlByTokenName()\` | Frontend URL | Share token pages |
|
|
2486
|
+
| \`getWallet()\` | Wallet instance | Advanced wallet operations |
|
|
2487
|
+
| \`hasWallet()\` | Boolean | Check if trades enabled |
|
|
2488
|
+
| \`setWallet()\` | void | Update wallet at runtime |
|
|
2489
|
+
|
|
2490
|
+
**MCP Tool Equivalents:**
|
|
2491
|
+
- \`gala_launchpad_get_address\`
|
|
2492
|
+
- \`gala_launchpad_get_ethereum_address\`
|
|
2493
|
+
- \`gala_launchpad_get_config\`
|
|
2494
|
+
- \`gala_launchpad_get_version\`
|
|
2495
|
+
- \`gala_launchpad_get_url_by_token_name\`
|
|
2496
|
+
`,
|
|
2497
|
+
// ============================================================================
|
|
2498
|
+
// EVENT SUBSCRIPTIONS: Real-Time Event Monitoring
|
|
2499
|
+
// ============================================================================
|
|
2500
|
+
// - event-subscriptions: Subscribe to real-time DEX and token events
|
|
2501
|
+
// ============================================================================
|
|
2502
|
+
'event-subscriptions': `
|
|
2503
|
+
## Real-Time Event Subscriptions and Monitoring
|
|
2504
|
+
|
|
2505
|
+
**Covers Methods:**
|
|
2506
|
+
- \`subscribeToDexLiquidityAdded()\`
|
|
2507
|
+
- \`subscribeToDexLiquidityChanged()\`
|
|
2508
|
+
- \`subscribeToDexLiquidityRemoved()\`
|
|
2509
|
+
- \`subscribeToDexPoolAdded()\`
|
|
2510
|
+
- \`subscribeToDexSwapExecuted()\`
|
|
2511
|
+
- \`subscribeToTokenCreations()\`
|
|
2512
|
+
|
|
2513
|
+
Subscribe to real-time WebSocket events for DEX trading, liquidity changes, and token launches.
|
|
2514
|
+
|
|
2515
|
+
\`\`\`typescript
|
|
2516
|
+
import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
|
|
2517
|
+
|
|
2518
|
+
async function subscribeToEvents() {
|
|
2519
|
+
const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
|
|
2520
|
+
|
|
2521
|
+
// ============================================================================
|
|
2522
|
+
// LIQUIDITY EVENTS - Monitor position changes
|
|
2523
|
+
// ============================================================================
|
|
2524
|
+
|
|
2525
|
+
// Subscribe to liquidity additions
|
|
2526
|
+
const cleanupAdded = sdk.subscribeToDexLiquidityAdded((event) => {
|
|
2527
|
+
console.log('Liquidity added!');
|
|
2528
|
+
console.log(\` Pool: \${event.token0}-\${event.token1}\`);
|
|
2529
|
+
console.log(\` Amount0: \${event.amount0}\`);
|
|
2530
|
+
console.log(\` Amount1: \${event.amount1}\`);
|
|
2531
|
+
console.log(\` Owner: \${event.owner}\`);
|
|
2532
|
+
console.log(\` Position ID: \${event.positionId}\`);
|
|
2533
|
+
});
|
|
2534
|
+
|
|
2535
|
+
// Subscribe to liquidity changes (compound events)
|
|
2536
|
+
const cleanupChanged = sdk.subscribeToDexLiquidityChanged((event) => {
|
|
2537
|
+
console.log('Liquidity changed!');
|
|
2538
|
+
console.log(\` Type: \${event.type}\`); // 'added', 'removed', 'modified'
|
|
2539
|
+
console.log(\` Pool: \${event.token0}-\${event.token1}\`);
|
|
2540
|
+
console.log(\` Delta: \${event.liquidityDelta}\`);
|
|
2541
|
+
});
|
|
2542
|
+
|
|
2543
|
+
// Subscribe to liquidity removals
|
|
2544
|
+
const cleanupRemoved = sdk.subscribeToDexLiquidityRemoved((event) => {
|
|
2545
|
+
console.log('Liquidity removed!');
|
|
2546
|
+
console.log(\` Pool: \${event.token0}-\${event.token1}\`);
|
|
2547
|
+
console.log(\` Amount0: \${event.amount0}\`);
|
|
2548
|
+
console.log(\` Amount1: \${event.amount1}\`);
|
|
2549
|
+
console.log(\` Owner: \${event.owner}\`);
|
|
2550
|
+
console.log(\` Fees collected: \${event.fees0}, \${event.fees1}\`);
|
|
2551
|
+
});
|
|
2552
|
+
|
|
2553
|
+
// ============================================================================
|
|
2554
|
+
// POOL EVENTS - Monitor new DEX pools
|
|
2555
|
+
// ============================================================================
|
|
2556
|
+
|
|
2557
|
+
// Subscribe to new DEX pool creation
|
|
2558
|
+
const cleanupPool = sdk.subscribeToDexPoolAdded((pool) => {
|
|
2559
|
+
console.log('New DEX pool created!');
|
|
2560
|
+
console.log(\` Token: \${pool.tokenName}\`);
|
|
2561
|
+
console.log(\` Token0: \${pool.token0}\`);
|
|
2562
|
+
console.log(\` Token1: \${pool.token1}\`);
|
|
2563
|
+
console.log(\` Fee Tier: \${pool.feeTier}\`);
|
|
2564
|
+
console.log(\` Initial TVL: \${pool.tvl}\`);
|
|
2565
|
+
|
|
2566
|
+
// Auto-provide liquidity to new pools
|
|
2567
|
+
sdk.addSwapLiquidityByPrice({
|
|
2568
|
+
token0: pool.token0,
|
|
2569
|
+
token1: pool.token1,
|
|
2570
|
+
fee: pool.feeTier,
|
|
2571
|
+
minPrice: '0.95',
|
|
2572
|
+
maxPrice: '1.05',
|
|
2573
|
+
amount0Desired: '1000',
|
|
2574
|
+
amount1Desired: '1000'
|
|
2575
|
+
}).then(() => console.log('Liquidity provided to new pool'));
|
|
2576
|
+
});
|
|
2577
|
+
|
|
2578
|
+
// ============================================================================
|
|
2579
|
+
// SWAP EVENTS - Monitor all DEX swaps
|
|
2580
|
+
// ============================================================================
|
|
2581
|
+
|
|
2582
|
+
// Subscribe to DEX swap executions
|
|
2583
|
+
const cleanupSwap = sdk.subscribeToDexSwapExecuted((swap) => {
|
|
2584
|
+
console.log('DEX swap executed!');
|
|
2585
|
+
console.log(\` Pair: \${swap.tokenIn} → \${swap.tokenOut}\`);
|
|
2586
|
+
console.log(\` Amount In: \${swap.amountIn}\`);
|
|
2587
|
+
console.log(\` Amount Out: \${swap.amountOut}\`);
|
|
2588
|
+
console.log(\` Trader: \${swap.trader}\`);
|
|
2589
|
+
console.log(\` Fee Tier: \${swap.feeTier}\`);
|
|
2590
|
+
|
|
2591
|
+
// Track volume and price impact
|
|
2592
|
+
const priceImpact = calculatePriceImpact(swap.amountIn, swap.amountOut);
|
|
2593
|
+
console.log(\` Price impact: \${priceImpact}%\`);
|
|
2594
|
+
});
|
|
2595
|
+
|
|
2596
|
+
// ============================================================================
|
|
2597
|
+
// TOKEN CREATION EVENTS - Monitor new token launches
|
|
2598
|
+
// ============================================================================
|
|
2599
|
+
|
|
2600
|
+
// Subscribe to new token launches
|
|
2601
|
+
const cleanupToken = sdk.subscribeToTokenCreations((token) => {
|
|
2602
|
+
console.log('New token launched!');
|
|
2603
|
+
console.log(\` Name: \${token.tokenName}\`);
|
|
2604
|
+
console.log(\` Symbol: \${token.tokenSymbol}\`);
|
|
2605
|
+
console.log(\` Creator: \${token.creator}\`);
|
|
2606
|
+
console.log(\` Max Supply: \${token.maxSupply}\`);
|
|
2607
|
+
console.log(\` Base Price: \${token.basePrice}\`);
|
|
2608
|
+
|
|
2609
|
+
// Auto-buy new tokens
|
|
2610
|
+
sdk.buy({
|
|
2611
|
+
tokenName: token.tokenName,
|
|
2612
|
+
amount: '100',
|
|
2613
|
+
type: 'native',
|
|
2614
|
+
slippageToleranceFactor: 0.01
|
|
2615
|
+
}).then(() => console.log('Auto-bought new token'));
|
|
2616
|
+
});
|
|
2617
|
+
|
|
2618
|
+
// ============================================================================
|
|
2619
|
+
// ARBITRAGE BOT EXAMPLE - Multi-event monitoring
|
|
2620
|
+
// ============================================================================
|
|
2621
|
+
|
|
2622
|
+
async function arbitrageBot() {
|
|
2623
|
+
const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
|
|
2624
|
+
|
|
2625
|
+
// Track all swaps for arbitrage opportunities
|
|
2626
|
+
sdk.subscribeToDexSwapExecuted(async (swap) => {
|
|
2627
|
+
// Check if price divergence exists
|
|
2628
|
+
const poolPrice = await sdk.getSwapPoolPrice(swap.tokenIn, swap.tokenOut);
|
|
2629
|
+
const externalPrice = await getExternalPrice(swap.tokenIn, swap.tokenOut);
|
|
2630
|
+
|
|
2631
|
+
const divergence = Math.abs(poolPrice - externalPrice) / externalPrice;
|
|
2632
|
+
|
|
2633
|
+
if (divergence > 0.01) {
|
|
2634
|
+
// 1% arbitrage opportunity
|
|
2635
|
+
console.log(\`Arbitrage opportunity: \${divergence * 100}%\`);
|
|
2636
|
+
|
|
2637
|
+
// Execute arbitrage trade
|
|
2638
|
+
await sdk.executeSwap(
|
|
2639
|
+
swap.tokenOut,
|
|
2640
|
+
swap.tokenIn,
|
|
2641
|
+
calculateArbitrageAmount(divergence),
|
|
2642
|
+
'0', // min output
|
|
2643
|
+
3000, // fee tier
|
|
2644
|
+
0.01 // slippage
|
|
2645
|
+
);
|
|
2646
|
+
}
|
|
2647
|
+
});
|
|
2648
|
+
|
|
2649
|
+
// Monitor liquidity additions for new opportunities
|
|
2650
|
+
sdk.subscribeToDexLiquidityAdded(async (event) => {
|
|
2651
|
+
console.log(\`New liquidity in \${event.token0}-\${event.token1}\`);
|
|
2652
|
+
|
|
2653
|
+
// Check if pool has sufficient depth for arbitrage
|
|
2654
|
+
const poolInfo = await sdk.getSwapPoolInfo(event.token0, event.token1);
|
|
2655
|
+
if (parseFloat(poolInfo.liquidity) > 100000) {
|
|
2656
|
+
console.log('Pool has sufficient liquidity for arbitrage');
|
|
2657
|
+
}
|
|
2658
|
+
});
|
|
2659
|
+
}
|
|
2660
|
+
|
|
2661
|
+
// ============================================================================
|
|
2662
|
+
// LIQUIDITY PROVIDER BOT - Auto-manage positions
|
|
2663
|
+
// ============================================================================
|
|
2664
|
+
|
|
2665
|
+
async function liquidityProviderBot() {
|
|
2666
|
+
const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
|
|
2667
|
+
|
|
2668
|
+
// Auto-add liquidity to new pools
|
|
2669
|
+
sdk.subscribeToDexPoolAdded(async (pool) => {
|
|
2670
|
+
console.log(\`New pool: \${pool.tokenName}\`);
|
|
2671
|
+
|
|
2672
|
+
// Wait for some initial swaps to establish price
|
|
2673
|
+
setTimeout(async () => {
|
|
2674
|
+
const poolInfo = await sdk.getSwapPoolInfo(pool.token0, pool.token1);
|
|
2675
|
+
|
|
2676
|
+
// Add liquidity if TVL is high enough
|
|
2677
|
+
if (parseFloat(poolInfo.liquidity) > 50000) {
|
|
2678
|
+
await sdk.addSwapLiquidityByPrice({
|
|
2679
|
+
token0: pool.token0,
|
|
2680
|
+
token1: pool.token1,
|
|
2681
|
+
fee: pool.feeTier,
|
|
2682
|
+
minPrice: '0.9',
|
|
2683
|
+
maxPrice: '1.1',
|
|
2684
|
+
amount0Desired: '10000',
|
|
2685
|
+
amount1Desired: '10000'
|
|
2686
|
+
});
|
|
2687
|
+
|
|
2688
|
+
console.log('Liquidity added to new pool');
|
|
2689
|
+
}
|
|
2690
|
+
}, 60000); // Wait 1 minute
|
|
2691
|
+
});
|
|
2692
|
+
|
|
2693
|
+
// Monitor liquidity removals (potential exit signal)
|
|
2694
|
+
sdk.subscribeToDexLiquidityRemoved((event) => {
|
|
2695
|
+
console.log(\`Large liquidity removal: \${event.amount0}, \${event.amount1}\`);
|
|
2696
|
+
|
|
2697
|
+
// Check if we should also exit
|
|
2698
|
+
if (isLargeRemoval(event)) {
|
|
2699
|
+
console.log('Large removal detected - consider exiting position');
|
|
2700
|
+
}
|
|
2701
|
+
});
|
|
2702
|
+
}
|
|
2703
|
+
|
|
2704
|
+
// Keep subscriptions running
|
|
2705
|
+
console.log('Subscriptions active... Press Ctrl+C to stop');
|
|
2706
|
+
await new Promise(() => {}); // Run forever
|
|
2707
|
+
|
|
2708
|
+
// Cleanup when done
|
|
2709
|
+
cleanupAdded();
|
|
2710
|
+
cleanupChanged();
|
|
2711
|
+
cleanupRemoved();
|
|
2712
|
+
cleanupPool();
|
|
2713
|
+
cleanupSwap();
|
|
2714
|
+
cleanupToken();
|
|
2715
|
+
}
|
|
2716
|
+
\`\`\`
|
|
2717
|
+
|
|
2718
|
+
**Event Data Structures:**
|
|
2719
|
+
|
|
2720
|
+
**LiquidityAdded:**
|
|
2721
|
+
- token0, token1, feeTier
|
|
2722
|
+
- amount0, amount1
|
|
2723
|
+
- owner, positionId
|
|
2724
|
+
- timestamp
|
|
2725
|
+
|
|
2726
|
+
**LiquidityRemoved:**
|
|
2727
|
+
- token0, token1, feeTier
|
|
2728
|
+
- amount0, amount1
|
|
2729
|
+
- fees0, fees1
|
|
2730
|
+
- owner, positionId
|
|
2731
|
+
- timestamp
|
|
2732
|
+
|
|
2733
|
+
**DexPoolAdded:**
|
|
2734
|
+
- tokenName, token0, token1
|
|
2735
|
+
- feeTier, tvl
|
|
2736
|
+
- timestamp
|
|
2737
|
+
|
|
2738
|
+
**SwapExecuted:**
|
|
2739
|
+
- tokenIn, tokenOut
|
|
2740
|
+
- amountIn, amountOut
|
|
2741
|
+
- trader, feeTier
|
|
2742
|
+
- priceImpact
|
|
2743
|
+
- timestamp
|
|
2744
|
+
|
|
2745
|
+
**TokenCreation:**
|
|
2746
|
+
- tokenName, tokenSymbol
|
|
2747
|
+
- creator, maxSupply
|
|
2748
|
+
- basePrice
|
|
2749
|
+
- timestamp
|
|
2750
|
+
|
|
2751
|
+
**Use Cases:**
|
|
2752
|
+
- **Arbitrage Bots**: Monitor swaps for price divergence
|
|
2753
|
+
- **Liquidity Management**: Auto-provide liquidity to new pools
|
|
2754
|
+
- **Early Bird Trading**: Buy new tokens immediately after launch
|
|
2755
|
+
- **Position Monitoring**: Track liquidity changes in your positions
|
|
2756
|
+
- **Market Analysis**: Analyze trading patterns and volumes
|
|
2757
|
+
|
|
2758
|
+
**MCP Tool Equivalents:**
|
|
2759
|
+
- \`gala_launchpad_subscribe_to_dex_liquidity_added\`
|
|
2760
|
+
- \`gala_launchpad_subscribe_to_dex_liquidity_changed\`
|
|
2761
|
+
- \`gala_launchpad_subscribe_to_dex_liquidity_removed\`
|
|
2762
|
+
- \`gala_launchpad_subscribe_to_dex_pool_added\`
|
|
2763
|
+
- \`gala_launchpad_subscribe_to_dex_swap_executed\`
|
|
2764
|
+
- \`gala_launchpad_subscribe_to_token_creations\`
|
|
2765
|
+
`,
|
|
2766
|
+
// ============================================================================
|
|
2767
|
+
// MCP TO SDK MAPPING: Cross-Reference Guide
|
|
2768
|
+
// ============================================================================
|
|
2769
|
+
// - mcp-to-sdk-mapping: How MCP tools map to SDK methods
|
|
2770
|
+
// ============================================================================
|
|
2771
|
+
'mcp-to-sdk-mapping': `
|
|
2772
|
+
## MCP Tool to SDK Method Mapping Guide
|
|
2773
|
+
|
|
2774
|
+
**Covers Concepts:**
|
|
2775
|
+
- Understanding MCP tool architecture
|
|
2776
|
+
- Mapping between MCP tools and SDK methods
|
|
2777
|
+
- When to use MCP vs direct SDK
|
|
2778
|
+
|
|
2779
|
+
This is a conceptual guide showing how MCP (Model Context Protocol) tools map to SDK methods.
|
|
2780
|
+
|
|
2781
|
+
### Architecture Overview
|
|
2782
|
+
|
|
2783
|
+
\`\`\`
|
|
2784
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
2785
|
+
│ MCP Server Layer │
|
|
2786
|
+
│ (89 tools - user-friendly wrappers with validation) │
|
|
2787
|
+
└─────────────────────────────────────────────────────────────┘
|
|
2788
|
+
│
|
|
2789
|
+
▼
|
|
2790
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
2791
|
+
│ LaunchpadSDK Layer │
|
|
2792
|
+
│ (91 methods - low-level programmatic access) │
|
|
2793
|
+
└─────────────────────────────────────────────────────────────┘
|
|
2794
|
+
│
|
|
2795
|
+
▼
|
|
2796
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
2797
|
+
│ Gala Launchpad Backend APIs │
|
|
2798
|
+
│ (REST endpoints, WebSocket events, GalaChain) │
|
|
2799
|
+
└─────────────────────────────────────────────────────────────┘
|
|
2800
|
+
\`\`\`
|
|
2801
|
+
|
|
2802
|
+
### MCP vs SDK Decision Matrix
|
|
2803
|
+
|
|
2804
|
+
| Scenario | Use MCP | Use SDK |
|
|
2805
|
+
|----------|---------|---------|
|
|
2806
|
+
| **AI Agent Development** | ✅ Yes | ❌ No |
|
|
2807
|
+
| **Claude Desktop Integration** | ✅ Yes | ❌ No |
|
|
2808
|
+
| **LLM-Driven Trading Bots** | ✅ Yes | ❌ No |
|
|
2809
|
+
| **TypeScript Application** | ❌ No | ✅ Yes |
|
|
2810
|
+
| **Node.js Backend Service** | ❌ No | ✅ Yes |
|
|
2811
|
+
| **React/Vue Frontend** | ❌ No | ✅ Yes |
|
|
2812
|
+
| **Python Application** | ❌ No (SDK only) | ❌ No (not yet) |
|
|
2813
|
+
|
|
2814
|
+
### Tool Naming Conventions
|
|
2815
|
+
|
|
2816
|
+
**MCP Tool Pattern:** \`gala_launchpad_{action}_{resource}\`
|
|
2817
|
+
**SDK Method Pattern:** \`{action}{Resource}\`
|
|
2818
|
+
|
|
2819
|
+
Examples:
|
|
2820
|
+
- MCP: \`gala_launchpad_fetch_pools\` → SDK: \`fetchPools()\`
|
|
2821
|
+
- MCP: \`gala_launchpad_buy_tokens\` → SDK: \`buy()\`
|
|
2822
|
+
- MCP: \`gala_launchpad_get_swap_quote_exact_input\` → SDK: \`getSwapQuoteExactInput()\`
|
|
2823
|
+
|
|
2824
|
+
### Common Mapping Patterns
|
|
2825
|
+
|
|
2826
|
+
**1. Direct 1:1 Mapping (Most Common):**
|
|
2827
|
+
|
|
2828
|
+
\`\`\`typescript
|
|
2829
|
+
// MCP Tool: gala_launchpad_fetch_pools
|
|
2830
|
+
// SDK Method: fetchPools()
|
|
2831
|
+
|
|
2832
|
+
// MCP Usage (AI agent)
|
|
2833
|
+
const result = await tools.gala_launchpad_fetch_pools({
|
|
2834
|
+
type: 'recent',
|
|
2835
|
+
limit: 10
|
|
2836
|
+
});
|
|
2837
|
+
|
|
2838
|
+
// SDK Usage (TypeScript app)
|
|
2839
|
+
const sdk = createLaunchpadSDK({ wallet: 'private-key' });
|
|
2840
|
+
const result = await sdk.fetchPools({ type: 'recent', limit: 10 });
|
|
2841
|
+
\`\`\`
|
|
2842
|
+
|
|
2843
|
+
**2. Composite Tool → Multiple SDK Methods:**
|
|
2844
|
+
|
|
2845
|
+
\`\`\`typescript
|
|
2846
|
+
// MCP Tool: gala_launchpad_buy_tokens_with_calculation
|
|
2847
|
+
// Calls TWO SDK methods internally:
|
|
2848
|
+
|
|
2849
|
+
// 1. Calculate quote
|
|
2850
|
+
const quote = await sdk.calculateBuyAmount({
|
|
2851
|
+
tokenName: 'anime',
|
|
2852
|
+
amount: '100',
|
|
2853
|
+
type: 'native'
|
|
2854
|
+
});
|
|
2855
|
+
|
|
2856
|
+
// 2. Execute trade
|
|
2857
|
+
const result = await sdk.buy({
|
|
2858
|
+
tokenName: 'anime',
|
|
2859
|
+
amount: '100',
|
|
2860
|
+
type: 'native',
|
|
2861
|
+
expectedAmount: quote.amount,
|
|
2862
|
+
slippageToleranceFactor: 0.01
|
|
2863
|
+
});
|
|
2864
|
+
\`\`\`
|
|
2865
|
+
|
|
2866
|
+
**3. SDK Method → No MCP Tool (Advanced Features):**
|
|
2867
|
+
|
|
2868
|
+
Some SDK methods don't have MCP equivalents:
|
|
2869
|
+
- \`setWallet()\` - Runtime wallet changes
|
|
2870
|
+
- \`getConfig()\` - SDK configuration access
|
|
2871
|
+
- \`warmCacheFromPoolData()\` - Cache optimization
|
|
2872
|
+
|
|
2873
|
+
**4. MCP Tool → No Direct SDK Method (Abstractions):**
|
|
2874
|
+
|
|
2875
|
+
Some MCP tools provide abstractions:
|
|
2876
|
+
- \`gala_launchpad_portfolio\` - Aggregates multiple SDK calls
|
|
2877
|
+
- \`gala_launchpad_analyze_token\` - Composite analysis workflow
|
|
2878
|
+
|
|
2879
|
+
### Complete Mapping Reference
|
|
2880
|
+
|
|
2881
|
+
**Trading (13 MCP tools → 9 SDK methods):**
|
|
2882
|
+
|
|
2883
|
+
| MCP Tool | SDK Method |
|
|
2884
|
+
|----------|-----------|
|
|
2885
|
+
| \`gala_launchpad_buy_tokens\` | \`buy()\` |
|
|
2886
|
+
| \`gala_launchpad_sell_tokens\` | \`sell()\` |
|
|
2887
|
+
| \`gala_launchpad_calculate_buy_amount\` | \`calculateBuyAmount()\` |
|
|
2888
|
+
| \`gala_launchpad_calculate_sell_amount\` | \`calculateSellAmount()\` |
|
|
2889
|
+
| \`gala_launchpad_graduate_token\` | \`graduateToken()\` |
|
|
2890
|
+
| \`gala_launchpad_calculate_buy_amount_local\` | \`calculateBuyAmountLocal()\` |
|
|
2891
|
+
| \`gala_launchpad_calculate_sell_amount_local\` | \`calculateSellAmountLocal()\` |
|
|
2892
|
+
| \`gala_launchpad_calculate_buy_amount_external\` | \`calculateBuyAmountExternal()\` |
|
|
2893
|
+
| \`gala_launchpad_calculate_sell_amount_external\` | \`calculateSellAmountExternal()\` |
|
|
2894
|
+
|
|
2895
|
+
**DEX Trading (6 MCP tools → 6 SDK methods):**
|
|
2896
|
+
|
|
2897
|
+
| MCP Tool | SDK Method |
|
|
2898
|
+
|----------|-----------|
|
|
2899
|
+
| \`gala_launchpad_get_swap_quote_exact_input\` | \`getSwapQuoteExactInput()\` |
|
|
2900
|
+
| \`gala_launchpad_get_swap_quote_exact_output\` | \`getSwapQuoteExactOutput()\` |
|
|
2901
|
+
| \`gala_launchpad_execute_swap\` | \`executeSwap()\` |
|
|
2902
|
+
| \`gala_launchpad_get_swap_user_assets\` | \`getSwapUserAssets()\` |
|
|
2903
|
+
| \`gala_launchpad_get_all_swap_user_assets\` | \`getAllSwapUserAssets()\` |
|
|
2904
|
+
| \`gala_launchpad_get_swap_pool_info\` | \`getSwapPoolInfo()\` |
|
|
2905
|
+
|
|
2906
|
+
**Liquidity Management (8 MCP tools → 9 SDK methods):**
|
|
2907
|
+
|
|
2908
|
+
| MCP Tool | SDK Method |
|
|
2909
|
+
|----------|-----------|
|
|
2910
|
+
| \`gala_launchpad_get_user_liquidity_positions\` | \`getSwapUserLiquidityPositions()\` |
|
|
2911
|
+
| \`gala_launchpad_get_all_user_liquidity_positions\` | \`getAllSwapUserLiquidityPositions()\` |
|
|
2912
|
+
| \`gala_launchpad_get_liquidity_position_by_id\` | \`getSwapLiquidityPositionById()\` |
|
|
2913
|
+
| \`gala_launchpad_add_liquidity_by_price\` | \`addSwapLiquidityByPrice()\` |
|
|
2914
|
+
| \`gala_launchpad_add_liquidity_by_ticks\` | \`addSwapLiquidityByTicks()\` |
|
|
2915
|
+
| \`gala_launchpad_estimate_remove_liquidity\` | \`getSwapEstimateRemoveLiquidity()\` |
|
|
2916
|
+
| \`gala_launchpad_remove_liquidity\` | \`removeSwapLiquidity()\` |
|
|
2917
|
+
| \`gala_launchpad_collect_position_fees\` | \`collectSwapPositionFees()\` |
|
|
2918
|
+
|
|
2919
|
+
### When to Use Each
|
|
2920
|
+
|
|
2921
|
+
**Use MCP Tools When:**
|
|
2922
|
+
- Building AI agents (Claude, GPT, etc.)
|
|
2923
|
+
- Need LLM-friendly error messages
|
|
2924
|
+
- Want automatic parameter validation
|
|
2925
|
+
- Working in Claude Desktop environment
|
|
2926
|
+
- Need slash command shortcuts
|
|
2927
|
+
|
|
2928
|
+
**Use SDK Directly When:**
|
|
2929
|
+
- Building TypeScript/JavaScript applications
|
|
2930
|
+
- Need maximum performance
|
|
2931
|
+
- Want full TypeScript type safety
|
|
2932
|
+
- Building React/Vue components
|
|
2933
|
+
- Need fine-grained control
|
|
2934
|
+
|
|
2935
|
+
### Migration Example
|
|
2936
|
+
|
|
2937
|
+
**From MCP to SDK:**
|
|
2938
|
+
|
|
2939
|
+
\`\`\`typescript
|
|
2940
|
+
// AI Agent using MCP
|
|
2941
|
+
async function mcpExample() {
|
|
2942
|
+
const result = await tools.gala_launchpad_buy_tokens({
|
|
2943
|
+
tokenName: 'anime',
|
|
2944
|
+
amount: '100',
|
|
2945
|
+
type: 'native',
|
|
2946
|
+
slippageToleranceFactor: 0.01
|
|
2947
|
+
});
|
|
2948
|
+
return result;
|
|
2949
|
+
}
|
|
2950
|
+
|
|
2951
|
+
// TypeScript App using SDK
|
|
2952
|
+
import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
|
|
2953
|
+
|
|
2954
|
+
async function sdkExample() {
|
|
2955
|
+
const sdk = createLaunchpadSDK({ wallet: 'private-key' });
|
|
2956
|
+
|
|
2957
|
+
// Step 1: Calculate quote
|
|
2958
|
+
const quote = await sdk.calculateBuyAmount({
|
|
2959
|
+
tokenName: 'anime',
|
|
2960
|
+
amount: '100',
|
|
2961
|
+
type: 'native'
|
|
2962
|
+
});
|
|
2963
|
+
|
|
2964
|
+
// Step 2: Execute trade
|
|
2965
|
+
const result = await sdk.buy({
|
|
2966
|
+
tokenName: 'anime',
|
|
2967
|
+
amount: '100',
|
|
2968
|
+
type: 'native',
|
|
2969
|
+
expectedAmount: quote.amount,
|
|
2970
|
+
slippageToleranceFactor: 0.01
|
|
2971
|
+
});
|
|
2972
|
+
|
|
2973
|
+
return result;
|
|
2974
|
+
}
|
|
2975
|
+
\`\`\`
|
|
2976
|
+
|
|
2977
|
+
**Key Differences:**
|
|
2978
|
+
1. MCP combines calculation + execution (safer for AI)
|
|
2979
|
+
2. SDK exposes individual steps (more control)
|
|
2980
|
+
3. MCP validates all inputs via Zod schemas
|
|
2981
|
+
4. SDK provides TypeScript type safety
|
|
2982
|
+
|
|
2983
|
+
### Resources
|
|
2984
|
+
|
|
2985
|
+
- **SDK Documentation**: packages/sdk/README.md
|
|
2986
|
+
- **MCP Documentation**: packages/mcp-server/README.md
|
|
2987
|
+
- **API Reference**: docs/API-REFERENCE.md
|
|
2988
|
+
- **Tool Registry**: packages/mcp-server/src/tools/registry.ts
|
|
2989
|
+
`,
|
|
2990
|
+
'fetch-current-dex-season': `
|
|
2991
|
+
## Fetch Current DEX Season
|
|
2992
|
+
|
|
2993
|
+
**Covers Methods:**
|
|
2994
|
+
- \`fetchCurrentDexSeason()\`
|
|
2995
|
+
|
|
2996
|
+
Get the currently active DEX leaderboard season for competitive trading.
|
|
2997
|
+
|
|
2998
|
+
\`\`\`typescript
|
|
2999
|
+
import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
|
|
3000
|
+
|
|
3001
|
+
async function getCurrentSeason() {
|
|
3002
|
+
const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
|
|
3003
|
+
|
|
3004
|
+
// Fetch the current active season
|
|
3005
|
+
const currentSeason = await sdk.fetchCurrentDexSeason();
|
|
3006
|
+
|
|
3007
|
+
if (currentSeason) {
|
|
3008
|
+
console.log('Current DEX Season:');
|
|
3009
|
+
console.log(\` Season ID: \${currentSeason.id}\`);
|
|
3010
|
+
console.log(\` Name: \${currentSeason.name}\`);
|
|
3011
|
+
console.log(\` Start: \${currentSeason.start.toISOString()}\`);
|
|
3012
|
+
console.log(\` End: \${currentSeason.end.toISOString()}\`);
|
|
3013
|
+
|
|
3014
|
+
// Check if season is currently active
|
|
3015
|
+
const now = new Date();
|
|
3016
|
+
const isActive = now >= currentSeason.start && now <= currentSeason.end;
|
|
3017
|
+
|
|
3018
|
+
console.log(\` Active: \${isActive}\`);
|
|
3019
|
+
|
|
3020
|
+
// Calculate time remaining
|
|
3021
|
+
const timeRemaining = currentSeason.end.getTime() - now.getTime();
|
|
3022
|
+
const daysRemaining = Math.floor(timeRemaining / (1000 * 60 * 60 * 24));
|
|
3023
|
+
|
|
3024
|
+
console.log(\` Days remaining: \${daysRemaining}\`);
|
|
3025
|
+
|
|
3026
|
+
// Fetch leaderboard for current season
|
|
3027
|
+
const leaderboard = await sdk.fetchDexLeaderboardBySeasonId(currentSeason.id);
|
|
3028
|
+
console.log(\` Total participants: \${leaderboard.entries.length}\`);
|
|
3029
|
+
|
|
3030
|
+
// Show top 3 players
|
|
3031
|
+
leaderboard.entries.slice(0, 3).forEach((entry, index) => {
|
|
3032
|
+
console.log(\` #\${index + 1}: \${entry.wallet} - \${entry.totalXp} XP\`);
|
|
3033
|
+
});
|
|
3034
|
+
} else {
|
|
3035
|
+
console.log('No active season (between seasons)');
|
|
3036
|
+
|
|
3037
|
+
// Fetch all seasons to see when next one starts
|
|
3038
|
+
const allSeasons = await sdk.fetchAllDexSeasons();
|
|
3039
|
+
const futureSeason = allSeasons.find(s => s.start > new Date());
|
|
3040
|
+
|
|
3041
|
+
if (futureSeason) {
|
|
3042
|
+
console.log(\`Next season starts: \${futureSeason.start.toISOString()}\`);
|
|
3043
|
+
}
|
|
3044
|
+
}
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
// Complete workflow: Check season + participate
|
|
3048
|
+
async function participateInSeason() {
|
|
3049
|
+
const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
|
|
3050
|
+
|
|
3051
|
+
const season = await sdk.fetchCurrentDexSeason();
|
|
3052
|
+
|
|
3053
|
+
if (season) {
|
|
3054
|
+
console.log(\`Active season: \${season.name}\`);
|
|
3055
|
+
|
|
3056
|
+
// Execute trades to earn XP
|
|
3057
|
+
const quote = await sdk.getSwapQuoteExactInput('GALA', 'GUSDC', '100');
|
|
3058
|
+
const swap = await sdk.executeSwap(
|
|
3059
|
+
'GALA',
|
|
3060
|
+
'GUSDC',
|
|
3061
|
+
'100',
|
|
3062
|
+
quote.estimatedOutput,
|
|
3063
|
+
quote.feeTier,
|
|
3064
|
+
0.01
|
|
3065
|
+
);
|
|
3066
|
+
|
|
3067
|
+
console.log('Trade executed - XP earned!');
|
|
3068
|
+
|
|
3069
|
+
// Check updated leaderboard position
|
|
3070
|
+
const leaderboard = await sdk.fetchCurrentDexLeaderboard();
|
|
3071
|
+
const myPosition = leaderboard?.entries.find(
|
|
3072
|
+
e => e.wallet === sdk.getAddress()
|
|
3073
|
+
);
|
|
3074
|
+
|
|
3075
|
+
if (myPosition) {
|
|
3076
|
+
console.log(\`Current rank: #\${myPosition.rank}\`);
|
|
3077
|
+
console.log(\`Total XP: \${myPosition.totalXp}\`);
|
|
3078
|
+
}
|
|
3079
|
+
} else {
|
|
3080
|
+
console.log('No active season - trades won't earn XP');
|
|
3081
|
+
}
|
|
3082
|
+
}
|
|
3083
|
+
\`\`\`
|
|
3084
|
+
|
|
3085
|
+
**Use Cases:**
|
|
3086
|
+
- Check if competitive trading is active
|
|
3087
|
+
- Display season information in UI
|
|
3088
|
+
- Calculate time remaining in season
|
|
3089
|
+
- Auto-participate in seasonal trading
|
|
3090
|
+
- Track seasonal leaderboard position
|
|
3091
|
+
|
|
3092
|
+
**Related Methods:**
|
|
3093
|
+
- \`fetchAllDexSeasons()\` - Get all seasons (past, current, future)
|
|
3094
|
+
- \`fetchDexLeaderboardBySeasonId()\` - Get leaderboard for specific season
|
|
3095
|
+
- \`fetchCurrentDexLeaderboard()\` - Get current season leaderboard (convenience)
|
|
3096
|
+
|
|
3097
|
+
**MCP Tool Equivalent:** \`gala_launchpad_fetch_current_dex_season\`
|
|
2176
3098
|
`,
|
|
2177
3099
|
};
|
|
2178
3100
|
/**
|
|
@@ -2180,7 +3102,7 @@ async function queryDexPools() {
|
|
|
2180
3102
|
*/
|
|
2181
3103
|
exports.explainSdkUsageTool = {
|
|
2182
3104
|
name: 'gala_launchpad_explain_sdk_usage',
|
|
2183
|
-
description: 'Get detailed SDK code examples for all
|
|
3105
|
+
description: 'Get detailed SDK code examples for all 91 SDK methods organized into 32 composite workflow topics covering: buy-tokens, sell-tokens, pool-graduation, fetch-pools, balances, token-creation, token-status, dex-trading, liquidity-positions, advanced-dex-analysis, price-history, token-details, token-distribution, profile-management, multi-wallet, transfers, locks, trading-analytics, utilities-and-helpers, utilities-system, error-handling, installation, local-calculations, spot-prices-smart-routing, event-subscriptions, mcp-to-sdk-mapping, and DEX leaderboards',
|
|
2184
3106
|
inputSchema: {
|
|
2185
3107
|
type: 'object',
|
|
2186
3108
|
properties: {
|
|
@@ -2198,6 +3120,7 @@ exports.explainSdkUsageTool = {
|
|
|
2198
3120
|
'price-history',
|
|
2199
3121
|
'token-details',
|
|
2200
3122
|
'token-distribution',
|
|
3123
|
+
'token-status',
|
|
2201
3124
|
'token-creation',
|
|
2202
3125
|
'profile-management',
|
|
2203
3126
|
'multi-wallet',
|
|
@@ -2205,16 +3128,19 @@ exports.explainSdkUsageTool = {
|
|
|
2205
3128
|
'locks',
|
|
2206
3129
|
'trading-analytics',
|
|
2207
3130
|
'utilities-and-helpers',
|
|
3131
|
+
'utilities-system',
|
|
2208
3132
|
'error-handling',
|
|
2209
3133
|
'installation',
|
|
2210
3134
|
'local-calculations',
|
|
2211
3135
|
'spot-prices-smart-routing',
|
|
3136
|
+
'event-subscriptions',
|
|
2212
3137
|
'mcp-to-sdk-mapping',
|
|
2213
3138
|
'fetch-all-dex-seasons',
|
|
2214
3139
|
'fetch-current-dex-season',
|
|
2215
3140
|
'fetch-dex-leaderboard-by-season-id',
|
|
2216
3141
|
'fetch-current-dex-leaderboard',
|
|
2217
3142
|
'fetch-dex-aggregated-volume-summary',
|
|
3143
|
+
'fetch-dex-pools',
|
|
2218
3144
|
],
|
|
2219
3145
|
description: 'The SDK usage topic to explain',
|
|
2220
3146
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"explainSdkUsage.js","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,mEAAiE;AACjE,6EAAkE;AAElE;;;GAGG;AACU,QAAA,oBAAoB,GAA6B;IAC5D,oBAAoB;IACpB,YAAY,EAAE,CAAC,oBAAoB,EAAE,KAAK,CAAC;IAC3C,aAAa,EAAE,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAC9C,iBAAiB,EAAE,CAAC,iCAAiC,EAAE,eAAe,CAAC;IAEvE,iBAAiB;IACjB,aAAa,EAAE;QACb,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,gCAAgC;QACnF,iBAAiB,EAAE,iBAAiB,EAAE,8BAA8B;QACpE,wBAAwB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,sBAAsB;KAC5F;IACD,UAAU,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"explainSdkUsage.js","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,mEAAiE;AACjE,6EAAkE;AAElE;;;GAGG;AACU,QAAA,oBAAoB,GAA6B;IAC5D,oBAAoB;IACpB,YAAY,EAAE,CAAC,oBAAoB,EAAE,KAAK,CAAC;IAC3C,aAAa,EAAE,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAC9C,iBAAiB,EAAE,CAAC,iCAAiC,EAAE,eAAe,CAAC;IAEvE,iBAAiB;IACjB,aAAa,EAAE;QACb,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,gCAAgC;QACnF,iBAAiB,EAAE,iBAAiB,EAAE,8BAA8B;QACpE,wBAAwB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,sBAAsB;KAC5F;IACD,UAAU,EAAE,CAAC,kBAAkB,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,uBAAuB,CAAC;IAEvH,8BAA8B;IAC9B,gBAA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BAAgB;oBAChB,oBAAoB;oBACpB,cAAc;oBACd,WAAW;oBACX,OAAO;oBACP,mBAAmB;oBACnB,uBAAuB;oBACvB,kBAAkB;oBAClB,gBAAgB;oBAChB,cAAc;oBACd,oBAAoB;oBACpB,2BAA2B;oBAC3B,qBAAqB;oBACrB,oBAAoB;oBACpB,uBAAuB;oBACvB,0BAA0B;oBAC1B,oCAAoC;oBACpC,+BAA+B;oBAC/B,qCAAqC;oBACrC,iBAAiB;iBAClB;gBACD,WAAW,EAAE,gCAAgC;aAC9C;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAC9C,MAAM,OAAO,GAAG,YAAY,CAAC,IAAI,CAAC,KAAkC,CAAC,CAAC;QAEtE,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QAClD,CAAC;QAED,OAAO,IAAA,qCAAa,EAAC;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,OAAO;YACpB,UAAU,EAAE,OAAO;YACnB,WAAW,EAAE,2BAA2B;YACxC,aAAa,EAAE,yDAAyD;SACzE,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-mcp-server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.4-beta.1",
|
|
4
4
|
"description": "MCP server for Gala Launchpad - 89 tools (pool management, event watchers, GSwap DEX trading, price history, token creation, wallet management, DEX pool discovery, liquidity positions, token locks, locked token queries, composite pool data) supporting optional wallet (read-only and full-access modes). Production-grade AI agent integration for Claude Desktop with comprehensive validation and 80%+ test coverage",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@gala-chain/api": "^2.4.3",
|
|
75
75
|
"@gala-chain/connect": "^2.4.3",
|
|
76
|
-
"@gala-chain/launchpad-sdk": "
|
|
76
|
+
"@gala-chain/launchpad-sdk": "4.0.4-beta.1",
|
|
77
77
|
"@humanwhocodes/config-array": "^0.13.0",
|
|
78
78
|
"@modelcontextprotocol/sdk": "^0.5.0",
|
|
79
79
|
"axios": "^1.12.2",
|