@kasarlabs/ekubo-mcp 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/lib/utils/liquidity.d.ts +0 -4
- package/build/lib/utils/liquidity.js +0 -6
- package/build/lib/utils/liquidity.js.map +1 -1
- package/build/schemas/index.d.ts +15 -27
- package/build/schemas/index.js +211 -44
- package/build/schemas/index.js.map +1 -1
- package/build/tools/write/addLiquidity.js +9 -6
- package/build/tools/write/addLiquidity.js.map +1 -1
- package/build/tools/write/createPosition.js +9 -6
- package/build/tools/write/createPosition.js.map +1 -1
- package/build/tools/write/swap.js +6 -2
- package/build/tools/write/swap.js.map +1 -1
- package/package.json +3 -3
|
@@ -10,10 +10,4 @@ export function buildBounds(lowerTick, upperTick) {
|
|
|
10
10
|
},
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
export function sortAmounts(amount0Input, amount1Input, isTokenALower) {
|
|
14
|
-
return {
|
|
15
|
-
amount0: isTokenALower ? amount0Input : amount1Input,
|
|
16
|
-
amount1: isTokenALower ? amount1Input : amount0Input,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
13
|
//# sourceMappingURL=liquidity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liquidity.js","sourceRoot":"","sources":["../../../src/lib/utils/liquidity.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,SAAiB;IAC9D,OAAO;QACL,KAAK,EAAE;YACL,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAChC,IAAI,EAAE,SAAS,GAAG,CAAC;SACpB;QACD,KAAK,EAAE;YACL,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAChC,IAAI,EAAE,SAAS,GAAG,CAAC;SACpB;KACF,CAAC;AACJ,CAAC
|
|
1
|
+
{"version":3,"file":"liquidity.js","sourceRoot":"","sources":["../../../src/lib/utils/liquidity.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,SAAiB;IAC9D,OAAO;QACL,KAAK,EAAE;YACL,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAChC,IAAI,EAAE,SAAS,GAAG,CAAC;SACpB;QACD,KAAK,EAAE;YACL,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;YAChC,IAAI,EAAE,SAAS,GAAG,CAAC;SACpB;KACF,CAAC;AACJ,CAAC"}
|
package/build/schemas/index.d.ts
CHANGED
|
@@ -30,7 +30,6 @@ export declare const poolKeySchema: z.ZodObject<{
|
|
|
30
30
|
assetType: "SYMBOL" | "ADDRESS";
|
|
31
31
|
assetValue: string;
|
|
32
32
|
}>;
|
|
33
|
-
} & {
|
|
34
33
|
fee: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
35
34
|
tick_spacing: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
36
35
|
extension: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -81,7 +80,6 @@ export declare const getTokenPriceSchema: z.ZodObject<{
|
|
|
81
80
|
assetType: "SYMBOL" | "ADDRESS";
|
|
82
81
|
assetValue: string;
|
|
83
82
|
}>;
|
|
84
|
-
} & {
|
|
85
83
|
fee: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
86
84
|
tick_spacing: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
87
85
|
extension: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -135,7 +133,6 @@ export declare const swapTokensSchema: z.ZodObject<{
|
|
|
135
133
|
amount: z.ZodString;
|
|
136
134
|
is_amount_in: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
137
135
|
slippage_tolerance: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
138
|
-
} & {
|
|
139
136
|
fee: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
140
137
|
tick_spacing: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
141
138
|
extension: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -175,7 +172,6 @@ export declare const addLiquiditySchema: z.ZodObject<{
|
|
|
175
172
|
position_id: z.ZodNumber;
|
|
176
173
|
amount0: z.ZodString;
|
|
177
174
|
amount1: z.ZodString;
|
|
178
|
-
} & {
|
|
179
175
|
token0: z.ZodObject<{
|
|
180
176
|
assetType: z.ZodEnum<["SYMBOL", "ADDRESS"]>;
|
|
181
177
|
assetValue: z.ZodString;
|
|
@@ -196,17 +192,12 @@ export declare const addLiquiditySchema: z.ZodObject<{
|
|
|
196
192
|
assetType: "SYMBOL" | "ADDRESS";
|
|
197
193
|
assetValue: string;
|
|
198
194
|
}>;
|
|
199
|
-
} & {
|
|
200
195
|
lower_tick: z.ZodNumber;
|
|
201
196
|
upper_tick: z.ZodNumber;
|
|
202
|
-
} & {
|
|
203
197
|
fee: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
204
198
|
tick_spacing: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
205
199
|
extension: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
206
200
|
}, "strip", z.ZodTypeAny, {
|
|
207
|
-
position_id: number;
|
|
208
|
-
amount0: string;
|
|
209
|
-
amount1: string;
|
|
210
201
|
token0: {
|
|
211
202
|
assetType: "SYMBOL" | "ADDRESS";
|
|
212
203
|
assetValue: string;
|
|
@@ -215,15 +206,15 @@ export declare const addLiquiditySchema: z.ZodObject<{
|
|
|
215
206
|
assetType: "SYMBOL" | "ADDRESS";
|
|
216
207
|
assetValue: string;
|
|
217
208
|
};
|
|
218
|
-
lower_tick: number;
|
|
219
|
-
upper_tick: number;
|
|
220
209
|
fee: number;
|
|
221
210
|
tick_spacing: number;
|
|
222
211
|
extension: string;
|
|
223
|
-
}, {
|
|
224
212
|
position_id: number;
|
|
225
213
|
amount0: string;
|
|
226
214
|
amount1: string;
|
|
215
|
+
lower_tick: number;
|
|
216
|
+
upper_tick: number;
|
|
217
|
+
}, {
|
|
227
218
|
token0: {
|
|
228
219
|
assetType: "SYMBOL" | "ADDRESS";
|
|
229
220
|
assetValue: string;
|
|
@@ -232,6 +223,9 @@ export declare const addLiquiditySchema: z.ZodObject<{
|
|
|
232
223
|
assetType: "SYMBOL" | "ADDRESS";
|
|
233
224
|
assetValue: string;
|
|
234
225
|
};
|
|
226
|
+
position_id: number;
|
|
227
|
+
amount0: string;
|
|
228
|
+
amount1: string;
|
|
235
229
|
lower_tick: number;
|
|
236
230
|
upper_tick: number;
|
|
237
231
|
fee?: number | undefined;
|
|
@@ -244,7 +238,6 @@ export declare const withdrawLiquiditySchema: z.ZodObject<{
|
|
|
244
238
|
liquidity_amount: z.ZodString;
|
|
245
239
|
fees_only: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
246
240
|
collect_fees: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
247
|
-
} & {
|
|
248
241
|
token0: z.ZodObject<{
|
|
249
242
|
assetType: z.ZodEnum<["SYMBOL", "ADDRESS"]>;
|
|
250
243
|
assetValue: z.ZodString;
|
|
@@ -265,15 +258,12 @@ export declare const withdrawLiquiditySchema: z.ZodObject<{
|
|
|
265
258
|
assetType: "SYMBOL" | "ADDRESS";
|
|
266
259
|
assetValue: string;
|
|
267
260
|
}>;
|
|
268
|
-
} & {
|
|
269
261
|
lower_tick: z.ZodNumber;
|
|
270
262
|
upper_tick: z.ZodNumber;
|
|
271
|
-
} & {
|
|
272
263
|
fee: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
273
264
|
tick_spacing: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
274
265
|
extension: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
275
266
|
}, "strip", z.ZodTypeAny, {
|
|
276
|
-
position_id: number;
|
|
277
267
|
token0: {
|
|
278
268
|
assetType: "SYMBOL" | "ADDRESS";
|
|
279
269
|
assetValue: string;
|
|
@@ -282,16 +272,16 @@ export declare const withdrawLiquiditySchema: z.ZodObject<{
|
|
|
282
272
|
assetType: "SYMBOL" | "ADDRESS";
|
|
283
273
|
assetValue: string;
|
|
284
274
|
};
|
|
285
|
-
lower_tick: number;
|
|
286
|
-
upper_tick: number;
|
|
287
275
|
fee: number;
|
|
288
276
|
tick_spacing: number;
|
|
289
277
|
extension: string;
|
|
278
|
+
position_id: number;
|
|
279
|
+
lower_tick: number;
|
|
280
|
+
upper_tick: number;
|
|
290
281
|
liquidity_amount: string;
|
|
291
282
|
fees_only: boolean;
|
|
292
283
|
collect_fees: boolean;
|
|
293
284
|
}, {
|
|
294
|
-
position_id: number;
|
|
295
285
|
token0: {
|
|
296
286
|
assetType: "SYMBOL" | "ADDRESS";
|
|
297
287
|
assetValue: string;
|
|
@@ -300,6 +290,7 @@ export declare const withdrawLiquiditySchema: z.ZodObject<{
|
|
|
300
290
|
assetType: "SYMBOL" | "ADDRESS";
|
|
301
291
|
assetValue: string;
|
|
302
292
|
};
|
|
293
|
+
position_id: number;
|
|
303
294
|
lower_tick: number;
|
|
304
295
|
upper_tick: number;
|
|
305
296
|
liquidity_amount: string;
|
|
@@ -324,7 +315,6 @@ export type TransferPositionSchema = z.infer<typeof transferPositionSchema>;
|
|
|
324
315
|
export declare const createPositionSchema: z.ZodObject<{
|
|
325
316
|
amount0: z.ZodString;
|
|
326
317
|
amount1: z.ZodString;
|
|
327
|
-
} & {
|
|
328
318
|
token0: z.ZodObject<{
|
|
329
319
|
assetType: z.ZodEnum<["SYMBOL", "ADDRESS"]>;
|
|
330
320
|
assetValue: z.ZodString;
|
|
@@ -345,16 +335,12 @@ export declare const createPositionSchema: z.ZodObject<{
|
|
|
345
335
|
assetType: "SYMBOL" | "ADDRESS";
|
|
346
336
|
assetValue: string;
|
|
347
337
|
}>;
|
|
348
|
-
} & {
|
|
349
338
|
lower_tick: z.ZodNumber;
|
|
350
339
|
upper_tick: z.ZodNumber;
|
|
351
|
-
} & {
|
|
352
340
|
fee: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
353
341
|
tick_spacing: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
354
342
|
extension: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
355
343
|
}, "strip", z.ZodTypeAny, {
|
|
356
|
-
amount0: string;
|
|
357
|
-
amount1: string;
|
|
358
344
|
token0: {
|
|
359
345
|
assetType: "SYMBOL" | "ADDRESS";
|
|
360
346
|
assetValue: string;
|
|
@@ -363,14 +349,14 @@ export declare const createPositionSchema: z.ZodObject<{
|
|
|
363
349
|
assetType: "SYMBOL" | "ADDRESS";
|
|
364
350
|
assetValue: string;
|
|
365
351
|
};
|
|
366
|
-
lower_tick: number;
|
|
367
|
-
upper_tick: number;
|
|
368
352
|
fee: number;
|
|
369
353
|
tick_spacing: number;
|
|
370
354
|
extension: string;
|
|
371
|
-
}, {
|
|
372
355
|
amount0: string;
|
|
373
356
|
amount1: string;
|
|
357
|
+
lower_tick: number;
|
|
358
|
+
upper_tick: number;
|
|
359
|
+
}, {
|
|
374
360
|
token0: {
|
|
375
361
|
assetType: "SYMBOL" | "ADDRESS";
|
|
376
362
|
assetValue: string;
|
|
@@ -379,6 +365,8 @@ export declare const createPositionSchema: z.ZodObject<{
|
|
|
379
365
|
assetType: "SYMBOL" | "ADDRESS";
|
|
380
366
|
assetValue: string;
|
|
381
367
|
};
|
|
368
|
+
amount0: string;
|
|
369
|
+
amount1: string;
|
|
382
370
|
lower_tick: number;
|
|
383
371
|
upper_tick: number;
|
|
384
372
|
fee?: number | undefined;
|
package/build/schemas/index.js
CHANGED
|
@@ -7,7 +7,27 @@ export const assetSchema = z.object({
|
|
|
7
7
|
.string()
|
|
8
8
|
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
9
9
|
});
|
|
10
|
-
const
|
|
10
|
+
export const poolKeySchema = z.object({
|
|
11
|
+
token0: z
|
|
12
|
+
.object({
|
|
13
|
+
assetType: z
|
|
14
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
15
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
16
|
+
assetValue: z
|
|
17
|
+
.string()
|
|
18
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
19
|
+
})
|
|
20
|
+
.describe('The asset information (symbol or contract address) of the first token in the pool'),
|
|
21
|
+
token1: z
|
|
22
|
+
.object({
|
|
23
|
+
assetType: z
|
|
24
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
25
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
26
|
+
assetValue: z
|
|
27
|
+
.string()
|
|
28
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
29
|
+
})
|
|
30
|
+
.describe('The asset information (symbol or contract address) of the second token in the pool'),
|
|
11
31
|
fee: z
|
|
12
32
|
.number()
|
|
13
33
|
.optional()
|
|
@@ -24,30 +44,64 @@ const poolParamsSchema = z.object({
|
|
|
24
44
|
.default('0x0')
|
|
25
45
|
.describe('The extension contract address (default: "0x0")'),
|
|
26
46
|
});
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
47
|
+
export const getTokenPriceSchema = z.object({
|
|
48
|
+
token: z
|
|
49
|
+
.object({
|
|
50
|
+
assetType: z
|
|
51
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
52
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
53
|
+
assetValue: z
|
|
54
|
+
.string()
|
|
55
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
56
|
+
})
|
|
57
|
+
.describe('The asset information (symbol or contract address) of the token to get the price for'),
|
|
58
|
+
quote_currency: z
|
|
59
|
+
.object({
|
|
60
|
+
assetType: z
|
|
61
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
62
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
63
|
+
assetValue: z
|
|
64
|
+
.string()
|
|
65
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
66
|
+
})
|
|
67
|
+
.describe('The asset information (symbol or contract address) of the quote currency (e.g., USDC, ETH)'),
|
|
68
|
+
fee: z
|
|
69
|
+
.number()
|
|
70
|
+
.optional()
|
|
71
|
+
.default(0.05)
|
|
72
|
+
.describe('The fee tier as a percentage (e.g., 0.05 for 0.05%, 0.3 for 0.3%, 1 for 1%, defaults to 0.05)'),
|
|
73
|
+
tick_spacing: z
|
|
74
|
+
.number()
|
|
75
|
+
.optional()
|
|
76
|
+
.default(0.1)
|
|
77
|
+
.describe('The tick spacing as a percentage (e.g., 0.01 for 0.01%, 0.1 for 0.1%, 1 for 1%, defaults to 0.1)'),
|
|
78
|
+
extension: z
|
|
79
|
+
.string()
|
|
80
|
+
.optional()
|
|
81
|
+
.default('0x0')
|
|
82
|
+
.describe('The extension contract address (default: "0x0")'),
|
|
34
83
|
});
|
|
35
|
-
export const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
84
|
+
export const swapTokensSchema = z.object({
|
|
85
|
+
token_in: z
|
|
86
|
+
.object({
|
|
87
|
+
assetType: z
|
|
88
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
89
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
90
|
+
assetValue: z
|
|
91
|
+
.string()
|
|
92
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
93
|
+
})
|
|
94
|
+
.describe('The asset information (symbol or contract address) of the token to sell'),
|
|
95
|
+
token_out: z
|
|
96
|
+
.object({
|
|
97
|
+
assetType: z
|
|
98
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
99
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
100
|
+
assetValue: z
|
|
101
|
+
.string()
|
|
102
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
103
|
+
})
|
|
104
|
+
.describe('The asset information (symbol or contract address) of the token to buy'),
|
|
51
105
|
amount: z
|
|
52
106
|
.string()
|
|
53
107
|
.describe('The amount to swap (in token decimals, e.g., "1000000" for 1 USDC with 6 decimals)'),
|
|
@@ -61,10 +115,23 @@ export const swapTokensSchema = z
|
|
|
61
115
|
.optional()
|
|
62
116
|
.default(0.5)
|
|
63
117
|
.describe('Maximum slippage tolerance as a percentage (e.g., 0.5 for 0.5%, defaults to 0.5%)'),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
118
|
+
fee: z
|
|
119
|
+
.number()
|
|
120
|
+
.optional()
|
|
121
|
+
.default(0.05)
|
|
122
|
+
.describe('The fee tier as a percentage (e.g., 0.05 for 0.05%, 0.3 for 0.3%, 1 for 1%, defaults to 0.05)'),
|
|
123
|
+
tick_spacing: z
|
|
124
|
+
.number()
|
|
125
|
+
.optional()
|
|
126
|
+
.default(0.1)
|
|
127
|
+
.describe('The tick spacing as a percentage (e.g., 0.01 for 0.01%, 0.1 for 0.1%, 1 for 1%, defaults to 0.1)'),
|
|
128
|
+
extension: z
|
|
129
|
+
.string()
|
|
130
|
+
.optional()
|
|
131
|
+
.default('0x0')
|
|
132
|
+
.describe('The extension contract address (default: "0x0")'),
|
|
133
|
+
});
|
|
134
|
+
export const addLiquiditySchema = z.object({
|
|
68
135
|
position_id: z
|
|
69
136
|
.number()
|
|
70
137
|
.describe('The NFT position ID (u64) to add liquidity to'),
|
|
@@ -74,12 +141,45 @@ export const addLiquiditySchema = z
|
|
|
74
141
|
amount1: z
|
|
75
142
|
.string()
|
|
76
143
|
.describe('The amount of token1 to add (in token decimals)'),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
144
|
+
token0: z
|
|
145
|
+
.object({
|
|
146
|
+
assetType: z
|
|
147
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
148
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
149
|
+
assetValue: z
|
|
150
|
+
.string()
|
|
151
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
152
|
+
})
|
|
153
|
+
.describe('The asset information (symbol or contract address) of the first token'),
|
|
154
|
+
token1: z
|
|
155
|
+
.object({
|
|
156
|
+
assetType: z
|
|
157
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
158
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
159
|
+
assetValue: z
|
|
160
|
+
.string()
|
|
161
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
162
|
+
})
|
|
163
|
+
.describe('The asset information (symbol or contract address) of the second token'),
|
|
164
|
+
lower_tick: z.number().describe('The lower tick of the position range'),
|
|
165
|
+
upper_tick: z.number().describe('The upper tick of the position range'),
|
|
166
|
+
fee: z
|
|
167
|
+
.number()
|
|
168
|
+
.optional()
|
|
169
|
+
.default(0.05)
|
|
170
|
+
.describe('The fee tier as a percentage (e.g., 0.05 for 0.05%, 0.3 for 0.3%, 1 for 1%, defaults to 0.05)'),
|
|
171
|
+
tick_spacing: z
|
|
172
|
+
.number()
|
|
173
|
+
.optional()
|
|
174
|
+
.default(0.1)
|
|
175
|
+
.describe('The tick spacing as a percentage (e.g., 0.01 for 0.01%, 0.1 for 0.1%, 1 for 1%, defaults to 0.1)'),
|
|
176
|
+
extension: z
|
|
177
|
+
.string()
|
|
178
|
+
.optional()
|
|
179
|
+
.default('0x0')
|
|
180
|
+
.describe('The extension contract address (default: "0x0")'),
|
|
181
|
+
});
|
|
182
|
+
export const withdrawLiquiditySchema = z.object({
|
|
83
183
|
position_id: z.number().describe('The NFT position ID (u64)'),
|
|
84
184
|
liquidity_amount: z
|
|
85
185
|
.string()
|
|
@@ -94,26 +194,93 @@ export const withdrawLiquiditySchema = z
|
|
|
94
194
|
.optional()
|
|
95
195
|
.default(true)
|
|
96
196
|
.describe('Whether to collect accumulated fees (defaults to true)'),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
197
|
+
token0: z
|
|
198
|
+
.object({
|
|
199
|
+
assetType: z
|
|
200
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
201
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
202
|
+
assetValue: z
|
|
203
|
+
.string()
|
|
204
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
205
|
+
})
|
|
206
|
+
.describe('The asset information (symbol or contract address) of the first token'),
|
|
207
|
+
token1: z
|
|
208
|
+
.object({
|
|
209
|
+
assetType: z
|
|
210
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
211
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
212
|
+
assetValue: z
|
|
213
|
+
.string()
|
|
214
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
215
|
+
})
|
|
216
|
+
.describe('The asset information (symbol or contract address) of the second token'),
|
|
217
|
+
lower_tick: z.number().describe('The lower tick of the position range'),
|
|
218
|
+
upper_tick: z.number().describe('The upper tick of the position range'),
|
|
219
|
+
fee: z
|
|
220
|
+
.number()
|
|
221
|
+
.optional()
|
|
222
|
+
.default(0.05)
|
|
223
|
+
.describe('The fee tier as a percentage (e.g., 0.05 for 0.05%, 0.3 for 0.3%, 1 for 1%, defaults to 0.05)'),
|
|
224
|
+
tick_spacing: z
|
|
225
|
+
.number()
|
|
226
|
+
.optional()
|
|
227
|
+
.default(0.1)
|
|
228
|
+
.describe('The tick spacing as a percentage (e.g., 0.01 for 0.01%, 0.1 for 0.1%, 1 for 1%, defaults to 0.1)'),
|
|
229
|
+
extension: z
|
|
230
|
+
.string()
|
|
231
|
+
.optional()
|
|
232
|
+
.default('0x0')
|
|
233
|
+
.describe('The extension contract address (default: "0x0")'),
|
|
234
|
+
});
|
|
101
235
|
export const transferPositionSchema = z.object({
|
|
102
236
|
position_id: z.number().describe('The NFT position ID to transfer (u64)'),
|
|
103
237
|
to_address: z
|
|
104
238
|
.string()
|
|
105
239
|
.describe('The recipient address to transfer the position to'),
|
|
106
240
|
});
|
|
107
|
-
export const createPositionSchema = z
|
|
108
|
-
.object({
|
|
241
|
+
export const createPositionSchema = z.object({
|
|
109
242
|
amount0: z
|
|
110
243
|
.string()
|
|
111
244
|
.describe('The amount of token0 to add (in token decimals)'),
|
|
112
245
|
amount1: z
|
|
113
246
|
.string()
|
|
114
247
|
.describe('The amount of token1 to add (in token decimals)'),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
248
|
+
token0: z
|
|
249
|
+
.object({
|
|
250
|
+
assetType: z
|
|
251
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
252
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
253
|
+
assetValue: z
|
|
254
|
+
.string()
|
|
255
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
256
|
+
})
|
|
257
|
+
.describe('The asset information (symbol or contract address) of the first token'),
|
|
258
|
+
token1: z
|
|
259
|
+
.object({
|
|
260
|
+
assetType: z
|
|
261
|
+
.enum(['SYMBOL', 'ADDRESS'])
|
|
262
|
+
.describe('The type of the asset concerned by the allowance: SYMBOL or ADDRESS'),
|
|
263
|
+
assetValue: z
|
|
264
|
+
.string()
|
|
265
|
+
.describe('The symbol (e.g., "ETH", "USDC") or the contract address of the token'),
|
|
266
|
+
})
|
|
267
|
+
.describe('The asset information (symbol or contract address) of the second token'),
|
|
268
|
+
lower_tick: z.number().describe('The lower tick of the position range'),
|
|
269
|
+
upper_tick: z.number().describe('The upper tick of the position range'),
|
|
270
|
+
fee: z
|
|
271
|
+
.number()
|
|
272
|
+
.optional()
|
|
273
|
+
.default(0.05)
|
|
274
|
+
.describe('The fee tier as a percentage (e.g., 0.05 for 0.05%, 0.3 for 0.3%, 1 for 1%, defaults to 0.05)'),
|
|
275
|
+
tick_spacing: z
|
|
276
|
+
.number()
|
|
277
|
+
.optional()
|
|
278
|
+
.default(0.1)
|
|
279
|
+
.describe('The tick spacing as a percentage (e.g., 0.01 for 0.01%, 0.1 for 0.1%, 1 for 1%, defaults to 0.1)'),
|
|
280
|
+
extension: z
|
|
281
|
+
.string()
|
|
282
|
+
.optional()
|
|
283
|
+
.default('0x0')
|
|
284
|
+
.describe('The extension contract address (default: "0x0")'),
|
|
285
|
+
});
|
|
119
286
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,SAAS,EAAE,CAAC;SACT,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;SAC3B,QAAQ,CACP,qEAAqE,CACtE;IACH,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,CACP,uEAAuE,CACxE;CACJ,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG,C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EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;IACvE,GAAG,EAAE,CAAC;SACH,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CACP,+FAA+F,CAChG;IACH,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,GAAG,CAAC;SACZ,QAAQ,CACP,kGAAkG,CACnG;IACH,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CAAC,iDAAiD,CAAC;CAC/D,CAAC,CAAC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { getERC20Contract } from '../../lib/utils/contracts.js';
|
|
2
2
|
import { getContract } from '../../lib/utils/contracts.js';
|
|
3
3
|
import { preparePoolKeyFromParams } from '../../lib/utils/pools.js';
|
|
4
|
-
import { buildBounds
|
|
4
|
+
import { buildBounds } from '../../lib/utils/liquidity.js';
|
|
5
5
|
export const addLiquidity = async (env, params) => {
|
|
6
|
+
return {
|
|
7
|
+
status: 'failure',
|
|
8
|
+
error: 'This tool is currently under maintenance. ',
|
|
9
|
+
};
|
|
6
10
|
try {
|
|
7
11
|
const account = env.account;
|
|
8
12
|
const positionsContract = await getContract(env.provider, 'positions');
|
|
@@ -13,20 +17,19 @@ export const addLiquidity = async (env, params) => {
|
|
|
13
17
|
tick_spacing: params.tick_spacing,
|
|
14
18
|
extension: params.extension,
|
|
15
19
|
});
|
|
16
|
-
const { amount0, amount1 } = sortAmounts(params.amount0, params.amount1, isTokenALower);
|
|
17
20
|
const bounds = buildBounds(params.lower_tick, params.upper_tick);
|
|
18
21
|
const minLiquidity = 0;
|
|
19
22
|
const token0Contract = getERC20Contract(token0.address, env.provider);
|
|
20
23
|
token0Contract.connect(account);
|
|
21
24
|
const transfer0Calldata = token0Contract.populate('transfer', [
|
|
22
25
|
positionsContract.address,
|
|
23
|
-
amount0,
|
|
26
|
+
params.amount0,
|
|
24
27
|
]);
|
|
25
28
|
const token1Contract = getERC20Contract(token1.address, env.provider);
|
|
26
29
|
token1Contract.connect(account);
|
|
27
30
|
const transfer1Calldata = token1Contract.populate('transfer', [
|
|
28
31
|
positionsContract.address,
|
|
29
|
-
amount1,
|
|
32
|
+
params.amount1,
|
|
30
33
|
]);
|
|
31
34
|
positionsContract.connect(account);
|
|
32
35
|
const depositCalldata = positionsContract.populate('deposit', [
|
|
@@ -59,8 +62,8 @@ export const addLiquidity = async (env, params) => {
|
|
|
59
62
|
position_id: params.position_id,
|
|
60
63
|
token0: token0.symbol,
|
|
61
64
|
token1: token1.symbol,
|
|
62
|
-
amount0: amount0,
|
|
63
|
-
amount1: amount1,
|
|
65
|
+
amount0: params.amount0,
|
|
66
|
+
amount1: params.amount1,
|
|
64
67
|
lower_tick: params.lower_tick,
|
|
65
68
|
upper_tick: params.upper_tick,
|
|
66
69
|
pool_fee: params.fee,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addLiquidity.js","sourceRoot":"","sources":["../../../src/tools/write/addLiquidity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"addLiquidity.js","sourceRoot":"","sources":["../../../src/tools/write/addLiquidity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,MAAM,CAAC,MAAM,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aACrB;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,sCAAsC;SAC/D,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { getChain, getEkuboAddress, getERC20Contract, } from '../../lib/utils/contracts.js';
|
|
2
2
|
import { getContract } from '../../lib/utils/contracts.js';
|
|
3
3
|
import { preparePoolKeyFromParams } from '../../lib/utils/pools.js';
|
|
4
|
-
import { buildBounds
|
|
4
|
+
import { buildBounds } from '../../lib/utils/liquidity.js';
|
|
5
5
|
import { extractPositionIdFromReceipt } from '../../lib/utils/events.js';
|
|
6
6
|
export const createPosition = async (env, params) => {
|
|
7
|
+
return {
|
|
8
|
+
status: 'failure',
|
|
9
|
+
error: 'This tool is currently under maintenance.',
|
|
10
|
+
};
|
|
7
11
|
try {
|
|
8
12
|
const account = env.account;
|
|
9
13
|
const positionsContract = await getContract(env.provider, 'positions');
|
|
@@ -14,20 +18,19 @@ export const createPosition = async (env, params) => {
|
|
|
14
18
|
tick_spacing: params.tick_spacing,
|
|
15
19
|
extension: params.extension,
|
|
16
20
|
});
|
|
17
|
-
const { amount0, amount1 } = sortAmounts(params.amount0, params.amount1, isTokenALower);
|
|
18
21
|
const bounds = buildBounds(params.lower_tick, params.upper_tick);
|
|
19
22
|
const minLiquidity = 0;
|
|
20
23
|
const token0Contract = getERC20Contract(token0.address, env.provider);
|
|
21
24
|
token0Contract.connect(account);
|
|
22
25
|
const transfer0Calldata = token0Contract.populate('transfer', [
|
|
23
26
|
positionsContract.address,
|
|
24
|
-
amount0,
|
|
27
|
+
params.amount0,
|
|
25
28
|
]);
|
|
26
29
|
const token1Contract = getERC20Contract(token1.address, env.provider);
|
|
27
30
|
token1Contract.connect(account);
|
|
28
31
|
const transfer1Calldata = token1Contract.populate('transfer', [
|
|
29
32
|
positionsContract.address,
|
|
30
|
-
amount1,
|
|
33
|
+
params.amount1,
|
|
31
34
|
]);
|
|
32
35
|
positionsContract.connect(account);
|
|
33
36
|
const mintCalldata = positionsContract.populate('mint_and_deposit_and_clear_both', [poolKey, bounds, minLiquidity]);
|
|
@@ -49,8 +52,8 @@ export const createPosition = async (env, params) => {
|
|
|
49
52
|
position_id: positionId,
|
|
50
53
|
token0: token0.symbol,
|
|
51
54
|
token1: token1.symbol,
|
|
52
|
-
amount0: amount0,
|
|
53
|
-
amount1: amount1,
|
|
55
|
+
amount0: params.amount0,
|
|
56
|
+
amount1: params.amount1,
|
|
54
57
|
lower_tick: params.lower_tick,
|
|
55
58
|
upper_tick: params.upper_tick,
|
|
56
59
|
pool_fee: params.fee,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPosition.js","sourceRoot":"","sources":["../../../src/tools/write/createPosition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"createPosition.js","sourceRoot":"","sources":["../../../src/tools/write/createPosition.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,gBAAgB,GACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AAIzE,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,GAAiB,EACjB,MAA4B,EAC5B,E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"}
|
|
@@ -4,6 +4,10 @@ import { preparePoolKeyFromParams } from '../../lib/utils/pools.js';
|
|
|
4
4
|
import { buildRouteNode, buildTokenAmount, calculateSqrtRatioLimit, } from '../../lib/utils/swap.js';
|
|
5
5
|
import { getSwapQuote, extractExpectedOutput, calculateMinimumOutputU256, } from '../../lib/utils/quote.js';
|
|
6
6
|
export const swap = async (env, params) => {
|
|
7
|
+
return {
|
|
8
|
+
status: 'failure',
|
|
9
|
+
error: 'This tool is currently under maintenance. ',
|
|
10
|
+
};
|
|
7
11
|
try {
|
|
8
12
|
const account = env.account;
|
|
9
13
|
const routerContract = await getContract(env.provider, 'routerV3');
|
|
@@ -15,8 +19,8 @@ export const swap = async (env, params) => {
|
|
|
15
19
|
tick_spacing: params.tick_spacing,
|
|
16
20
|
extension: params.extension,
|
|
17
21
|
});
|
|
18
|
-
const tokenIn =
|
|
19
|
-
const tokenOut =
|
|
22
|
+
const tokenIn = token0;
|
|
23
|
+
const tokenOut = token1;
|
|
20
24
|
const priceResult = await coreContract.get_pool_price(poolKey);
|
|
21
25
|
const currentSqrtPrice = BigInt(priceResult.sqrt_ratio);
|
|
22
26
|
const sqrtRatioLimit = calculateSqrtRatioLimit(currentSqrtPrice, params.slippage_tolerance, isTokenALower);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swap.js","sourceRoot":"","sources":["../../../src/tools/write/swap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,YAAY,EACZ,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAGlC,MAAM,CAAC,MAAM,IAAI,GAA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,CAAC,YAAY;gBACjC,QAAQ,EAAE,MAAM,CAAC,GAAG;gBACpB,kBAAkB,EAAE,MAAM,CAAC,kBAAkB;aAC9C;SACF,CAAC;IACJ,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QAEpB,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,KAAK,CAAC,OAAO,IAAI,2BAA2B;SACpD,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kasarlabs/ekubo-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@ekubo/starknet-sdk": "^0.0.7",
|
|
20
|
-
"@kasarlabs/ask-starknet-core": "0.1.
|
|
20
|
+
"@kasarlabs/ask-starknet-core": "0.1.1",
|
|
21
21
|
"@modelcontextprotocol/sdk": "^1.11.2",
|
|
22
22
|
"dotenv": "^16.4.7",
|
|
23
23
|
"starknet": "^7.6.4",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "4212f968456c2a170aac99306a899ae43458e23c"
|
|
42
42
|
}
|