@gala-chain/launchpad-mcp-server 1.22.4 → 1.23.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/README.md +83 -8
- package/dist/constants/mcpToolNames.d.ts +69 -11
- package/dist/constants/mcpToolNames.d.ts.map +1 -1
- package/dist/constants/mcpToolNames.js +47 -9
- package/dist/constants/mcpToolNames.js.map +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/prompts/balances.d.ts +24 -0
- package/dist/prompts/balances.d.ts.map +1 -0
- package/dist/prompts/balances.js +191 -0
- package/dist/prompts/balances.js.map +1 -0
- package/dist/prompts/creation-utils.d.ts +20 -0
- package/dist/prompts/creation-utils.d.ts.map +1 -0
- package/dist/prompts/creation-utils.js +115 -0
- package/dist/prompts/creation-utils.js.map +1 -0
- package/dist/prompts/index.d.ts +9 -2
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +23 -2
- package/dist/prompts/index.js.map +1 -1
- package/dist/prompts/pools.d.ts +64 -0
- package/dist/prompts/pools.d.ts.map +1 -0
- package/dist/prompts/pools.js +548 -0
- package/dist/prompts/pools.js.map +1 -0
- package/dist/prompts/social.d.ts +16 -0
- package/dist/prompts/social.d.ts.map +1 -0
- package/dist/prompts/social.js +97 -0
- package/dist/prompts/social.js.map +1 -0
- package/dist/prompts/trading-calculations.d.ts +52 -0
- package/dist/prompts/trading-calculations.d.ts.map +1 -0
- package/dist/prompts/trading-calculations.js +479 -0
- package/dist/prompts/trading-calculations.js.map +1 -0
- package/dist/prompts/transfers.d.ts +16 -0
- package/dist/prompts/transfers.d.ts.map +1 -0
- package/dist/prompts/transfers.js +100 -0
- package/dist/prompts/transfers.js.map +1 -0
- package/dist/prompts/utility-tools.d.ts +56 -0
- package/dist/prompts/utility-tools.d.ts.map +1 -0
- package/dist/prompts/utility-tools.js +338 -0
- package/dist/prompts/utility-tools.js.map +1 -0
- package/docs/AI-AGENT-PATTERNS.md +555 -0
- package/docs/CONSTRAINTS-REFERENCE.md +454 -0
- package/docs/PROMPT-TOOL-MAPPING.md +352 -0
- package/docs/examples/default-values-pattern.md +240 -0
- package/docs/examples/tool-factory-pattern.md +217 -0
- package/jest.config.js +94 -0
- package/package.json +1 -1
- package/src/__tests__/integration/fetchTokenDetails.integration.test.ts +258 -0
- package/src/__tests__/integration/poolTools.integration.test.ts +185 -0
- package/src/__tests__/server.test.ts +256 -0
- package/src/constants/mcpToolNames.ts +181 -0
- package/src/index.ts +19 -0
- package/src/prompts/__tests__/promptStructure.test.ts +137 -0
- package/src/prompts/__tests__/registry.test.ts +359 -0
- package/src/prompts/analysis.ts +429 -0
- package/src/prompts/balances.ts +198 -0
- package/src/prompts/create-token.ts +123 -0
- package/src/prompts/creation-utils.ts +118 -0
- package/src/prompts/dex-trading.ts +86 -0
- package/src/prompts/discover-tokens.ts +86 -0
- package/src/prompts/index.ts +175 -0
- package/src/prompts/liquidity-positions.ts +270 -0
- package/src/prompts/pools.ts +571 -0
- package/src/prompts/portfolio.ts +242 -0
- package/src/prompts/social.ts +100 -0
- package/src/prompts/trading-calculations.ts +499 -0
- package/src/prompts/trading.ts +191 -0
- package/src/prompts/transfers.ts +103 -0
- package/src/prompts/utility-tools.ts +349 -0
- package/src/prompts/utility.ts +92 -0
- package/src/prompts/utils/workflowTemplates.ts +511 -0
- package/src/schemas/common-schemas.ts +393 -0
- package/src/scripts/test-all-prompts.ts +184 -0
- package/src/server.ts +367 -0
- package/src/tools/__tests__/dex-tools.test.ts +562 -0
- package/src/tools/__tests__/liquidity-positions.test.ts +673 -0
- package/src/tools/balance/index.ts +174 -0
- package/src/tools/creation/index.ts +182 -0
- package/src/tools/dex/index.ts +226 -0
- package/src/tools/dex/liquidity-positions.ts +547 -0
- package/src/tools/index.ts +94 -0
- package/src/tools/pools/fetchAllPools.ts +47 -0
- package/src/tools/pools/fetchAllPriceHistory.ts +119 -0
- package/src/tools/pools/fetchPoolDetails.ts +27 -0
- package/src/tools/pools/fetchPoolDetailsForCalculation.ts +22 -0
- package/src/tools/pools/fetchPools.ts +47 -0
- package/src/tools/pools/fetchPriceHistory.ts +124 -0
- package/src/tools/pools/fetchTokenDetails.ts +77 -0
- package/src/tools/pools/index.ts +284 -0
- package/src/tools/social/index.ts +64 -0
- package/src/tools/trading/index.ts +605 -0
- package/src/tools/transfers/index.ts +75 -0
- package/src/tools/utils/clearCache.ts +36 -0
- package/src/tools/utils/createWallet.ts +19 -0
- package/src/tools/utils/explainSdkUsage.ts +1446 -0
- package/src/tools/utils/getAddress.ts +12 -0
- package/src/tools/utils/getCacheInfo.ts +14 -0
- package/src/tools/utils/getConfig.ts +21 -0
- package/src/tools/utils/getEnvironment.ts +17 -0
- package/src/tools/utils/getEthereumAddress.ts +12 -0
- package/src/tools/utils/getUrlByTokenName.ts +12 -0
- package/src/tools/utils/getVersion.ts +25 -0
- package/src/tools/utils/getWallet.ts +25 -0
- package/src/tools/utils/hasWallet.ts +15 -0
- package/src/tools/utils/index.ts +37 -0
- package/src/tools/utils/isTokenGraduated.ts +16 -0
- package/src/tools/utils/setWallet.ts +41 -0
- package/src/tools/utils/switchEnvironment.ts +28 -0
- package/src/types/mcp.ts +72 -0
- package/src/utils/__tests__/validation.test.ts +147 -0
- package/src/utils/constraints.ts +155 -0
- package/src/utils/default-values.ts +208 -0
- package/src/utils/error-handler.ts +69 -0
- package/src/utils/error-templates.ts +273 -0
- package/src/utils/response-formatter.ts +51 -0
- package/src/utils/tool-factory.ts +303 -0
- package/src/utils/tool-registry.ts +296 -0
- package/src/utils/validation.ts +371 -0
- package/tests/wallet-management-integration.test.ts +284 -0
- package/tsconfig.json +23 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility Tools Prompts
|
|
3
|
+
*
|
|
4
|
+
* Slash commands for utility and system operations
|
|
5
|
+
*/
|
|
6
|
+
import type { MCPPrompt } from '../types/mcp.js';
|
|
7
|
+
/**
|
|
8
|
+
* Create Wallet - Generate new wallet
|
|
9
|
+
*/
|
|
10
|
+
export declare const createWalletPrompt: MCPPrompt;
|
|
11
|
+
/**
|
|
12
|
+
* Get Address - Get GalaChain address
|
|
13
|
+
*/
|
|
14
|
+
export declare const getAddressPrompt: MCPPrompt;
|
|
15
|
+
/**
|
|
16
|
+
* Get Ethereum Address - Get Ethereum address
|
|
17
|
+
*/
|
|
18
|
+
export declare const getEthereumAddressPrompt: MCPPrompt;
|
|
19
|
+
/**
|
|
20
|
+
* Get Config - View SDK configuration
|
|
21
|
+
*/
|
|
22
|
+
export declare const getConfigPrompt: MCPPrompt;
|
|
23
|
+
/**
|
|
24
|
+
* Get URL by Token Name - Generate launchpad URL
|
|
25
|
+
*/
|
|
26
|
+
export declare const getUrlByTokenNamePrompt: MCPPrompt;
|
|
27
|
+
/**
|
|
28
|
+
* Explain SDK Usage - SDK documentation helper
|
|
29
|
+
*/
|
|
30
|
+
export declare const explainSdkUsagePrompt: MCPPrompt;
|
|
31
|
+
/**
|
|
32
|
+
* Get Cache Info - Cache statistics
|
|
33
|
+
*/
|
|
34
|
+
export declare const getCacheInfoPrompt: MCPPrompt;
|
|
35
|
+
/**
|
|
36
|
+
* Clear Cache - Cache management
|
|
37
|
+
*/
|
|
38
|
+
export declare const clearCachePrompt: MCPPrompt;
|
|
39
|
+
/**
|
|
40
|
+
* Has Wallet - Check wallet status
|
|
41
|
+
*/
|
|
42
|
+
export declare const hasWalletPrompt: MCPPrompt;
|
|
43
|
+
/**
|
|
44
|
+
* Get Wallet - Get wallet instance
|
|
45
|
+
*/
|
|
46
|
+
export declare const getWalletPrompt: MCPPrompt;
|
|
47
|
+
/**
|
|
48
|
+
* Set Wallet - Configure wallet
|
|
49
|
+
*/
|
|
50
|
+
export declare const setWalletPrompt: MCPPrompt;
|
|
51
|
+
/**
|
|
52
|
+
* Get Environment - Current environment query
|
|
53
|
+
*/
|
|
54
|
+
export declare const getEnvironmentPrompt: MCPPrompt;
|
|
55
|
+
export declare const utilityToolPrompts: MCPPrompt[];
|
|
56
|
+
//# sourceMappingURL=utility-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility-tools.d.ts","sourceRoot":"","sources":["../../src/prompts/utility-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGjD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAqBhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAkB9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAkBtC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SAwB7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uBAAuB,EAAE,SA2BrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,SAyBnC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAqBhC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,SA2B9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SAoB7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SAoB7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,SA2B7B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAkBlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,SAAS,EAazC,CAAC"}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Utility Tools Prompts
|
|
4
|
+
*
|
|
5
|
+
* Slash commands for utility and system operations
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.utilityToolPrompts = exports.getEnvironmentPrompt = exports.setWalletPrompt = exports.getWalletPrompt = exports.hasWalletPrompt = exports.clearCachePrompt = exports.getCacheInfoPrompt = exports.explainSdkUsagePrompt = exports.getUrlByTokenNamePrompt = exports.getConfigPrompt = exports.getEthereumAddressPrompt = exports.getAddressPrompt = exports.createWalletPrompt = void 0;
|
|
9
|
+
const mcpToolNames_js_1 = require("../constants/mcpToolNames.js");
|
|
10
|
+
/**
|
|
11
|
+
* Create Wallet - Generate new wallet
|
|
12
|
+
*/
|
|
13
|
+
exports.createWalletPrompt = {
|
|
14
|
+
name: 'galachain-launchpad:create-wallet',
|
|
15
|
+
description: 'Generate a new wallet with random private key',
|
|
16
|
+
handler: () => {
|
|
17
|
+
return [
|
|
18
|
+
{
|
|
19
|
+
role: 'user',
|
|
20
|
+
content: {
|
|
21
|
+
type: 'text',
|
|
22
|
+
text: `Create a new wallet with random private key.
|
|
23
|
+
|
|
24
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.CREATE_WALLET} to generate:
|
|
25
|
+
- New wallet address
|
|
26
|
+
- Random private key
|
|
27
|
+
- Wallet credentials for authentication
|
|
28
|
+
|
|
29
|
+
Display the wallet details with a security warning about private key storage.`,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
];
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Get Address - Get GalaChain address
|
|
37
|
+
*/
|
|
38
|
+
exports.getAddressPrompt = {
|
|
39
|
+
name: 'galachain-launchpad:get-address',
|
|
40
|
+
description: 'Get the GalaChain address format of authenticated wallet',
|
|
41
|
+
handler: () => {
|
|
42
|
+
return [
|
|
43
|
+
{
|
|
44
|
+
role: 'user',
|
|
45
|
+
content: {
|
|
46
|
+
type: 'text',
|
|
47
|
+
text: `Get the GalaChain format address of the authenticated wallet.
|
|
48
|
+
|
|
49
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_ADDRESS} to retrieve the address in GalaChain format (eth|0x...).
|
|
50
|
+
|
|
51
|
+
Display the wallet address.`,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
},
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Get Ethereum Address - Get Ethereum address
|
|
59
|
+
*/
|
|
60
|
+
exports.getEthereumAddressPrompt = {
|
|
61
|
+
name: 'galachain-launchpad:get-ethereum-address',
|
|
62
|
+
description: 'Get the standard Ethereum address format of authenticated wallet',
|
|
63
|
+
handler: () => {
|
|
64
|
+
return [
|
|
65
|
+
{
|
|
66
|
+
role: 'user',
|
|
67
|
+
content: {
|
|
68
|
+
type: 'text',
|
|
69
|
+
text: `Get the standard Ethereum format address of the authenticated wallet.
|
|
70
|
+
|
|
71
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_ETHEREUM_ADDRESS} to retrieve the address in Ethereum format (0x...).
|
|
72
|
+
|
|
73
|
+
Display the wallet address.`,
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Get Config - View SDK configuration
|
|
81
|
+
*/
|
|
82
|
+
exports.getConfigPrompt = {
|
|
83
|
+
name: 'galachain-launchpad:get-config',
|
|
84
|
+
description: 'View current SDK and MCP server configuration',
|
|
85
|
+
handler: () => {
|
|
86
|
+
return [
|
|
87
|
+
{
|
|
88
|
+
role: 'user',
|
|
89
|
+
content: {
|
|
90
|
+
type: 'text',
|
|
91
|
+
text: `Get the current SDK and MCP server configuration.
|
|
92
|
+
|
|
93
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_CONFIG} to retrieve:
|
|
94
|
+
- Environment (production, development, testing)
|
|
95
|
+
- Base URLs
|
|
96
|
+
- Timeout settings
|
|
97
|
+
- Feature flags
|
|
98
|
+
- Effective slippage tolerance factors
|
|
99
|
+
- Current MCP server environment state
|
|
100
|
+
|
|
101
|
+
Display the configuration in a readable format.`,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
];
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Get URL by Token Name - Generate launchpad URL
|
|
109
|
+
*/
|
|
110
|
+
exports.getUrlByTokenNamePrompt = {
|
|
111
|
+
name: 'galachain-launchpad:get-url-by-token-name',
|
|
112
|
+
description: 'Get the launchpad frontend URL for a token',
|
|
113
|
+
arguments: [
|
|
114
|
+
{
|
|
115
|
+
name: 'tokenName',
|
|
116
|
+
description: 'Token name (e.g., anime)',
|
|
117
|
+
required: true,
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
handler: (args) => {
|
|
121
|
+
return [
|
|
122
|
+
{
|
|
123
|
+
role: 'user',
|
|
124
|
+
content: {
|
|
125
|
+
type: 'text',
|
|
126
|
+
text: `Get the launchpad frontend URL for a token.
|
|
127
|
+
|
|
128
|
+
Token: ${args.tokenName}
|
|
129
|
+
|
|
130
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_URL_BY_TOKEN_NAME} to generate the URL.
|
|
131
|
+
|
|
132
|
+
Display the complete launchpad URL for viewing/trading the token.`,
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
];
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Explain SDK Usage - SDK documentation helper
|
|
140
|
+
*/
|
|
141
|
+
exports.explainSdkUsagePrompt = {
|
|
142
|
+
name: 'galachain-launchpad:explain-sdk-usage',
|
|
143
|
+
description: 'Get detailed SDK usage examples for a topic',
|
|
144
|
+
arguments: [
|
|
145
|
+
{
|
|
146
|
+
name: 'topic',
|
|
147
|
+
description: 'Topic: buy-tokens, sell-tokens, pool-graduation, fetch-pools, balances, dex-trading, liquidity-positions, price-history, token-details, token-distribution, token-creation, profile-management, multi-wallet, transfers, error-handling, installation, local-calculations, mcp-to-sdk-mapping',
|
|
148
|
+
required: true,
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
handler: (args) => {
|
|
152
|
+
return [
|
|
153
|
+
{
|
|
154
|
+
role: 'user',
|
|
155
|
+
content: {
|
|
156
|
+
type: 'text',
|
|
157
|
+
text: `Get detailed SDK usage examples for topic: ${args.topic}
|
|
158
|
+
|
|
159
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.EXPLAIN_SDK_USAGE} to retrieve complete runnable code examples.
|
|
160
|
+
|
|
161
|
+
Display the examples with explanations for integrating the SDK directly.`,
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
];
|
|
165
|
+
},
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* Get Cache Info - Cache statistics
|
|
169
|
+
*/
|
|
170
|
+
exports.getCacheInfoPrompt = {
|
|
171
|
+
name: 'galachain-launchpad:get-cache-info',
|
|
172
|
+
description: 'Get token metadata cache statistics',
|
|
173
|
+
handler: () => {
|
|
174
|
+
return [
|
|
175
|
+
{
|
|
176
|
+
role: 'user',
|
|
177
|
+
content: {
|
|
178
|
+
type: 'text',
|
|
179
|
+
text: `Get token metadata cache statistics.
|
|
180
|
+
|
|
181
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_CACHE_INFO} to retrieve:
|
|
182
|
+
- Total tokens cached
|
|
183
|
+
- Cache size in bytes
|
|
184
|
+
- Timestamp of oldest entry
|
|
185
|
+
|
|
186
|
+
Display the cache information.`,
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
];
|
|
190
|
+
},
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Clear Cache - Cache management
|
|
194
|
+
*/
|
|
195
|
+
exports.clearCachePrompt = {
|
|
196
|
+
name: 'galachain-launchpad:clear-cache',
|
|
197
|
+
description: 'Clear token metadata cache',
|
|
198
|
+
arguments: [
|
|
199
|
+
{
|
|
200
|
+
name: 'tokenName',
|
|
201
|
+
description: 'Token name to clear (optional, clears all if not provided)',
|
|
202
|
+
required: false,
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
handler: (args) => {
|
|
206
|
+
return [
|
|
207
|
+
{
|
|
208
|
+
role: 'user',
|
|
209
|
+
content: {
|
|
210
|
+
type: 'text',
|
|
211
|
+
text: `Clear token metadata cache.
|
|
212
|
+
|
|
213
|
+
${args.tokenName ? `Token: ${args.tokenName}` : 'Clearing entire cache'}
|
|
214
|
+
|
|
215
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.CLEAR_CACHE} to clear the cache.
|
|
216
|
+
|
|
217
|
+
Display confirmation of cache clearing.`,
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
];
|
|
221
|
+
},
|
|
222
|
+
};
|
|
223
|
+
/**
|
|
224
|
+
* Has Wallet - Check wallet status
|
|
225
|
+
*/
|
|
226
|
+
exports.hasWalletPrompt = {
|
|
227
|
+
name: 'galachain-launchpad:has-wallet',
|
|
228
|
+
description: 'Check if a wallet is configured in the MCP server',
|
|
229
|
+
handler: () => {
|
|
230
|
+
return [
|
|
231
|
+
{
|
|
232
|
+
role: 'user',
|
|
233
|
+
content: {
|
|
234
|
+
type: 'text',
|
|
235
|
+
text: `Check wallet configuration status.
|
|
236
|
+
|
|
237
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.HAS_WALLET} to determine:
|
|
238
|
+
- Whether a wallet is configured
|
|
239
|
+
- Whether MCP server is in full-access or read-only mode
|
|
240
|
+
|
|
241
|
+
Display the wallet status clearly.`,
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
];
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Get Wallet - Get wallet instance
|
|
249
|
+
*/
|
|
250
|
+
exports.getWalletPrompt = {
|
|
251
|
+
name: 'galachain-launchpad:get-wallet',
|
|
252
|
+
description: 'Get the currently configured wallet instance',
|
|
253
|
+
handler: () => {
|
|
254
|
+
return [
|
|
255
|
+
{
|
|
256
|
+
role: 'user',
|
|
257
|
+
content: {
|
|
258
|
+
type: 'text',
|
|
259
|
+
text: `Get the currently configured wallet instance.
|
|
260
|
+
|
|
261
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_WALLET} to retrieve:
|
|
262
|
+
- Wallet object if available
|
|
263
|
+
- Null if in read-only mode
|
|
264
|
+
|
|
265
|
+
Display the wallet information.`,
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
];
|
|
269
|
+
},
|
|
270
|
+
};
|
|
271
|
+
/**
|
|
272
|
+
* Set Wallet - Configure wallet
|
|
273
|
+
*/
|
|
274
|
+
exports.setWalletPrompt = {
|
|
275
|
+
name: 'galachain-launchpad:set-wallet',
|
|
276
|
+
description: 'Configure a wallet for signing operations',
|
|
277
|
+
arguments: [
|
|
278
|
+
{
|
|
279
|
+
name: 'privateKey',
|
|
280
|
+
description: 'Private key in hex format (0x + 64 hex characters)',
|
|
281
|
+
required: true,
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
handler: (args) => {
|
|
285
|
+
return [
|
|
286
|
+
{
|
|
287
|
+
role: 'user',
|
|
288
|
+
content: {
|
|
289
|
+
type: 'text',
|
|
290
|
+
text: `Configure wallet for signing operations.
|
|
291
|
+
|
|
292
|
+
Private Key: ${args.privateKey.substring(0, 10)}...${args.privateKey.substring(60)}
|
|
293
|
+
|
|
294
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.SET_WALLET} to configure the wallet.
|
|
295
|
+
|
|
296
|
+
Display confirmation that wallet is configured for full-access mode.`,
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
];
|
|
300
|
+
},
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* Get Environment - Current environment query
|
|
304
|
+
*/
|
|
305
|
+
exports.getEnvironmentPrompt = {
|
|
306
|
+
name: 'galachain-launchpad:get-environment',
|
|
307
|
+
description: 'Get the current MCP server environment',
|
|
308
|
+
handler: () => {
|
|
309
|
+
return [
|
|
310
|
+
{
|
|
311
|
+
role: 'user',
|
|
312
|
+
content: {
|
|
313
|
+
type: 'text',
|
|
314
|
+
text: `Get the current MCP server environment.
|
|
315
|
+
|
|
316
|
+
Use ${mcpToolNames_js_1.MCP_TOOLS.GET_ENVIRONMENT} to retrieve the active environment.
|
|
317
|
+
|
|
318
|
+
Display the current environment (production, development, or testing).`,
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
];
|
|
322
|
+
},
|
|
323
|
+
};
|
|
324
|
+
exports.utilityToolPrompts = [
|
|
325
|
+
exports.createWalletPrompt,
|
|
326
|
+
exports.getAddressPrompt,
|
|
327
|
+
exports.getEthereumAddressPrompt,
|
|
328
|
+
exports.getConfigPrompt,
|
|
329
|
+
exports.getUrlByTokenNamePrompt,
|
|
330
|
+
exports.explainSdkUsagePrompt,
|
|
331
|
+
exports.getCacheInfoPrompt,
|
|
332
|
+
exports.clearCachePrompt,
|
|
333
|
+
exports.hasWalletPrompt,
|
|
334
|
+
exports.getWalletPrompt,
|
|
335
|
+
exports.setWalletPrompt,
|
|
336
|
+
exports.getEnvironmentPrompt,
|
|
337
|
+
];
|
|
338
|
+
//# sourceMappingURL=utility-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utility-tools.js","sourceRoot":"","sources":["../../src/prompts/utility-tools.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAGH,kEAAyD;AAEzD;;GAEG;AACU,QAAA,kBAAkB,GAAc;IAC3C,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,+CAA+C;IAC5D,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO;YACL;gBACE,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE;oBACP,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE;;MAEV,2BAAS,CAAC,aAAa;;;;;8EAKiD;iBACrE;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF;;GAEG;AACU,QAAA,gBAAgB,GAAc;IACzC,IAAI,EAAE,iCAAiC;IACvC,WAAW,EAAE,0DAA0D;IACvE,OAAO,EA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