@gala-chain/launchpad-mcp-server 1.17.5 → 1.17.6

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.
@@ -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.17.5";
6
+ export declare const MCP_SERVER_VERSION = "1.17.6";
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.17.5';
9
+ exports.MCP_SERVER_VERSION = '1.17.6';
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;AA6qClD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAqEjC,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;AA4zClD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAqEjC,CAAC"}
@@ -909,6 +909,148 @@ async function analyzeTokenDetails() {
909
909
  - Object: \`{ collection, category, type, additionalKey }\`
910
910
 
911
911
  **MCP Tool Equivalent:** \`gala_launchpad_fetch_token_details\`
912
+ `,
913
+ 'spot-prices-smart-routing': `
914
+ ## Smart Spot Price Routing with DEX Fallback
915
+
916
+ The SDK intelligently routes pricing requests between DEX and Launchpad backends based on token graduation status - no need to know which backend a token uses!
917
+
918
+ \`\`\`typescript
919
+ import { createLaunchpadSDK } from '@gala-chain/launchpad-sdk';
920
+
921
+ async function tokenPricing() {
922
+ const sdk = createLaunchpadSDK({
923
+ wallet: 'your-private-key'
924
+ });
925
+
926
+ // OPTION 1: SMART ROUTING (Recommended) - Automatic backend selection
927
+ // Use tokenId for ANY token (graduated or ungraduated)
928
+ // SDK automatically detects and routes to correct backend
929
+ console.log('=== Smart Routing (Recommended) ===');
930
+ const smartPrice = await sdk.fetchTokenSpotPrice({
931
+ tokenId: 'Token|Unit|ANIME|eth:0x...' // Works for ANY token!
932
+ });
933
+ console.log(\`Token price: $\${smartPrice}\`);
934
+ // ✅ Handles graduated tokens (DEX) automatically
935
+ // ✅ Handles ungraduated tokens (Launchpad) automatically
936
+ // ✅ No need to know token status beforehand
937
+
938
+ // OPTION 2: EXPLICIT DEX PRICING - Graduated tokens only
939
+ // Use tokenId directly for DEX tokens
940
+ console.log('\\n=== Explicit DEX Pricing ===');
941
+ const dexPrices = await sdk.fetchTokenSpotPrice({
942
+ tokenId: 'GALA|Unit|none|none' // Or other DEX token
943
+ });
944
+ console.log(\`DEX Token GALA: $\${dexPrices}\`);
945
+
946
+ // OPTION 3: EXPLICIT LAUNCHPAD PRICING - Ungraduated tokens
947
+ // Use tokenName for launchpad bonding curve tokens
948
+ console.log('\\n=== Explicit Launchpad Pricing ===');
949
+ const launchpadPrice = await sdk.fetchLaunchpadTokenSpotPrice('anime');
950
+ console.log(\`Launchpad token anime: $\${launchpadPrice}\`);
951
+
952
+ // ADVANCED: Handle both pricing methods with error recovery
953
+ console.log('\\n=== Fallback Pricing Strategy ===');
954
+ async function getPriceWithFallback(tokenId: string, tokenName?: string) {
955
+ try {
956
+ // Try DEX pricing first
957
+ return await sdk.fetchTokenSpotPrice({ tokenId });
958
+ } catch (error) {
959
+ // If not on DEX, try launchpad pricing
960
+ if (tokenName) {
961
+ try {
962
+ return await sdk.fetchLaunchpadTokenSpotPrice(tokenName);
963
+ } catch (fallbackError) {
964
+ throw new Error(\`Could not fetch price for \${tokenName}\`);
965
+ }
966
+ }
967
+ throw error;
968
+ }
969
+ }
970
+
971
+ const fallbackPrice = await getPriceWithFallback(
972
+ 'Token|Unit|ANIME|eth:0x...',
973
+ 'anime'
974
+ );
975
+ console.log(\`Fallback price: $\${fallbackPrice}\`);
976
+
977
+ // USECASE: Price comparison and discovery
978
+ console.log('\\n=== Price Discovery ===');
979
+ async function comparePrices(tokenName: string) {
980
+ const launchpadPrice = await sdk.fetchLaunchpadTokenSpotPrice(tokenName);
981
+
982
+ // Check if graduated (on DEX)
983
+ const isGraduated = await sdk.isTokenGraduated(tokenName);
984
+
985
+ if (isGraduated) {
986
+ const dexPrice = await sdk.fetchTokenSpotPrice({
987
+ tokenId: \`Token|Unit|\${tokenName.toUpperCase()}|eth:0x...\`
988
+ });
989
+ console.log(\`Launchpad: $\${launchpadPrice}, DEX: $\${dexPrice}\`);
990
+ return { launchpadPrice, dexPrice, graduated: true };
991
+ } else {
992
+ console.log(\`Launchpad: $\${launchpadPrice} (not on DEX yet)\`);
993
+ return { launchpadPrice, graduated: false };
994
+ }
995
+ }
996
+
997
+ const priceComparison = await comparePrices('anime');
998
+ }
999
+ \`\`\`
1000
+
1001
+ **Smart Routing Benefits:**
1002
+ - ✅ **Seamless Transitions** - Works before and after token graduation
1003
+ - ✅ **No Backend Knowledge** - SDK handles routing automatically
1004
+ - ✅ **Error Handling** - Automatic fallback if needed
1005
+ - ✅ **Single API** - Use same method for all tokens
1006
+
1007
+ **When to Use Each Method:**
1008
+
1009
+ | Method | Use Case | Token Status |
1010
+ |--------|----------|--------------|
1011
+ | \`fetchTokenSpotPrice({ tokenId })\` | Smart routing (recommended) | Any (DEX or Launchpad) |
1012
+ | \`fetchLaunchpadTokenSpotPrice(name)\` | Launchpad-only pricing | Ungraduated tokens |
1013
+ | \`isTokenGraduated(name)\` | Check token status | Any |
1014
+
1015
+ **Key Differences:**
1016
+
1017
+ **Ungraduated Tokens (Launchpad):**
1018
+ - Priced on exponential bonding curve
1019
+ - Token name parameter works: \`fetchLaunchpadTokenSpotPrice('anime')\`
1020
+ - Price affected by supply/demand
1021
+
1022
+ **Graduated Tokens (DEX):**
1023
+ - Priced on DEX via order books
1024
+ - Token ID format needed: \`Token|Unit|SYMBOL|eth:0x...\`
1025
+ - Market-driven pricing
1026
+
1027
+ **Graduation Impact:**
1028
+ When a token graduates from launchpad to DEX:
1029
+ - Bonding curve closes
1030
+ - Trading moves to DEX order books
1031
+ - Smart routing automatically switches backends
1032
+ - Old launchpad queries will fail (use DEX pricing instead)
1033
+
1034
+ **Error Handling:**
1035
+ \`\`\`typescript
1036
+ async function safePriceQuery(tokenId: string) {
1037
+ try {
1038
+ // Always try smart routing first
1039
+ return await sdk.fetchTokenSpotPrice({ tokenId });
1040
+ } catch (error) {
1041
+ if (error.message.includes('not found')) {
1042
+ console.log('Token not available on DEX');
1043
+ // Could try fallback to launchpad pricing here
1044
+ }
1045
+ throw error;
1046
+ }
1047
+ }
1048
+ \`\`\`
1049
+
1050
+ **MCP Tool Equivalents:**
1051
+ - \`gala_launchpad_fetch_token_spot_price\` - Smart routing
1052
+ - \`gala_launchpad_fetch_launchpad_token_spot_price\` - Launchpad-only
1053
+ - \`gala_launchpad_is_token_graduated\` - Check graduation status
912
1054
  `,
913
1055
  'profile-management': `
914
1056
  ## User Profile Management with SDK
@@ -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;;;;;;;;;;;;;;;;;;;;;;;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IACxC,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;;;;6DAuB8C;IAC3D,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE;oBACJ,YAAY;oBACZ,aAAa;oBACb,iBAAiB;oBACjB,aAAa;oBACb,UAAU;oBACV,eAAe;oBACf,eAAe;oBACf,oBAAoB;oBACpB,gBAAgB;oBAChB,oBAAoB;oBACpB,cAAc;oBACd,WAAW;oBACX,gBAAgB;oBAChB,cAAc;oBACd,oBAAoB;oBACpB,oBAAoB;iBACrB;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,kBAAkB,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAClD,CAAC;QAED,OAAO,IAAA,qCAAa,EAAC;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,OAAO;YACpB,UAAU,EAAE,QAAQ;YACpB,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": "1.17.5",
3
+ "version": "1.17.6",
4
4
  "description": "MCP server for Gala Launchpad SDK with 55 tools + 14 slash commands - Production-grade AI agent integration with comprehensive validation, optimized performance, and 80%+ test coverage",
5
5
  "main": "dist/index.js",
6
6
  "bin": {