@gala-chain/launchpad-mcp-server 1.0.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/.env.example +13 -0
- package/.eslintrc.json +20 -0
- package/README.md +178 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +32 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +151 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/balance/index.d.ts +12 -0
- package/dist/tools/balance/index.d.ts.map +1 -0
- package/dist/tools/balance/index.js +182 -0
- package/dist/tools/balance/index.js.map +1 -0
- package/dist/tools/creation/index.d.ts +9 -0
- package/dist/tools/creation/index.d.ts.map +1 -0
- package/dist/tools/creation/index.js +154 -0
- package/dist/tools/creation/index.js.map +1 -0
- package/dist/tools/index.d.ts +10 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +27 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/pools/fetchPoolDetails.d.ts +6 -0
- package/dist/tools/pools/fetchPoolDetails.d.ts.map +1 -0
- package/dist/tools/pools/fetchPoolDetails.js +25 -0
- package/dist/tools/pools/fetchPoolDetails.js.map +1 -0
- package/dist/tools/pools/fetchPools.d.ts +6 -0
- package/dist/tools/pools/fetchPools.d.ts.map +1 -0
- package/dist/tools/pools/fetchPools.js +44 -0
- package/dist/tools/pools/fetchPools.js.map +1 -0
- package/dist/tools/pools/index.d.ts +14 -0
- package/dist/tools/pools/index.d.ts.map +1 -0
- package/dist/tools/pools/index.js +215 -0
- package/dist/tools/pools/index.js.map +1 -0
- package/dist/tools/social/index.d.ts +8 -0
- package/dist/tools/social/index.d.ts.map +1 -0
- package/dist/tools/social/index.js +70 -0
- package/dist/tools/social/index.js.map +1 -0
- package/dist/tools/trading/index.d.ts +12 -0
- package/dist/tools/trading/index.d.ts.map +1 -0
- package/dist/tools/trading/index.js +270 -0
- package/dist/tools/trading/index.js.map +1 -0
- package/dist/tools/transfers/index.d.ts +8 -0
- package/dist/tools/transfers/index.d.ts.map +1 -0
- package/dist/tools/transfers/index.js +81 -0
- package/dist/tools/transfers/index.js.map +1 -0
- package/dist/types/mcp.d.ts +37 -0
- package/dist/types/mcp.d.ts.map +1 -0
- package/dist/types/mcp.js +5 -0
- package/dist/types/mcp.js.map +1 -0
- package/dist/utils/error-handler.d.ts +15 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +50 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/response-formatter.d.ts +19 -0
- package/dist/utils/response-formatter.d.ts.map +1 -0
- package/dist/utils/response-formatter.js +46 -0
- package/dist/utils/response-formatter.js.map +1 -0
- package/package.json +73 -0
- package/test-mcp.js +89 -0
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Token Creation Tools
|
|
3
|
+
*/
|
|
4
|
+
import { formatSuccess } from '../../utils/response-formatter.js';
|
|
5
|
+
import { withErrorHandling } from '../../utils/error-handler.js';
|
|
6
|
+
// 1. Launch Token
|
|
7
|
+
export const launchTokenTool = {
|
|
8
|
+
name: 'gala_launchpad_launch_token',
|
|
9
|
+
description: 'Create a new token on the launchpad',
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
tokenName: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
16
|
+
description: 'Token name',
|
|
17
|
+
},
|
|
18
|
+
tokenSymbol: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
pattern: '^[A-Z0-9]{2,10}$',
|
|
21
|
+
description: 'Token symbol',
|
|
22
|
+
},
|
|
23
|
+
description: {
|
|
24
|
+
type: 'string',
|
|
25
|
+
maxLength: 500,
|
|
26
|
+
description: 'Token description',
|
|
27
|
+
},
|
|
28
|
+
imageUrl: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
format: 'uri',
|
|
31
|
+
description: 'Token image URL',
|
|
32
|
+
},
|
|
33
|
+
totalSupply: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
pattern: '^[0-9]+$',
|
|
36
|
+
description: 'Total token supply',
|
|
37
|
+
},
|
|
38
|
+
reserveGala: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
pattern: '^[0-9.]+$',
|
|
41
|
+
description: 'Reserve GALA amount',
|
|
42
|
+
},
|
|
43
|
+
bondingCurveType: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
enum: ['LINEAR', 'EXPONENTIAL'],
|
|
46
|
+
description: 'Bonding curve type',
|
|
47
|
+
},
|
|
48
|
+
reverseBondingCurve: {
|
|
49
|
+
type: 'object',
|
|
50
|
+
properties: {
|
|
51
|
+
enabled: {
|
|
52
|
+
type: 'boolean',
|
|
53
|
+
description: 'Enable reverse bonding curve',
|
|
54
|
+
},
|
|
55
|
+
feePercentage: {
|
|
56
|
+
type: 'number',
|
|
57
|
+
minimum: 0,
|
|
58
|
+
maximum: 100,
|
|
59
|
+
description: 'Fee percentage',
|
|
60
|
+
},
|
|
61
|
+
reservePercentage: {
|
|
62
|
+
type: 'number',
|
|
63
|
+
minimum: 0,
|
|
64
|
+
maximum: 100,
|
|
65
|
+
description: 'Reserve percentage',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
required: ['enabled'],
|
|
69
|
+
description: 'Reverse bonding curve configuration',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
required: [
|
|
73
|
+
'tokenName',
|
|
74
|
+
'tokenSymbol',
|
|
75
|
+
'description',
|
|
76
|
+
'imageUrl',
|
|
77
|
+
'totalSupply',
|
|
78
|
+
'reserveGala',
|
|
79
|
+
'bondingCurveType',
|
|
80
|
+
'reverseBondingCurve',
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
84
|
+
const result = await sdk.launchToken(args);
|
|
85
|
+
return formatSuccess(result);
|
|
86
|
+
}),
|
|
87
|
+
};
|
|
88
|
+
// 2. Upload Token Image
|
|
89
|
+
export const uploadTokenImageTool = {
|
|
90
|
+
name: 'gala_launchpad_upload_token_image',
|
|
91
|
+
description: 'Upload token image from filesystem (Node.js only)',
|
|
92
|
+
inputSchema: {
|
|
93
|
+
type: 'object',
|
|
94
|
+
properties: {
|
|
95
|
+
tokenName: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
98
|
+
description: 'Token name (2-20 lowercase alphanumeric)',
|
|
99
|
+
},
|
|
100
|
+
imagePath: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
description: 'Absolute file path to image file',
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
required: ['tokenName', 'imagePath'],
|
|
106
|
+
},
|
|
107
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
108
|
+
const fs = await import('fs/promises');
|
|
109
|
+
const fileBuffer = await fs.readFile(args.imagePath);
|
|
110
|
+
const result = await sdk.uploadTokenImage({
|
|
111
|
+
tokenName: args.tokenName,
|
|
112
|
+
options: {
|
|
113
|
+
file: fileBuffer,
|
|
114
|
+
tokenName: args.tokenName,
|
|
115
|
+
},
|
|
116
|
+
});
|
|
117
|
+
return formatSuccess(result);
|
|
118
|
+
}),
|
|
119
|
+
};
|
|
120
|
+
// 3. Upload Profile Image
|
|
121
|
+
export const uploadProfileImageTool = {
|
|
122
|
+
name: 'gala_launchpad_upload_profile_image',
|
|
123
|
+
description: 'Upload profile image from filesystem (Node.js only)',
|
|
124
|
+
inputSchema: {
|
|
125
|
+
type: 'object',
|
|
126
|
+
properties: {
|
|
127
|
+
imagePath: {
|
|
128
|
+
type: 'string',
|
|
129
|
+
description: 'Absolute file path to image file',
|
|
130
|
+
},
|
|
131
|
+
walletAddress: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
|
|
134
|
+
description: 'Optional wallet address (defaults to authenticated user)',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
required: ['imagePath'],
|
|
138
|
+
},
|
|
139
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
140
|
+
const fs = await import('fs/promises');
|
|
141
|
+
const fileBuffer = await fs.readFile(args.imagePath);
|
|
142
|
+
const result = await sdk.uploadProfileImage({
|
|
143
|
+
file: fileBuffer,
|
|
144
|
+
walletAddress: args.walletAddress,
|
|
145
|
+
});
|
|
146
|
+
return formatSuccess(result);
|
|
147
|
+
}),
|
|
148
|
+
};
|
|
149
|
+
export const creationTools = [
|
|
150
|
+
launchTokenTool,
|
|
151
|
+
uploadTokenImageTool,
|
|
152
|
+
uploadProfileImageTool,
|
|
153
|
+
];
|
|
154
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/creation/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,kBAAkB;AAClB,MAAM,CAAC,MAAM,eAAe,GAAY;IACtC,IAAI,EAAE,6BAA6B;IACnC,WAAW,EAAE,qCAAqC;IAClD,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,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,kBAAkB;gBAC3B,WAAW,EAAE,cAAc;aAC5B;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,SAAS,EAAE,GAAG;gBACd,WAAW,EAAE,mBAAmB;aACjC;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AW,EAAE,0DAA0D;aACxE;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,OAAO,EAAE,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QACvC,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAErD,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,kBAAkB,CAAC;YAC1C,IAAI,EAAE,UAAU;YAChB,aAAa,EAAE,IAAI,CAAC,aAAa;SAClC,CAAC,CAAC;QACH,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAc;IACtC,eAAe;IACf,oBAAoB;IACpB,sBAAsB;CACvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH;;GAEG;AACH,eAAO,MAAM,KAAK,qCAOjB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Registry
|
|
3
|
+
*
|
|
4
|
+
* All 25 MCP tools for Gala Launchpad
|
|
5
|
+
*/
|
|
6
|
+
import { poolTools } from './pools/index.js';
|
|
7
|
+
import { tradingTools } from './trading/index.js';
|
|
8
|
+
import { balanceTools } from './balance/index.js';
|
|
9
|
+
import { creationTools } from './creation/index.js';
|
|
10
|
+
import { socialTools } from './social/index.js';
|
|
11
|
+
import { transferTools } from './transfers/index.js';
|
|
12
|
+
/**
|
|
13
|
+
* Complete tool registry (27 tools)
|
|
14
|
+
*/
|
|
15
|
+
export const tools = [
|
|
16
|
+
...poolTools, // 8 tools
|
|
17
|
+
...tradingTools, // 6 tools
|
|
18
|
+
...balanceTools, // 6 tools
|
|
19
|
+
...creationTools, // 3 tools
|
|
20
|
+
...socialTools, // 2 tools
|
|
21
|
+
...transferTools, // 2 tools
|
|
22
|
+
];
|
|
23
|
+
// Verify tool count
|
|
24
|
+
if (tools.length !== 27) {
|
|
25
|
+
console.warn(`Warning: Expected 27 tools, but registered ${tools.length} tools`);
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,GAAG,SAAS,EAAO,UAAU;IAC7B,GAAG,YAAY,EAAI,UAAU;IAC7B,GAAG,YAAY,EAAI,UAAU;IAC7B,GAAG,aAAa,EAAG,UAAU;IAC7B,GAAG,WAAW,EAAK,UAAU;IAC7B,GAAG,aAAa,EAAG,UAAU;CAC9B,CAAC;AAEF,oBAAoB;AACpB,IAAI,KAAK,CAAC,MAAM,KAAK,EAAE,EAAE,CAAC;IACxB,OAAO,CAAC,IAAI,CACV,8CAA8C,KAAK,CAAC,MAAM,QAAQ,CACnE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchPoolDetails.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchPoolDetails.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,eAAO,MAAM,oBAAoB,EAAE,OAkBlC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fetch Pool Details Tool
|
|
3
|
+
*/
|
|
4
|
+
import { formatSuccess } from '../../utils/response-formatter.js';
|
|
5
|
+
import { withErrorHandling } from '../../utils/error-handler.js';
|
|
6
|
+
export const fetchPoolDetailsTool = {
|
|
7
|
+
name: 'gala_launchpad_fetch_pool_details',
|
|
8
|
+
description: 'Get detailed pool state from GalaChain bonding curve',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
tokenName: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
15
|
+
description: 'Token name',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
required: ['tokenName'],
|
|
19
|
+
},
|
|
20
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
21
|
+
const result = await sdk.fetchPoolDetails(args.tokenName);
|
|
22
|
+
return formatSuccess(result);
|
|
23
|
+
}),
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=fetchPoolDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchPoolDetails.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchPoolDetails.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,MAAM,CAAC,MAAM,oBAAoB,GAAY;IAC3C,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,sDAAsD;IACnE,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;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,OAAO,EAAE,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC1D,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchPools.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/fetchPools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAIlD,eAAO,MAAM,cAAc,EAAE,OAsC5B,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fetch Pools Tool
|
|
3
|
+
*/
|
|
4
|
+
import { formatSuccess } from '../../utils/response-formatter.js';
|
|
5
|
+
import { withErrorHandling } from '../../utils/error-handler.js';
|
|
6
|
+
export const fetchPoolsTool = {
|
|
7
|
+
name: 'gala_launchpad_fetch_pools',
|
|
8
|
+
description: 'Fetch token pools from Gala Launchpad with filtering and pagination',
|
|
9
|
+
inputSchema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
type: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
enum: ['recent', 'trending', 'user'],
|
|
15
|
+
description: 'Type of pools to fetch (default: recent)',
|
|
16
|
+
},
|
|
17
|
+
creatorAddress: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
|
|
20
|
+
description: 'Filter by creator address (optional)',
|
|
21
|
+
},
|
|
22
|
+
page: {
|
|
23
|
+
type: 'number',
|
|
24
|
+
minimum: 1,
|
|
25
|
+
description: 'Page number (default: 1)',
|
|
26
|
+
},
|
|
27
|
+
limit: {
|
|
28
|
+
type: 'number',
|
|
29
|
+
minimum: 1,
|
|
30
|
+
maximum: 100,
|
|
31
|
+
description: 'Results per page (default: 20)',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
36
|
+
const result = await sdk.fetchPools({
|
|
37
|
+
type: args.type || 'recent',
|
|
38
|
+
page: args.page || 1,
|
|
39
|
+
limit: args.limit || 20,
|
|
40
|
+
});
|
|
41
|
+
return formatSuccess(result);
|
|
42
|
+
}),
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=fetchPools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetchPools.js","sourceRoot":"","sources":["../../../src/tools/pools/fetchPools.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,MAAM,CAAC,MAAM,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,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,UAAU,CAAC;YAClC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,QAAQ;YAC3B,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC;YACpB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;SACxB,CAAC,CAAC;QAEH,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pool Management Tools
|
|
3
|
+
*/
|
|
4
|
+
import type { MCPTool } from '../../types/mcp.js';
|
|
5
|
+
export declare const fetchPoolsTool: MCPTool;
|
|
6
|
+
export declare const fetchPoolDetailsTool: MCPTool;
|
|
7
|
+
export declare const fetchTokenDistributionTool: MCPTool;
|
|
8
|
+
export declare const fetchTokenBadgesTool: MCPTool;
|
|
9
|
+
export declare const fetchVolumeDataTool: MCPTool;
|
|
10
|
+
export declare const checkTokenNameTool: MCPTool;
|
|
11
|
+
export declare const checkTokenSymbolTool: MCPTool;
|
|
12
|
+
export declare const resolveVaultAddressTool: MCPTool;
|
|
13
|
+
export declare const poolTools: MCPTool[];
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/pools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAKlD,eAAO,MAAM,cAAc,EAAE,OAqC5B,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,OAkBlC,CAAC;AAGF,eAAO,MAAM,0BAA0B,EAAE,OAkBxC,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,OAkBlC,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,OAsCjC,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,OAqBhC,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,OAqBlC,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,OAkBrC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,OAAO,EAS9B,CAAC"}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pool Management Tools
|
|
3
|
+
*/
|
|
4
|
+
import { formatSuccess, formatBoolean } from '../../utils/response-formatter.js';
|
|
5
|
+
import { withErrorHandling } from '../../utils/error-handler.js';
|
|
6
|
+
// 1. Fetch Pools
|
|
7
|
+
export const fetchPoolsTool = {
|
|
8
|
+
name: 'gala_launchpad_fetch_pools',
|
|
9
|
+
description: 'Fetch token pools from Gala Launchpad with filtering and pagination',
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
type: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
enum: ['recent', 'trending', 'user'],
|
|
16
|
+
description: 'Type of pools to fetch (default: recent)',
|
|
17
|
+
},
|
|
18
|
+
creatorAddress: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
pattern: '^(0x[a-fA-F0-9]{40}|eth\\|[a-fA-F0-9]{40})$',
|
|
21
|
+
description: 'Filter by creator address (optional)',
|
|
22
|
+
},
|
|
23
|
+
page: {
|
|
24
|
+
type: 'number',
|
|
25
|
+
minimum: 1,
|
|
26
|
+
description: 'Page number (default: 1)',
|
|
27
|
+
},
|
|
28
|
+
limit: {
|
|
29
|
+
type: 'number',
|
|
30
|
+
minimum: 1,
|
|
31
|
+
maximum: 100,
|
|
32
|
+
description: 'Results per page (default: 20)',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
37
|
+
const result = await sdk.fetchPools({
|
|
38
|
+
type: args.type || 'recent',
|
|
39
|
+
page: args.page || 1,
|
|
40
|
+
limit: args.limit || 20,
|
|
41
|
+
});
|
|
42
|
+
return formatSuccess(result);
|
|
43
|
+
}),
|
|
44
|
+
};
|
|
45
|
+
// 2. Fetch Pool Details
|
|
46
|
+
export const fetchPoolDetailsTool = {
|
|
47
|
+
name: 'gala_launchpad_fetch_pool_details',
|
|
48
|
+
description: 'Get detailed pool state from GalaChain bonding curve',
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
properties: {
|
|
52
|
+
tokenName: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
55
|
+
description: 'Token name',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
required: ['tokenName'],
|
|
59
|
+
},
|
|
60
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
61
|
+
const result = await sdk.fetchPoolDetails(args.tokenName);
|
|
62
|
+
return formatSuccess(result);
|
|
63
|
+
}),
|
|
64
|
+
};
|
|
65
|
+
// 3. Fetch Token Distribution
|
|
66
|
+
export const fetchTokenDistributionTool = {
|
|
67
|
+
name: 'gala_launchpad_fetch_token_distribution',
|
|
68
|
+
description: 'Get holder distribution and supply metrics',
|
|
69
|
+
inputSchema: {
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: {
|
|
72
|
+
tokenName: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
75
|
+
description: 'Token name',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
required: ['tokenName'],
|
|
79
|
+
},
|
|
80
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
81
|
+
const result = await sdk.fetchTokenDistribution(args.tokenName);
|
|
82
|
+
return formatSuccess(result);
|
|
83
|
+
}),
|
|
84
|
+
};
|
|
85
|
+
// 4. Fetch Token Badges
|
|
86
|
+
export const fetchTokenBadgesTool = {
|
|
87
|
+
name: 'gala_launchpad_fetch_token_badges',
|
|
88
|
+
description: 'Get achievement badges for volume and engagement',
|
|
89
|
+
inputSchema: {
|
|
90
|
+
type: 'object',
|
|
91
|
+
properties: {
|
|
92
|
+
tokenName: {
|
|
93
|
+
type: 'string',
|
|
94
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
95
|
+
description: 'Token name',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
required: ['tokenName'],
|
|
99
|
+
},
|
|
100
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
101
|
+
const result = await sdk.fetchTokenBadges(args.tokenName);
|
|
102
|
+
return formatSuccess(result);
|
|
103
|
+
}),
|
|
104
|
+
};
|
|
105
|
+
// 5. Fetch Volume Data
|
|
106
|
+
export const fetchVolumeDataTool = {
|
|
107
|
+
name: 'gala_launchpad_fetch_volume_data',
|
|
108
|
+
description: 'Get OHLCV (candlestick) data for charting',
|
|
109
|
+
inputSchema: {
|
|
110
|
+
type: 'object',
|
|
111
|
+
properties: {
|
|
112
|
+
tokenName: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
115
|
+
description: 'Token name',
|
|
116
|
+
},
|
|
117
|
+
from: {
|
|
118
|
+
type: 'string',
|
|
119
|
+
format: 'date-time',
|
|
120
|
+
description: 'Start date (ISO 8601)',
|
|
121
|
+
},
|
|
122
|
+
to: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
format: 'date-time',
|
|
125
|
+
description: 'End date (ISO 8601)',
|
|
126
|
+
},
|
|
127
|
+
resolution: {
|
|
128
|
+
type: 'string',
|
|
129
|
+
enum: ['1m', '5m', '15m', '1h', '4h', '1d'],
|
|
130
|
+
description: 'Time resolution (default: 1h)',
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
required: ['tokenName'],
|
|
134
|
+
},
|
|
135
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
136
|
+
const result = await sdk.fetchVolumeData({
|
|
137
|
+
tokenName: args.tokenName,
|
|
138
|
+
from: args.from,
|
|
139
|
+
to: args.to,
|
|
140
|
+
resolution: args.resolution || '1h',
|
|
141
|
+
});
|
|
142
|
+
return formatSuccess(result);
|
|
143
|
+
}),
|
|
144
|
+
};
|
|
145
|
+
// 6. Check Token Name
|
|
146
|
+
export const checkTokenNameTool = {
|
|
147
|
+
name: 'gala_launchpad_check_token_name',
|
|
148
|
+
description: 'Check if token name is available',
|
|
149
|
+
inputSchema: {
|
|
150
|
+
type: 'object',
|
|
151
|
+
properties: {
|
|
152
|
+
tokenName: {
|
|
153
|
+
type: 'string',
|
|
154
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
155
|
+
description: 'Token name to check',
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
required: ['tokenName'],
|
|
159
|
+
},
|
|
160
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
161
|
+
const available = await sdk.isTokenNameAvailable(args.tokenName);
|
|
162
|
+
return formatBoolean(available, available ? 'Token name is available' : 'Token name is already taken');
|
|
163
|
+
}),
|
|
164
|
+
};
|
|
165
|
+
// 7. Check Token Symbol
|
|
166
|
+
export const checkTokenSymbolTool = {
|
|
167
|
+
name: 'gala_launchpad_check_token_symbol',
|
|
168
|
+
description: 'Check if token symbol is available',
|
|
169
|
+
inputSchema: {
|
|
170
|
+
type: 'object',
|
|
171
|
+
properties: {
|
|
172
|
+
symbol: {
|
|
173
|
+
type: 'string',
|
|
174
|
+
pattern: '^[A-Z0-9]{2,10}$',
|
|
175
|
+
description: 'Token symbol to check',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
required: ['symbol'],
|
|
179
|
+
},
|
|
180
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
181
|
+
const available = await sdk.isTokenSymbolAvailable(args.symbol);
|
|
182
|
+
return formatBoolean(available, available ? 'Token symbol is available' : 'Token symbol is already taken');
|
|
183
|
+
}),
|
|
184
|
+
};
|
|
185
|
+
// 8. Resolve Vault Address
|
|
186
|
+
export const resolveVaultAddressTool = {
|
|
187
|
+
name: 'gala_launchpad_resolve_vault_address',
|
|
188
|
+
description: 'Get GalaChain vault address for a token (useful for debugging)',
|
|
189
|
+
inputSchema: {
|
|
190
|
+
type: 'object',
|
|
191
|
+
properties: {
|
|
192
|
+
tokenName: {
|
|
193
|
+
type: 'string',
|
|
194
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
195
|
+
description: 'Token name',
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
required: ['tokenName'],
|
|
199
|
+
},
|
|
200
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
201
|
+
const vaultAddress = await sdk.resolveVaultAddress(args.tokenName);
|
|
202
|
+
return formatSuccess({ tokenName: args.tokenName, vaultAddress });
|
|
203
|
+
}),
|
|
204
|
+
};
|
|
205
|
+
export const poolTools = [
|
|
206
|
+
fetchPoolsTool,
|
|
207
|
+
fetchPoolDetailsTool,
|
|
208
|
+
fetchTokenDistributionTool,
|
|
209
|
+
fetchTokenBadgesTool,
|
|
210
|
+
fetchVolumeDataTool,
|
|
211
|
+
checkTokenNameTool,
|
|
212
|
+
checkTokenSymbolTool,
|
|
213
|
+
resolveVaultAddressTool,
|
|
214
|
+
];
|
|
215
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/pools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,iBAAiB;AACjB,MAAM,CAAC,MAAM,cAAc,GAAY;IACrC,IAAI,EAAE,4BAA4B;IAClC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EAAE,sCAAsC;IAC5C,WAAW,EAAE,gEAAgE;IAC7E,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;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,OAAO,EAAE,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,YAAY,GAAG,MAAM,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnE,OAAO,aAAa,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC;IACpE,CAAC,CAAC;CACH,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAc;IAClC,cAAc;IACd,oBAAoB;IACpB,0BAA0B;IAC1B,oBAAoB;IACpB,mBAAmB;IACnB,kBAAkB;IAClB,oBAAoB;IACpB,uBAAuB;CACxB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comments & Social Tools
|
|
3
|
+
*/
|
|
4
|
+
import type { MCPTool } from '../../types/mcp.js';
|
|
5
|
+
export declare const postCommentTool: MCPTool;
|
|
6
|
+
export declare const fetchCommentsTool: MCPTool;
|
|
7
|
+
export declare const socialTools: MCPTool[];
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +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;AAKlD,eAAO,MAAM,eAAe,EAAE,OA0B7B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,OAiC/B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,OAAO,EAAyC,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Comments & Social Tools
|
|
3
|
+
*/
|
|
4
|
+
import { formatSuccess } from '../../utils/response-formatter.js';
|
|
5
|
+
import { withErrorHandling } from '../../utils/error-handler.js';
|
|
6
|
+
// 1. Post Comment
|
|
7
|
+
export const postCommentTool = {
|
|
8
|
+
name: 'gala_launchpad_post_comment',
|
|
9
|
+
description: 'Post a comment on a token pool',
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
tokenName: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
16
|
+
description: 'Token name',
|
|
17
|
+
},
|
|
18
|
+
content: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
maxLength: 500,
|
|
21
|
+
description: 'Comment content',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
required: ['tokenName', 'content'],
|
|
25
|
+
},
|
|
26
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
27
|
+
const result = await sdk.postComment({
|
|
28
|
+
tokenName: args.tokenName,
|
|
29
|
+
content: args.content,
|
|
30
|
+
});
|
|
31
|
+
return formatSuccess(result);
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
// 2. Fetch Comments
|
|
35
|
+
export const fetchCommentsTool = {
|
|
36
|
+
name: 'gala_launchpad_fetch_comments',
|
|
37
|
+
description: 'Get comments for a token pool',
|
|
38
|
+
inputSchema: {
|
|
39
|
+
type: 'object',
|
|
40
|
+
properties: {
|
|
41
|
+
tokenName: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
pattern: '^[a-z0-9_-]{2,20}$',
|
|
44
|
+
description: 'Token name',
|
|
45
|
+
},
|
|
46
|
+
page: {
|
|
47
|
+
type: 'number',
|
|
48
|
+
minimum: 1,
|
|
49
|
+
description: 'Page number (default: 1)',
|
|
50
|
+
},
|
|
51
|
+
limit: {
|
|
52
|
+
type: 'number',
|
|
53
|
+
minimum: 1,
|
|
54
|
+
maximum: 100,
|
|
55
|
+
description: 'Results per page (default: 20)',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
required: ['tokenName'],
|
|
59
|
+
},
|
|
60
|
+
handler: withErrorHandling(async (sdk, args) => {
|
|
61
|
+
const result = await sdk.fetchComments({
|
|
62
|
+
tokenName: args.tokenName,
|
|
63
|
+
page: args.page || 1,
|
|
64
|
+
limit: args.limit || 20,
|
|
65
|
+
});
|
|
66
|
+
return formatSuccess(result);
|
|
67
|
+
}),
|
|
68
|
+
};
|
|
69
|
+
export const socialTools = [postCommentTool, fetchCommentsTool];
|
|
70
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/social/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,kBAAkB;AAClB,MAAM,CAAC,MAAM,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,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,MAAM,GAA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
3
|
+
*/
|
|
4
|
+
import type { MCPTool } from '../../types/mcp.js';
|
|
5
|
+
export declare const calculateBuyAmountTool: MCPTool;
|
|
6
|
+
export declare const calculateSellAmountTool: MCPTool;
|
|
7
|
+
export declare const buyTokensTool: MCPTool;
|
|
8
|
+
export declare const sellTokensTool: MCPTool;
|
|
9
|
+
export declare const fetchTradesTool: MCPTool;
|
|
10
|
+
export declare const calculateInitialBuyTool: MCPTool;
|
|
11
|
+
export declare const tradingTools: MCPTool[];
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|