@gala-chain/launchpad-mcp-server 1.2.2 → 1.2.4
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 +38 -0
- package/dist/schemas/common-schemas.d.ts +181 -0
- package/dist/schemas/common-schemas.d.ts.map +1 -0
- package/dist/schemas/common-schemas.js +194 -0
- package/dist/schemas/common-schemas.js.map +1 -0
- package/dist/tools/balance/index.d.ts.map +1 -1
- package/dist/tools/balance/index.js +18 -74
- package/dist/tools/balance/index.js.map +1 -1
- package/dist/tools/creation/index.d.ts.map +1 -1
- package/dist/tools/creation/index.js +14 -47
- package/dist/tools/creation/index.js.map +1 -1
- package/dist/tools/pools/index.d.ts.map +1 -1
- package/dist/tools/pools/index.js +10 -40
- package/dist/tools/pools/index.js.map +1 -1
- package/dist/tools/social/index.d.ts.map +1 -1
- package/dist/tools/social/index.js +7 -31
- package/dist/tools/social/index.js.map +1 -1
- package/dist/tools/trading/index.d.ts.map +1 -1
- package/dist/tools/trading/index.js +38 -96
- package/dist/tools/trading/index.js.map +1 -1
- package/dist/tools/transfers/index.d.ts.map +1 -1
- package/dist/tools/transfers/index.js +10 -39
- package/dist/tools/transfers/index.js.map +1 -1
- package/dist/tools/utils/getUrlByTokenName.d.ts.map +1 -1
- package/dist/tools/utils/getUrlByTokenName.js +2 -2
- package/dist/tools/utils/getUrlByTokenName.js.map +1 -1
- package/package.json +2 -2
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.creationTools = exports.uploadProfileImageTool = exports.uploadTokenImageTool = exports.launchTokenTool = void 0;
|
|
40
40
|
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
41
41
|
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
42
|
+
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
42
43
|
// 1. Launch Token
|
|
43
44
|
exports.launchTokenTool = {
|
|
44
45
|
name: 'gala_launchpad_launch_token',
|
|
@@ -56,44 +57,24 @@ RETURNS: Transaction details including token name, symbol, creator address, and
|
|
|
56
57
|
inputSchema: {
|
|
57
58
|
type: 'object',
|
|
58
59
|
properties: {
|
|
59
|
-
tokenName:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
description: 'Token name',
|
|
63
|
-
},
|
|
64
|
-
tokenSymbol: {
|
|
65
|
-
type: 'string',
|
|
66
|
-
pattern: '^[A-Z0-9]{2,10}$',
|
|
67
|
-
description: 'Token symbol',
|
|
68
|
-
},
|
|
69
|
-
tokenDescription: {
|
|
70
|
-
type: 'string',
|
|
71
|
-
maxLength: 500,
|
|
72
|
-
description: 'Token description',
|
|
73
|
-
},
|
|
60
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
61
|
+
tokenSymbol: common_schemas_js_1.TOKEN_SYMBOL_SCHEMA,
|
|
62
|
+
tokenDescription: common_schemas_js_1.TOKEN_DESCRIPTION_SCHEMA,
|
|
74
63
|
tokenImage: {
|
|
75
|
-
|
|
76
|
-
format: 'uri',
|
|
64
|
+
...common_schemas_js_1.URL_SCHEMA,
|
|
77
65
|
description: 'Token image URL',
|
|
78
66
|
},
|
|
79
|
-
preBuyQuantity:
|
|
80
|
-
type: 'string',
|
|
81
|
-
pattern: '^[0-9.]+$',
|
|
82
|
-
description: 'Pre-buy quantity as decimal string (defaults to "0")',
|
|
83
|
-
},
|
|
67
|
+
preBuyQuantity: common_schemas_js_1.PRE_BUY_QUANTITY_SCHEMA,
|
|
84
68
|
websiteUrl: {
|
|
85
|
-
|
|
86
|
-
format: 'uri',
|
|
69
|
+
...common_schemas_js_1.URL_SCHEMA,
|
|
87
70
|
description: 'Website URL (optional)',
|
|
88
71
|
},
|
|
89
72
|
telegramUrl: {
|
|
90
|
-
|
|
91
|
-
format: 'uri',
|
|
73
|
+
...common_schemas_js_1.URL_SCHEMA,
|
|
92
74
|
description: 'Telegram channel URL (optional)',
|
|
93
75
|
},
|
|
94
76
|
twitterUrl: {
|
|
95
|
-
|
|
96
|
-
format: 'uri',
|
|
77
|
+
...common_schemas_js_1.URL_SCHEMA,
|
|
97
78
|
description: 'Twitter profile URL (optional)',
|
|
98
79
|
},
|
|
99
80
|
tokenCategory: {
|
|
@@ -118,11 +99,7 @@ RETURNS: Transaction details including token name, symbol, creator address, and
|
|
|
118
99
|
},
|
|
119
100
|
description: 'Reverse bonding curve configuration (optional, uses defaults)',
|
|
120
101
|
},
|
|
121
|
-
privateKey:
|
|
122
|
-
type: 'string',
|
|
123
|
-
pattern: '^0x[a-fA-F0-9]{64}$',
|
|
124
|
-
description: 'Optional private key override for this operation (format: "0x" + 64 hex characters). If provided, uses this wallet instead of the default MCP server wallet.',
|
|
125
|
-
},
|
|
102
|
+
privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
|
|
126
103
|
},
|
|
127
104
|
required: [
|
|
128
105
|
'tokenName',
|
|
@@ -144,19 +121,14 @@ exports.uploadTokenImageTool = {
|
|
|
144
121
|
type: 'object',
|
|
145
122
|
properties: {
|
|
146
123
|
tokenName: {
|
|
147
|
-
|
|
148
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
124
|
+
...common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
149
125
|
description: 'Token name (2-20 lowercase alphanumeric)',
|
|
150
126
|
},
|
|
151
127
|
imagePath: {
|
|
152
128
|
type: 'string',
|
|
153
129
|
description: 'Absolute file path to image file',
|
|
154
130
|
},
|
|
155
|
-
privateKey:
|
|
156
|
-
type: 'string',
|
|
157
|
-
pattern: '^0x[a-fA-F0-9]{64}$',
|
|
158
|
-
description: 'Optional private key override for this operation (format: "0x" + 64 hex characters). If provided, uses this wallet instead of the default MCP server wallet.',
|
|
159
|
-
},
|
|
131
|
+
privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
|
|
160
132
|
},
|
|
161
133
|
required: ['tokenName', 'imagePath'],
|
|
162
134
|
},
|
|
@@ -186,15 +158,10 @@ exports.uploadProfileImageTool = {
|
|
|
186
158
|
description: 'Absolute file path to image file',
|
|
187
159
|
},
|
|
188
160
|
address: {
|
|
189
|
-
|
|
190
|
-
pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
|
|
161
|
+
...common_schemas_js_1.ADDRESS_SCHEMA,
|
|
191
162
|
description: 'Optional wallet address (defaults to authenticated user)',
|
|
192
163
|
},
|
|
193
|
-
privateKey:
|
|
194
|
-
type: 'string',
|
|
195
|
-
pattern: '^0x[a-fA-F0-9]{64}$',
|
|
196
|
-
description: 'Optional private key override for this operation (format: "0x" + 64 hex characters). If provided, uses this wallet instead of the default MCP server wallet.',
|
|
197
|
-
},
|
|
164
|
+
privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
|
|
198
165
|
},
|
|
199
166
|
required: ['imagePath'],
|
|
200
167
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/creation/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,6EAAkE;AAClE,mEAAiE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/creation/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAQyC;AAEzC,kBAAkB;AACL,QAAA,eAAe,GAAY;IACtC,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE;;;;;;;;;;+FAUgF;IAC7F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE,qCAAiB;YAC5B,WAAW,EAAE,uCAAmB;YAChC,gBAAgB,EAAE,4CAAwB;YAC1C,UAAU,EAAE;gBACV,GAAG,8BAAU;gBACb,WAAW,EAAE,iBAAiB;aAC/B;YACD,cAAc,EA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AAC;QAErD,MAAM,QAAQ,GAAG,MAAM,GAAG,CAAC,kBAAkB,CAAC;YAC5C,IAAI,EAAE,UAAU;YAChB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QAEH,wEAAwE;QACxE,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,IAAA,qCAAa,EAAC;gBACnB,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,wEAAwE;aAClF,CAAC,CAAC;QACL,CAAC;QAED,OAAO,IAAA,qCAAa,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACpD,CAAC,CAAC;CACH,CAAC;AAEW,QAAA,aAAa,GAAc;IACtC,uBAAe;IACf,4BAAoB;IACpB,8BAAsB;CACvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAYlD,eAAO,MAAM,cAAc,EAAE,OA2B5B,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,OAclC,CAAC;AAGF,eAAO,MAAM,0BAA0B,EAAE,OAcxC,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,OAclC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,OAiDjC,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,OAwBrC,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,OAWpC,CAAC;AAGF,eAAO,MAAM,gCAAgC,EAAE,OAkB9C,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,OAqBhC,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,OAoBlC,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,OAcrC,CAAC;AAGF,eAAO,MAAM,wBAAwB,EAAE,OAkBtC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,OAAO,EAa9B,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.poolTools = exports.resolveTokenClassKeyTool = exports.resolveVaultAddre
|
|
|
7
7
|
const launchpad_sdk_1 = require("@gala-chain/launchpad-sdk");
|
|
8
8
|
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
9
9
|
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
10
|
+
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
10
11
|
// 1. Fetch Pools
|
|
11
12
|
exports.fetchPoolsTool = {
|
|
12
13
|
name: 'gala_launchpad_fetch_pools',
|
|
@@ -20,21 +21,11 @@ exports.fetchPoolsTool = {
|
|
|
20
21
|
description: 'Type of pools to fetch (default: recent)',
|
|
21
22
|
},
|
|
22
23
|
creatorAddress: {
|
|
23
|
-
|
|
24
|
-
pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
|
|
24
|
+
...common_schemas_js_1.ADDRESS_SCHEMA,
|
|
25
25
|
description: 'Filter by creator address (optional)',
|
|
26
26
|
},
|
|
27
|
-
page:
|
|
28
|
-
|
|
29
|
-
minimum: 1,
|
|
30
|
-
description: 'Page number (default: 1)',
|
|
31
|
-
},
|
|
32
|
-
limit: {
|
|
33
|
-
type: 'number',
|
|
34
|
-
minimum: 1,
|
|
35
|
-
maximum: 100, // PAGINATION_CONSTRAINTS.MAX_LIMIT from SDK (pools use general limit)
|
|
36
|
-
description: 'Results per page (default: 20, maximum: 100)',
|
|
37
|
-
},
|
|
27
|
+
page: common_schemas_js_1.PAGE_SCHEMA,
|
|
28
|
+
limit: (0, common_schemas_js_1.createLimitSchema)('pool', 20),
|
|
38
29
|
},
|
|
39
30
|
},
|
|
40
31
|
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
@@ -53,11 +44,7 @@ exports.fetchPoolDetailsTool = {
|
|
|
53
44
|
inputSchema: {
|
|
54
45
|
type: 'object',
|
|
55
46
|
properties: {
|
|
56
|
-
tokenName:
|
|
57
|
-
type: 'string',
|
|
58
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
59
|
-
description: 'Token name',
|
|
60
|
-
},
|
|
47
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
61
48
|
},
|
|
62
49
|
required: ['tokenName'],
|
|
63
50
|
},
|
|
@@ -73,11 +60,7 @@ exports.fetchTokenDistributionTool = {
|
|
|
73
60
|
inputSchema: {
|
|
74
61
|
type: 'object',
|
|
75
62
|
properties: {
|
|
76
|
-
tokenName:
|
|
77
|
-
type: 'string',
|
|
78
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
79
|
-
description: 'Token name',
|
|
80
|
-
},
|
|
63
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
81
64
|
},
|
|
82
65
|
required: ['tokenName'],
|
|
83
66
|
},
|
|
@@ -93,11 +76,7 @@ exports.fetchTokenBadgesTool = {
|
|
|
93
76
|
inputSchema: {
|
|
94
77
|
type: 'object',
|
|
95
78
|
properties: {
|
|
96
|
-
tokenName:
|
|
97
|
-
type: 'string',
|
|
98
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
99
|
-
description: 'Token name',
|
|
100
|
-
},
|
|
79
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
101
80
|
},
|
|
102
81
|
required: ['tokenName'],
|
|
103
82
|
},
|
|
@@ -113,11 +92,7 @@ exports.fetchVolumeDataTool = {
|
|
|
113
92
|
inputSchema: {
|
|
114
93
|
type: 'object',
|
|
115
94
|
properties: {
|
|
116
|
-
tokenName:
|
|
117
|
-
type: 'string',
|
|
118
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
119
|
-
description: 'Token name',
|
|
120
|
-
},
|
|
95
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
121
96
|
from: {
|
|
122
97
|
type: 'string',
|
|
123
98
|
format: 'date-time',
|
|
@@ -246,8 +221,7 @@ exports.checkTokenSymbolTool = {
|
|
|
246
221
|
type: 'object',
|
|
247
222
|
properties: {
|
|
248
223
|
symbol: {
|
|
249
|
-
|
|
250
|
-
pattern: '^[A-Z0-9]{2,10}$',
|
|
224
|
+
...common_schemas_js_1.TOKEN_SYMBOL_SCHEMA,
|
|
251
225
|
description: 'Token symbol to check',
|
|
252
226
|
},
|
|
253
227
|
},
|
|
@@ -265,11 +239,7 @@ exports.resolveVaultAddressTool = {
|
|
|
265
239
|
inputSchema: {
|
|
266
240
|
type: 'object',
|
|
267
241
|
properties: {
|
|
268
|
-
tokenName:
|
|
269
|
-
type: 'string',
|
|
270
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
271
|
-
description: 'Token name',
|
|
272
|
-
},
|
|
242
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
273
243
|
},
|
|
274
244
|
required: ['tokenName'],
|
|
275
245
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/pools/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6DAAuD;AAEvD,6EAAiF;AACjF,mEAAiE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/pools/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,6DAAuD;AAEvD,6EAAiF;AACjF,mEAAiE;AACjE,uEAMyC;AAEzC,iBAAiB;AACJ,QAAA,cAAc,GAAY;IACrC,IAAI,EAAE,4BAA4B;IAClC,WAAW,EAAE,qEAAqE;IAClF,WAAW,EAAE;QACX,IAAI,EAAE,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,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,aAAa,GAAG,MAAM,GAAG,CAAC,oBAAoB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrE,OAAO,IAAA,qCAAa,EAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC;IACrE,CAAC,CAAC;CACH,CAAC;AAEW,QAAA,SAAS,GAAc;IAClC,sBAAc;IACd,4BAAoB;IACpB,kCAA0B;IAC1B,4BAAoB;IACpB,2BAAmB;IACnB,+BAAuB;IACvB,8BAAsB;IACtB,wCAAgC;IAChC,0BAAkB;IAClB,4BAAoB;IACpB,+BAAuB;IACvB,gCAAwB;CACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/social/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/social/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAYlD,eAAO,MAAM,eAAe,EAAE,OAqB7B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,OAoB/B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,OAAO,EAAyC,CAAC"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.socialTools = exports.fetchCommentsTool = exports.postCommentTool = void 0;
|
|
7
7
|
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
8
8
|
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
9
|
+
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
9
10
|
// 1. Post Comment
|
|
10
11
|
exports.postCommentTool = {
|
|
11
12
|
name: 'gala_launchpad_post_comment',
|
|
@@ -13,21 +14,9 @@ exports.postCommentTool = {
|
|
|
13
14
|
inputSchema: {
|
|
14
15
|
type: 'object',
|
|
15
16
|
properties: {
|
|
16
|
-
tokenName:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
description: 'Token name',
|
|
20
|
-
},
|
|
21
|
-
message: {
|
|
22
|
-
type: 'string',
|
|
23
|
-
maxLength: 500,
|
|
24
|
-
description: 'Comment message text',
|
|
25
|
-
},
|
|
26
|
-
privateKey: {
|
|
27
|
-
type: 'string',
|
|
28
|
-
pattern: '^0x[a-fA-F0-9]{64}$',
|
|
29
|
-
description: 'Optional private key override for this operation (format: "0x" + 64 hex characters). If provided, uses this wallet instead of the default MCP server wallet.',
|
|
30
|
-
},
|
|
17
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
18
|
+
message: common_schemas_js_1.COMMENT_MESSAGE_SCHEMA,
|
|
19
|
+
privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
|
|
31
20
|
},
|
|
32
21
|
required: ['tokenName', 'message'],
|
|
33
22
|
},
|
|
@@ -48,22 +37,9 @@ exports.fetchCommentsTool = {
|
|
|
48
37
|
inputSchema: {
|
|
49
38
|
type: 'object',
|
|
50
39
|
properties: {
|
|
51
|
-
tokenName:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
description: 'Token name',
|
|
55
|
-
},
|
|
56
|
-
page: {
|
|
57
|
-
type: 'number',
|
|
58
|
-
minimum: 1,
|
|
59
|
-
description: 'Page number (default: 1)',
|
|
60
|
-
},
|
|
61
|
-
limit: {
|
|
62
|
-
type: 'number',
|
|
63
|
-
minimum: 1,
|
|
64
|
-
maximum: 50, // COMMENT_CONSTRAINTS.PAGINATION.MAX_LIMIT from SDK
|
|
65
|
-
description: 'Results per page (default: 20, maximum: 50)',
|
|
66
|
-
},
|
|
40
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
41
|
+
page: common_schemas_js_1.PAGE_SCHEMA,
|
|
42
|
+
limit: (0, common_schemas_js_1.createLimitSchema)('comment', 20),
|
|
67
43
|
},
|
|
68
44
|
required: ['tokenName'],
|
|
69
45
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/social/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,6EAAkE;AAClE,mEAAiE;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/social/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAGH,6EAAkE;AAClE,mEAAiE;AACjE,uEAMyC;AAEzC,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,qCAAiB;YAC5B,OAAO,EAAE,0CAAsB;YAC/B,UAAU,EAAE,sCAAkB;SAC/B;QACD,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC;KACnC;IACD,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,GAAG,CAAC,WAAW,CAAC;YACpB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,oDAAoD;YAC3E,UAAU,EAAE,IAAI,CAAC,UAAU;SAC5B,CAAC,CAAC;QACH,sDAAsD;QACtD,OAAO,IAAA,qCAAa,EAAC,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC,CAAC;IAClF,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,qCAAiB;YAC5B,IAAI,EAAE,+BAAW;YACjB,KAAK,EAAE,IAAA,qCAAiB,EAAC,SAAS,EAAE,EAAE,CAAC;SACxC;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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/trading/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/trading/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAkBlD,eAAO,MAAM,sBAAsB,EAAE,OAmCpC,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,OAgCrC,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,OAuE3B,CAAC;AAGF,eAAO,MAAM,cAAc,EAAE,OAsF5B,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,OA0C7B,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,OAiBrC,CAAC;AAGF,eAAO,MAAM,+BAA+B,EAAE,OAyB7C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,OAAO,EAQjC,CAAC"}
|
|
@@ -7,6 +7,7 @@ exports.tradingTools = exports.getBundlerTransactionResultTool = exports.calcula
|
|
|
7
7
|
const launchpad_sdk_1 = require("@gala-chain/launchpad-sdk");
|
|
8
8
|
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
9
9
|
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
10
|
+
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
10
11
|
// 1. Calculate Buy Amount
|
|
11
12
|
exports.calculateBuyAmountTool = {
|
|
12
13
|
name: 'gala_launchpad_calculate_buy_amount',
|
|
@@ -14,14 +15,9 @@ exports.calculateBuyAmountTool = {
|
|
|
14
15
|
inputSchema: {
|
|
15
16
|
type: 'object',
|
|
16
17
|
properties: {
|
|
17
|
-
tokenName:
|
|
18
|
-
type: 'string',
|
|
19
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
20
|
-
description: 'Token name',
|
|
21
|
-
},
|
|
18
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
22
19
|
amount: {
|
|
23
|
-
|
|
24
|
-
pattern: '^[0-9.]+$',
|
|
20
|
+
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
25
21
|
description: 'Amount in standard decimal format (e.g., "1" for 1 GALA)',
|
|
26
22
|
},
|
|
27
23
|
type: {
|
|
@@ -56,16 +52,8 @@ exports.calculateSellAmountTool = {
|
|
|
56
52
|
inputSchema: {
|
|
57
53
|
type: 'object',
|
|
58
54
|
properties: {
|
|
59
|
-
tokenName:
|
|
60
|
-
|
|
61
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
62
|
-
description: 'Token name',
|
|
63
|
-
},
|
|
64
|
-
amount: {
|
|
65
|
-
type: 'string',
|
|
66
|
-
pattern: '^[0-9.]+$',
|
|
67
|
-
description: 'Amount in standard decimal format',
|
|
68
|
-
},
|
|
55
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
56
|
+
amount: common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
69
57
|
type: {
|
|
70
58
|
type: 'string',
|
|
71
59
|
enum: Object.values(launchpad_sdk_1.TRADING_TYPES),
|
|
@@ -97,24 +85,22 @@ exports.buyTokensTool = {
|
|
|
97
85
|
description: `Execute token purchase with slippage protection.
|
|
98
86
|
|
|
99
87
|
WORKFLOW:
|
|
100
|
-
1. calculateBuyAmount() → Get expected output (result.amount)
|
|
101
|
-
2. buy() → Execute trade with expectedAmount
|
|
88
|
+
1. calculateBuyAmount() → Get expected output (result.amount AND result.reverseBondingCurveFee)
|
|
89
|
+
2. buy() → Execute trade with BOTH expectedAmount AND maxAcceptableReverseBondingCurveFee
|
|
102
90
|
3. fetchTrades() → Verify trade completed
|
|
103
91
|
|
|
104
|
-
CRITICAL:
|
|
92
|
+
CRITICAL: Extract BOTH parameters from calculateBuyAmount:
|
|
93
|
+
- result.amount → expectedAmount
|
|
94
|
+
- result.reverseBondingCurveFee → maxAcceptableReverseBondingCurveFee
|
|
95
|
+
Omitting reverseBondingCurveFee may cause transaction failures!
|
|
105
96
|
|
|
106
97
|
RETURNS: Transaction details including input/output amounts and transaction ID`,
|
|
107
98
|
inputSchema: {
|
|
108
99
|
type: 'object',
|
|
109
100
|
properties: {
|
|
110
|
-
tokenName:
|
|
111
|
-
type: 'string',
|
|
112
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
113
|
-
description: 'Token name',
|
|
114
|
-
},
|
|
101
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
115
102
|
amount: {
|
|
116
|
-
|
|
117
|
-
pattern: '^[0-9.]+$',
|
|
103
|
+
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
118
104
|
description: 'Amount to spend/buy',
|
|
119
105
|
},
|
|
120
106
|
type: {
|
|
@@ -126,8 +112,7 @@ RETURNS: Transaction details including input/output amounts and transaction ID`,
|
|
|
126
112
|
- 'exact': Buying exact token amount`,
|
|
127
113
|
},
|
|
128
114
|
expectedAmount: {
|
|
129
|
-
|
|
130
|
-
pattern: '^[0-9.]+$',
|
|
115
|
+
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
131
116
|
description: `Expected token output amount from calculateBuyAmount (REQUIRED).
|
|
132
117
|
|
|
133
118
|
CRITICAL: This is the 'amount' field from calculateBuyAmount result, NOT your input amount.
|
|
@@ -144,27 +129,12 @@ await buy({ tokenName: 'woohoo', amount: '10', type: 'native', expectedAmount: c
|
|
|
144
129
|
// Use calc.amount ("16843.7579794843252"), NOT the input '10'`,
|
|
145
130
|
},
|
|
146
131
|
maxAcceptableReverseBondingCurveFee: {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
description: 'Optional base reverse bonding curve fee from calculateBuyAmount (GALA). Use result.reverseBondingCurveFee. Works with maxAcceptableReverseBondingCurveFeeSlippageFactor for automatic slippage adjustment.',
|
|
150
|
-
},
|
|
151
|
-
maxAcceptableReverseBondingCurveFeeSlippageFactor: {
|
|
152
|
-
type: 'number',
|
|
153
|
-
minimum: 0,
|
|
154
|
-
maximum: 1,
|
|
155
|
-
description: 'Optional slippage tolerance for reverse bonding curve fee (decimal, e.g., 0.01 for 1%). Defaults to 0.01 (1%) if not provided. Applied to maxAcceptableReverseBondingCurveFee to increase max acceptable fee.',
|
|
156
|
-
},
|
|
157
|
-
slippageToleranceFactor: {
|
|
158
|
-
type: 'number',
|
|
159
|
-
minimum: 0,
|
|
160
|
-
maximum: 1,
|
|
161
|
-
description: 'Decimal format (0.05 = 5% slippage)',
|
|
162
|
-
},
|
|
163
|
-
privateKey: {
|
|
164
|
-
type: 'string',
|
|
165
|
-
pattern: '^0x[a-fA-F0-9]{64}$',
|
|
166
|
-
description: 'Optional private key override for this operation (format: "0x" + 64 hex characters). If provided, uses this wallet instead of the default MCP server wallet.',
|
|
132
|
+
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
133
|
+
description: 'RECOMMENDED: Base reverse bonding curve fee from calculateBuyAmount (GALA). Use result.reverseBondingCurveFee. Omitting this may cause transaction failures. Works with maxAcceptableReverseBondingCurveFeeSlippageFactor for automatic slippage adjustment.',
|
|
167
134
|
},
|
|
135
|
+
maxAcceptableReverseBondingCurveFeeSlippageFactor: common_schemas_js_1.RBC_FEE_SLIPPAGE_SCHEMA,
|
|
136
|
+
slippageToleranceFactor: common_schemas_js_1.SLIPPAGE_TOLERANCE_SCHEMA,
|
|
137
|
+
privateKey: common_schemas_js_1.PRIVATE_KEY_SCHEMA,
|
|
168
138
|
},
|
|
169
139
|
required: ['tokenName', 'amount', 'type', 'expectedAmount', 'slippageToleranceFactor'],
|
|
170
140
|
},
|
|
@@ -188,24 +158,22 @@ exports.sellTokensTool = {
|
|
|
188
158
|
description: `Execute token sale with slippage protection.
|
|
189
159
|
|
|
190
160
|
WORKFLOW:
|
|
191
|
-
1. calculateSellAmount() → Get expected output (result.amount)
|
|
192
|
-
2. sell() → Execute trade with expectedAmount
|
|
161
|
+
1. calculateSellAmount() → Get expected output (result.amount AND result.reverseBondingCurveFee)
|
|
162
|
+
2. sell() → Execute trade with BOTH expectedAmount AND maxAcceptableReverseBondingCurveFee
|
|
193
163
|
3. fetchTrades() → Verify trade completed
|
|
194
164
|
|
|
195
|
-
CRITICAL:
|
|
165
|
+
CRITICAL: Extract BOTH parameters from calculateSellAmount:
|
|
166
|
+
- result.amount → expectedAmount
|
|
167
|
+
- result.reverseBondingCurveFee → maxAcceptableReverseBondingCurveFee
|
|
168
|
+
Omitting reverseBondingCurveFee may cause transaction failures!
|
|
196
169
|
|
|
197
170
|
RETURNS: Transaction details including input/output amounts and transaction ID`,
|
|
198
171
|
inputSchema: {
|
|
199
172
|
type: 'object',
|
|
200
173
|
properties: {
|
|
201
|
-
tokenName:
|
|
202
|
-
type: 'string',
|
|
203
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
204
|
-
description: 'Token name',
|
|
205
|
-
},
|
|
174
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
206
175
|
amount: {
|
|
207
|
-
|
|
208
|
-
pattern: '^[0-9.]+$',
|
|
176
|
+
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
209
177
|
description: 'Amount to sell/receive',
|
|
210
178
|
},
|
|
211
179
|
type: {
|
|
@@ -217,8 +185,7 @@ RETURNS: Transaction details including input/output amounts and transaction ID`,
|
|
|
217
185
|
- 'exact': Selling exact token amount`,
|
|
218
186
|
},
|
|
219
187
|
expectedAmount: {
|
|
220
|
-
|
|
221
|
-
pattern: '^[0-9.]+$',
|
|
188
|
+
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
222
189
|
description: `Expected GALA output amount from calculateSellAmount (REQUIRED).
|
|
223
190
|
|
|
224
191
|
CRITICAL: This is the 'amount' field from calculateSellAmount result, NOT your input amount.
|
|
@@ -237,7 +204,7 @@ await sell({ tokenName: 'woohoo', amount: '10', type: 'native', expectedAmount:
|
|
|
237
204
|
maxAcceptableReverseBondingCurveFee: {
|
|
238
205
|
type: 'string',
|
|
239
206
|
pattern: '^[0-9.]+$',
|
|
240
|
-
description: '
|
|
207
|
+
description: 'RECOMMENDED: Base reverse bonding curve fee from calculateSellAmount (GALA). Use result.reverseBondingCurveFee. Omitting this may cause transaction failures. Works with maxAcceptableReverseBondingCurveFeeSlippageFactor for automatic slippage adjustment.',
|
|
241
208
|
},
|
|
242
209
|
maxAcceptableReverseBondingCurveFeeSlippageFactor: {
|
|
243
210
|
type: 'number',
|
|
@@ -280,47 +247,27 @@ exports.fetchTradesTool = {
|
|
|
280
247
|
inputSchema: {
|
|
281
248
|
type: 'object',
|
|
282
249
|
properties: {
|
|
283
|
-
tokenName:
|
|
284
|
-
type: 'string',
|
|
285
|
-
pattern: '^[a-z0-9_-]{2,20}$',
|
|
286
|
-
description: 'Token name',
|
|
287
|
-
},
|
|
250
|
+
tokenName: common_schemas_js_1.TOKEN_NAME_SCHEMA,
|
|
288
251
|
tradeType: {
|
|
289
252
|
type: 'string',
|
|
290
253
|
enum: ['BUY', 'SELL'],
|
|
291
254
|
description: 'Filter by trade type',
|
|
292
255
|
},
|
|
293
256
|
userAddress: {
|
|
294
|
-
|
|
295
|
-
pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
|
|
257
|
+
...common_schemas_js_1.ADDRESS_SCHEMA,
|
|
296
258
|
description: 'Filter by user address',
|
|
297
259
|
},
|
|
298
|
-
page:
|
|
299
|
-
|
|
300
|
-
minimum: 1,
|
|
301
|
-
description: 'Page number (default: 1)',
|
|
302
|
-
},
|
|
303
|
-
limit: {
|
|
304
|
-
type: 'number',
|
|
305
|
-
minimum: 1,
|
|
306
|
-
maximum: 20, // TRADE_CONSTRAINTS.PAGINATION.MAX_LIMIT from SDK
|
|
307
|
-
description: 'Results per page (default: 20, maximum: 20)',
|
|
308
|
-
},
|
|
260
|
+
page: common_schemas_js_1.PAGE_SCHEMA,
|
|
261
|
+
limit: (0, common_schemas_js_1.createLimitSchema)('trade', 20),
|
|
309
262
|
startDate: {
|
|
310
|
-
|
|
311
|
-
format: 'date-time',
|
|
263
|
+
...common_schemas_js_1.DATE_TIME_SCHEMA,
|
|
312
264
|
description: 'Filter by start date',
|
|
313
265
|
},
|
|
314
266
|
endDate: {
|
|
315
|
-
|
|
316
|
-
format: 'date-time',
|
|
267
|
+
...common_schemas_js_1.DATE_TIME_SCHEMA,
|
|
317
268
|
description: 'Filter by end date',
|
|
318
269
|
},
|
|
319
|
-
sortOrder:
|
|
320
|
-
type: 'string',
|
|
321
|
-
enum: ['ASC', 'DESC'],
|
|
322
|
-
description: 'Sort order (default: DESC)',
|
|
323
|
-
},
|
|
270
|
+
sortOrder: common_schemas_js_1.SORT_ORDER_SCHEMA,
|
|
324
271
|
},
|
|
325
272
|
},
|
|
326
273
|
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
@@ -345,8 +292,7 @@ exports.calculateInitialBuyTool = {
|
|
|
345
292
|
type: 'object',
|
|
346
293
|
properties: {
|
|
347
294
|
amount: {
|
|
348
|
-
|
|
349
|
-
pattern: '^[0-9.]+$',
|
|
295
|
+
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
350
296
|
description: 'GALA amount to spend for initial buy (standard decimal format, e.g., "100" for 100 GALA)',
|
|
351
297
|
},
|
|
352
298
|
},
|
|
@@ -375,11 +321,7 @@ Note: This is a synchronous HTTP call, not WebSocket monitoring.`,
|
|
|
375
321
|
inputSchema: {
|
|
376
322
|
type: 'object',
|
|
377
323
|
properties: {
|
|
378
|
-
transactionId:
|
|
379
|
-
type: 'string',
|
|
380
|
-
pattern: '^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$',
|
|
381
|
-
description: 'Transaction ID (UUID format) from buy(), sell(), or launchToken()',
|
|
382
|
-
},
|
|
324
|
+
transactionId: common_schemas_js_1.TRANSACTION_ID_SCHEMA,
|
|
383
325
|
},
|
|
384
326
|
required: ['transactionId'],
|
|
385
327
|
},
|