@gala-chain/launchpad-mcp-server 1.0.0 → 1.0.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/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/server.js +19 -15
- package/dist/server.js.map +1 -1
- package/dist/tools/balance/index.d.ts.map +1 -1
- package/dist/tools/balance/index.js +77 -36
- package/dist/tools/balance/index.js.map +1 -1
- package/dist/tools/creation/index.js +53 -17
- package/dist/tools/creation/index.js.map +1 -1
- package/dist/tools/index.js +18 -15
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/pools/fetchPoolDetails.js +8 -5
- package/dist/tools/pools/fetchPoolDetails.js.map +1 -1
- package/dist/tools/pools/fetchPools.js +8 -5
- package/dist/tools/pools/fetchPools.js.map +1 -1
- package/dist/tools/pools/index.js +38 -35
- package/dist/tools/pools/index.js.map +1 -1
- package/dist/tools/social/index.js +12 -9
- package/dist/tools/social/index.js.map +1 -1
- package/dist/tools/trading/index.js +30 -27
- package/dist/tools/trading/index.js.map +1 -1
- package/dist/tools/transfers/index.js +12 -9
- package/dist/tools/transfers/index.js.map +1 -1
- package/dist/types/mcp.js +2 -1
- package/dist/types/mcp.js.map +1 -1
- package/dist/utils/error-handler.js +6 -2
- package/dist/utils/error-handler.js.map +1 -1
- package/dist/utils/response-formatter.js +8 -3
- package/dist/utils/response-formatter.js.map +1 -1
- package/package.json +2 -3
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Pool Management Tools
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.poolTools = exports.resolveVaultAddressTool = exports.checkTokenSymbolTool = exports.checkTokenNameTool = exports.fetchVolumeDataTool = exports.fetchTokenBadgesTool = exports.fetchTokenDistributionTool = exports.fetchPoolDetailsTool = exports.fetchPoolsTool = void 0;
|
|
7
|
+
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
8
|
+
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
6
9
|
// 1. Fetch Pools
|
|
7
|
-
|
|
10
|
+
exports.fetchPoolsTool = {
|
|
8
11
|
name: 'gala_launchpad_fetch_pools',
|
|
9
12
|
description: 'Fetch token pools from Gala Launchpad with filtering and pagination',
|
|
10
13
|
inputSchema: {
|
|
@@ -33,17 +36,17 @@ export const fetchPoolsTool = {
|
|
|
33
36
|
},
|
|
34
37
|
},
|
|
35
38
|
},
|
|
36
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
39
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
37
40
|
const result = await sdk.fetchPools({
|
|
38
41
|
type: args.type || 'recent',
|
|
39
42
|
page: args.page || 1,
|
|
40
43
|
limit: args.limit || 20,
|
|
41
44
|
});
|
|
42
|
-
return formatSuccess(result);
|
|
45
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
43
46
|
}),
|
|
44
47
|
};
|
|
45
48
|
// 2. Fetch Pool Details
|
|
46
|
-
|
|
49
|
+
exports.fetchPoolDetailsTool = {
|
|
47
50
|
name: 'gala_launchpad_fetch_pool_details',
|
|
48
51
|
description: 'Get detailed pool state from GalaChain bonding curve',
|
|
49
52
|
inputSchema: {
|
|
@@ -57,13 +60,13 @@ export const fetchPoolDetailsTool = {
|
|
|
57
60
|
},
|
|
58
61
|
required: ['tokenName'],
|
|
59
62
|
},
|
|
60
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
63
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
61
64
|
const result = await sdk.fetchPoolDetails(args.tokenName);
|
|
62
|
-
return formatSuccess(result);
|
|
65
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
63
66
|
}),
|
|
64
67
|
};
|
|
65
68
|
// 3. Fetch Token Distribution
|
|
66
|
-
|
|
69
|
+
exports.fetchTokenDistributionTool = {
|
|
67
70
|
name: 'gala_launchpad_fetch_token_distribution',
|
|
68
71
|
description: 'Get holder distribution and supply metrics',
|
|
69
72
|
inputSchema: {
|
|
@@ -77,13 +80,13 @@ export const fetchTokenDistributionTool = {
|
|
|
77
80
|
},
|
|
78
81
|
required: ['tokenName'],
|
|
79
82
|
},
|
|
80
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
83
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
81
84
|
const result = await sdk.fetchTokenDistribution(args.tokenName);
|
|
82
|
-
return formatSuccess(result);
|
|
85
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
83
86
|
}),
|
|
84
87
|
};
|
|
85
88
|
// 4. Fetch Token Badges
|
|
86
|
-
|
|
89
|
+
exports.fetchTokenBadgesTool = {
|
|
87
90
|
name: 'gala_launchpad_fetch_token_badges',
|
|
88
91
|
description: 'Get achievement badges for volume and engagement',
|
|
89
92
|
inputSchema: {
|
|
@@ -97,13 +100,13 @@ export const fetchTokenBadgesTool = {
|
|
|
97
100
|
},
|
|
98
101
|
required: ['tokenName'],
|
|
99
102
|
},
|
|
100
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
103
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
101
104
|
const result = await sdk.fetchTokenBadges(args.tokenName);
|
|
102
|
-
return formatSuccess(result);
|
|
105
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
103
106
|
}),
|
|
104
107
|
};
|
|
105
108
|
// 5. Fetch Volume Data
|
|
106
|
-
|
|
109
|
+
exports.fetchVolumeDataTool = {
|
|
107
110
|
name: 'gala_launchpad_fetch_volume_data',
|
|
108
111
|
description: 'Get OHLCV (candlestick) data for charting',
|
|
109
112
|
inputSchema: {
|
|
@@ -132,18 +135,18 @@ export const fetchVolumeDataTool = {
|
|
|
132
135
|
},
|
|
133
136
|
required: ['tokenName'],
|
|
134
137
|
},
|
|
135
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
138
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
136
139
|
const result = await sdk.fetchVolumeData({
|
|
137
140
|
tokenName: args.tokenName,
|
|
138
141
|
from: args.from,
|
|
139
142
|
to: args.to,
|
|
140
143
|
resolution: args.resolution || '1h',
|
|
141
144
|
});
|
|
142
|
-
return formatSuccess(result);
|
|
145
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
143
146
|
}),
|
|
144
147
|
};
|
|
145
148
|
// 6. Check Token Name
|
|
146
|
-
|
|
149
|
+
exports.checkTokenNameTool = {
|
|
147
150
|
name: 'gala_launchpad_check_token_name',
|
|
148
151
|
description: 'Check if token name is available',
|
|
149
152
|
inputSchema: {
|
|
@@ -157,13 +160,13 @@ export const checkTokenNameTool = {
|
|
|
157
160
|
},
|
|
158
161
|
required: ['tokenName'],
|
|
159
162
|
},
|
|
160
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
163
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
161
164
|
const available = await sdk.isTokenNameAvailable(args.tokenName);
|
|
162
|
-
return formatBoolean(available, available ? 'Token name is available' : 'Token name is already taken');
|
|
165
|
+
return (0, response_formatter_js_1.formatBoolean)(available, available ? 'Token name is available' : 'Token name is already taken');
|
|
163
166
|
}),
|
|
164
167
|
};
|
|
165
168
|
// 7. Check Token Symbol
|
|
166
|
-
|
|
169
|
+
exports.checkTokenSymbolTool = {
|
|
167
170
|
name: 'gala_launchpad_check_token_symbol',
|
|
168
171
|
description: 'Check if token symbol is available',
|
|
169
172
|
inputSchema: {
|
|
@@ -177,13 +180,13 @@ export const checkTokenSymbolTool = {
|
|
|
177
180
|
},
|
|
178
181
|
required: ['symbol'],
|
|
179
182
|
},
|
|
180
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
183
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
181
184
|
const available = await sdk.isTokenSymbolAvailable(args.symbol);
|
|
182
|
-
return formatBoolean(available, available ? 'Token symbol is available' : 'Token symbol is already taken');
|
|
185
|
+
return (0, response_formatter_js_1.formatBoolean)(available, available ? 'Token symbol is available' : 'Token symbol is already taken');
|
|
183
186
|
}),
|
|
184
187
|
};
|
|
185
188
|
// 8. Resolve Vault Address
|
|
186
|
-
|
|
189
|
+
exports.resolveVaultAddressTool = {
|
|
187
190
|
name: 'gala_launchpad_resolve_vault_address',
|
|
188
191
|
description: 'Get GalaChain vault address for a token (useful for debugging)',
|
|
189
192
|
inputSchema: {
|
|
@@ -197,19 +200,19 @@ export const resolveVaultAddressTool = {
|
|
|
197
200
|
},
|
|
198
201
|
required: ['tokenName'],
|
|
199
202
|
},
|
|
200
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
203
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
201
204
|
const vaultAddress = await sdk.resolveVaultAddress(args.tokenName);
|
|
202
|
-
return formatSuccess({ tokenName: args.tokenName, vaultAddress });
|
|
205
|
+
return (0, response_formatter_js_1.formatSuccess)({ tokenName: args.tokenName, vaultAddress });
|
|
203
206
|
}),
|
|
204
207
|
};
|
|
205
|
-
|
|
206
|
-
fetchPoolsTool,
|
|
207
|
-
fetchPoolDetailsTool,
|
|
208
|
-
fetchTokenDistributionTool,
|
|
209
|
-
fetchTokenBadgesTool,
|
|
210
|
-
fetchVolumeDataTool,
|
|
211
|
-
checkTokenNameTool,
|
|
212
|
-
checkTokenSymbolTool,
|
|
213
|
-
resolveVaultAddressTool,
|
|
208
|
+
exports.poolTools = [
|
|
209
|
+
exports.fetchPoolsTool,
|
|
210
|
+
exports.fetchPoolDetailsTool,
|
|
211
|
+
exports.fetchTokenDistributionTool,
|
|
212
|
+
exports.fetchTokenBadgesTool,
|
|
213
|
+
exports.fetchVolumeDataTool,
|
|
214
|
+
exports.checkTokenNameTool,
|
|
215
|
+
exports.checkTokenSymbolTool,
|
|
216
|
+
exports.resolveVaultAddressTool,
|
|
214
217
|
];
|
|
215
218
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/pools/index.ts"],"names":[],"mappings":"AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/pools/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,6EAAiF;AACjF,mEAAiE;AAEjE,iBAAiB;AACJ,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,UAAU,EAAE,MAAM,CAAC;gBACpC,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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, "__esModule", { value: true });
|
|
6
|
+
exports.socialTools = exports.fetchCommentsTool = exports.postCommentTool = void 0;
|
|
7
|
+
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
8
|
+
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
6
9
|
// 1. Post Comment
|
|
7
|
-
|
|
10
|
+
exports.postCommentTool = {
|
|
8
11
|
name: 'gala_launchpad_post_comment',
|
|
9
12
|
description: 'Post a comment on a token pool',
|
|
10
13
|
inputSchema: {
|
|
@@ -23,16 +26,16 @@ export const postCommentTool = {
|
|
|
23
26
|
},
|
|
24
27
|
required: ['tokenName', 'content'],
|
|
25
28
|
},
|
|
26
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
29
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
27
30
|
const result = await sdk.postComment({
|
|
28
31
|
tokenName: args.tokenName,
|
|
29
32
|
content: args.content,
|
|
30
33
|
});
|
|
31
|
-
return formatSuccess(result);
|
|
34
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
32
35
|
}),
|
|
33
36
|
};
|
|
34
37
|
// 2. Fetch Comments
|
|
35
|
-
|
|
38
|
+
exports.fetchCommentsTool = {
|
|
36
39
|
name: 'gala_launchpad_fetch_comments',
|
|
37
40
|
description: 'Get comments for a token pool',
|
|
38
41
|
inputSchema: {
|
|
@@ -57,14 +60,14 @@ export const fetchCommentsTool = {
|
|
|
57
60
|
},
|
|
58
61
|
required: ['tokenName'],
|
|
59
62
|
},
|
|
60
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
63
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
61
64
|
const result = await sdk.fetchComments({
|
|
62
65
|
tokenName: args.tokenName,
|
|
63
66
|
page: args.page || 1,
|
|
64
67
|
limit: args.limit || 20,
|
|
65
68
|
});
|
|
66
|
-
return formatSuccess(result);
|
|
69
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
67
70
|
}),
|
|
68
71
|
};
|
|
69
|
-
|
|
72
|
+
exports.socialTools = [exports.postCommentTool, exports.fetchCommentsTool];
|
|
70
73
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/social/index.ts"],"names":[],"mappings":"AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/social/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEjE,kBAAkB;AACL,QAAA,eAAe,GAAY;IACtC,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,gCAAgC;IAC7C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,oBAAoB;gBAC7B,WAAW,EAAE,YAAY;aAC1B;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,GAAG;gBACd,WAAW,EAAE,iBAAiB;aAC/B;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;KACnC;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,WAAW,CAAC;YACnC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC,CAAC;QACH,OAAO,IAAA,qCAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC;AAEF,oBAAoB;AACP,QAAA,iBAAiB,GAAY;IACxC,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE,+BAA+B;IAC5C,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,oBAAoB;gBAC7B,WAAW,EAAE,YAAY;aAC1B;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;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,aAAa,CAAC;YACrC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;YACpB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;SACxB,CAAC,CAAC;QACH,OAAO,IAAA,qCAAa,EAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC;AAEW,QAAA,WAAW,GAAc,CAAC,uBAAe,EAAE,yBAAiB,CAAC,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Trading Operations Tools
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.tradingTools = exports.calculateInitialBuyTool = exports.fetchTradesTool = exports.sellTokensTool = exports.buyTokensTool = exports.calculateSellAmountTool = exports.calculateBuyAmountTool = void 0;
|
|
7
|
+
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
8
|
+
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
6
9
|
// 1. Calculate Buy Amount
|
|
7
|
-
|
|
10
|
+
exports.calculateBuyAmountTool = {
|
|
8
11
|
name: 'gala_launchpad_calculate_buy_amount',
|
|
9
12
|
description: 'Calculate token amounts for buying with fee breakdown',
|
|
10
13
|
inputSchema: {
|
|
@@ -28,17 +31,17 @@ export const calculateBuyAmountTool = {
|
|
|
28
31
|
},
|
|
29
32
|
required: ['tokenName', 'amount', 'type'],
|
|
30
33
|
},
|
|
31
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
34
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
32
35
|
const result = await sdk.calculateBuyAmount({
|
|
33
36
|
tokenName: args.tokenName,
|
|
34
37
|
amount: args.amount,
|
|
35
38
|
type: args.type,
|
|
36
39
|
});
|
|
37
|
-
return formatSuccess(result);
|
|
40
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
38
41
|
}),
|
|
39
42
|
};
|
|
40
43
|
// 2. Calculate Sell Amount
|
|
41
|
-
|
|
44
|
+
exports.calculateSellAmountTool = {
|
|
42
45
|
name: 'gala_launchpad_calculate_sell_amount',
|
|
43
46
|
description: 'Calculate GALA amounts for selling tokens',
|
|
44
47
|
inputSchema: {
|
|
@@ -62,17 +65,17 @@ export const calculateSellAmountTool = {
|
|
|
62
65
|
},
|
|
63
66
|
required: ['tokenName', 'amount', 'type'],
|
|
64
67
|
},
|
|
65
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
68
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
66
69
|
const result = await sdk.calculateSellAmount({
|
|
67
70
|
tokenName: args.tokenName,
|
|
68
71
|
amount: args.amount,
|
|
69
72
|
type: args.type,
|
|
70
73
|
});
|
|
71
|
-
return formatSuccess(result);
|
|
74
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
72
75
|
}),
|
|
73
76
|
};
|
|
74
77
|
// 3. Buy Tokens
|
|
75
|
-
|
|
78
|
+
exports.buyTokensTool = {
|
|
76
79
|
name: 'gala_launchpad_buy_tokens',
|
|
77
80
|
description: 'Execute token purchase with slippage protection',
|
|
78
81
|
inputSchema: {
|
|
@@ -107,7 +110,7 @@ export const buyTokensTool = {
|
|
|
107
110
|
},
|
|
108
111
|
required: ['tokenName', 'amount', 'type', 'expectedAmount', 'slippageToleranceFactor'],
|
|
109
112
|
},
|
|
110
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
113
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
111
114
|
const result = await sdk.buy({
|
|
112
115
|
tokenName: args.tokenName,
|
|
113
116
|
amount: args.amount,
|
|
@@ -115,11 +118,11 @@ export const buyTokensTool = {
|
|
|
115
118
|
expectedAmount: args.expectedAmount,
|
|
116
119
|
slippageToleranceFactor: args.slippageToleranceFactor,
|
|
117
120
|
});
|
|
118
|
-
return formatSuccess(result);
|
|
121
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
119
122
|
}),
|
|
120
123
|
};
|
|
121
124
|
// 4. Sell Tokens
|
|
122
|
-
|
|
125
|
+
exports.sellTokensTool = {
|
|
123
126
|
name: 'gala_launchpad_sell_tokens',
|
|
124
127
|
description: 'Execute token sale with slippage protection',
|
|
125
128
|
inputSchema: {
|
|
@@ -154,7 +157,7 @@ export const sellTokensTool = {
|
|
|
154
157
|
},
|
|
155
158
|
required: ['tokenName', 'amount', 'type', 'expectedAmount', 'slippageToleranceFactor'],
|
|
156
159
|
},
|
|
157
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
160
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
158
161
|
const result = await sdk.sell({
|
|
159
162
|
tokenName: args.tokenName,
|
|
160
163
|
amount: args.amount,
|
|
@@ -162,11 +165,11 @@ export const sellTokensTool = {
|
|
|
162
165
|
expectedAmount: args.expectedAmount,
|
|
163
166
|
slippageToleranceFactor: args.slippageToleranceFactor,
|
|
164
167
|
});
|
|
165
|
-
return formatSuccess(result);
|
|
168
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
166
169
|
}),
|
|
167
170
|
};
|
|
168
171
|
// 5. Fetch Trades
|
|
169
|
-
|
|
172
|
+
exports.fetchTradesTool = {
|
|
170
173
|
name: 'gala_launchpad_fetch_trades',
|
|
171
174
|
description: 'Get trade history with filtering',
|
|
172
175
|
inputSchema: {
|
|
@@ -215,7 +218,7 @@ export const fetchTradesTool = {
|
|
|
215
218
|
},
|
|
216
219
|
},
|
|
217
220
|
},
|
|
218
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
221
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
219
222
|
const result = await sdk.fetchTrades({
|
|
220
223
|
tokenName: args.tokenName,
|
|
221
224
|
tradeType: args.tradeType,
|
|
@@ -226,11 +229,11 @@ export const fetchTradesTool = {
|
|
|
226
229
|
endDate: args.endDate,
|
|
227
230
|
sortOrder: args.sortOrder || 'DESC',
|
|
228
231
|
});
|
|
229
|
-
return formatSuccess(result);
|
|
232
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
230
233
|
}),
|
|
231
234
|
};
|
|
232
235
|
// 6. Calculate Initial Buy
|
|
233
|
-
|
|
236
|
+
exports.calculateInitialBuyTool = {
|
|
234
237
|
name: 'gala_launchpad_calculate_initial_buy',
|
|
235
238
|
description: 'Calculate amounts for initial token purchase during creation',
|
|
236
239
|
inputSchema: {
|
|
@@ -254,17 +257,17 @@ export const calculateInitialBuyTool = {
|
|
|
254
257
|
},
|
|
255
258
|
required: ['tokenName', 'amount', 'type'],
|
|
256
259
|
},
|
|
257
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
260
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
258
261
|
const result = await sdk.calculateInitialBuyAmount(args.amount);
|
|
259
|
-
return formatSuccess(result);
|
|
262
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
260
263
|
}),
|
|
261
264
|
};
|
|
262
|
-
|
|
263
|
-
calculateBuyAmountTool,
|
|
264
|
-
calculateSellAmountTool,
|
|
265
|
-
buyTokensTool,
|
|
266
|
-
sellTokensTool,
|
|
267
|
-
fetchTradesTool,
|
|
268
|
-
calculateInitialBuyTool,
|
|
265
|
+
exports.tradingTools = [
|
|
266
|
+
exports.calculateBuyAmountTool,
|
|
267
|
+
exports.calculateSellAmountTool,
|
|
268
|
+
exports.buyTokensTool,
|
|
269
|
+
exports.sellTokensTool,
|
|
270
|
+
exports.fetchTradesTool,
|
|
271
|
+
exports.calculateInitialBuyTool,
|
|
269
272
|
];
|
|
270
273
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/trading/index.ts"],"names":[],"mappings":"AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/trading/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEjE,0BAA0B;AACb,QAAA,sBAAsB,GAAY;IAC7C,IAAI,EAAE,qCAAqC;IAC3C,WAAW,EAAE,uDAAuD;IACpE,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,oBAAoB;gBAC7B,WAAW,EAAE,YAAY;aAC1B;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,WAAW;gBACpB,WAAW,EAAE,0DAA0D;aACxE;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;gBACzB,WAAW,EAAE,qDAAqD;aACnE;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC;KAC1C;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IA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
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Token Transfer Tools
|
|
3
4
|
*/
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.transferTools = exports.transferTokenTool = exports.transferGalaTool = void 0;
|
|
7
|
+
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
8
|
+
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
6
9
|
// 1. Transfer GALA
|
|
7
|
-
|
|
10
|
+
exports.transferGalaTool = {
|
|
8
11
|
name: 'gala_launchpad_transfer_gala',
|
|
9
12
|
description: 'Transfer GALA tokens via GalaChain',
|
|
10
13
|
inputSchema: {
|
|
@@ -28,17 +31,17 @@ export const transferGalaTool = {
|
|
|
28
31
|
},
|
|
29
32
|
required: ['recipientAddress', 'amount'],
|
|
30
33
|
},
|
|
31
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
34
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
32
35
|
const result = await sdk.transferGala({
|
|
33
36
|
recipientAddress: args.recipientAddress,
|
|
34
37
|
amount: args.amount,
|
|
35
38
|
uniqueKey: args.uniqueKey,
|
|
36
39
|
});
|
|
37
|
-
return formatSuccess(result);
|
|
40
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
38
41
|
}),
|
|
39
42
|
};
|
|
40
43
|
// 2. Transfer Token
|
|
41
|
-
|
|
44
|
+
exports.transferTokenTool = {
|
|
42
45
|
name: 'gala_launchpad_transfer_token',
|
|
43
46
|
description: 'Transfer launchpad tokens via GalaChain',
|
|
44
47
|
inputSchema: {
|
|
@@ -67,15 +70,15 @@ export const transferTokenTool = {
|
|
|
67
70
|
},
|
|
68
71
|
required: ['to', 'tokenName', 'amount'],
|
|
69
72
|
},
|
|
70
|
-
handler: withErrorHandling(async (sdk, args) => {
|
|
73
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
71
74
|
const result = await sdk.transferToken({
|
|
72
75
|
to: args.to,
|
|
73
76
|
tokenName: args.tokenName,
|
|
74
77
|
amount: args.amount,
|
|
75
78
|
uniqueKey: args.uniqueKey,
|
|
76
79
|
});
|
|
77
|
-
return formatSuccess(result);
|
|
80
|
+
return (0, response_formatter_js_1.formatSuccess)(result);
|
|
78
81
|
}),
|
|
79
82
|
};
|
|
80
|
-
|
|
83
|
+
exports.transferTools = [exports.transferGalaTool, exports.transferTokenTool];
|
|
81
84
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/transfers/index.ts"],"names":[],"mappings":"AAAA;;GAEG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/transfers/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,6EAAkE;AAClE,mEAAiE;AAEjE,mBAAmB;AACN,QAAA,gBAAgB,GAAY;IACvC,IAAI,EAAE,8BAA8B;IACpC,WAAW,EAAE,oCAAoC;IACjD,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,gBAAgB,EAAE;gBAChB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,6CAA6C;gBACtD,WAAW,EAAE,0BAA0B;aACxC;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,WAAW;gBACpB,WAAW,EAAE,mCAAmC;aACjD;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,oCAAoC;gBAC7C,WAAW,EAAE,0BAA0B;aACxC;SACF;QACD,QAAQ,EAAE,CAAC,kBAAkB,EAAE,QAAQ,CAAC;KACzC;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,YAAY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AA,aAAa,GAAc,CAAC,wBAAgB,EAAE,yBAAiB,CAAC,CAAC"}
|
package/dist/types/mcp.js
CHANGED
package/dist/types/mcp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/types/mcp.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
1
|
+
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../src/types/mcp.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Error Handler Utility
|
|
3
4
|
*
|
|
4
5
|
* Formats errors for MCP protocol responses
|
|
5
6
|
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.formatError = formatError;
|
|
9
|
+
exports.withErrorHandling = withErrorHandling;
|
|
6
10
|
/**
|
|
7
11
|
* Format error for MCP response
|
|
8
12
|
*/
|
|
9
|
-
|
|
13
|
+
function formatError(error) {
|
|
10
14
|
const errorMessage = error instanceof Error
|
|
11
15
|
? error.message
|
|
12
16
|
: String(error);
|
|
@@ -37,7 +41,7 @@ function sanitizeError(message) {
|
|
|
37
41
|
/**
|
|
38
42
|
* Wrap handler with error handling
|
|
39
43
|
*/
|
|
40
|
-
|
|
44
|
+
function withErrorHandling(handler) {
|
|
41
45
|
return (async (...args) => {
|
|
42
46
|
try {
|
|
43
47
|
return await handler(...args);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/utils/error-handler.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"error-handler.js","sourceRoot":"","sources":["../../src/utils/error-handler.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAOH,kCAiBC;AAqBD,8CAUC;AAnDD;;GAEG;AACH,SAAgB,WAAW,CAAC,KAAc;IACxC,MAAM,YAAY,GAAG,KAAK,YAAY,KAAK;QACzC,CAAC,CAAC,KAAK,CAAC,OAAO;QACf,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAElB,qDAAqD;IACrD,MAAM,SAAS,GAAG,aAAa,CAAC,YAAY,CAAC,CAAC;IAE9C,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,UAAU,SAAS,EAAE;aAC5B;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,aAAa,CAAC,OAAe;IACpC,sBAAsB;IACtB,IAAI,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IAE/D,gDAAgD;IAChD,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,yBAAyB,EAAE,OAAO,CAAC,CAAC;IAElE,8CAA8C;IAC9C,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IAE/D,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,SAAgB,iBAAiB,CAC/B,OAAU;IAEV,OAAO,CAAC,KAAK,EAAE,GAAG,IAAW,EAAE,EAAE;QAC/B,IAAI,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;QAChC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CAAM,CAAC;AACV,CAAC"}
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/**
|
|
2
3
|
* Response Formatter Utility
|
|
3
4
|
*
|
|
4
5
|
* Formats SDK responses for MCP protocol
|
|
5
6
|
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.formatSuccess = formatSuccess;
|
|
9
|
+
exports.formatBoolean = formatBoolean;
|
|
10
|
+
exports.formatText = formatText;
|
|
6
11
|
/**
|
|
7
12
|
* Format successful response
|
|
8
13
|
*/
|
|
9
|
-
|
|
14
|
+
function formatSuccess(data) {
|
|
10
15
|
return {
|
|
11
16
|
content: [
|
|
12
17
|
{
|
|
@@ -19,7 +24,7 @@ export function formatSuccess(data) {
|
|
|
19
24
|
/**
|
|
20
25
|
* Format boolean response
|
|
21
26
|
*/
|
|
22
|
-
|
|
27
|
+
function formatBoolean(result, message) {
|
|
23
28
|
const text = message || `Result: ${result}`;
|
|
24
29
|
return {
|
|
25
30
|
content: [
|
|
@@ -33,7 +38,7 @@ export function formatBoolean(result, message) {
|
|
|
33
38
|
/**
|
|
34
39
|
* Format simple text response
|
|
35
40
|
*/
|
|
36
|
-
|
|
41
|
+
function formatText(text) {
|
|
37
42
|
return {
|
|
38
43
|
content: [
|
|
39
44
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response-formatter.js","sourceRoot":"","sources":["../../src/utils/response-formatter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"response-formatter.js","sourceRoot":"","sources":["../../src/utils/response-formatter.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAOH,sCASC;AAKD,sCAWC;AAKD,gCASC;AA1CD;;GAEG;AACH,SAAgB,aAAa,CAAC,IAAS;IACrC,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;aACpC;SACF;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa,CAAC,MAAe,EAAE,OAAgB;IAC7D,MAAM,IAAI,GAAG,OAAO,IAAI,WAAW,MAAM,EAAE,CAAC;IAE5C,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;aAClE;SACF;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,UAAU,CAAC,IAAY;IACrC,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI;aACL;SACF;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gala-chain/launchpad-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "MCP server for Gala Launchpad SDK with 27 tools - AI agents can interact with Gala Launchpad",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"type": "module",
|
|
7
6
|
"bin": {
|
|
8
7
|
"gala-launchpad-mcp": "./dist/index.js"
|
|
9
8
|
},
|
|
@@ -57,7 +56,7 @@
|
|
|
57
56
|
"registry": "https://registry.npmjs.org/"
|
|
58
57
|
},
|
|
59
58
|
"dependencies": {
|
|
60
|
-
"@gala-chain/launchpad-sdk": "^3.0
|
|
59
|
+
"@gala-chain/launchpad-sdk": "^3.1.0",
|
|
61
60
|
"@modelcontextprotocol/sdk": "^0.5.0"
|
|
62
61
|
},
|
|
63
62
|
"devDependencies": {
|