@gala-chain/launchpad-mcp-server 1.14.1 → 1.14.2

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/generated/version.d.ts +1 -1
  3. package/dist/generated/version.js +1 -1
  4. package/dist/tools/utils/explainSdkUsage.d.ts.map +1 -1
  5. package/dist/tools/utils/explainSdkUsage.js +441 -20
  6. package/dist/tools/utils/explainSdkUsage.js.map +1 -1
  7. package/docs/AI-AGENT-PATTERNS.md +555 -0
  8. package/docs/CONSTRAINTS-REFERENCE.md +454 -0
  9. package/docs/PROMPT-TOOL-MAPPING.md +352 -0
  10. package/docs/examples/default-values-pattern.md +240 -0
  11. package/docs/examples/tool-factory-pattern.md +217 -0
  12. package/jest.config.js +94 -0
  13. package/package.json +2 -2
  14. package/src/__tests__/integration/fetchTokenDetails.integration.test.ts +258 -0
  15. package/src/__tests__/integration/poolTools.integration.test.ts +185 -0
  16. package/src/constants/mcpToolNames.ts +141 -0
  17. package/src/index.ts +19 -0
  18. package/src/prompts/__tests__/promptStructure.test.ts +114 -0
  19. package/src/prompts/__tests__/registry.test.ts +145 -0
  20. package/src/prompts/analysis.ts +429 -0
  21. package/src/prompts/index.ts +127 -0
  22. package/src/prompts/portfolio.ts +242 -0
  23. package/src/prompts/trading.ts +191 -0
  24. package/src/prompts/utility.ts +43 -0
  25. package/src/prompts/utils/workflowTemplates.ts +344 -0
  26. package/src/schemas/common-schemas.ts +393 -0
  27. package/src/scripts/test-all-prompts.ts +184 -0
  28. package/src/server.ts +241 -0
  29. package/src/tools/balance/index.ts +174 -0
  30. package/src/tools/creation/index.ts +182 -0
  31. package/src/tools/index.ts +80 -0
  32. package/src/tools/pools/fetchAllPools.ts +47 -0
  33. package/src/tools/pools/fetchAllPriceHistory.ts +103 -0
  34. package/src/tools/pools/fetchPoolDetails.ts +27 -0
  35. package/src/tools/pools/fetchPoolDetailsForCalculation.ts +22 -0
  36. package/src/tools/pools/fetchPools.ts +47 -0
  37. package/src/tools/pools/fetchPriceHistory.ts +108 -0
  38. package/src/tools/pools/fetchTokenDetails.ts +77 -0
  39. package/src/tools/pools/index.ts +246 -0
  40. package/src/tools/social/index.ts +64 -0
  41. package/src/tools/trading/index.ts +605 -0
  42. package/src/tools/transfers/index.ts +75 -0
  43. package/src/tools/utils/clearCache.ts +36 -0
  44. package/src/tools/utils/createWallet.ts +19 -0
  45. package/src/tools/utils/explainSdkUsage.ts +1277 -0
  46. package/src/tools/utils/getAddress.ts +12 -0
  47. package/src/tools/utils/getCacheInfo.ts +14 -0
  48. package/src/tools/utils/getConfig.ts +11 -0
  49. package/src/tools/utils/getEthereumAddress.ts +12 -0
  50. package/src/tools/utils/getUrlByTokenName.ts +12 -0
  51. package/src/tools/utils/getVersion.ts +25 -0
  52. package/src/tools/utils/index.ts +27 -0
  53. package/src/tools/utils/isTokenGraduated.ts +16 -0
  54. package/src/types/mcp.ts +72 -0
  55. package/src/utils/__tests__/validation.test.ts +147 -0
  56. package/src/utils/constraints.ts +155 -0
  57. package/src/utils/default-values.ts +208 -0
  58. package/src/utils/error-handler.ts +69 -0
  59. package/src/utils/error-templates.ts +273 -0
  60. package/src/utils/response-formatter.ts +51 -0
  61. package/src/utils/tool-factory.ts +257 -0
  62. package/src/utils/tool-registry.ts +296 -0
  63. package/src/utils/validation.ts +336 -0
  64. package/tsconfig.json +23 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.14.2
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: enhance MCP SDK usage documentation with 200+ code examples
8
+ - Add price-history topic with fetchPriceHistory and fetchAllPriceHistory examples
9
+ - Add token-details topic with token metadata retrieval and validation
10
+ - Add profile-management topic with user profile workflows
11
+ - Enhance fetch-pools topic with 9 advanced examples and 11 tool equivalents
12
+ - Enhance balances topic with additional methods (fetchTokensCreated, fetchProfile)
13
+ - Expand mcp-to-sdk-mapping with 15+ missing tools across multiple sections
14
+ - Fix error-handling topic syntax error
15
+
16
+ - Updated dependencies
17
+ - @gala-chain/launchpad-sdk@3.19.2
18
+
3
19
  ## 1.14.0
4
20
 
5
21
  ### Breaking Changes
@@ -3,5 +3,5 @@
3
3
  * This file is generated by scripts/inject-version.ts during build
4
4
  * DO NOT EDIT MANUALLY
5
5
  */
6
- export declare const MCP_SERVER_VERSION = "1.14.1";
6
+ export declare const MCP_SERVER_VERSION = "1.14.2";
7
7
  //# sourceMappingURL=version.d.ts.map
@@ -6,5 +6,5 @@
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
8
8
  exports.MCP_SERVER_VERSION = void 0;
9
- exports.MCP_SERVER_VERSION = '1.14.1';
9
+ exports.MCP_SERVER_VERSION = '1.14.2';
10
10
  //# sourceMappingURL=version.js.map
@@ -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;AA2wBlD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OA+DjC,CAAC"}
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;AA6qClD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAqEjC,CAAC"}
@@ -137,15 +137,14 @@ async function graduatePool() {
137
137
  - \`gala_launchpad_graduate_token\`
138
138
  `,
139
139
  'fetch-pools': `
140
- ## Fetching Pool Data with SDK
140
+ ## Fetching Pool Data with Advanced Methods
141
141
 
142
142
  \`\`\`typescript
143
143
  import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
144
144
 
145
- async function fetchPools() {
146
- const sdk = createLaunchpadSDK({
147
- wallet: 'your-private-key'
148
- });
145
+ // 1. BASIC POOL FETCHING - With Pagination
146
+ async function basicPoolFetching() {
147
+ const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
149
148
 
150
149
  // Fetch recent pools with pagination
151
150
  const pools = await sdk.fetchPools({
@@ -154,29 +153,146 @@ async function fetchPools() {
154
153
  page: 1
155
154
  });
156
155
 
157
- console.log(\`Found \${pools.total} pools\`);
158
- console.log(\`Page \${pools.page} of \${pools.totalPages}\`);
159
- console.log(\`Has next page: \${pools.hasNext}\`);
160
-
156
+ console.log(\`Found \${pools.total} pools, page \${pools.page} of \${pools.totalPages}\`);
161
157
  pools.pools.forEach(pool => {
162
158
  console.log(\`\${pool.tokenName}: \${pool.tokenSymbol}\`);
163
- console.log(\`Creator: \${pool.creatorAddress}\`);
164
- console.log(\`Created: \${pool.createdAt}\`);
165
159
  });
160
+ }
161
+
162
+ // 2. AUTO-PAGINATED FETCHING - Get ALL Pools
163
+ async function fetchAllPools() {
164
+ const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
165
+
166
+ // Auto-paginated - returns all pools without manual pagination
167
+ const allPools = await sdk.fetchAllPools({
168
+ type: 'recent'
169
+ });
170
+
171
+ console.log(\`Total pools: \${allPools.pools.length}\`);
172
+ }
166
173
 
167
- // Fetch specific pool details
168
- const details = await sdk.fetchPoolDetails('dragnrkti');
174
+ // 3. POOL DETAILS - Complete information
175
+ async function getPoolDetails(tokenName) {
176
+ const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
169
177
 
170
- console.log('Sale status:', details.saleStatus);
178
+ const details = await sdk.fetchPoolDetails(tokenName);
179
+
180
+ console.log('Sale status:', details.saleStatus); // 'Ongoing' or 'Completed'
171
181
  console.log('Base price:', details.basePrice);
172
182
  console.log('Max supply:', details.maxSupply);
173
- console.log('Native token quantity:', details.nativeTokenQuantity);
183
+ console.log('Remaining tokens:', details.sellingTokenQuantity);
184
+ }
185
+
186
+ // 4. POOL DETAILS FOR CALCULATIONS - Optimized for math
187
+ async function getOptimizedPoolDetails(tokenName) {
188
+ const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
189
+
190
+ // Returns only fields needed for bonding curve calculations
191
+ const poolData = await sdk.fetchPoolDetailsForCalculation(tokenName);
192
+
193
+ console.log('Current supply:', poolData.currentSupply);
194
+ console.log('Remaining tokens:', poolData.remainingTokens);
195
+ console.log('Max supply:', poolData.maxSupply);
196
+ console.log('Reverse bonding curve max fee:', poolData.reverseBondingCurveMaxFeeFactor);
197
+ }
198
+
199
+ // 5. VOLUME & OHLCV DATA - Historical candlestick data
200
+ async function getVolumeData(tokenName) {
201
+ const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
202
+
203
+ // Different resolutions: '1m', '5m', '15m', '1h', '4h', '1d'
204
+ const volumeData = await sdk.fetchVolumeData({
205
+ tokenName: tokenName,
206
+ from: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000), // Last 7 days
207
+ to: new Date(),
208
+ resolution: '1h' // 1-hour candlesticks
209
+ });
210
+
211
+ volumeData.forEach(candle => {
212
+ console.log(\`\${candle.time}: O:\${candle.open} H:\${candle.high} L:\${candle.low} C:\${candle.close} V:\${candle.volume}\`);
213
+ });
214
+ }
215
+
216
+ // 6. SPOT PRICES - DEX tokens (GALA, SILK, MUSIC)
217
+ async function getDexTokenPrices() {
218
+ const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
219
+
220
+ // Fetch prices for multiple DEX tokens
221
+ const prices = await sdk.fetchTokenSpotPrice(['GALA', 'SILK', 'MUSIC']);
222
+
223
+ console.log(\`GALA: \$\${prices.GALA}\`);
224
+ console.log(\`SILK: \$\${prices.SILK}\`);
225
+ console.log(\`MUSIC: \$\${prices.MUSIC}\`);
226
+ }
227
+
228
+ // 7. LAUNCHPAD TOKEN SPOT PRICES
229
+ async function getLaunchpadTokenPrice(tokenName) {
230
+ const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
231
+
232
+ // Get USD spot price for a launchpad token (anime, woohoo, etc.)
233
+ const price = await sdk.fetchLaunchpadTokenSpotPrice(tokenName);
234
+
235
+ console.log(\`\${tokenName} price: \$\${price}\`);
236
+ }
237
+
238
+ // 8. RESOLVE UTILITY ADDRESSES
239
+ async function resolveAddresses(tokenName) {
240
+ const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
241
+
242
+ // Get GalaChain vault address for token
243
+ const vaultAddress = await sdk.resolveVaultAddress(tokenName);
244
+ console.log(\`Vault address: \${vaultAddress}\`);
245
+
246
+ // Get TokenClassKey for token
247
+ const tokenClassKey = await sdk.resolveTokenClassKey(tokenName);
248
+ console.log(\`TokenClassKey: \${tokenClassKey}\`);
249
+ }
250
+
251
+ // 9. COMPLETE INVESTMENT ANALYSIS WORKFLOW
252
+ async function analyzeToken(tokenName) {
253
+ const sdk = createLaunchpadSDK({ wallet: 'your-private-key' });
254
+
255
+ // Get all token data in parallel
256
+ const [details, volumeData, distribution, badges] = await Promise.all([
257
+ sdk.fetchPoolDetails(tokenName),
258
+ sdk.fetchVolumeData({ tokenName, resolution: '1d' }),
259
+ sdk.fetchTokenDistribution(tokenName),
260
+ sdk.fetchTokenBadges(tokenName)
261
+ ]);
262
+
263
+ // Analyze status
264
+ console.log(\`Pool Status: \${details.saleStatus}\`);
265
+ console.log(\`Supply: \${details.currentSupply} / \${details.maxSupply}\`);
266
+
267
+ // Analyze volume trend
268
+ const volumes = volumeData.map(v => parseFloat(v.volume));
269
+ const avgVolume = volumes.reduce((a, b) => a + b, 0) / volumes.length;
270
+ console.log(\`Avg daily volume: \$\${avgVolume.toFixed(2)}\`);
271
+
272
+ // Analyze distribution
273
+ const top5Ownership = distribution.holders
274
+ .sort((a, b) => parseFloat(b.balance) - parseFloat(a.balance))
275
+ .slice(0, 5)
276
+ .reduce((sum, h) => sum + h.percentage, 0);
277
+ console.log(\`Top 5 holders: \${top5Ownership.toFixed(2)}%\`);
278
+
279
+ // Check badges
280
+ console.log(\`Badges: \${badges.join(', ')}\`);
174
281
  }
175
282
  \`\`\`
176
283
 
177
284
  **MCP Tool Equivalents:**
178
- - \`gala_launchpad_fetch_pools\`
179
- - \`gala_launchpad_fetch_pool_details\`
285
+ - \`gala_launchpad_fetch_pools\` - Paginated pool list
286
+ - \`gala_launchpad_fetch_all_pools\` - Auto-paginated all pools
287
+ - \`gala_launchpad_fetch_pool_details\` - Complete pool information
288
+ - \`gala_launchpad_fetch_pool_details_for_calculation\` - Optimized for calculations
289
+ - \`gala_launchpad_fetch_volume_data\` - OHLCV candlestick data
290
+ - \`gala_launchpad_fetch_token_spot_price\` - DEX token prices (GALA, SILK, MUSIC)
291
+ - \`gala_launchpad_fetch_launchpad_token_spot_price\` - Launchpad token USD prices
292
+ - \`gala_launchpad_fetch_token_distribution\` - Token holder analysis
293
+ - \`gala_launchpad_fetch_token_badges\` - Achievement badges
294
+ - \`gala_launchpad_resolve_vault_address\` - Get vault address
295
+ - \`gala_launchpad_resolve_token_class_key\` - Get TokenClassKey
180
296
  `,
181
297
  'balances': `
182
298
  ## Checking Balances with SDK
@@ -215,6 +331,25 @@ async function checkBalances() {
215
331
  portfolio.tokens.forEach(token => {
216
332
  console.log(\`\${token.name}: \${token.quantity}\`);
217
333
  });
334
+
335
+ // Check tokens created by this wallet
336
+ const createdTokens = await sdk.fetchTokensCreated({
337
+ address: sdk.getAddress(),
338
+ limit: 10
339
+ });
340
+
341
+ console.log(\`Created \${createdTokens.total} tokens\`);
342
+ createdTokens.tokens.forEach(token => {
343
+ console.log(\` \${token.symbol}: \${token.name}\`);
344
+ });
345
+
346
+ // Get user profile
347
+ const profile = await sdk.fetchProfile();
348
+ console.log(\`Profile: \${profile.fullName}\`);
349
+
350
+ // Check profile of another user
351
+ const otherProfile = await sdk.fetchProfile('eth|0x...');
352
+ console.log(\`Other user: \${otherProfile.fullName}\`);
218
353
  }
219
354
  \`\`\`
220
355
 
@@ -222,6 +357,8 @@ async function checkBalances() {
222
357
  - \`gala_launchpad_fetch_gala_balance\`
223
358
  - \`gala_launchpad_fetch_token_balance\`
224
359
  - \`gala_launchpad_fetch_tokens_held\`
360
+ - \`gala_launchpad_fetch_tokens_created\`
361
+ - \`gala_launchpad_fetch_profile\`
225
362
  `,
226
363
  'token-creation': `
227
364
  ## Creating Tokens with SDK
@@ -422,7 +559,7 @@ async function errorHandlingExample() {
422
559
  } else if (error instanceof TokenNotFoundError) {
423
560
  console.error('Token does not exist:', error.tokenName);
424
561
 
425
- } catch if (error instanceof NetworkError) {
562
+ } else if (error instanceof NetworkError) {
426
563
  console.error('Network issue:', error.message);
427
564
  console.error('Status code:', error.statusCode);
428
565
 
@@ -624,6 +761,257 @@ async function localCalculationsExample() {
624
761
  - \`gala_launchpad_calculate_buy_amount_external\`
625
762
  - \`gala_launchpad_calculate_sell_amount_local\`
626
763
  - \`gala_launchpad_calculate_sell_amount_external\`
764
+ `,
765
+ 'price-history': `
766
+ ## Historical Price Analysis with SDK
767
+
768
+ \`\`\`typescript
769
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
770
+
771
+ async function analyzePriceHistory() {
772
+ const sdk = createLaunchpadSDK({
773
+ wallet: 'your-private-key-or-mnemonic'
774
+ });
775
+
776
+ // Paginated price history
777
+ const history = await sdk.fetchPriceHistory({
778
+ tokenId: 'Token|Unit|GUSDC|eth:0x...',
779
+ from: new Date('2025-01-01'),
780
+ to: new Date('2025-01-31'),
781
+ sortOrder: 'DESC',
782
+ page: 1,
783
+ limit: 50
784
+ });
785
+
786
+ console.log(\`Found \${history.snapshots.length} snapshots\`);
787
+ console.log(\`Total available: \${history.total} (page \${history.page} of \${history.totalPages})\`);
788
+
789
+ // Auto-paginated complete history
790
+ const allHistory = await sdk.fetchAllPriceHistory({
791
+ tokenId: 'GWETH|Unit|none|none',
792
+ from: new Date('2024-01-01'),
793
+ sortOrder: 'ASC'
794
+ });
795
+
796
+ // Price analysis
797
+ const prices = allHistory.snapshots.map(s => parseFloat(s.price));
798
+ const avg = prices.reduce((a, b) => a + b, 0) / prices.length;
799
+ const variance = prices.reduce((sum, p) => sum + Math.pow(p - avg, 2), 0) / prices.length;
800
+ const volatility = Math.sqrt(variance);
801
+
802
+ console.log(\`Average: \$\${avg.toFixed(4)}, Volatility: \$\${volatility.toFixed(4)}\`);
803
+
804
+ // Data export (CSV)
805
+ const csv = ['timestamp,price'].concat(
806
+ allHistory.snapshots.map(s => \`\${s.timestamp.toISOString()},\${s.price}\`)
807
+ ).join('\\n');
808
+
809
+ console.log('CSV export:', csv.split('\\n').slice(0, 3).join('\\n'));
810
+ }
811
+ \`\`\`
812
+
813
+ **Key Methods:**
814
+ - \`fetchPriceHistory()\` - Paginated historical prices (max 50 per page)
815
+ - \`fetchAllPriceHistory()\` - Auto-paginated complete history (all snapshots)
816
+
817
+ **Response Fields:**
818
+ - \`price\` - Token price as decimal string
819
+ - \`timestamp\` - ISO 8601 timestamp
820
+ - \`tokenId\` - Token identifier (pipe-delimited)
821
+
822
+ **Use Cases:**
823
+ - Technical analysis and charting
824
+ - Volatility assessment
825
+ - Price trend identification
826
+ - Data export for analytics
827
+ - Backtesting strategies
828
+
829
+ **Token ID Formats:**
830
+ - String: \`Token|Unit|GUSDC|eth:0x...\`
831
+ - Object: \`{ collection, category, type, additionalKey }\`
832
+
833
+ **MCP Tool Equivalents:**
834
+ - \`gala_launchpad_fetch_price_history\` - Paginated
835
+ - \`gala_launchpad_fetch_all_price_history\` - Auto-paginated
836
+ `,
837
+ 'token-details': `
838
+ ## Token Details and Metadata with SDK
839
+
840
+ \`\`\`typescript
841
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
842
+
843
+ async function analyzeTokenDetails() {
844
+ const sdk = createLaunchpadSDK({
845
+ wallet: 'your-private-key-or-mnemonic'
846
+ });
847
+
848
+ // Fetch token metadata
849
+ const details = await sdk.fetchTokenDetails('Token|Unit|GUSDC|eth:0x...');
850
+
851
+ console.log('Token Information:');
852
+ console.log(\` Name: \${details.name}\`);
853
+ console.log(\` Symbol: \${details.symbol}\`);
854
+ console.log(\` Decimals: \${details.decimals}\`);
855
+ console.log(\` Verified: \${details.verified}\`);
856
+ console.log(\` Trading: \${details.tradingEnabled}\`);
857
+ console.log(\` Network: \${details.network}\`);
858
+ console.log(\` Image: \${details.image}\`);
859
+
860
+ // Pre-trading validation
861
+ async function validateBeforeTrade(tokenId: string) {
862
+ const token = await sdk.fetchTokenDetails(tokenId);
863
+
864
+ if (!token.verified) {
865
+ console.warn(\`⚠️ \${token.symbol} is NOT verified\`);
866
+ }
867
+
868
+ if (!token.tradingEnabled) {
869
+ throw new Error(\`Trading disabled for \${token.symbol}\`);
870
+ }
871
+
872
+ if (token.network !== 'ethereum') {
873
+ throw new Error(\`Wrong network: got \${token.network}\`);
874
+ }
875
+
876
+ return token;
877
+ }
878
+
879
+ // Batch token comparison
880
+ const tokens = ['GALA|Unit|none|none', 'Token|Unit|GUSDC|eth:0x...'];
881
+ const details_list = await Promise.all(
882
+ tokens.map(id => sdk.fetchTokenDetails(id).catch(() => null))
883
+ );
884
+
885
+ const verified = details_list.filter(t => t?.verified).length;
886
+ console.log(\`Verified tokens: \${verified}/\${tokens.length}\`);
887
+ }
888
+ \`\`\`
889
+
890
+ **Response Fields:**
891
+ - \`symbol\` - Token symbol (e.g., 'GUSDC')
892
+ - \`name\` - Full token name
893
+ - \`decimals\` - Decimal places
894
+ - \`verified\` - Verification status
895
+ - \`tradingEnabled\` - Trading availability
896
+ - \`network\` - Network name (e.g., 'ethereum')
897
+ - \`contractAddress\` - Smart contract address
898
+ - \`image\` - Token image URL
899
+ - \`chainId\` - Blockchain chain ID
900
+
901
+ **Use Cases:**
902
+ - Pre-trading validation and safety checks
903
+ - Display token metadata in UI
904
+ - Verify token authenticity
905
+ - Network compatibility checking
906
+
907
+ **Token ID Formats:**
908
+ - String: \`Token|Unit|GUSDC|eth:0x...\`
909
+ - Object: \`{ collection, category, type, additionalKey }\`
910
+
911
+ **MCP Tool Equivalent:** \`gala_launchpad_fetch_token_details\`
912
+ `,
913
+ 'profile-management': `
914
+ ## User Profile Management with SDK
915
+
916
+ \`\`\`typescript
917
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
918
+
919
+ async function manageUserProfiles() {
920
+ const sdk = createLaunchpadSDK({
921
+ wallet: 'your-private-key-or-mnemonic'
922
+ });
923
+
924
+ // Fetch current user profile
925
+ const myProfile = await sdk.fetchProfile();
926
+ console.log(\`Name: \${myProfile.fullName}\`);
927
+ console.log(\`Avatar: \${myProfile.profileImage}\`);
928
+
929
+ // Fetch another user's profile
930
+ const other = await sdk.fetchProfile('eth|0x...');
931
+ console.log(\`Other user: \${other.fullName}\`);
932
+
933
+ // Update profile
934
+ const updated = await sdk.updateProfile({
935
+ fullName: 'Satoshi Nakamoto',
936
+ profileImage: 'https://example.com/avatar.png',
937
+ address: sdk.getAddress()
938
+ });
939
+
940
+ console.log(\`Updated: \${updated.fullName}\`);
941
+
942
+ // Upload profile image (Node.js only)
943
+ const imgResult = await sdk.uploadProfileImage({
944
+ imagePath: '/path/to/avatar.png'
945
+ });
946
+
947
+ // Update with uploaded image
948
+ await sdk.updateProfile({
949
+ fullName: 'My Name',
950
+ profileImage: imgResult.imageUrl,
951
+ address: sdk.getAddress()
952
+ });
953
+
954
+ // Complete workflow: Update profile, then launch token
955
+ async function createTokenWithProfile() {
956
+ const avatar = await sdk.uploadProfileImage({
957
+ imagePath: '/path/to/pic.png'
958
+ });
959
+
960
+ await sdk.updateProfile({
961
+ fullName: 'Token Creator',
962
+ profileImage: avatar.imageUrl,
963
+ address: sdk.getAddress()
964
+ });
965
+
966
+ const logo = await sdk.uploadTokenImage({
967
+ tokenName: 'mytoken',
968
+ imagePath: '/path/to/logo.png'
969
+ });
970
+
971
+ const result = await sdk.launchToken({
972
+ tokenName: 'mytoken',
973
+ tokenSymbol: 'MTK',
974
+ tokenDescription: 'Awesome token',
975
+ tokenImage: logo.imageUrl,
976
+ websiteUrl: 'https://mytoken.com'
977
+ });
978
+
979
+ return result;
980
+ }
981
+
982
+ // Batch profile fetching
983
+ const addresses = ['eth|0xaddress1', 'eth|0xaddress2'];
984
+ const profiles = await Promise.all(
985
+ addresses.map(addr => sdk.fetchProfile(addr).catch(() => null))
986
+ );
987
+
988
+ console.log('Profiles:', profiles.filter(p => p).map(p => p.fullName));
989
+ }
990
+ \`\`\`
991
+
992
+ **Profile Methods:**
993
+ - \`fetchProfile(address?)\` - Get user profile
994
+ - \`updateProfile(data)\` - Update profile info
995
+ - \`uploadProfileImage(options)\` - Upload avatar (Node.js)
996
+
997
+ **Profile Fields:**
998
+ - \`fullName\` - Display name (max 100 chars)
999
+ - \`profileImage\` - Avatar image URL
1000
+ - \`address\` - Wallet address
1001
+ - \`createdAt\` - Creation date
1002
+ - \`updatedAt\` - Update timestamp
1003
+
1004
+ **Use Cases:**
1005
+ - Display user profiles
1006
+ - Allow profile customization
1007
+ - Manage profile images
1008
+ - Token creator attribution
1009
+ - Multi-wallet profiles
1010
+
1011
+ **MCP Tool Equivalents:**
1012
+ - \`gala_launchpad_fetch_profile\`
1013
+ - \`gala_launchpad_update_profile\`
1014
+ - \`gala_launchpad_upload_profile_image\`
627
1015
  `,
628
1016
  'token-distribution': `
629
1017
  ## Token Holder Distribution with SDK
@@ -724,15 +1112,32 @@ function calculateGini(holders: Array<{balance: string}>) {
724
1112
  | \`gala_launchpad_calculate_sell_amount_external\` | \`sdk.calculateSellAmountExternal(options)\` | Explicit network quote (sell) |
725
1113
  | \`gala_launchpad_buy_tokens\` | \`sdk.buy(options)\` | Execute token purchase |
726
1114
  | \`gala_launchpad_sell_tokens\` | \`sdk.sell(options)\` | Execute token sale |
1115
+ | \`gala_launchpad_calculate_buy_amount_for_graduation\` | \`sdk.calculateBuyAmountForGraduation(options)\` | Calculate graduation cost |
727
1116
  | \`gala_launchpad_graduate_token\` | \`sdk.graduateToken(options)\` | One-step pool graduation |
1117
+ | \`gala_launchpad_fetch_trades\` | \`sdk.fetchTrades(options)\` | Get trade history |
1118
+ | \`gala_launchpad_get_bundler_transaction_result\` | \`sdk.getBundlerTransactionResult(txId)\` | Get transaction result |
728
1119
 
729
1120
  ### Pool Management
730
1121
  | MCP Tool | SDK Method | Notes |
731
1122
  |----------|------------|-------|
732
1123
  | \`gala_launchpad_fetch_pools\` | \`sdk.fetchPools(options)\` | List pools with filtering |
1124
+ | \`gala_launchpad_fetch_all_pools\` | \`sdk.fetchAllPools(options)\` | Auto-paginated all pools |
733
1125
  | \`gala_launchpad_fetch_pool_details\` | \`sdk.fetchPoolDetails(tokenName)\` | Get specific pool data |
1126
+ | \`gala_launchpad_fetch_pool_details_for_calculation\` | \`sdk.fetchPoolDetailsForCalculation(tokenName)\` | Optimized for calculations |
734
1127
  | \`gala_launchpad_fetch_token_distribution\` | \`sdk.fetchTokenDistribution(tokenName)\` | Holder distribution |
735
1128
  | \`gala_launchpad_fetch_token_badges\` | \`sdk.fetchTokenBadges(tokenName)\` | Achievement badges |
1129
+ | \`gala_launchpad_fetch_volume_data\` | \`sdk.fetchVolumeData(options)\` | OHLCV candlestick data |
1130
+ | \`gala_launchpad_fetch_token_spot_price\` | \`sdk.fetchTokenSpotPrice(symbols)\` | DEX token spot prices |
1131
+ | \`gala_launchpad_fetch_launchpad_token_spot_price\` | \`sdk.fetchLaunchpadTokenSpotPrice(options)\` | Launchpad token price |
1132
+ | \`gala_launchpad_resolve_vault_address\` | \`sdk.resolveVaultAddress(tokenName)\` | Get vault address |
1133
+ | \`gala_launchpad_resolve_token_class_key\` | \`sdk.resolveTokenClassKey(tokenName)\` | Get TokenClassKey |
1134
+ | \`gala_launchpad_fetch_token_details\` | \`sdk.fetchTokenDetails(tokenId)\` | Comprehensive token metadata |
1135
+
1136
+ ### Price History & Analysis
1137
+ | MCP Tool | SDK Method | Notes |
1138
+ |----------|------------|-------|
1139
+ | \`gala_launchpad_fetch_price_history\` | \`sdk.fetchPriceHistory(options)\` | Paginated price snapshots |
1140
+ | \`gala_launchpad_fetch_all_price_history\` | \`sdk.fetchAllPriceHistory(options)\` | Auto-paginated all prices |
736
1141
 
737
1142
  ### Balance & Portfolio
738
1143
  | MCP Tool | SDK Method | Notes |
@@ -741,6 +1146,16 @@ function calculateGini(holders: Array<{balance: string}>) {
741
1146
  | \`gala_launchpad_fetch_token_balance\` | \`sdk.fetchTokenBalance(options)\` | Specific token balance |
742
1147
  | \`gala_launchpad_fetch_tokens_held\` | \`sdk.fetchTokensHeld(options)\` | Portfolio holdings |
743
1148
  | \`gala_launchpad_fetch_tokens_created\` | \`sdk.fetchTokensCreated(options)\` | Created tokens |
1149
+ | \`gala_launchpad_fetch_profile\` | \`sdk.fetchProfile(address?)\` | User profile |
1150
+ | \`gala_launchpad_update_profile\` | \`sdk.updateProfile(data)\` | Update profile |
1151
+ | \`gala_launchpad_upload_profile_image\` | \`sdk.uploadProfileImage(options)\` | Upload avatar |
1152
+
1153
+ ### Profile Management
1154
+ | MCP Tool | SDK Method | Notes |
1155
+ |----------|------------|-------|
1156
+ | \`gala_launchpad_fetch_profile\` | \`sdk.fetchProfile(address?)\` | Get user profile |
1157
+ | \`gala_launchpad_update_profile\` | \`sdk.updateProfile(data)\` | Update profile info |
1158
+ | \`gala_launchpad_upload_profile_image\` | \`sdk.uploadProfileImage(options)\` | Upload profile image |
744
1159
 
745
1160
  ### Token Creation
746
1161
  | MCP Tool | SDK Method | Notes |
@@ -787,14 +1202,17 @@ Available topics:
787
1202
  - 'pool-graduation' - Graduate a bonding curve pool
788
1203
  - 'fetch-pools' - Query pool data and details
789
1204
  - 'balances' - Check GALA and token balances
1205
+ - 'price-history' - Historical price analysis and technical analysis
1206
+ - 'token-details' - Comprehensive token metadata and validation
790
1207
  - 'token-distribution' - Analyze token holder distribution and concentration
791
1208
  - 'token-creation' - Launch new tokens
1209
+ - 'profile-management' - User profile management and customization
792
1210
  - 'multi-wallet' - Use multiple wallets (privateKey override pattern)
793
1211
  - 'transfers' - Transfer GALA and tokens between wallets
794
1212
  - 'error-handling' - Handle errors and exceptions
795
1213
  - 'installation' - Install and configure SDK
796
1214
  - 'local-calculations' - Local vs external bonding curve calculations
797
- - 'mcp-to-sdk-mapping' - Complete mapping of MCP tools to SDK methods
1215
+ - 'mcp-to-sdk-mapping' - Complete mapping of MCP tools to SDK methods (56+ tools)
798
1216
 
799
1217
  Returns runnable TypeScript code examples with explanations.`,
800
1218
  inputSchema: {
@@ -808,8 +1226,11 @@ Returns runnable TypeScript code examples with explanations.`,
808
1226
  'pool-graduation',
809
1227
  'fetch-pools',
810
1228
  'balances',
1229
+ 'price-history',
1230
+ 'token-details',
811
1231
  'token-distribution',
812
1232
  'token-creation',
1233
+ 'profile-management',
813
1234
  'multi-wallet',
814
1235
  'transfers',
815
1236
  'error-handling',
@@ -830,7 +1251,7 @@ Returns runnable TypeScript code examples with explanations.`,
830
1251
  return (0, response_formatter_js_1.formatSuccess)({
831
1252
  topic: args.topic,
832
1253
  explanation: example,
833
- sdkVersion: '3.11.7',
1254
+ sdkVersion: '3.19.0',
834
1255
  packageName: '@gala-chain/launchpad-sdk',
835
1256
  documentation: 'https://www.npmjs.com/package/@gala-chain/launchpad-sdk',
836
1257
  });
@@ -1 +1 @@
1
- {"version":3,"file":"explainSdkUsage.js","sourceRoot":"","sources":["../../../src/tools/utils/explainSdkUsage.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,mEAAiE;AACjE,6EAAkE;AAElE;;GAEG;AACH,MAAM,YAAY,GAAG;IACnB,oBAAoB;IACpB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCf;IAEC,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsChB;IAEC,iBAAiB,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCpB;IAEC,aAAa,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyChB;IAEC,UAAU,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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