@gala-chain/launchpad-mcp-server 1.13.0 → 1.13.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,110 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ## Enhancement: Token Format Validation for Price History (v3.16.2)
8
+
9
+ **Added validation** to ensure correct token ID format for DEX Backend API compatibility.
10
+
11
+ The price history API requires tokens to follow GalaChain's standard format where the token name
12
+ is stored in the `type` field:
13
+
14
+ ### Valid Formats
15
+
16
+ ✅ String format: `Token|Unit|{TOKEN_NAME}|{additionalKey}`
17
+
18
+ ```typescript
19
+ sdk.fetchPriceHistory({ tokenId: 'Token|Unit|GALA|none' });
20
+ sdk.fetchPriceHistory({ tokenId: 'Token|Unit|SILK|none' });
21
+ ```
22
+
23
+ ✅ Object format:
24
+ `{ collection: "Token", category: "Unit", type: "{TOKEN_NAME}", additionalKey: "{key}" }`
25
+
26
+ ```typescript
27
+ sdk.fetchPriceHistory({
28
+ tokenId: { collection: 'Token', category: 'Unit', type: 'GALA', additionalKey: 'none' },
29
+ });
30
+ ```
31
+
32
+ ### Invalid Formats (Now Rejected)
33
+
34
+ ❌ `GALA|Unit|none|none` - Token name in first field instead of third ❌ `Gala|Unit|none|none` -
35
+ Mixed case, ambiguous format ❌
36
+ `{ collection: 'GALA', category: 'Unit', type: 'none', additionalKey: 'none' }` - Wrong field
37
+ mapping
38
+
39
+ ### Error Messages
40
+
41
+ When invalid format is provided, users now get clear guidance:
42
+
43
+ ```
44
+ Invalid tokenId format for price history. Expected format: "Token|Unit|{TOKEN_NAME}|{additionalKey}"
45
+ (e.g., "Token|Unit|GALA|none"). Received: "GALA|Unit|none|none".
46
+ The token name must be in the third field (type), not the first field (collection).
47
+ ```
48
+
49
+ ### Changes
50
+ - Added comprehensive token format validation in `PriceHistoryService.validateOptions()`
51
+ - Validates both string and object token ID formats
52
+ - Provides clear error messages with examples
53
+ - Prevents silent failures from incorrect token format mapping
54
+ - Ensures DEX Backend API receives correctly formatted token identifiers
55
+
56
+ This prevents subtle bugs where tokens like `GALA|Unit|none|none` would be silently converted to
57
+ `none$Unit$none$none` (wrong).
58
+
59
+ - Updated dependencies
60
+ - @gala-chain/launchpad-sdk@3.16.2
61
+
62
+ ## 1.13.1
63
+
64
+ ### Patch Changes
65
+
66
+ - ## Fix: Price History Token Format Mapping (v3.16.1)
67
+
68
+ **Critical Fix:** Corrects token ID format conversion for DEX Backend API.
69
+
70
+ The DEX Backend API uses a different token format than GalaChain:
71
+ - API format: `tokenName$Unit$none$none` (e.g., `GALA$Unit$none$none`)
72
+ - SDK format: `collection|category|type|additionalKey` (e.g., `Token|Unit|GALA|none`)
73
+
74
+ ### Changes
75
+
76
+ **PriceHistoryService.ts:**
77
+ - Fixed token format conversion when calling DEX Backend API
78
+ - Now correctly maps GalaChain TokenInstanceKey fields to API format
79
+ - Token name is extracted from the `type` field (where it's stored in GalaChain)
80
+ - API always receives properly formatted: `{tokenName}$Unit$none$none`
81
+
82
+ ### Impact
83
+ - `fetchPriceHistory()` now returns historical price data correctly
84
+ - MCP tool `gala_launchpad_fetch_price_history` now works as expected
85
+ - All 30,000+ price snapshots now accessible for supported tokens
86
+
87
+ ### Before
88
+
89
+ ```typescript
90
+ // Input: Token|Unit|GALA|none
91
+ // Converted to: Token$Unit$GALA$none (WRONG - API expected GALA$Unit$none$none)
92
+ // Result: Empty response, no historical data
93
+ ```
94
+
95
+ ### After
96
+
97
+ ```typescript
98
+ // Input: Token|Unit|GALA|none
99
+ // Converted to: GALA$Unit$none$none (CORRECT)
100
+ // Result: Returns all 30,862 GALA price snapshots
101
+ ```
102
+
103
+ This is a critical fix for price history functionality.
104
+
105
+ - Updated dependencies
106
+ - @gala-chain/launchpad-sdk@3.16.1
107
+
3
108
  ## 1.13.0
4
109
 
5
110
  ### Minor 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.13.0";
6
+ export declare const MCP_SERVER_VERSION = "1.13.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.13.0';
9
+ exports.MCP_SERVER_VERSION = '1.13.2';
10
10
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gala-chain/launchpad-mcp-server",
3
- "version": "1.13.0",
3
+ "version": "1.13.2",
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": {
@@ -64,7 +64,7 @@
64
64
  "dependencies": {
65
65
  "@gala-chain/api": "^2.4.3",
66
66
  "@gala-chain/connect": "^2.4.3",
67
- "@gala-chain/launchpad-sdk": "^3.16.0",
67
+ "@gala-chain/launchpad-sdk": "^3.16.2",
68
68
  "@modelcontextprotocol/sdk": "^0.5.0",
69
69
  "axios": "^1.12.2",
70
70
  "bignumber.js": "^9.1.2",