@gala-chain/launchpad-mcp-server 2.0.2-beta.0 → 2.0.2-beta.11
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 +24 -22
- 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/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/dist/tools/dex/index.d.ts +5 -0
- package/dist/tools/dex/index.d.ts.map +1 -1
- package/dist/tools/dex/index.js +234 -2
- package/dist/tools/dex/index.js.map +1 -1
- package/dist/tools/index.d.ts +5 -5
- package/dist/tools/index.js +6 -6
- package/dist/tools/pools/fetchAllPools.d.ts.map +1 -1
- package/dist/tools/pools/fetchAllPools.js +2 -9
- package/dist/tools/pools/fetchAllPools.js.map +1 -1
- package/dist/tools/trading/index.js +1 -1
- package/dist/tools/utils/cleanup.d.ts +9 -0
- package/dist/tools/utils/cleanup.d.ts.map +1 -0
- package/dist/tools/utils/cleanup.js +27 -0
- package/dist/tools/utils/cleanup.js.map +1 -0
- package/dist/tools/utils/index.d.ts.map +1 -1
- package/dist/tools/utils/index.js +4 -0
- package/dist/tools/utils/index.js.map +1 -1
- package/dist/tools/utils/retrieveFromFaucet.d.ts +9 -0
- package/dist/tools/utils/retrieveFromFaucet.d.ts.map +1 -0
- package/dist/tools/utils/retrieveFromFaucet.js +36 -0
- package/dist/tools/utils/retrieveFromFaucet.js.map +1 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ MCP (Model Context Protocol) server for Gala Launchpad SDK - Enables AI agents t
|
|
|
4
4
|
|
|
5
5
|
## 🚀 Features
|
|
6
6
|
|
|
7
|
-
- **
|
|
7
|
+
- **91 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 social/comment tools, 2 lock/unlock tools, 17 utility tools, 26 DEX/GalaSwap tools)
|
|
8
8
|
- **78 slash commands** (prompts) for streamlined workflows - 89% tool coverage (every major operation has a corresponding slash command)
|
|
9
9
|
- **Type-safe** - Full TypeScript support with validated inputs
|
|
10
10
|
- **Production-ready** - Built on [@gala-chain/launchpad-sdk ](https://www.npmjs.com/package/@gala-chain/launchpad-sdk)
|
|
@@ -45,23 +45,24 @@ MCP (Model Context Protocol) server for Gala Launchpad SDK - Enables AI agents t
|
|
|
45
45
|
|
|
46
46
|
### Tool Coverage
|
|
47
47
|
|
|
48
|
-
- **
|
|
48
|
+
- **91 total MCP tools** (full coverage of Gala Launchpad features)
|
|
49
49
|
- **78 total prompts** (up from 75 in v1.x)
|
|
50
50
|
- **89% tool→prompt coverage** (70/78 tools have dedicated prompts)
|
|
51
51
|
- **New focus**: DEX ecosystem integration, real-time monitoring, advanced quote calculations
|
|
52
52
|
|
|
53
53
|
### Category Breakdown
|
|
54
54
|
|
|
55
|
-
| Category | Tool Count |
|
|
56
|
-
|
|
57
|
-
| **Pool Management** |
|
|
58
|
-
| **DEX
|
|
59
|
-
| **
|
|
60
|
-
| **
|
|
61
|
-
| **Utilities** | 17 |
|
|
62
|
-
| **Creation** | 4 |
|
|
63
|
-
| **Social** | 2 |
|
|
64
|
-
| **Transfers** | 2 |
|
|
55
|
+
| Category | Tool Count | Key Features |
|
|
56
|
+
|----------|------------|--------------|
|
|
57
|
+
| **Pool Management** | 19 | Pool data, real-time watchers, price history, analytics |
|
|
58
|
+
| **DEX/GalaSwap** | 26 | Swap quotes, liquidity positions, pool discovery, leaderboard, composite pool data |
|
|
59
|
+
| **Trading Operations** | 13 | Buy, sell, calculate amounts, graduation |
|
|
60
|
+
| **Balance & Portfolio** | 6 | Balance queries, profile management |
|
|
61
|
+
| **Utilities** | 17 | Config, version, environment, wallet, cache, faucet, cleanup |
|
|
62
|
+
| **Creation** | 4 | Token launch, image upload |
|
|
63
|
+
| **Social** | 2 | Comments and interactions |
|
|
64
|
+
| **Transfers** | 2 | GALA and token transfers |
|
|
65
|
+
| **Locks** | 2 | Token lock/unlock for staking, escrow |
|
|
65
66
|
|
|
66
67
|
### Performance Improvements
|
|
67
68
|
|
|
@@ -156,9 +157,9 @@ Use the wallet management tools to upgrade or switch wallets at runtime:
|
|
|
156
157
|
- `gala_launchpad_set_wallet` - Upgrade from read-only to full-access mode
|
|
157
158
|
- `gala_launchpad_get_wallet` - Retrieve wallet information
|
|
158
159
|
|
|
159
|
-
## 🛠️ Available Tools (
|
|
160
|
+
## 🛠️ Available Tools (84 Total)
|
|
160
161
|
|
|
161
|
-
### Pool Management, Pricing & Event Watchers (
|
|
162
|
+
### Pool Management, Pricing & Event Watchers (19 tools)
|
|
162
163
|
- `gala_launchpad_fetch_pools` - Fetch token pools with filtering
|
|
163
164
|
- `gala_launchpad_fetch_all_pools` - Fetch all available pools with automatic pagination
|
|
164
165
|
- `gala_launchpad_fetch_pool_details` - Get detailed pool state
|
|
@@ -411,7 +412,7 @@ const result2 = await gala_launchpad_graduate_token({
|
|
|
411
412
|
- 🚀 **Auto-pagination** - Fetch all pools automatically with `fetchAllDexPools`
|
|
412
413
|
- 💰 **Complete pool data** - TVL, fees, APR, volume metrics, and token pricing
|
|
413
414
|
|
|
414
|
-
### GSwap DEX Trading (
|
|
415
|
+
### GSwap DEX Trading (26 tools)
|
|
415
416
|
|
|
416
417
|
**Real-time DEX trading for graduated tokens with slippage protection:**
|
|
417
418
|
|
|
@@ -422,11 +423,12 @@ const result2 = await gala_launchpad_graduate_token({
|
|
|
422
423
|
- `gala_launchpad_get_all_swap_user_assets` - **NEW v2.0** - Get all user assets with auto-pagination
|
|
423
424
|
- `gala_launchpad_get_swap_pool_info` - Get liquidity and fee tier information for token pairs
|
|
424
425
|
- `gala_launchpad_get_swap_pool_price` - **NEW v2.0** - Get current price for token pair in DEX pool
|
|
425
|
-
- `
|
|
426
|
-
- `gala_launchpad_calculate_dex_pool_quote_local` - **NEW v2.0** - Local/offline DEX quote calculation
|
|
427
|
-
- `gala_launchpad_calculate_dex_pool_quote_external` - **NEW v2.0** - External GalaChain DEX quotes
|
|
428
|
-
- **
|
|
429
|
-
-
|
|
426
|
+
- `gala_launchpad_fetch_composite_pool_data` - **NEW v2.0** - Fetch complete pool state for offline quote calculations
|
|
427
|
+
- `gala_launchpad_calculate_dex_pool_quote_local` - **NEW v2.0** - Local/offline DEX quote calculation (instant)
|
|
428
|
+
- `gala_launchpad_calculate_dex_pool_quote_external` - **NEW v2.0** - External GalaChain DEX quotes (real-time)
|
|
429
|
+
- **9 liquidity position tools** - Add, remove, collect fees, query positions
|
|
430
|
+
- **4 leaderboard tools** - Top traders, tokens, volume rankings
|
|
431
|
+
- **1 volume tool** - DEX trading volume metrics
|
|
430
432
|
|
|
431
433
|
**Complete DEX Trading Workflow Example:**
|
|
432
434
|
|
|
@@ -567,7 +569,7 @@ Ask Claude:
|
|
|
567
569
|
|
|
568
570
|
> "Show me the most and least expensive tokens right now"
|
|
569
571
|
|
|
570
|
-
### Balance & Portfolio (
|
|
572
|
+
### Balance & Portfolio (6 tools)
|
|
571
573
|
- `gala_launchpad_fetch_gala_balance` - Get GALA balance
|
|
572
574
|
- `gala_launchpad_fetch_token_balance` - Get token balance
|
|
573
575
|
- `gala_launchpad_fetch_tokens_held` - Get portfolio holdings
|
|
@@ -596,7 +598,7 @@ Ask Claude:
|
|
|
596
598
|
- `gala_launchpad_transfer_gala` - Transfer GALA tokens
|
|
597
599
|
- `gala_launchpad_transfer_token` - Transfer launchpad tokens
|
|
598
600
|
|
|
599
|
-
### Utility Tools (
|
|
601
|
+
### Utility Tools (15 tools)
|
|
600
602
|
- `gala_launchpad_create_wallet` - Create new GalaChain wallet
|
|
601
603
|
- `gala_launchpad_get_address` - Get user's GalaChain address
|
|
602
604
|
- `gala_launchpad_get_ethereum_address` - Get user's Ethereum address
|
|
@@ -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,kBAAkB,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,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,22 @@
|
|
|
4
4
|
* Gala Launchpad MCP Server Entry Point
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
// Suppress verbose fabric-contract-api logging from @gala-chain/api decorators
|
|
8
|
+
// This MUST be set before any imports that trigger decorator initialization
|
|
9
|
+
process.env.CORE_CHAINCODE_LOGGING_LEVEL = process.env.CORE_CHAINCODE_LOGGING_LEVEL || 'ERROR';
|
|
10
|
+
// Suppress @gala-chain/api schema processing errors that occur during decorator initialization
|
|
11
|
+
// These errors are harmless (just missing type metadata for Map/Object properties like bitmap, tickRangeMap)
|
|
12
|
+
// but they go to stderr which breaks MCP's JSON-RPC communication over stdio
|
|
13
|
+
const originalConsoleError = console.error;
|
|
14
|
+
console.error = (...args) => {
|
|
15
|
+
const message = String(args[0] || '');
|
|
16
|
+
// Filter out specific schema processing errors from @gala-chain/api
|
|
17
|
+
if (message.includes('Error processing schema:') ||
|
|
18
|
+
message.includes('Cannot find type metadata')) {
|
|
19
|
+
return; // Suppress these harmless errors
|
|
20
|
+
}
|
|
21
|
+
originalConsoleError.apply(console, args);
|
|
22
|
+
};
|
|
7
23
|
const server_js_1 = require("./server.js");
|
|
8
24
|
async function main() {
|
|
9
25
|
const server = new server_js_1.LaunchpadMCPServer();
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA;;GAEG;;AAEH,2CAAiD;AAEjD,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAI,8BAAkB,EAAE,CAAC;IAExC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AACA;;GAEG;;AAEH,+EAA+E;AAC/E,4EAA4E;AAC5E,OAAO,CAAC,GAAG,CAAC,4BAA4B,GAAG,OAAO,CAAC,GAAG,CAAC,4BAA4B,IAAI,OAAO,CAAC;AAE/F,+FAA+F;AAC/F,6GAA6G;AAC7G,6EAA6E;AAC7E,MAAM,oBAAoB,GAAG,OAAO,CAAC,KAAK,CAAC;AAC3C,OAAO,CAAC,KAAK,GAAG,CAAC,GAAG,IAAe,EAAE,EAAE;IACrC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACtC,oEAAoE;IACpE,IAAI,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC;QAC5C,OAAO,CAAC,QAAQ,CAAC,2BAA2B,CAAC,EAAE,CAAC;QAClD,OAAO,CAAC,iCAAiC;IAC3C,CAAC;IACD,oBAAoB,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,2CAAiD;AAEjD,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAI,8BAAkB,EAAE,CAAC;IAExC,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -11,5 +11,10 @@ export declare const getSwapQuoteExactOutputTool: MCPTool;
|
|
|
11
11
|
export declare const executeSwapTool: MCPTool;
|
|
12
12
|
export declare const getSwapUserAssetsTool: MCPTool;
|
|
13
13
|
export declare const getSwapPoolInfoTool: MCPTool;
|
|
14
|
+
export declare const fetchCompositePoolDataTool: MCPTool;
|
|
15
|
+
export declare const calculateDexPoolQuoteLocalTool: MCPTool;
|
|
16
|
+
export declare const calculateDexPoolQuoteExternalTool: MCPTool;
|
|
17
|
+
export declare const getSwapPoolPriceTool: MCPTool;
|
|
18
|
+
export declare const getAllSwapUserAssetsTool: MCPTool;
|
|
14
19
|
export declare const dexTools: MCPTool[];
|
|
15
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/dex/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAqClD,eAAO,MAAM,0BAA0B,EAAE,OA6BxC,CAAC;AAGF,eAAO,MAAM,2BAA2B,EAAE,OA6BzC,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,OAuD7B,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,OA0BnC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,OAwBjC,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/dex/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAqClD,eAAO,MAAM,0BAA0B,EAAE,OA6BxC,CAAC;AAGF,eAAO,MAAM,2BAA2B,EAAE,OA6BzC,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,OAuD7B,CAAC;AAGF,eAAO,MAAM,qBAAqB,EAAE,OA0BnC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,OAwBjC,CAAC;AASF,eAAO,MAAM,0BAA0B,EAAE,OAsCxC,CAAC;AAGF,eAAO,MAAM,8BAA8B,EAAE,OAqE5C,CAAC;AAGF,eAAO,MAAM,iCAAiC,EAAE,OA0D/C,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,OA6BlC,CAAC;AAGF,eAAO,MAAM,wBAAwB,EAAE,OA2BtC,CAAC;AAGF,eAAO,MAAM,QAAQ,EAAE,OAAO,EAgB7B,CAAC"}
|
package/dist/tools/dex/index.js
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Provides quote generation, swap execution, liquidity management, asset management, and pool exploration.
|
|
8
8
|
*/
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.dexTools = exports.getSwapPoolInfoTool = exports.getSwapUserAssetsTool = exports.executeSwapTool = exports.getSwapQuoteExactOutputTool = exports.getSwapQuoteExactInputTool = void 0;
|
|
10
|
+
exports.dexTools = exports.getAllSwapUserAssetsTool = exports.getSwapPoolPriceTool = exports.calculateDexPoolQuoteExternalTool = exports.calculateDexPoolQuoteLocalTool = exports.fetchCompositePoolDataTool = exports.getSwapPoolInfoTool = exports.getSwapUserAssetsTool = exports.executeSwapTool = exports.getSwapQuoteExactOutputTool = exports.getSwapQuoteExactInputTool = void 0;
|
|
11
11
|
const liquidity_positions_js_1 = require("./liquidity-positions.js");
|
|
12
12
|
const fetchDexPools_js_1 = require("./fetchDexPools.js");
|
|
13
13
|
const fetchAllDexPools_js_1 = require("./fetchAllDexPools.js");
|
|
@@ -197,7 +197,234 @@ exports.getSwapPoolInfoTool = {
|
|
|
197
197
|
});
|
|
198
198
|
}),
|
|
199
199
|
};
|
|
200
|
-
//
|
|
200
|
+
// Token class key for DEX (full pipe-delimited format)
|
|
201
|
+
const TOKEN_CLASS_KEY_SCHEMA = {
|
|
202
|
+
type: 'string',
|
|
203
|
+
description: 'Full token class key in pipe-delimited format (e.g., "GALA|Unit|none|none" or "Token|Unit|SYMBOL|client:xxx")',
|
|
204
|
+
};
|
|
205
|
+
// 6. Fetch Composite Pool Data
|
|
206
|
+
exports.fetchCompositePoolDataTool = {
|
|
207
|
+
name: 'gala_launchpad_fetch_composite_pool_data',
|
|
208
|
+
description: 'Fetch complete pool state for offline DEX quote calculations. Returns pool liquidity, tick data, and token balances. Use this for bulk pricing operations or when you need multiple quotes for the same pool.',
|
|
209
|
+
inputSchema: {
|
|
210
|
+
type: 'object',
|
|
211
|
+
properties: {
|
|
212
|
+
token0: {
|
|
213
|
+
...TOKEN_CLASS_KEY_SCHEMA,
|
|
214
|
+
description: 'First token class key (e.g., "GALA|Unit|none|none")',
|
|
215
|
+
},
|
|
216
|
+
token1: {
|
|
217
|
+
...TOKEN_CLASS_KEY_SCHEMA,
|
|
218
|
+
description: 'Second token class key (e.g., "Token|Unit|BENE|client:5c806869e7fd0e2384461ce9")',
|
|
219
|
+
},
|
|
220
|
+
fee: FEE_TIER_SCHEMA,
|
|
221
|
+
},
|
|
222
|
+
required: ['token0', 'token1', 'fee'],
|
|
223
|
+
},
|
|
224
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
225
|
+
const composite = await sdk.fetchCompositePoolData({
|
|
226
|
+
token0: args.token0,
|
|
227
|
+
token1: args.token1,
|
|
228
|
+
fee: args.fee,
|
|
229
|
+
});
|
|
230
|
+
return (0, response_formatter_js_1.formatSuccess)({
|
|
231
|
+
token0: args.token0,
|
|
232
|
+
token1: args.token1,
|
|
233
|
+
fee: args.fee,
|
|
234
|
+
token0Decimals: composite.token0Decimals,
|
|
235
|
+
token1Decimals: composite.token1Decimals,
|
|
236
|
+
poolLiquidity: composite.pool.liquidity.toString(),
|
|
237
|
+
tick: composite.pool.tick,
|
|
238
|
+
sqrtPrice: composite.pool.sqrtPrice.toString(),
|
|
239
|
+
tickDataCount: Object.keys(composite.tickDataMap).length,
|
|
240
|
+
message: `Composite pool data fetched for ${args.token0}/${args.token1} (${args.fee / 10000}% fee)`,
|
|
241
|
+
});
|
|
242
|
+
}),
|
|
243
|
+
};
|
|
244
|
+
// 7. Calculate DEX Pool Quote (Local - instant offline calculation)
|
|
245
|
+
exports.calculateDexPoolQuoteLocalTool = {
|
|
246
|
+
name: 'gala_launchpad_calculate_dex_pool_quote_local',
|
|
247
|
+
description: 'Calculate instant DEX quote using local bonding curve math. Auto-fetches pool data unless compositePoolData is provided (for bulk efficiency).',
|
|
248
|
+
inputSchema: {
|
|
249
|
+
type: 'object',
|
|
250
|
+
properties: {
|
|
251
|
+
token0: {
|
|
252
|
+
...TOKEN_CLASS_KEY_SCHEMA,
|
|
253
|
+
description: 'First token in pool (e.g., "GALA|Unit|none|none")',
|
|
254
|
+
},
|
|
255
|
+
token1: {
|
|
256
|
+
...TOKEN_CLASS_KEY_SCHEMA,
|
|
257
|
+
description: 'Second token in pool (e.g., "Token|Unit|BENE|client:xxx")',
|
|
258
|
+
},
|
|
259
|
+
fee: FEE_TIER_SCHEMA,
|
|
260
|
+
fromToken: {
|
|
261
|
+
...TOKEN_CLASS_KEY_SCHEMA,
|
|
262
|
+
description: 'Token to swap FROM',
|
|
263
|
+
},
|
|
264
|
+
toToken: {
|
|
265
|
+
...TOKEN_CLASS_KEY_SCHEMA,
|
|
266
|
+
description: 'Token to swap TO',
|
|
267
|
+
},
|
|
268
|
+
amount: {
|
|
269
|
+
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
270
|
+
description: 'Amount of fromToken to swap',
|
|
271
|
+
},
|
|
272
|
+
compositePoolData: {
|
|
273
|
+
type: 'string',
|
|
274
|
+
description: 'Optional: Pre-fetched composite pool data as JSON string from gala_launchpad_fetch_composite_pool_data. If provided, skips fetch for efficiency (ideal for bulk quotes).',
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
required: ['token0', 'token1', 'fee', 'fromToken', 'toToken', 'amount'],
|
|
278
|
+
},
|
|
279
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
280
|
+
// Use provided composite data or fetch it
|
|
281
|
+
let composite;
|
|
282
|
+
if (args.compositePoolData) {
|
|
283
|
+
composite = JSON.parse(args.compositePoolData);
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
composite = await sdk.fetchCompositePoolData({
|
|
287
|
+
token0: args.token0,
|
|
288
|
+
token1: args.token1,
|
|
289
|
+
fee: args.fee,
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
// Calculate quote locally
|
|
293
|
+
const quote = await sdk.calculateDexPoolQuoteExactAmountLocal({
|
|
294
|
+
compositePoolData: composite,
|
|
295
|
+
fromToken: args.fromToken,
|
|
296
|
+
toToken: args.toToken,
|
|
297
|
+
amount: args.amount,
|
|
298
|
+
});
|
|
299
|
+
return (0, response_formatter_js_1.formatSuccess)({
|
|
300
|
+
mode: 'local',
|
|
301
|
+
fromToken: args.fromToken,
|
|
302
|
+
toToken: args.toToken,
|
|
303
|
+
inputAmount: quote.amount0,
|
|
304
|
+
outputAmount: quote.amount1,
|
|
305
|
+
currentSqrtPrice: quote.currentSqrtPrice,
|
|
306
|
+
newSqrtPrice: quote.newSqrtPrice,
|
|
307
|
+
priceImpact: quote.priceImpact,
|
|
308
|
+
executionPrice: quote.executionPrice,
|
|
309
|
+
usedCachedData: !!args.compositePoolData,
|
|
310
|
+
message: `Local quote: ${quote.amount0} ${args.fromToken} → ${quote.amount1} ${args.toToken}${args.compositePoolData ? ' (using cached pool data)' : ''}`,
|
|
311
|
+
});
|
|
312
|
+
}),
|
|
313
|
+
};
|
|
314
|
+
// 8. Calculate DEX Pool Quote (External - real-time from blockchain)
|
|
315
|
+
exports.calculateDexPoolQuoteExternalTool = {
|
|
316
|
+
name: 'gala_launchpad_calculate_dex_pool_quote_external',
|
|
317
|
+
description: 'Calculate real-time DEX quote from GalaChain blockchain. Slower than local but always reflects current pool state. Use for final price verification.',
|
|
318
|
+
inputSchema: {
|
|
319
|
+
type: 'object',
|
|
320
|
+
properties: {
|
|
321
|
+
token0: {
|
|
322
|
+
...TOKEN_CLASS_KEY_SCHEMA,
|
|
323
|
+
description: 'First token in pool (e.g., "GALA|Unit|none|none")',
|
|
324
|
+
},
|
|
325
|
+
token1: {
|
|
326
|
+
...TOKEN_CLASS_KEY_SCHEMA,
|
|
327
|
+
description: 'Second token in pool (e.g., "Token|Unit|BENE|client:xxx")',
|
|
328
|
+
},
|
|
329
|
+
fee: FEE_TIER_SCHEMA,
|
|
330
|
+
fromToken: {
|
|
331
|
+
...TOKEN_CLASS_KEY_SCHEMA,
|
|
332
|
+
description: 'Token to swap FROM',
|
|
333
|
+
},
|
|
334
|
+
toToken: {
|
|
335
|
+
...TOKEN_CLASS_KEY_SCHEMA,
|
|
336
|
+
description: 'Token to swap TO',
|
|
337
|
+
},
|
|
338
|
+
amount: {
|
|
339
|
+
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
340
|
+
description: 'Amount of fromToken to swap',
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
required: ['token0', 'token1', 'fee', 'fromToken', 'toToken', 'amount'],
|
|
344
|
+
},
|
|
345
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
346
|
+
// Fetch composite pool data first
|
|
347
|
+
const composite = await sdk.fetchCompositePoolData({
|
|
348
|
+
token0: args.token0,
|
|
349
|
+
token1: args.token1,
|
|
350
|
+
fee: args.fee,
|
|
351
|
+
});
|
|
352
|
+
// Calculate quote from blockchain
|
|
353
|
+
const quote = await sdk.calculateDexPoolQuoteExactAmountExternal({
|
|
354
|
+
compositePoolData: composite,
|
|
355
|
+
fromToken: args.fromToken,
|
|
356
|
+
toToken: args.toToken,
|
|
357
|
+
amount: args.amount,
|
|
358
|
+
});
|
|
359
|
+
return (0, response_formatter_js_1.formatSuccess)({
|
|
360
|
+
mode: 'external',
|
|
361
|
+
fromToken: args.fromToken,
|
|
362
|
+
toToken: args.toToken,
|
|
363
|
+
inputAmount: quote.amount0,
|
|
364
|
+
outputAmount: quote.amount1,
|
|
365
|
+
currentSqrtPrice: quote.currentSqrtPrice,
|
|
366
|
+
newSqrtPrice: quote.newSqrtPrice,
|
|
367
|
+
priceImpact: quote.priceImpact,
|
|
368
|
+
executionPrice: quote.executionPrice,
|
|
369
|
+
message: `External quote: ${quote.amount0} ${args.fromToken} → ${quote.amount1} ${args.toToken}`,
|
|
370
|
+
});
|
|
371
|
+
}),
|
|
372
|
+
};
|
|
373
|
+
// 9. Get Swap Pool Price
|
|
374
|
+
exports.getSwapPoolPriceTool = {
|
|
375
|
+
name: 'gala_launchpad_get_swap_pool_price',
|
|
376
|
+
description: 'Get current price, tick, and liquidity for a DEX pool. Use to check if liquidity positions are in-range.',
|
|
377
|
+
inputSchema: {
|
|
378
|
+
type: 'object',
|
|
379
|
+
properties: {
|
|
380
|
+
token0: TOKEN_SYMBOL_SCHEMA,
|
|
381
|
+
token1: TOKEN_SYMBOL_SCHEMA,
|
|
382
|
+
fee: FEE_TIER_SCHEMA,
|
|
383
|
+
},
|
|
384
|
+
required: ['token0', 'token1', 'fee'],
|
|
385
|
+
},
|
|
386
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
387
|
+
const priceData = await sdk.getSwapPoolPrice(args.token0, args.token1, args.fee);
|
|
388
|
+
return (0, response_formatter_js_1.formatSuccess)({
|
|
389
|
+
token0: args.token0,
|
|
390
|
+
token1: args.token1,
|
|
391
|
+
fee: args.fee,
|
|
392
|
+
price: priceData.price,
|
|
393
|
+
tick: priceData.tick,
|
|
394
|
+
liquidity: priceData.liquidity,
|
|
395
|
+
message: `Pool price: ${priceData.price} ${args.token1} per ${args.token0} (tick: ${priceData.tick})`,
|
|
396
|
+
});
|
|
397
|
+
}),
|
|
398
|
+
};
|
|
399
|
+
// 10. Get All Swap User Assets (auto-paginated)
|
|
400
|
+
exports.getAllSwapUserAssetsTool = {
|
|
401
|
+
name: 'gala_launchpad_get_all_swap_user_assets',
|
|
402
|
+
description: 'Get ALL token assets and balances for a wallet (auto-paginates). Complete portfolio view for DEX trading.',
|
|
403
|
+
inputSchema: {
|
|
404
|
+
type: 'object',
|
|
405
|
+
properties: {
|
|
406
|
+
walletAddress: {
|
|
407
|
+
...common_schemas_js_1.ADDRESS_SCHEMA,
|
|
408
|
+
description: 'Wallet address to query (e.g., "0x1234..." or "eth|1234...")',
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
required: ['walletAddress'],
|
|
412
|
+
},
|
|
413
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
414
|
+
const assets = await sdk.getAllSwapUserAssets(args.walletAddress);
|
|
415
|
+
return (0, response_formatter_js_1.formatSuccess)({
|
|
416
|
+
walletAddress: args.walletAddress,
|
|
417
|
+
assetCount: assets.length,
|
|
418
|
+
assets: assets.map((asset) => ({
|
|
419
|
+
symbol: asset.symbol,
|
|
420
|
+
balance: asset.balance,
|
|
421
|
+
decimals: asset.decimals,
|
|
422
|
+
})),
|
|
423
|
+
message: `${assets.length} total assets found for wallet ${args.walletAddress} (fully paginated)`,
|
|
424
|
+
});
|
|
425
|
+
}),
|
|
426
|
+
};
|
|
427
|
+
// Export all DEX tools (2 pool discovery + 4 leaderboard + 1 volume + 10 swap/quote tools + 9 liquidity position tools = 26 tools)
|
|
201
428
|
exports.dexTools = [
|
|
202
429
|
fetchDexPools_js_1.fetchDexPoolsTool,
|
|
203
430
|
fetchAllDexPools_js_1.fetchAllDexPoolsTool,
|
|
@@ -206,6 +433,11 @@ exports.dexTools = [
|
|
|
206
433
|
exports.executeSwapTool,
|
|
207
434
|
exports.getSwapUserAssetsTool,
|
|
208
435
|
exports.getSwapPoolInfoTool,
|
|
436
|
+
exports.fetchCompositePoolDataTool,
|
|
437
|
+
exports.calculateDexPoolQuoteLocalTool,
|
|
438
|
+
exports.calculateDexPoolQuoteExternalTool,
|
|
439
|
+
exports.getSwapPoolPriceTool,
|
|
440
|
+
exports.getAllSwapUserAssetsTool,
|
|
209
441
|
...leaderboard_js_1.leaderboardTools,
|
|
210
442
|
...volume_js_1.volumeTools,
|
|
211
443
|
...liquidity_positions_js_1.liquidityPositionTools,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/dex/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,qEAAkE;AAClE,yDAAuD;AACvD,+DAA6D;AAC7D,qDAAoD;AACpD,2CAA0C;AAC1C,6EAAkE;AAClE,mEAAiE;AACjE,uEAGyC;AAEzC,+BAA+B;AAC/B,MAAM,mBAAmB,GAAG;IAC1B,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,CAAC;IACZ,SAAS,EAAE,EAAE;IACb,WAAW,EAAE,sCAAsC;CACpD,CAAC;AAEF,0CAA0C;AAC1C,MAAM,eAAe,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC;IACxB,WAAW,EAAE,oEAAoE;CAClF,CAAC;AAEF,qBAAqB;AACrB,MAAM,yBAAyB,GAAG;IAChC,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,CAAC;IACV,WAAW,EAAE,mDAAmD;CACjE,CAAC;AAEF,kCAAk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,MAAM,CAAC,MAAM;YACzB,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC7B,MAAM,EAAE,KAAK,CAAC,MAAM;gBACpB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;aACzB,CAAC,CAAC;YACH,OAAO,EAAE,GAAG,MAAM,CAAC,MAAM,kCAAkC,IAAI,CAAC,aAAa,oBAAoB;SAClG,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC;AAEF,mIAAmI;AACtH,QAAA,QAAQ,GAAc;IACjC,oCAAiB;IACjB,0CAAoB;IACpB,kCAA0B;IAC1B,mCAA2B;IAC3B,uBAAe;IACf,6BAAqB;IACrB,2BAAmB;IACnB,kCAA0B;IAC1B,sCAA8B;IAC9B,yCAAiC;IACjC,4BAAoB;IACpB,gCAAwB;IACxB,GAAG,iCAAgB;IACnB,GAAG,uBAAW;IACd,GAAG,+CAAsB;CAC1B,CAAC"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
* @see src/utils/tool-registry.ts
|
|
8
8
|
*/
|
|
9
9
|
/**
|
|
10
|
-
* Enhanced tool registry with validation (
|
|
11
|
-
* - Pools:
|
|
10
|
+
* Enhanced tool registry with validation (91 tools total):
|
|
11
|
+
* - Pools: 19 tools (pool operations + 2 watchers: onDexPoolCreation, onLaunchpadTokenCreation)
|
|
12
12
|
* - Trading: 13 tools (buy, sell, calculate amounts, graduation)
|
|
13
|
-
* - DEX/GalaSwap:
|
|
14
|
-
* - Balance:
|
|
13
|
+
* - DEX/GalaSwap: 26 tools (10 swap/quote + 9 liquidity + 2 pool discovery + 4 leaderboard + 1 volume)
|
|
14
|
+
* - Balance: 6 tools (balance queries and profile)
|
|
15
15
|
* - Creation: 4 tools (token creation and launch)
|
|
16
16
|
* - Social: 2 tools (comments and interactions)
|
|
17
17
|
* - Transfers: 2 tools (GALA and token transfers)
|
|
18
18
|
* - Locks: 2 tools (token lock/unlock for staking, escrow)
|
|
19
|
-
* - Utilities: 17 tools (config, version, environment, wallet, faucet, cleanup, etc.)
|
|
19
|
+
* - Utilities: 17 tools (config, version, environment, wallet, cache, faucet, cleanup, etc.)
|
|
20
20
|
*/
|
|
21
21
|
export declare const registry: import("../utils/tool-registry.js").ToolRegistry;
|
|
22
22
|
/**
|
package/dist/tools/index.js
CHANGED
|
@@ -70,18 +70,18 @@ const toolCategories = [
|
|
|
70
70
|
},
|
|
71
71
|
];
|
|
72
72
|
/**
|
|
73
|
-
* Enhanced tool registry with validation (
|
|
74
|
-
* - Pools:
|
|
73
|
+
* Enhanced tool registry with validation (91 tools total):
|
|
74
|
+
* - Pools: 19 tools (pool operations + 2 watchers: onDexPoolCreation, onLaunchpadTokenCreation)
|
|
75
75
|
* - Trading: 13 tools (buy, sell, calculate amounts, graduation)
|
|
76
|
-
* - DEX/GalaSwap:
|
|
77
|
-
* - Balance:
|
|
76
|
+
* - DEX/GalaSwap: 26 tools (10 swap/quote + 9 liquidity + 2 pool discovery + 4 leaderboard + 1 volume)
|
|
77
|
+
* - Balance: 6 tools (balance queries and profile)
|
|
78
78
|
* - Creation: 4 tools (token creation and launch)
|
|
79
79
|
* - Social: 2 tools (comments and interactions)
|
|
80
80
|
* - Transfers: 2 tools (GALA and token transfers)
|
|
81
81
|
* - Locks: 2 tools (token lock/unlock for staking, escrow)
|
|
82
|
-
* - Utilities: 17 tools (config, version, environment, wallet, faucet, cleanup, etc.)
|
|
82
|
+
* - Utilities: 17 tools (config, version, environment, wallet, cache, faucet, cleanup, etc.)
|
|
83
83
|
*/
|
|
84
|
-
exports.registry = (0, tool_registry_js_1.createToolRegistry)(toolCategories,
|
|
84
|
+
exports.registry = (0, tool_registry_js_1.createToolRegistry)(toolCategories, 91);
|
|
85
85
|
/**
|
|
86
86
|
* Complete tool array (for backward compatibility)
|
|
87
87
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAllPools.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,eAAO,MAAM,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"fetchAllPools.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,eAAO,MAAM,iBAAiB,EAAE,OA8B/B,CAAC"}
|
|
@@ -11,16 +11,10 @@ const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
|
11
11
|
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
12
12
|
exports.fetchAllPoolsTool = {
|
|
13
13
|
name: 'gala_launchpad_fetch_all_pools',
|
|
14
|
-
description: 'Fetch all available pools with automatic pagination. No page/limit parameters needed - returns ALL pools matching filters.',
|
|
14
|
+
description: 'Fetch all available pools with automatic pagination. No page/limit parameters needed - returns ALL pools matching filters. Note: For search functionality, use gala_launchpad_fetch_pools (paginated version) instead.',
|
|
15
15
|
inputSchema: {
|
|
16
16
|
type: 'object',
|
|
17
17
|
properties: {
|
|
18
|
-
search: {
|
|
19
|
-
type: 'string',
|
|
20
|
-
minLength: 1,
|
|
21
|
-
maxLength: 100,
|
|
22
|
-
description: 'Optional search query (fuzzy match filter)',
|
|
23
|
-
},
|
|
24
18
|
tokenName: {
|
|
25
19
|
type: 'string',
|
|
26
20
|
minLength: 3,
|
|
@@ -37,8 +31,7 @@ exports.fetchAllPoolsTool = {
|
|
|
37
31
|
},
|
|
38
32
|
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
39
33
|
const options = {};
|
|
40
|
-
|
|
41
|
-
options.search = args.search;
|
|
34
|
+
// Note: search parameter removed - not supported in auto-pagination endpoint
|
|
42
35
|
if (args.tokenName)
|
|
43
36
|
options.tokenName = args.tokenName;
|
|
44
37
|
if (args.type)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchAllPools.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPools.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEpD,QAAA,iBAAiB,GAAY;IACxC,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"fetchAllPools.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchAllPools.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEpD,QAAA,iBAAiB,GAAY;IACxC,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE,wNAAwN;IACrO,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,CAAC;gBACZ,SAAS,EAAE,EAAE;gBACb,OAAO,EAAE,qBAAqB;gBAC9B,WAAW,EAAE,0CAA0C;aACxD;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;gBAC3B,WAAW,EAAE,0CAA0C;aACxD;SACF;KACF;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,OAAO,GAA4B,EAAE,CAAC;QAC5C,6EAA6E;QAC7E,IAAI,IAAI,CAAC,SAAS;YAAE,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,SAAmB,CAAC;QACjE,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,IAA4B,CAAC;QAEhE,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QAEhD,OAAO,IAAA,qCAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cleanup Tool
|
|
3
|
+
*
|
|
4
|
+
* Cleans up SDK resources including HTTP interceptors and WebSocket connections.
|
|
5
|
+
* Call this when shutting down to prevent memory leaks and ensure proper resource management.
|
|
6
|
+
*/
|
|
7
|
+
import type { MCPTool } from '../../types/mcp.js';
|
|
8
|
+
export declare const cleanupTool: MCPTool;
|
|
9
|
+
//# sourceMappingURL=cleanup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/cleanup.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,eAAO,MAAM,WAAW,EAAE,OAgBzB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Cleanup Tool
|
|
4
|
+
*
|
|
5
|
+
* Cleans up SDK resources including HTTP interceptors and WebSocket connections.
|
|
6
|
+
* Call this when shutting down to prevent memory leaks and ensure proper resource management.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.cleanupTool = void 0;
|
|
10
|
+
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
11
|
+
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
12
|
+
exports.cleanupTool = {
|
|
13
|
+
name: 'gala_launchpad_cleanup',
|
|
14
|
+
description: 'Clean up SDK resources (HTTP interceptors, WebSocket connections). Call when done using the SDK to prevent memory leaks.',
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {},
|
|
18
|
+
},
|
|
19
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk) => {
|
|
20
|
+
await sdk.cleanup();
|
|
21
|
+
return (0, response_formatter_js_1.formatSuccess)({
|
|
22
|
+
message: 'SDK cleanup completed successfully',
|
|
23
|
+
cleanedResources: ['HTTP interceptors', 'WebSocket connections'],
|
|
24
|
+
});
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=cleanup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../src/tools/utils/cleanup.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mEAAiE;AACjE,6EAAkE;AAGrD,QAAA,WAAW,GAAY;IAClC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EACT,0HAA0H;IAC5H,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;KACf;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACvC,MAAM,GAAG,CAAC,OAAO,EAAE,CAAC;QAEpB,OAAO,IAAA,qCAAa,EAAC;YACnB,OAAO,EAAE,oCAAoC;YAC7C,gBAAgB,EAAE,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;SACjE,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAoBH,eAAO,MAAM,YAAY,wCAkBxB,CAAC"}
|
|
@@ -19,6 +19,8 @@ const getWallet_js_1 = require("./getWallet.js");
|
|
|
19
19
|
const setWallet_js_1 = require("./setWallet.js");
|
|
20
20
|
const getEnvironment_js_1 = require("./getEnvironment.js");
|
|
21
21
|
const switchEnvironment_js_1 = require("./switchEnvironment.js");
|
|
22
|
+
const retrieveFromFaucet_js_1 = require("./retrieveFromFaucet.js");
|
|
23
|
+
const cleanup_js_1 = require("./cleanup.js");
|
|
22
24
|
exports.utilityTools = [
|
|
23
25
|
createWallet_js_1.createWalletTool,
|
|
24
26
|
getAddress_js_1.getAddressTool,
|
|
@@ -35,5 +37,7 @@ exports.utilityTools = [
|
|
|
35
37
|
setWallet_js_1.setWalletTool,
|
|
36
38
|
getEnvironment_js_1.getEnvironmentTool,
|
|
37
39
|
switchEnvironment_js_1.switchEnvironmentTool,
|
|
40
|
+
retrieveFromFaucet_js_1.retrieveFromFaucetTool,
|
|
41
|
+
cleanup_js_1.cleanupTool,
|
|
38
42
|
];
|
|
39
43
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uDAAqD;AACrD,mDAAiD;AACjD,mEAAiE;AACjE,iDAA+C;AAC/C,iEAA+D;AAC/D,6DAA2D;AAC3D,+DAA6D;AAC7D,uDAAqD;AACrD,mDAAiD;AACjD,mDAAiD;AACjD,iDAA+C;AAC/C,iDAA+C;AAC/C,iDAA+C;AAC/C,2DAAyD;AACzD,iEAA+D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/utils/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uDAAqD;AACrD,mDAAiD;AACjD,mEAAiE;AACjE,iDAA+C;AAC/C,iEAA+D;AAC/D,6DAA2D;AAC3D,+DAA6D;AAC7D,uDAAqD;AACrD,mDAAiD;AACjD,mDAAiD;AACjD,iDAA+C;AAC/C,iDAA+C;AAC/C,iDAA+C;AAC/C,2DAAyD;AACzD,iEAA+D;AAC/D,mEAAiE;AACjE,6CAA2C;AAE9B,QAAA,YAAY,GAAG;IAC1B,kCAAgB;IAChB,8BAAc;IACd,8CAAsB;IACtB,4BAAa;IACb,4CAAqB;IACrB,wCAAmB;IACnB,0CAAoB;IACpB,kCAAgB;IAChB,8BAAc;IACd,8BAAc;IACd,4BAAa;IACb,4BAAa;IACb,4BAAa;IACb,sCAAkB;IAClB,4CAAqB;IACrB,8CAAsB;IACtB,wBAAW;CACZ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Retrieve From Faucet Tool
|
|
3
|
+
*
|
|
4
|
+
* Retrieves GALA from the faucet to a wallet address.
|
|
5
|
+
* Backend provides a fixed amount (5 GALA) regardless of amount parameter.
|
|
6
|
+
*/
|
|
7
|
+
import type { MCPTool } from '../../types/mcp.js';
|
|
8
|
+
export declare const retrieveFromFaucetTool: MCPTool;
|
|
9
|
+
//# sourceMappingURL=retrieveFromFaucet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieveFromFaucet.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/retrieveFromFaucet.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,eAAO,MAAM,sBAAsB,EAAE,OA0BpC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve From Faucet Tool
|
|
4
|
+
*
|
|
5
|
+
* Retrieves GALA from the faucet to a wallet address.
|
|
6
|
+
* Backend provides a fixed amount (5 GALA) regardless of amount parameter.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.retrieveFromFaucetTool = void 0;
|
|
10
|
+
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
11
|
+
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
12
|
+
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
13
|
+
exports.retrieveFromFaucetTool = {
|
|
14
|
+
name: 'gala_launchpad_retrieve_from_faucet',
|
|
15
|
+
description: 'Retrieve GALA from faucet to wallet. Backend provides a fixed amount (5 GALA). Useful for testing and development.',
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
properties: {
|
|
19
|
+
walletAddress: {
|
|
20
|
+
...common_schemas_js_1.ADDRESS_SCHEMA,
|
|
21
|
+
description: 'Optional wallet address override (defaults to SDK authenticated wallet). Format: "eth|0x..." or "0x..."',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
26
|
+
const walletAddress = args?.walletAddress;
|
|
27
|
+
await sdk.retrieveGalaFromFaucet(walletAddress);
|
|
28
|
+
return (0, response_formatter_js_1.formatSuccess)({
|
|
29
|
+
message: 'Successfully retrieved 5 GALA from faucet',
|
|
30
|
+
walletAddress: walletAddress || sdk.getAddress(),
|
|
31
|
+
amount: '5',
|
|
32
|
+
token: 'GALA',
|
|
33
|
+
});
|
|
34
|
+
}),
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=retrieveFromFaucet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retrieveFromFaucet.js","sourceRoot":"","sources":["../../../src/tools/utils/retrieveFromFaucet.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mEAAiE;AACjE,6EAAkE;AAClE,uEAAiE;AAGpD,QAAA,sBAAsB,GAAY;IAC7C,IAAI,EAAE,qCAAqC;IAC3C,WAAW,EACT,oHAAoH;IACtH,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,aAAa,EAAE;gBACb,GAAG,kCAAc;gBACjB,WAAW,EACT,yGAAyG;aAC5G;SACF;KACF;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,aAAa,GAAG,IAAI,EAAE,aAAmC,CAAC;QAEhE,MAAM,GAAG,CAAC,sBAAsB,CAAC,aAAa,CAAC,CAAC;QAEhD,OAAO,IAAA,qCAAa,EAAC;YACnB,OAAO,EAAE,2CAA2C;YACpD,aAAa,EAAE,aAAa,IAAI,GAAG,CAAC,UAAU,EAAE;YAChD,MAAM,EAAE,GAAG;YACX,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;IACL,CAAC,CAAC;CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-mcp-server",
|
|
3
|
-
"version": "2.0.2-beta.
|
|
4
|
-
"description": "MCP server for Gala Launchpad -
|
|
3
|
+
"version": "2.0.2-beta.11",
|
|
4
|
+
"description": "MCP server for Gala Launchpad - 91 tools (pool management, event watchers, GSwap DEX trading, price history, token creation, wallet management, DEX pool discovery, liquidity positions, token locks, faucet, 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": {
|
|
7
7
|
"gala-launchpad-mcp": "./dist/index.js"
|
|
@@ -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": "4.0.1-beta.
|
|
76
|
+
"@gala-chain/launchpad-sdk": "4.0.1-beta.9",
|
|
77
77
|
"@humanwhocodes/config-array": "^0.13.0",
|
|
78
78
|
"@modelcontextprotocol/sdk": "^0.5.0",
|
|
79
79
|
"axios": "^1.12.2",
|