@gala-chain/launchpad-mcp-server 1.14.2 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +118 -0
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/tools/pools/fetchAllPriceHistory.d.ts.map +1 -1
- package/dist/tools/pools/fetchAllPriceHistory.js +19 -4
- package/dist/tools/pools/fetchAllPriceHistory.js.map +1 -1
- package/dist/tools/pools/fetchPools.js +1 -1
- package/dist/tools/pools/fetchPools.js.map +1 -1
- package/dist/tools/pools/fetchPriceHistory.d.ts.map +1 -1
- package/dist/tools/pools/fetchPriceHistory.js +19 -4
- package/dist/tools/pools/fetchPriceHistory.js.map +1 -1
- package/package.json +2 -2
- package/docs/AI-AGENT-PATTERNS.md +0 -555
- package/docs/CONSTRAINTS-REFERENCE.md +0 -454
- package/docs/PROMPT-TOOL-MAPPING.md +0 -352
- package/docs/examples/default-values-pattern.md +0 -240
- package/docs/examples/tool-factory-pattern.md +0 -217
- package/jest.config.js +0 -94
- package/src/__tests__/integration/fetchTokenDetails.integration.test.ts +0 -258
- package/src/__tests__/integration/poolTools.integration.test.ts +0 -185
- package/src/constants/mcpToolNames.ts +0 -141
- package/src/index.ts +0 -19
- package/src/prompts/__tests__/promptStructure.test.ts +0 -114
- package/src/prompts/__tests__/registry.test.ts +0 -145
- package/src/prompts/analysis.ts +0 -429
- package/src/prompts/index.ts +0 -127
- package/src/prompts/portfolio.ts +0 -242
- package/src/prompts/trading.ts +0 -191
- package/src/prompts/utility.ts +0 -43
- package/src/prompts/utils/workflowTemplates.ts +0 -344
- package/src/schemas/common-schemas.ts +0 -393
- package/src/scripts/test-all-prompts.ts +0 -184
- package/src/server.ts +0 -241
- package/src/tools/balance/index.ts +0 -174
- package/src/tools/creation/index.ts +0 -182
- package/src/tools/index.ts +0 -80
- package/src/tools/pools/fetchAllPools.ts +0 -47
- package/src/tools/pools/fetchAllPriceHistory.ts +0 -103
- package/src/tools/pools/fetchPoolDetails.ts +0 -27
- package/src/tools/pools/fetchPoolDetailsForCalculation.ts +0 -22
- package/src/tools/pools/fetchPools.ts +0 -47
- package/src/tools/pools/fetchPriceHistory.ts +0 -108
- package/src/tools/pools/fetchTokenDetails.ts +0 -77
- package/src/tools/pools/index.ts +0 -246
- package/src/tools/social/index.ts +0 -64
- package/src/tools/trading/index.ts +0 -605
- package/src/tools/transfers/index.ts +0 -75
- package/src/tools/utils/clearCache.ts +0 -36
- package/src/tools/utils/createWallet.ts +0 -19
- package/src/tools/utils/explainSdkUsage.ts +0 -1277
- package/src/tools/utils/getAddress.ts +0 -12
- package/src/tools/utils/getCacheInfo.ts +0 -14
- package/src/tools/utils/getConfig.ts +0 -11
- package/src/tools/utils/getEthereumAddress.ts +0 -12
- package/src/tools/utils/getUrlByTokenName.ts +0 -12
- package/src/tools/utils/getVersion.ts +0 -25
- package/src/tools/utils/index.ts +0 -27
- package/src/tools/utils/isTokenGraduated.ts +0 -16
- package/src/types/mcp.ts +0 -72
- package/src/utils/__tests__/validation.test.ts +0 -147
- package/src/utils/constraints.ts +0 -155
- package/src/utils/default-values.ts +0 -208
- package/src/utils/error-handler.ts +0 -69
- package/src/utils/error-templates.ts +0 -273
- package/src/utils/response-formatter.ts +0 -51
- package/src/utils/tool-factory.ts +0 -257
- package/src/utils/tool-registry.ts +0 -296
- package/src/utils/validation.ts +0 -336
- package/tsconfig.json +0 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,123 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add tokenName parameter support to fetchPriceHistory and fetchAllPriceHistory (v3.20.0+)
|
|
8
|
+
|
|
9
|
+
**Features:**
|
|
10
|
+
- New optional `tokenName` parameter enables simple token names (e.g., "demonkpop") with automatic
|
|
11
|
+
resolution to full tokenId
|
|
12
|
+
- Mutual exclusivity validation: use exactly one of `tokenName` OR `tokenId` (not both, not
|
|
13
|
+
neither)
|
|
14
|
+
- Full backward compatibility with existing tokenId parameter usage (string and object formats)
|
|
15
|
+
- New helper method `fetchTokenClassKeyByTokenName()` for token name resolution
|
|
16
|
+
- Enhanced JSDoc with comprehensive examples for all three token identification methods
|
|
17
|
+
|
|
18
|
+
**SDK Changes:**
|
|
19
|
+
- `PriceHistoryService`: Added tokenName parameter support with auto-resolution via
|
|
20
|
+
TokenResolverService
|
|
21
|
+
- `LaunchpadSDK`: Wired TokenResolverService to PriceHistoryService for automatic name resolution
|
|
22
|
+
- Updated type definitions with optional `tokenName?: string` parameter
|
|
23
|
+
- Added comprehensive validation for mutual exclusivity
|
|
24
|
+
|
|
25
|
+
**MCP Server Changes:**
|
|
26
|
+
- `gala_launchpad_fetch_price_history`: Updated schema to support optional tokenName parameter
|
|
27
|
+
- `gala_launchpad_fetch_all_price_history`: Updated schema to support optional tokenName parameter
|
|
28
|
+
- Both tools now accept flexible token identification (tokenName or tokenId, choose one)
|
|
29
|
+
|
|
30
|
+
**Documentation:**
|
|
31
|
+
- Updated SDK README with new usage patterns and examples
|
|
32
|
+
- Updated CLAUDE.md Price History Patterns section
|
|
33
|
+
- Added complete section in complete-sdk-demo.ts demonstrating tokenName parameter
|
|
34
|
+
- Enhanced JSDoc comments for all methods with practical examples
|
|
35
|
+
|
|
36
|
+
**Testing:**
|
|
37
|
+
- Added 33 comprehensive unit tests covering:
|
|
38
|
+
- Token name to token class key resolution
|
|
39
|
+
- Mutual exclusivity validation
|
|
40
|
+
- Error handling for invalid inputs
|
|
41
|
+
- Integration with both fetchPriceHistory and fetchAllPriceHistory
|
|
42
|
+
- All test suites passing (1102 total tests)
|
|
43
|
+
|
|
44
|
+
**Breaking Changes:** None - fully backward compatible
|
|
45
|
+
|
|
46
|
+
**Migration Guide:** Instead of: `sdk.fetchPriceHistory({ tokenId: 'Token|Unit|DKP|eth:...' })`
|
|
47
|
+
You can now use: `sdk.fetchPriceHistory({ tokenName: 'demonkpop' })`
|
|
48
|
+
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- Fix token format conversion and add DEX spot pricing for graduated launchpad tokens
|
|
52
|
+
|
|
53
|
+
**Bug Fixes:**
|
|
54
|
+
- **CRITICAL**: Fixed PriceHistoryService token format conversion that was losing Ethereum
|
|
55
|
+
addresses for launchpad tokens
|
|
56
|
+
- Was converting: `Token|Unit|GDOG|eth:902...` → `GDOG$Unit$none$none` ❌
|
|
57
|
+
- Now converts: `Token|Unit|GDOG|eth:902...` → `Token$Unit$GDOG$eth:902...` ✅
|
|
58
|
+
- Impact: All launchpad token price history queries now return data instead of empty results
|
|
59
|
+
- Affected methods: `fetchPriceHistory()`, `fetchAllPriceHistory()`
|
|
60
|
+
- Updated test expectations in `price-history-service.test.ts` to validate correct token format
|
|
61
|
+
- All 1,102 unit tests passing
|
|
62
|
+
|
|
63
|
+
**Features:**
|
|
64
|
+
- New method `DexService.fetchDexTokenSpotPrice(tokenId)` for real-time DEX market prices
|
|
65
|
+
- Uses `/v1/trade/price` endpoint for accurate graduated token pricing
|
|
66
|
+
- Supports both pipe-delimited and object token ID formats
|
|
67
|
+
- Perfect for tokens trading on the DEX post-graduation
|
|
68
|
+
- Enhanced `fetchLaunchpadTokenSpotPrice()` to intelligently select price source:
|
|
69
|
+
- Active pool tokens: Uses bonding curve calculation
|
|
70
|
+
- Graduated tokens: Uses `/v1/trade/price` endpoint for real DEX market prices
|
|
71
|
+
- Optional `fetchPoolDetails` parameter enables automatic graduation detection
|
|
72
|
+
- Gracefully falls back to bonding curve if graduation check unavailable
|
|
73
|
+
|
|
74
|
+
**SDK Changes:**
|
|
75
|
+
- `PriceHistoryService.ts`: Fixed token format converter to use `pipeFormatToDollarFormat()`
|
|
76
|
+
utility
|
|
77
|
+
- `DexService.ts`: Added `fetchDexTokenSpotPrice()` method with full documentation
|
|
78
|
+
- `DexService.ts`: Enhanced `fetchLaunchpadTokenSpotPrice()` with graduation detection
|
|
79
|
+
- Added import of `pipeFormatToDollarFormat` to DexService
|
|
80
|
+
|
|
81
|
+
**Test Results:**
|
|
82
|
+
- All price history service tests passing (33 tests)
|
|
83
|
+
- All SDK tests passing (1102 total tests)
|
|
84
|
+
- No regressions detected
|
|
85
|
+
|
|
86
|
+
**Breaking Changes:** None - both are enhancements/bug fixes
|
|
87
|
+
|
|
88
|
+
**Example Usage (Graduated Token):**
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
// Graduated token now returns real DEX market price
|
|
92
|
+
const price = await sdk.fetchLaunchpadTokenSpotPrice(
|
|
93
|
+
'galadog',
|
|
94
|
+
calculateBuyAmount,
|
|
95
|
+
fetchPoolDetails // Optional - enables automatic DEX pricing
|
|
96
|
+
);
|
|
97
|
+
// Returns: { symbol: 'GALADOG', price: 0.019110 } (real market price)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Example Usage (Direct DEX Pricing):**
|
|
101
|
+
|
|
102
|
+
```typescript
|
|
103
|
+
// Query DEX directly for any trading token
|
|
104
|
+
const price = await dexService.fetchDexTokenSpotPrice(
|
|
105
|
+
'Token|Unit|GDOG|eth:902Ef7566c8A8bEe5517FdEC0D7b5d1157942830'
|
|
106
|
+
);
|
|
107
|
+
// Returns: { symbol: 'GDOG', price: 0.019110 }
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
- Updated dependencies
|
|
111
|
+
- Updated dependencies
|
|
112
|
+
- @gala-chain/launchpad-sdk@3.20.0
|
|
113
|
+
|
|
114
|
+
## 1.14.3
|
|
115
|
+
|
|
116
|
+
### Patch Changes
|
|
117
|
+
|
|
118
|
+
- fix: correct fetchPools tool enum values to match SDK (recent/popular instead of
|
|
119
|
+
recent/trending/user)
|
|
120
|
+
|
|
3
121
|
## 1.14.2
|
|
4
122
|
|
|
5
123
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAllPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,eAAO,MAAM,wBAAwB,EAAE,
|
|
1
|
+
{"version":3,"file":"fetchAllPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,eAAO,MAAM,wBAAwB,EAAE,OA2GtC,CAAC"}
|
|
@@ -18,7 +18,12 @@ exports.fetchAllPriceHistoryTool = {
|
|
|
18
18
|
**Requirements:**
|
|
19
19
|
- DEX Backend API must be configured (dexBackendBaseUrl in SDK config)
|
|
20
20
|
- Node.js environment only (not available in browser)
|
|
21
|
-
-
|
|
21
|
+
- Either tokenName OR tokenId is required (not both)
|
|
22
|
+
|
|
23
|
+
**Token Identification:**
|
|
24
|
+
- Use \`tokenName\` for convenience (e.g., "demonkpop") - automatically resolved to full token ID
|
|
25
|
+
- Use \`tokenId\` for direct specification (e.g., "Token|Unit|DKP|eth:...")
|
|
26
|
+
- Provide exactly ONE of these parameters
|
|
22
27
|
|
|
23
28
|
**Use Cases:**
|
|
24
29
|
- Complete historical price analysis and charting
|
|
@@ -30,6 +35,10 @@ exports.fetchAllPriceHistoryTool = {
|
|
|
30
35
|
inputSchema: {
|
|
31
36
|
type: 'object',
|
|
32
37
|
properties: {
|
|
38
|
+
tokenName: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Simple token name for convenience (e.g., "demonkpop", "shoewars") - automatically resolves to full token ID. Use this OR tokenId, not both.',
|
|
41
|
+
},
|
|
33
42
|
tokenId: {
|
|
34
43
|
oneOf: [
|
|
35
44
|
{
|
|
@@ -60,7 +69,7 @@ exports.fetchAllPriceHistoryTool = {
|
|
|
60
69
|
description: 'TokenClassKey object format',
|
|
61
70
|
},
|
|
62
71
|
],
|
|
63
|
-
description: 'Token identifier (string or TokenClassKey object)',
|
|
72
|
+
description: 'Token identifier (string or TokenClassKey object). Use this OR tokenName, not both.',
|
|
64
73
|
},
|
|
65
74
|
from: {
|
|
66
75
|
type: 'string',
|
|
@@ -78,14 +87,20 @@ exports.fetchAllPriceHistoryTool = {
|
|
|
78
87
|
description: 'Sort order for results (default: DESC for newest-first)',
|
|
79
88
|
},
|
|
80
89
|
},
|
|
81
|
-
required: [
|
|
90
|
+
required: [],
|
|
82
91
|
},
|
|
83
92
|
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
84
93
|
// Convert string dates to Date objects if provided
|
|
85
94
|
const options = {
|
|
86
|
-
tokenId: args.tokenId,
|
|
87
95
|
sortOrder: args.sortOrder,
|
|
88
96
|
};
|
|
97
|
+
// Support both tokenName and tokenId (mutual exclusivity validation happens in SDK)
|
|
98
|
+
if (args.tokenName) {
|
|
99
|
+
options.tokenName = args.tokenName;
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
options.tokenId = args.tokenId;
|
|
103
|
+
}
|
|
89
104
|
if (args.from) {
|
|
90
105
|
options.from = new Date(args.from);
|
|
91
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAllPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEpD,QAAA,wBAAwB,GAAY;IAC/C,IAAI,EAAE,wCAAwC;IAC9C,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"fetchAllPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEpD,QAAA,wBAAwB,GAAY;IAC/C,IAAI,EAAE,wCAAwC;IAC9C,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QAC7C,mDAAmD;QACnD,MAAM,OAAO,GAAQ;YACnB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CAAC;QAEF,oFAAoF;QACpF,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QACjC,CAAC;QAED,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;YACZ,OAAO,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;QACvD,OAAO,IAAA,qCAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchPools.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchPools.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEpD,QAAA,cAAc,GAAY;IACrC,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,qEAAqE;IAClF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"fetchPools.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchPools.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEpD,QAAA,cAAc,GAAY;IACrC,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,qEAAqE;IAClF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;gBAC3B,WAAW,EAAE,0CAA0C;aACxD;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6CAA6C;gBACtD,WAAW,EAAE,sCAAsC;aACpD;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,WAAW,EAAE,0BAA0B;aACxC;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,GAAG;gBACZ,WAAW,EAAE,gCAAgC;aAC9C;SACF;KACF;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;YAClC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,QAAQ;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;YACpB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;SACxB,CAAC,CAAC;QAEH,OAAO,IAAA,qCAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,eAAO,MAAM,qBAAqB,EAAE,OA+
|
|
1
|
+
{"version":3,"file":"fetchPriceHistory.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,eAAO,MAAM,qBAAqB,EAAE,OA+GnC,CAAC"}
|
|
@@ -19,7 +19,12 @@ exports.fetchPriceHistoryTool = {
|
|
|
19
19
|
**Requirements:**
|
|
20
20
|
- DEX Backend API must be configured (dexBackendBaseUrl in SDK config)
|
|
21
21
|
- Node.js environment only (not available in browser)
|
|
22
|
-
-
|
|
22
|
+
- Either tokenName OR tokenId is required (not both)
|
|
23
|
+
|
|
24
|
+
**Token Identification:**
|
|
25
|
+
- Use \`tokenName\` for convenience (e.g., "demonkpop") - automatically resolved to full token ID
|
|
26
|
+
- Use \`tokenId\` for direct specification (e.g., "Token|Unit|DKP|eth:...")
|
|
27
|
+
- Provide exactly ONE of these parameters
|
|
23
28
|
|
|
24
29
|
**Use Cases:**
|
|
25
30
|
- Historical price analysis and charting
|
|
@@ -31,6 +36,10 @@ exports.fetchPriceHistoryTool = {
|
|
|
31
36
|
inputSchema: {
|
|
32
37
|
type: 'object',
|
|
33
38
|
properties: {
|
|
39
|
+
tokenName: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'Simple token name for convenience (e.g., "demonkpop", "shoewars") - automatically resolves to full token ID. Use this OR tokenId, not both.',
|
|
42
|
+
},
|
|
34
43
|
tokenId: {
|
|
35
44
|
oneOf: [
|
|
36
45
|
{
|
|
@@ -61,7 +70,7 @@ exports.fetchPriceHistoryTool = {
|
|
|
61
70
|
description: 'TokenClassKey object format',
|
|
62
71
|
},
|
|
63
72
|
],
|
|
64
|
-
description: 'Token identifier (string or TokenClassKey object)',
|
|
73
|
+
description: 'Token identifier (string or TokenClassKey object). Use this OR tokenName, not both.',
|
|
65
74
|
},
|
|
66
75
|
from: {
|
|
67
76
|
type: 'string',
|
|
@@ -81,16 +90,22 @@ exports.fetchPriceHistoryTool = {
|
|
|
81
90
|
page: common_schemas_js_1.PAGE_SCHEMA,
|
|
82
91
|
limit: (0, common_schemas_js_1.createLimitSchema)('priceHistory', 10),
|
|
83
92
|
},
|
|
84
|
-
required: [
|
|
93
|
+
required: [],
|
|
85
94
|
},
|
|
86
95
|
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
87
96
|
// Convert string dates to Date objects if provided
|
|
88
97
|
const options = {
|
|
89
|
-
tokenId: args.tokenId,
|
|
90
98
|
sortOrder: args.sortOrder,
|
|
91
99
|
page: args.page,
|
|
92
100
|
limit: args.limit,
|
|
93
101
|
};
|
|
102
|
+
// Support both tokenName and tokenId (mutual exclusivity validation happens in SDK)
|
|
103
|
+
if (args.tokenName) {
|
|
104
|
+
options.tokenName = args.tokenName;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
options.tokenId = args.tokenId;
|
|
108
|
+
}
|
|
94
109
|
if (args.from) {
|
|
95
110
|
options.from = new Date(args.from);
|
|
96
111
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAAiF;AAEpE,QAAA,qBAAqB,GAAY;IAC5C,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE
|
|
1
|
+
{"version":3,"file":"fetchPriceHistory.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchPriceHistory.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAAiF;AAEpE,QAAA,qBAAqB,GAAY;IAC5C,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE;;;;;;;;;;;;;;;;;;;;oFAoBqE;IAElF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;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O,GAAQ;YACnB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC;QAEF,oFAAoF;QACpF,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QACjC,CAAC;QAED,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QACD,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;YACZ,OAAO,CAAC,EAAE,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjC,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACpD,OAAO,IAAA,qCAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,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.
|
|
3
|
+
"version": "1.15.0",
|
|
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.
|
|
67
|
+
"@gala-chain/launchpad-sdk": "^3.20.0",
|
|
68
68
|
"@modelcontextprotocol/sdk": "^0.5.0",
|
|
69
69
|
"axios": "^1.12.2",
|
|
70
70
|
"bignumber.js": "^9.1.2",
|