@gala-chain/launchpad-mcp-server 5.1.1 → 7.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -113
- package/dist/constants/mcpToolNames.d.ts +2 -2
- package/dist/constants/mcpToolNames.d.ts.map +1 -1
- package/dist/constants/mcpToolNames.js +1 -1
- package/dist/constants/mcpToolNames.js.map +1 -1
- package/dist/generated/version.d.ts +1 -1
- package/dist/generated/version.d.ts.map +1 -1
- package/dist/generated/version.js +1 -1
- package/dist/generated/version.js.map +1 -1
- package/dist/prompts/analysis.d.ts.map +1 -1
- package/dist/prompts/analysis.js +5 -13
- package/dist/prompts/analysis.js.map +1 -1
- package/dist/prompts/dex-trading.d.ts.map +1 -1
- package/dist/prompts/dex-trading.js +10 -8
- package/dist/prompts/dex-trading.js.map +1 -1
- package/dist/prompts/manifest.d.ts +2 -2
- package/dist/prompts/manifest.d.ts.map +1 -1
- package/dist/prompts/manifest.js +5 -12
- package/dist/prompts/manifest.js.map +1 -1
- package/dist/prompts/tier1-token-analysis.d.ts +0 -4
- package/dist/prompts/tier1-token-analysis.d.ts.map +1 -1
- package/dist/prompts/tier1-token-analysis.js +2 -87
- package/dist/prompts/tier1-token-analysis.js.map +1 -1
- package/dist/prompts/utility-tools.js +1 -1
- package/dist/prompts/utility-tools.js.map +1 -1
- package/dist/prompts/utility.d.ts +1 -1
- package/dist/prompts/utility.d.ts.map +1 -1
- package/dist/prompts/utility.js +7 -8
- package/dist/prompts/utility.js.map +1 -1
- package/dist/scripts/test-all-prompts.js +2 -44
- package/dist/scripts/test-all-prompts.js.map +1 -1
- package/dist/server.d.ts +4 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +13 -6
- package/dist/server.js.map +1 -1
- package/dist/tools/chat/index.d.ts +0 -14
- package/dist/tools/chat/index.d.ts.map +1 -1
- package/dist/tools/chat/index.js +1 -79
- package/dist/tools/chat/index.js.map +1 -1
- package/dist/tools/creation/index.d.ts.map +1 -1
- package/dist/tools/creation/index.js +10 -2
- package/dist/tools/creation/index.js.map +1 -1
- package/dist/tools/dex/helpers.d.ts +20 -419
- package/dist/tools/dex/helpers.d.ts.map +1 -1
- package/dist/tools/dex/helpers.js +127 -542
- package/dist/tools/dex/helpers.js.map +1 -1
- package/dist/tools/dex/index.d.ts +2 -51
- package/dist/tools/dex/index.d.ts.map +1 -1
- package/dist/tools/dex/index.js +144 -131
- package/dist/tools/dex/index.js.map +1 -1
- package/dist/tools/dex-liquidity/index.d.ts +1 -9
- package/dist/tools/dex-liquidity/index.d.ts.map +1 -1
- package/dist/tools/dex-liquidity/index.js +107 -310
- package/dist/tools/dex-liquidity/index.js.map +1 -1
- package/dist/tools/dex-pools/index.d.ts +1 -50
- package/dist/tools/dex-pools/index.d.ts.map +1 -1
- package/dist/tools/dex-pools/index.js +69 -173
- package/dist/tools/dex-pools/index.js.map +1 -1
- package/dist/tools/global-feed/getGlobalFeedStatus.d.ts.map +1 -1
- package/dist/tools/global-feed/getGlobalFeedStatus.js +2 -3
- package/dist/tools/global-feed/getGlobalFeedStatus.js.map +1 -1
- package/dist/tools/global-feed/monitorGlobalFeedEvents.d.ts.map +1 -1
- package/dist/tools/global-feed/monitorGlobalFeedEvents.js +2 -3
- package/dist/tools/global-feed/monitorGlobalFeedEvents.js.map +1 -1
- package/dist/tools/global-feed/subscribeToGlobalFeed.d.ts.map +1 -1
- package/dist/tools/global-feed/subscribeToGlobalFeed.js +3 -4
- package/dist/tools/global-feed/subscribeToGlobalFeed.js.map +1 -1
- package/dist/tools/global-feed/unsubscribeFromGlobalFeed.js +3 -3
- package/dist/tools/global-feed/unsubscribeFromGlobalFeed.js.map +1 -1
- package/dist/tools/handler-factories.d.ts +27 -15
- package/dist/tools/handler-factories.d.ts.map +1 -1
- package/dist/tools/handler-factories.js +58 -23
- package/dist/tools/handler-factories.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +16 -49
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/manifest.d.ts +3 -3
- package/dist/tools/manifest.d.ts.map +1 -1
- package/dist/tools/manifest.js +242 -98
- package/dist/tools/manifest.js.map +1 -1
- package/dist/tools/messages/getPinnedMessage.d.ts +1 -1
- package/dist/tools/messages/getPinnedMessage.js +1 -1
- package/dist/tools/messages/index.d.ts +1 -1
- package/dist/tools/messages/index.js +1 -1
- package/dist/tools/messages/pinMessage.d.ts +1 -1
- package/dist/tools/messages/pinMessage.js +1 -1
- package/dist/tools/messages/unpinMessage.d.ts +1 -1
- package/dist/tools/messages/unpinMessage.js +1 -1
- package/dist/tools/pagination-handler-factory.d.ts +6 -6
- package/dist/tools/pagination-handler-factory.js +6 -6
- package/dist/tools/pools/index.d.ts +0 -1
- package/dist/tools/pools/index.d.ts.map +1 -1
- package/dist/tools/pools/index.js +4 -11
- package/dist/tools/pools/index.js.map +1 -1
- package/dist/tools/trading/index.d.ts.map +1 -1
- package/dist/tools/trading/index.js +37 -4
- package/dist/tools/trading/index.js.map +1 -1
- package/dist/tools/utils/explainSdkUsage.d.ts +3 -104
- package/dist/tools/utils/explainSdkUsage.d.ts.map +1 -1
- package/dist/tools/utils/explainSdkUsage.js +301 -7036
- package/dist/tools/utils/explainSdkUsage.js.map +1 -1
- package/dist/tools/utils/getEnvironment.d.ts +1 -1
- package/dist/tools/utils/getEnvironment.js +2 -2
- package/dist/tools/utils/getEnvironment.js.map +1 -1
- package/dist/tools/utils/switchEnvironment.d.ts +1 -1
- package/dist/tools/utils/switchEnvironment.d.ts.map +1 -1
- package/dist/tools/utils/switchEnvironment.js +8 -5
- package/dist/tools/utils/switchEnvironment.js.map +1 -1
- package/dist/utils/error-templates.d.ts +10 -0
- package/dist/utils/error-templates.d.ts.map +1 -1
- package/dist/utils/error-templates.js +29 -1
- package/dist/utils/error-templates.js.map +1 -1
- package/dist/utils/pool-filter-builder.d.ts +1 -1
- package/dist/utils/pool-filter-builder.js +1 -1
- package/dist/utils/response-formatter.d.ts +16 -1
- package/dist/utils/response-formatter.d.ts.map +1 -1
- package/dist/utils/response-formatter.js +49 -2
- package/dist/utils/response-formatter.js.map +1 -1
- package/package.json +7 -6
- package/dist/tools/chat/getPinnedChatMessage.d.ts +0 -15
- package/dist/tools/chat/getPinnedChatMessage.d.ts.map +0 -1
- package/dist/tools/chat/getPinnedChatMessage.js +0 -37
- package/dist/tools/chat/getPinnedChatMessage.js.map +0 -1
- package/dist/tools/chat/pinChatMessage.d.ts +0 -16
- package/dist/tools/chat/pinChatMessage.d.ts.map +0 -1
- package/dist/tools/chat/pinChatMessage.js +0 -51
- package/dist/tools/chat/pinChatMessage.js.map +0 -1
- package/dist/tools/chat/unpinChatMessage.d.ts +0 -16
- package/dist/tools/chat/unpinChatMessage.d.ts.map +0 -1
- package/dist/tools/chat/unpinChatMessage.js +0 -39
- package/dist/tools/chat/unpinChatMessage.js.map +0 -1
|
@@ -1,385 +1,182 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* DEX Liquidity Position Management Tools
|
|
4
|
-
*
|
|
5
|
-
* Tools for managing liquidity positions on GalaSwap DEX, including:
|
|
6
|
-
* - Querying user positions and position details
|
|
7
|
-
* - Estimating liquidity removal
|
|
8
|
-
* - Adding liquidity by price or tick range
|
|
9
|
-
* - Removing liquidity and collecting fees
|
|
10
|
-
*/
|
|
2
|
+
/** MCP tools for current-contract GSwap liquidity positions. */
|
|
11
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
4
|
exports.liquidityPositionTools = exports.collectPositionFeesTool = exports.fetchSwapPositionDirectTool = exports.removeLiquidityTool = exports.addLiquidityByTicksTool = exports.addLiquidityByPriceTool = exports.estimateRemoveLiquidityTool = exports.getLiquidityPositionTool = exports.getLiquidityPositionByIdTool = exports.getAllUserLiquidityPositionsTool = exports.getUserLiquidityPositionsTool = void 0;
|
|
5
|
+
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
13
6
|
const response_formatter_js_1 = require("../../utils/response-formatter.js");
|
|
14
7
|
const error_handler_js_1 = require("../../utils/error-handler.js");
|
|
15
|
-
const handler_factories_js_1 = require("../handler-factories.js");
|
|
16
|
-
const common_schemas_js_1 = require("../../schemas/common-schemas.js");
|
|
17
8
|
const helpers_js_1 = require("../dex/helpers.js");
|
|
18
|
-
// 1. Get User Liquidity Positions
|
|
19
9
|
exports.getUserLiquidityPositionsTool = {
|
|
20
10
|
name: 'gala_launchpad_get_user_liquidity_positions',
|
|
21
|
-
description: 'Get
|
|
22
|
-
inputSchema: {
|
|
23
|
-
type: 'object',
|
|
24
|
-
properties: {
|
|
25
|
-
ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA,
|
|
26
|
-
limit: {
|
|
27
|
-
type: 'number',
|
|
28
|
-
minimum: 1,
|
|
29
|
-
maximum: 100,
|
|
30
|
-
description: 'Maximum number of positions to return (optional).',
|
|
31
|
-
},
|
|
32
|
-
bookmark: {
|
|
33
|
-
type: 'string',
|
|
34
|
-
description: 'Pagination bookmark from previous response (optional). Cannot be used together with withPrices - if you need pricing, use getAllUserLiquidityPositionsTool instead.',
|
|
35
|
-
},
|
|
36
|
-
withPrices: {
|
|
37
|
-
type: 'boolean',
|
|
38
|
-
description: 'Whether to fetch REST-backed pricing for each position with ~1s freshness (optional, default: false; no signer required). Cannot be used together with bookmark - if you need pagination, use bookmark without withPrices. Pricing concurrency is controlled by SDK-level pricingConcurrency configuration.',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
required: ['ownerAddress'],
|
|
42
|
-
},
|
|
11
|
+
description: 'Get current-contract GSwap liquidity positions owned by an address.',
|
|
12
|
+
inputSchema: { type: 'object', properties: { ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA }, required: ['ownerAddress'] },
|
|
43
13
|
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
// When pricing is requested, pass pricing options as 3rd parameter (can't use bookmark with options)
|
|
48
|
-
const pricingOptions = { withPrices: true };
|
|
49
|
-
result = await sdk.getSwapUserLiquidityPositions(args.ownerAddress, args.limit, pricingOptions);
|
|
50
|
-
}
|
|
51
|
-
else if (typeof args.bookmark !== 'undefined' && args.bookmark) {
|
|
52
|
-
// When only bookmark pagination is used, pass bookmark as 3rd parameter
|
|
53
|
-
result = await sdk.getSwapUserLiquidityPositions(args.ownerAddress, args.limit, args.bookmark);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
// No pagination or pricing, just fetch positions
|
|
57
|
-
result = await sdk.getSwapUserLiquidityPositions(args.ownerAddress, args.limit);
|
|
58
|
-
}
|
|
59
|
-
const parsed = (0, helpers_js_1.parsePositionListResult)(result);
|
|
60
|
-
const withPrices = typeof args.withPrices === 'boolean' && args.withPrices === true ? true : false;
|
|
61
|
-
return (0, response_formatter_js_1.formatSuccess)((0, helpers_js_1.formatPositionListResponse)(parsed, {
|
|
62
|
-
ownerAddress: args.ownerAddress,
|
|
63
|
-
withPrices,
|
|
64
|
-
}));
|
|
14
|
+
const owner = requiredString(args, 'ownerAddress');
|
|
15
|
+
const positions = await sdk.dex.positions.getUserPositions(owner);
|
|
16
|
+
return (0, response_formatter_js_1.formatSuccess)({ ownerAddress: owner, positions: (0, helpers_js_1.formatPositions)(positions), count: positions.length });
|
|
65
17
|
}),
|
|
66
18
|
};
|
|
67
|
-
// 2. Get ALL User Liquidity Positions (Auto-Paginated)
|
|
68
19
|
exports.getAllUserLiquidityPositionsTool = {
|
|
69
20
|
name: 'gala_launchpad_get_all_user_liquidity_positions',
|
|
70
|
-
description: 'Get all
|
|
71
|
-
inputSchema: {
|
|
72
|
-
|
|
73
|
-
properties: {
|
|
74
|
-
ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA,
|
|
75
|
-
withPrices: {
|
|
76
|
-
type: 'boolean',
|
|
77
|
-
description: 'Whether to fetch REST-backed pricing for each position with ~1s freshness (optional, default: false; no signer required). Pricing concurrency is controlled by SDK-level pricingConcurrency configuration.',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
required: ['ownerAddress'],
|
|
81
|
-
},
|
|
82
|
-
handler: (0, handler_factories_js_1.createOptionalParamsHandler)((sdk, params) => sdk.getAllSwapUserLiquidityPositions(params?.ownerAddress, params?.pricingOptions), (args) => ({
|
|
83
|
-
ownerAddress: args.ownerAddress,
|
|
84
|
-
pricingOptions: typeof args.withPrices === 'boolean' && args.withPrices === true ? { withPrices: true } : undefined,
|
|
85
|
-
}), (result, args) => {
|
|
86
|
-
const withPrices = typeof args.withPrices === 'boolean' && args.withPrices === true ? true : false;
|
|
87
|
-
return (0, helpers_js_1.formatPositionListResponse)((0, helpers_js_1.parsePositionListResult)(result), {
|
|
88
|
-
ownerAddress: args.ownerAddress,
|
|
89
|
-
withPrices,
|
|
90
|
-
messageSuffix: '(auto-paginated)',
|
|
91
|
-
});
|
|
92
|
-
}),
|
|
21
|
+
description: 'Get all current-contract GSwap liquidity positions owned by an address.',
|
|
22
|
+
inputSchema: { type: 'object', properties: { ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA }, required: ['ownerAddress'] },
|
|
23
|
+
handler: exports.getUserLiquidityPositionsTool.handler,
|
|
93
24
|
};
|
|
94
|
-
// 3. Get Liquidity Position by ID
|
|
95
25
|
exports.getLiquidityPositionByIdTool = {
|
|
96
26
|
name: 'gala_launchpad_get_liquidity_position_by_id',
|
|
97
|
-
description: 'Get
|
|
27
|
+
description: 'Get one current-contract GSwap position by its pair, fee, owner, and tick range.',
|
|
98
28
|
inputSchema: {
|
|
99
29
|
type: 'object',
|
|
100
|
-
properties: {
|
|
101
|
-
|
|
102
|
-
positionId: {
|
|
103
|
-
type: 'string',
|
|
104
|
-
minLength: 1,
|
|
105
|
-
description: 'Unique position identifier.',
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
required: ['ownerAddress', 'positionId'],
|
|
30
|
+
properties: { ...common_schemas_js_1.TOKEN_PAIR_WITH_TICKS_SCHEMA, ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA },
|
|
31
|
+
required: ['token0', 'token1', 'fee', 'tickLower', 'tickUpper', 'ownerAddress'],
|
|
109
32
|
},
|
|
110
|
-
handler: (
|
|
33
|
+
handler: createPositionLookupHandler(),
|
|
111
34
|
};
|
|
112
|
-
// 4. Get Liquidity Position by Token Pair
|
|
113
35
|
exports.getLiquidityPositionTool = {
|
|
114
36
|
name: 'gala_launchpad_get_liquidity_position',
|
|
115
|
-
description: 'Get
|
|
37
|
+
description: 'Get one current-contract GSwap position by pair, owner, and tick range.',
|
|
116
38
|
inputSchema: {
|
|
117
39
|
type: 'object',
|
|
118
|
-
properties: {
|
|
119
|
-
|
|
120
|
-
...common_schemas_js_1.TOKEN_PAIR_WITH_TICKS_SCHEMA,
|
|
121
|
-
},
|
|
122
|
-
required: ['ownerAddress', 'token0', 'token1', 'fee', 'tickLower', 'tickUpper'],
|
|
40
|
+
properties: { ...common_schemas_js_1.TOKEN_PAIR_WITH_TICKS_SCHEMA, ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA },
|
|
41
|
+
required: ['token0', 'token1', 'fee', 'tickLower', 'tickUpper', 'ownerAddress'],
|
|
123
42
|
},
|
|
124
|
-
|
|
125
|
-
handler: (0, handler_factories_js_1.createOptionResultHandler)((sdk, args) => sdk.getSwapLiquidityPosition(args.ownerAddress, (0, helpers_js_1.extractTokenPairWithTicksParams)(args)), 'No position found for specified token pair and tick range'),
|
|
43
|
+
handler: createPositionLookupHandler(),
|
|
126
44
|
};
|
|
127
|
-
// 5. Estimate Liquidity Removal
|
|
128
45
|
exports.estimateRemoveLiquidityTool = {
|
|
129
46
|
name: 'gala_launchpad_estimate_remove_liquidity',
|
|
130
|
-
description: 'Estimate
|
|
47
|
+
description: 'Estimate token amounts released by a current-contract GSwap liquidity withdrawal.',
|
|
131
48
|
inputSchema: {
|
|
132
49
|
type: 'object',
|
|
133
|
-
properties: {
|
|
134
|
-
|
|
135
|
-
liquidity: {
|
|
136
|
-
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
137
|
-
description: 'Liquidity amount to estimate removal for.',
|
|
138
|
-
},
|
|
139
|
-
ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA,
|
|
140
|
-
},
|
|
141
|
-
required: ['token0', 'token1', 'fee', 'liquidity', 'tickLower', 'tickUpper', 'ownerAddress'],
|
|
50
|
+
properties: { ...common_schemas_js_1.TOKEN_PAIR_WITH_TICKS_SCHEMA, liquidity: common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA, ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA },
|
|
51
|
+
required: ['token0', 'token1', 'fee', 'tickLower', 'tickUpper', 'liquidity', 'ownerAddress'],
|
|
142
52
|
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
...
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}),
|
|
149
|
-
// API only returns amount0 and amount1; other fields are optional
|
|
150
|
-
(estimate, args) => ({
|
|
151
|
-
amount0: estimate.amount0,
|
|
152
|
-
amount1: estimate.amount1,
|
|
153
|
-
message: `Removing ${String(args.liquidity)} liquidity would return approximately ${estimate.amount0} ${String(args.token0)} + ${estimate.amount1} ${String(args.token1)}`,
|
|
154
|
-
})),
|
|
53
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
54
|
+
const params = (0, helpers_js_1.extractTokenPairWithTicksParams)(args);
|
|
55
|
+
const estimate = await sdk.dex.positions.estimateRemoveLiquidity({ ...params, liquidity: requiredString(args, 'liquidity') });
|
|
56
|
+
return (0, response_formatter_js_1.formatSuccess)({ ...estimate, message: `Estimated withdrawal for ${params.token0}/${params.token1}.` });
|
|
57
|
+
}),
|
|
155
58
|
};
|
|
156
|
-
// 6. Add Liquidity by Price Range
|
|
157
59
|
exports.addLiquidityByPriceTool = {
|
|
158
60
|
name: 'gala_launchpad_add_liquidity_by_price',
|
|
159
|
-
description: 'Add liquidity
|
|
61
|
+
description: 'Add liquidity through sdk.dex.positions.addLiquidityByPrice and return confirm() output.',
|
|
160
62
|
inputSchema: {
|
|
161
63
|
type: 'object',
|
|
162
64
|
properties: {
|
|
163
65
|
...common_schemas_js_1.TOKEN_PAIR_SCHEMA,
|
|
164
|
-
minPrice:
|
|
165
|
-
|
|
166
|
-
description: 'Minimum price boundary (e.g., "0.90").',
|
|
167
|
-
},
|
|
168
|
-
maxPrice: {
|
|
169
|
-
type: 'string',
|
|
170
|
-
description: 'Maximum price boundary (e.g., "1.10").',
|
|
171
|
-
},
|
|
66
|
+
minPrice: common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
67
|
+
maxPrice: common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
172
68
|
...common_schemas_js_1.LIQUIDITY_AMOUNTS_SCHEMA,
|
|
69
|
+
amountIsToken0: { type: 'boolean', description: 'Whether amount is denominated in token0.' },
|
|
173
70
|
},
|
|
174
|
-
required: [
|
|
175
|
-
'token0',
|
|
176
|
-
'token1',
|
|
177
|
-
'fee',
|
|
178
|
-
'minPrice',
|
|
179
|
-
'maxPrice',
|
|
180
|
-
'amount0Desired',
|
|
181
|
-
'amount1Desired',
|
|
182
|
-
],
|
|
71
|
+
required: ['token0', 'token1', 'fee', 'minPrice', 'maxPrice', 'amount0Desired', 'amount1Desired'],
|
|
183
72
|
},
|
|
184
|
-
handler: (0,
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
amount0Desired: typedArgs.amount0Desired,
|
|
194
|
-
amount1Desired: typedArgs.amount1Desired,
|
|
195
|
-
amount0Min: typedArgs.amount0Min ?? '0',
|
|
196
|
-
amount1Min: typedArgs.amount1Min ?? '0',
|
|
197
|
-
};
|
|
198
|
-
}, (result, args) => {
|
|
199
|
-
// Type assertion is safe here because MCP schema validation ensures args match AddLiquidityByPriceArgs
|
|
200
|
-
const typedArgs = args;
|
|
201
|
-
return (0, helpers_js_1.formatAddLiquidityResponse)(result, typedArgs, {
|
|
202
|
-
priceRange: `${typedArgs.minPrice} - ${typedArgs.maxPrice}`,
|
|
73
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
74
|
+
const pair = (0, helpers_js_1.extractTokenPairParams)(args);
|
|
75
|
+
const { amount, amountIsToken0 } = depositAmount(args);
|
|
76
|
+
const transaction = await sdk.dex.positions.addLiquidityByPrice({
|
|
77
|
+
...pair,
|
|
78
|
+
minPrice: (0, helpers_js_1.asPriceIn)(requiredString(args, 'minPrice')),
|
|
79
|
+
maxPrice: (0, helpers_js_1.asPriceIn)(requiredString(args, 'maxPrice')),
|
|
80
|
+
amount,
|
|
81
|
+
amountIsToken0,
|
|
203
82
|
});
|
|
83
|
+
return (0, response_formatter_js_1.formatSuccess)({ ...(await (0, helpers_js_1.formatDexSubmission)(transaction)), token0: pair.token0, token1: pair.token1 });
|
|
204
84
|
}),
|
|
205
85
|
};
|
|
206
|
-
// 7. Add Liquidity by Tick Range
|
|
207
86
|
exports.addLiquidityByTicksTool = {
|
|
208
87
|
name: 'gala_launchpad_add_liquidity_by_ticks',
|
|
209
|
-
description: 'Add liquidity
|
|
88
|
+
description: 'Add liquidity through sdk.dex.positions.addLiquidityByTicks and return confirm() output.',
|
|
210
89
|
inputSchema: {
|
|
211
90
|
type: 'object',
|
|
212
|
-
properties: {
|
|
213
|
-
|
|
214
|
-
token1: common_schemas_js_1.TOKEN_PAIR_SCHEMA.token1,
|
|
215
|
-
feeTier: common_schemas_js_1.FEE_TIER_SCHEMA,
|
|
216
|
-
tickLower: {
|
|
217
|
-
type: 'number',
|
|
218
|
-
description: 'Lower tick boundary (must be multiple of tickSpacing).',
|
|
219
|
-
},
|
|
220
|
-
tickUpper: {
|
|
221
|
-
type: 'number',
|
|
222
|
-
description: 'Upper tick boundary (must be multiple of tickSpacing).',
|
|
223
|
-
},
|
|
224
|
-
...common_schemas_js_1.LIQUIDITY_AMOUNTS_SCHEMA,
|
|
225
|
-
},
|
|
226
|
-
required: [
|
|
227
|
-
'token0',
|
|
228
|
-
'token1',
|
|
229
|
-
'feeTier',
|
|
230
|
-
'tickLower',
|
|
231
|
-
'tickUpper',
|
|
232
|
-
'amount0Desired',
|
|
233
|
-
'amount1Desired',
|
|
234
|
-
],
|
|
91
|
+
properties: { ...common_schemas_js_1.TOKEN_PAIR_WITH_TICKS_SCHEMA, ...common_schemas_js_1.LIQUIDITY_AMOUNTS_SCHEMA, amountIsToken0: { type: 'boolean', description: 'Whether amount is denominated in token0.' } },
|
|
92
|
+
required: ['token0', 'token1', 'fee', 'tickLower', 'tickUpper', 'amount0Desired', 'amount1Desired'],
|
|
235
93
|
},
|
|
236
|
-
handler: (0,
|
|
237
|
-
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
token1: typedArgs.token1,
|
|
242
|
-
feeTier: typedArgs.feeTier,
|
|
243
|
-
tickLower: typedArgs.tickLower,
|
|
244
|
-
tickUpper: typedArgs.tickUpper,
|
|
245
|
-
amount0Desired: typedArgs.amount0Desired,
|
|
246
|
-
amount1Desired: typedArgs.amount1Desired,
|
|
247
|
-
amount0Min: typedArgs.amount0Min ?? '0',
|
|
248
|
-
amount1Min: typedArgs.amount1Min ?? '0',
|
|
249
|
-
};
|
|
250
|
-
}, (result, args) => {
|
|
251
|
-
// Type assertion is safe here because MCP schema validation ensures args match AddLiquidityByTicksArgs
|
|
252
|
-
const typedArgs = args;
|
|
253
|
-
return (0, helpers_js_1.formatAddLiquidityResponse)(result, typedArgs, {
|
|
254
|
-
tickRange: `${typedArgs.tickLower} - ${typedArgs.tickUpper}`,
|
|
255
|
-
});
|
|
94
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
95
|
+
const pair = (0, helpers_js_1.extractTokenPairWithTicksParams)(args);
|
|
96
|
+
const { amount, amountIsToken0 } = depositAmount(args);
|
|
97
|
+
const transaction = await sdk.dex.positions.addLiquidityByTicks({ ...pair, amount, amountIsToken0 });
|
|
98
|
+
return (0, response_formatter_js_1.formatSuccess)({ ...(await (0, helpers_js_1.formatDexSubmission)(transaction)), token0: pair.token0, token1: pair.token1 });
|
|
256
99
|
}),
|
|
257
100
|
};
|
|
258
|
-
// 8. Remove Liquidity
|
|
259
101
|
exports.removeLiquidityTool = {
|
|
260
102
|
name: 'gala_launchpad_remove_liquidity',
|
|
261
|
-
description: 'Remove
|
|
103
|
+
description: 'Remove current-contract GSwap liquidity and return confirm() output.',
|
|
262
104
|
inputSchema: {
|
|
263
105
|
type: 'object',
|
|
264
|
-
properties: {
|
|
265
|
-
|
|
266
|
-
positionId: {
|
|
267
|
-
type: 'string',
|
|
268
|
-
minLength: 1,
|
|
269
|
-
description: 'Position identifier to remove liquidity from.',
|
|
270
|
-
},
|
|
271
|
-
liquidity: {
|
|
272
|
-
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
273
|
-
description: 'Amount of liquidity to remove (full liquidity to close position).',
|
|
274
|
-
},
|
|
275
|
-
amount0Min: {
|
|
276
|
-
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
277
|
-
description: 'Minimum acceptable amount of token0 to receive.',
|
|
278
|
-
},
|
|
279
|
-
amount1Min: {
|
|
280
|
-
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
281
|
-
description: 'Minimum acceptable amount of token1 to receive.',
|
|
282
|
-
},
|
|
283
|
-
deadline: {
|
|
284
|
-
type: 'number',
|
|
285
|
-
description: 'Transaction deadline (unix timestamp, optional).',
|
|
286
|
-
},
|
|
287
|
-
},
|
|
288
|
-
required: ['ownerAddress', 'positionId', 'liquidity', 'amount0Min', 'amount1Min'],
|
|
106
|
+
properties: { ...common_schemas_js_1.TOKEN_PAIR_WITH_TICKS_SCHEMA, ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA, liquidity: common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA, amount0: common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA, amount1: common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA },
|
|
107
|
+
required: ['token0', 'token1', 'fee', 'tickLower', 'tickUpper', 'ownerAddress'],
|
|
289
108
|
},
|
|
290
|
-
handler: (0,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
amount0Min: args.amount0Min,
|
|
299
|
-
amount1Min: args.amount1Min,
|
|
300
|
-
positionId: args.positionId,
|
|
301
|
-
}),
|
|
302
|
-
responseBuilder: (result, position, args) => ({
|
|
303
|
-
transactionId: result.transactionId,
|
|
304
|
-
status: result.status,
|
|
305
|
-
positionId: args.positionId,
|
|
306
|
-
token0: position.token0,
|
|
307
|
-
token1: position.token1,
|
|
308
|
-
liquidity: args.liquidity,
|
|
309
|
-
amount0: result.amount0,
|
|
310
|
-
amount1: result.amount1,
|
|
311
|
-
message: `Liquidity removed! Received ${result.amount0 ?? '0'} ${position.token0} and ${result.amount1 ?? '0'} ${position.token1}`,
|
|
312
|
-
}),
|
|
109
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
110
|
+
const pair = (0, helpers_js_1.extractTokenPairWithTicksParams)(args);
|
|
111
|
+
const transaction = await sdk.dex.positions.removeLiquidity({
|
|
112
|
+
...pair,
|
|
113
|
+
...optionalProperty(args, 'amount0'),
|
|
114
|
+
...optionalProperty(args, 'amount1'),
|
|
115
|
+
});
|
|
116
|
+
return (0, response_formatter_js_1.formatSuccess)({ ...(await (0, helpers_js_1.formatDexSubmission)(transaction)), token0: pair.token0, token1: pair.token1 });
|
|
313
117
|
}),
|
|
314
118
|
};
|
|
315
|
-
// 9. Fetch Swap Position Direct (compound key lookup - most efficient)
|
|
316
119
|
exports.fetchSwapPositionDirectTool = {
|
|
317
120
|
name: 'gala_launchpad_fetch_swap_position_direct',
|
|
318
|
-
description: 'Fetch
|
|
121
|
+
description: 'Fetch one current-contract GSwap position by its compound pair and tick key.',
|
|
319
122
|
inputSchema: {
|
|
320
123
|
type: 'object',
|
|
321
|
-
properties: {
|
|
322
|
-
...common_schemas_js_1.TOKEN_PAIR_WITH_TICKS_SCHEMA,
|
|
323
|
-
ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA,
|
|
324
|
-
},
|
|
124
|
+
properties: { ...common_schemas_js_1.TOKEN_PAIR_WITH_TICKS_SCHEMA, ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA },
|
|
325
125
|
required: ['token0', 'token1', 'fee', 'tickLower', 'tickUpper', 'ownerAddress'],
|
|
326
126
|
},
|
|
327
|
-
handler: (
|
|
328
|
-
...(0, helpers_js_1.extractTokenPairWithTicksParams)(args),
|
|
329
|
-
owner: args.ownerAddress,
|
|
330
|
-
}), 'No position found for specified compound key'),
|
|
127
|
+
handler: createPositionLookupHandler(),
|
|
331
128
|
};
|
|
332
|
-
// 10. Collect Position Fees
|
|
333
129
|
exports.collectPositionFeesTool = {
|
|
334
130
|
name: 'gala_launchpad_collect_position_fees',
|
|
335
|
-
description: 'Collect
|
|
131
|
+
description: 'Collect current-contract GSwap position fees and return confirm() output.',
|
|
336
132
|
inputSchema: {
|
|
337
133
|
type: 'object',
|
|
338
|
-
properties: {
|
|
339
|
-
|
|
340
|
-
positionId: {
|
|
341
|
-
type: 'string',
|
|
342
|
-
minLength: 1,
|
|
343
|
-
description: 'Position identifier to collect fees from.',
|
|
344
|
-
},
|
|
345
|
-
amount0Max: {
|
|
346
|
-
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
347
|
-
description: 'Maximum amount of token0 fees to collect (optional).',
|
|
348
|
-
},
|
|
349
|
-
amount1Max: {
|
|
350
|
-
...common_schemas_js_1.DECIMAL_AMOUNT_SCHEMA,
|
|
351
|
-
description: 'Maximum amount of token1 fees to collect (optional).',
|
|
352
|
-
},
|
|
353
|
-
},
|
|
354
|
-
required: ['ownerAddress', 'positionId'],
|
|
134
|
+
properties: { ...common_schemas_js_1.TOKEN_PAIR_WITH_TICKS_SCHEMA, ownerAddress: common_schemas_js_1.OWNER_ADDRESS_SCHEMA },
|
|
135
|
+
required: ['token0', 'token1', 'fee', 'tickLower', 'tickUpper', 'ownerAddress'],
|
|
355
136
|
},
|
|
356
|
-
handler: (0,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
positionId: args.positionId,
|
|
361
|
-
};
|
|
362
|
-
if (args.amount0Max !== undefined) {
|
|
363
|
-
collectFeesArgs.amount0Max = args.amount0Max;
|
|
364
|
-
}
|
|
365
|
-
if (args.amount1Max !== undefined) {
|
|
366
|
-
collectFeesArgs.amount1Max = args.amount1Max;
|
|
367
|
-
}
|
|
368
|
-
return sdk.collectSwapPositionFees(collectFeesArgs);
|
|
369
|
-
},
|
|
370
|
-
responseBuilder: (result, position, args) => ({
|
|
371
|
-
transactionId: result.transactionId,
|
|
372
|
-
status: result.status,
|
|
373
|
-
positionId: args.positionId,
|
|
374
|
-
token0: position.token0,
|
|
375
|
-
token1: position.token1,
|
|
376
|
-
amount0Collected: result.amount0,
|
|
377
|
-
amount1Collected: result.amount1,
|
|
378
|
-
message: `Fees collected! ${result.amount0 ?? '0'} ${position.token0} and ${result.amount1 ?? '0'} ${position.token1} harvested.`,
|
|
379
|
-
}),
|
|
137
|
+
handler: (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
138
|
+
const params = (0, helpers_js_1.extractTokenPairWithTicksParams)(args);
|
|
139
|
+
const transaction = await sdk.dex.positions.collectPositionFees(params);
|
|
140
|
+
return (0, response_formatter_js_1.formatSuccess)({ ...(await (0, helpers_js_1.formatDexSubmission)(transaction)), token0: params.token0, token1: params.token1 });
|
|
380
141
|
}),
|
|
381
142
|
};
|
|
382
|
-
|
|
143
|
+
function createPositionLookupHandler() {
|
|
144
|
+
return (0, error_handler_js_1.withErrorHandling)(async (sdk, args) => {
|
|
145
|
+
const params = (0, helpers_js_1.extractTokenPairWithTicksParams)(args);
|
|
146
|
+
const owner = requiredString(args, 'ownerAddress');
|
|
147
|
+
const position = await sdk.dex.positions.getPosition({ ...params, owner });
|
|
148
|
+
return (0, response_formatter_js_1.formatSuccess)(position === null ? { found: false } : { found: true, position: (0, helpers_js_1.formatPosition)(position) });
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function depositAmount(args) {
|
|
152
|
+
const explicit = args.amountIsToken0;
|
|
153
|
+
if (typeof explicit === 'boolean') {
|
|
154
|
+
return { amount: requiredString(args, explicit ? 'amount0Desired' : 'amount1Desired'), amountIsToken0: explicit };
|
|
155
|
+
}
|
|
156
|
+
const amount0 = optionalString(args, 'amount0Desired');
|
|
157
|
+
if (amount0 !== undefined && amount0 !== '0')
|
|
158
|
+
return { amount: amount0, amountIsToken0: true };
|
|
159
|
+
const amount1 = optionalString(args, 'amount1Desired');
|
|
160
|
+
if (amount1 !== undefined)
|
|
161
|
+
return { amount: amount1, amountIsToken0: false };
|
|
162
|
+
throw new Error('One of amount0Desired or amount1Desired is required');
|
|
163
|
+
}
|
|
164
|
+
function requiredString(args, name) {
|
|
165
|
+
const value = args[name];
|
|
166
|
+
if (typeof value !== 'string' || value.trim() === '')
|
|
167
|
+
throw new Error(`${name} must be a non-empty string`);
|
|
168
|
+
return value;
|
|
169
|
+
}
|
|
170
|
+
function optionalString(args, name) {
|
|
171
|
+
const value = args[name];
|
|
172
|
+
if (value === undefined)
|
|
173
|
+
return undefined;
|
|
174
|
+
return requiredString(args, name);
|
|
175
|
+
}
|
|
176
|
+
function optionalProperty(args, name) {
|
|
177
|
+
const value = optionalString(args, name);
|
|
178
|
+
return value === undefined ? {} : { [name]: value };
|
|
179
|
+
}
|
|
383
180
|
exports.liquidityPositionTools = [
|
|
384
181
|
exports.getUserLiquidityPositionsTool,
|
|
385
182
|
exports.getAllUserLiquidityPositionsTool,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/dex-liquidity/index.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/dex-liquidity/index.ts"],"names":[],"mappings":";AAAA,gEAAgE;;;AAGhE,uEAMyC;AACzC,6EAAkE;AAClE,mEAAiE;AACjE,kDAO2B;AAEd,QAAA,6BAA6B,GAAY;IACpD,IAAI,EAAE,6CAA6C;IACnD,WAAW,EAAE,qEAAqE;IAClF,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,YAAY,EAAE,wCAAoB,EAAE,EAAE,QAAQ,EAAE,CAAC,cAAc,CAAC,EAAE;IAC/G,OAAO,EAAE,IAAA,oCAAiB,EAAC,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAC7C,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;QACnD,MAAM,SAAS,GAAG,MAAM,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAClE,OAAO,IAAA,qCAAa,EAAC,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,EAAE,IAAA,4BAAe,EAAC,SAAS,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;IAChH,CAAC,CAAC;CACH,CAAC;AAEW,QAAA,gCAAgC,GAAY;IACvD,IAAI,EAAE,iDAAiD;IACvD,WAAW,EAAE,yEAAyE;IACtF,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,YAAY,EAAE,wCAAoB,EAAE,EAAE,QAAQ,EAAE,CAAC,cAAc,CAAC,EAAE;IAC/G,OAAO,EAAE,qCAA6B,CAAC,OAAO;CAC/C,CAAC;AAEW,QAAA,4BAA4B,GAAY;IACnD,IAAI,EAAE,6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