@continuumdao/ctm-mpc-defi 0.1.4 → 0.2.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 +20 -78
- package/dist/agent/catalog.cjs +1388 -144
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +881 -17
- package/dist/agent/catalog.js +1327 -145
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/aave-v4/SKILL.md +43 -0
- package/dist/agent/skills/curve-dao/SKILL.md +12 -0
- package/dist/agent/skills/ethena/SKILL.md +10 -0
- package/dist/agent/skills/euler-v2/SKILL.md +10 -0
- package/dist/agent/skills/lido/SKILL.md +22 -0
- package/dist/agent/skills/maple-syrup/SKILL.md +10 -0
- package/dist/agent/skills/sky/SKILL.md +10 -0
- package/dist/agent/skills/uniswap-v4/SKILL.md +22 -0
- package/dist/chains/evm/index.cjs +27 -213
- package/dist/chains/evm/index.cjs.map +1 -1
- package/dist/chains/evm/index.d.ts +15 -25
- package/dist/chains/evm/index.js +21 -199
- package/dist/chains/evm/index.js.map +1 -1
- package/dist/chains/near/index.d.ts +1 -1
- package/dist/chains/solana/index.d.ts +1 -1
- package/dist/core/index.cjs +8 -110
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +5 -39
- package/dist/core/index.js +6 -100
- package/dist/core/index.js.map +1 -1
- package/dist/{envelope-CcE5Cz_q.d.ts → envelope-CpBUh9eP.d.ts} +1 -1
- package/dist/index.cjs +238 -1184
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -10
- package/dist/index.js +227 -1156
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/aave-v4/index.cjs +1710 -0
- package/dist/protocols/evm/aave-v4/index.cjs.map +1 -0
- package/dist/protocols/evm/aave-v4/index.d.ts +499 -0
- package/dist/protocols/evm/aave-v4/index.js +1666 -0
- package/dist/protocols/evm/aave-v4/index.js.map +1 -0
- package/dist/protocols/evm/curve-dao/index.cjs +24 -124
- package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/curve-dao/index.d.ts +3 -4
- package/dist/protocols/evm/curve-dao/index.js +15 -115
- package/dist/protocols/evm/curve-dao/index.js.map +1 -1
- package/dist/protocols/evm/ethena/index.cjs +853 -0
- package/dist/protocols/evm/ethena/index.cjs.map +1 -0
- package/dist/protocols/evm/ethena/index.d.ts +160 -0
- package/dist/protocols/evm/ethena/index.js +831 -0
- package/dist/protocols/evm/ethena/index.js.map +1 -0
- package/dist/protocols/evm/euler-v2/index.cjs +1585 -0
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -0
- package/dist/protocols/evm/euler-v2/index.d.ts +316 -0
- package/dist/protocols/evm/euler-v2/index.js +1560 -0
- package/dist/protocols/evm/euler-v2/index.js.map +1 -0
- package/dist/protocols/evm/lido/index.cjs +839 -0
- package/dist/protocols/evm/lido/index.cjs.map +1 -0
- package/dist/protocols/evm/lido/index.d.ts +119 -0
- package/dist/protocols/evm/lido/index.js +814 -0
- package/dist/protocols/evm/lido/index.js.map +1 -0
- package/dist/protocols/evm/maple/index.cjs +619 -0
- package/dist/protocols/evm/maple/index.cjs.map +1 -0
- package/dist/protocols/evm/maple/index.d.ts +108 -0
- package/dist/protocols/evm/maple/index.js +605 -0
- package/dist/protocols/evm/maple/index.js.map +1 -0
- package/dist/protocols/evm/sky/index.cjs +1259 -0
- package/dist/protocols/evm/sky/index.cjs.map +1 -0
- package/dist/protocols/evm/sky/index.d.ts +217 -0
- package/dist/protocols/evm/sky/index.js +1234 -0
- package/dist/protocols/evm/sky/index.js.map +1 -0
- package/dist/protocols/evm/uniswap-v4/index.cjs +423 -658
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.d.ts +3 -4
- package/dist/protocols/evm/uniswap-v4/index.js +422 -657
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/dist/{registry-oMKlO_5z.d.ts → registry-Bv5o37_w.d.ts} +1 -1
- package/dist/{types-Ce2qNHai.d.cts → types-BfjWdw1j.d.ts} +3 -1
- package/dist/{types-5u863Fd9.d.ts → types-DUeNJLr9.d.ts} +1 -1
- package/package.json +43 -8
- package/dist/agent/catalog.d.cts +0 -195
- package/dist/chains/evm/index.d.cts +0 -62
- package/dist/chains/near/index.d.cts +0 -37
- package/dist/chains/solana/index.d.cts +0 -40
- package/dist/core/index.d.cts +0 -43
- package/dist/envelope-DYDPnrHZ.d.cts +0 -35
- package/dist/index.d.cts +0 -15
- package/dist/keygen-CfNp8yKJ.d.cts +0 -9
- package/dist/keygen-DsINazx8.d.ts +0 -9
- package/dist/nodeRead-BnmSaMGO.d.cts +0 -8
- package/dist/nodeRead-BnmSaMGO.d.ts +0 -8
- package/dist/protocols/evm/curve-dao/index.d.cts +0 -147
- package/dist/protocols/evm/uniswap-v4/index.d.cts +0 -324
- package/dist/registry-BwZoE668.d.cts +0 -8
- package/dist/txParams-BC7ogvdR.d.cts +0 -19
- package/dist/txParams-BC7ogvdR.d.ts +0 -19
- package/dist/types-B8idm_gu.d.cts +0 -34
- package/dist/types-Ce2qNHai.d.ts +0 -57
package/dist/agent/catalog.cjs
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('viem');
|
|
3
|
+
var viem = require('viem');
|
|
4
|
+
var zodToJsonSchema = require('zod-to-json-schema');
|
|
5
|
+
var zod = require('zod');
|
|
6
|
+
var fs = require('fs');
|
|
7
|
+
var path = require('path');
|
|
8
|
+
var url = require('url');
|
|
4
9
|
|
|
10
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
5
11
|
// src/core/registry.ts
|
|
6
12
|
var modules = [];
|
|
7
13
|
function registerProtocolModule(mod) {
|
|
@@ -159,6 +165,96 @@ function isCurveApiChainSupported(chainId) {
|
|
|
159
165
|
if (Number.isNaN(n) || n < 0) return false;
|
|
160
166
|
return CURVE_FULL_NETWORK_CONSTANTS_CHAIN_IDS.has(n);
|
|
161
167
|
}
|
|
168
|
+
var CURVE_NATIVE_PLACEHOLDER = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
169
|
+
var ETH_PLACEHOLDER = CURVE_NATIVE_PLACEHOLDER;
|
|
170
|
+
function normalizeAddr(a) {
|
|
171
|
+
return a.toLowerCase();
|
|
172
|
+
}
|
|
173
|
+
function addEdge(adj, a, b) {
|
|
174
|
+
if (a === b) return;
|
|
175
|
+
if (!adj.has(a)) adj.set(a, /* @__PURE__ */ new Set());
|
|
176
|
+
if (!adj.has(b)) adj.set(b, /* @__PURE__ */ new Set());
|
|
177
|
+
adj.get(a).add(b);
|
|
178
|
+
adj.get(b).add(a);
|
|
179
|
+
}
|
|
180
|
+
function buildCurveLiquidityGraphFromApi(curve) {
|
|
181
|
+
const adj = /* @__PURE__ */ new Map();
|
|
182
|
+
for (const id of curve.getPoolList()) {
|
|
183
|
+
try {
|
|
184
|
+
const pool = curve.getPool(id);
|
|
185
|
+
const w = (pool.wrappedCoinAddresses ?? []).map(normalizeAddr);
|
|
186
|
+
const u = (pool.underlyingCoinAddresses ?? []).map(normalizeAddr);
|
|
187
|
+
const all = [.../* @__PURE__ */ new Set([...w, ...u])];
|
|
188
|
+
for (let i = 0; i < all.length; i++) {
|
|
189
|
+
for (let j = i + 1; j < all.length; j++) {
|
|
190
|
+
addEdge(adj, all[i], all[j]);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
} catch {
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return adj;
|
|
197
|
+
}
|
|
198
|
+
function addNativeWethBridge(adj, wrappedNative) {
|
|
199
|
+
if (!wrappedNative) return;
|
|
200
|
+
const w = wrappedNative.toLowerCase();
|
|
201
|
+
const a = ETH_PLACEHOLDER;
|
|
202
|
+
const b = w;
|
|
203
|
+
if (a === b) return;
|
|
204
|
+
if (!adj.has(a)) adj.set(a, /* @__PURE__ */ new Set());
|
|
205
|
+
if (!adj.has(b)) adj.set(b, /* @__PURE__ */ new Set());
|
|
206
|
+
adj.get(a).add(b);
|
|
207
|
+
adj.get(b).add(a);
|
|
208
|
+
}
|
|
209
|
+
function swappableCurveGraphNodeKeys(adj) {
|
|
210
|
+
const out = /* @__PURE__ */ new Set();
|
|
211
|
+
for (const [k, neigh] of adj) {
|
|
212
|
+
if (neigh.size > 0) out.add(k);
|
|
213
|
+
}
|
|
214
|
+
return out;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// src/protocols/evm/curve-dao/apiSession.ts
|
|
218
|
+
async function fetchAllCurvePools(curve) {
|
|
219
|
+
const run = (p) => p.catch(() => void 0);
|
|
220
|
+
await Promise.all([
|
|
221
|
+
run(curve.factory.fetchPools()),
|
|
222
|
+
run(curve.crvUSDFactory.fetchPools()),
|
|
223
|
+
run(curve.EYWAFactory.fetchPools()),
|
|
224
|
+
run(curve.cryptoFactory.fetchPools()),
|
|
225
|
+
run(curve.twocryptoFactory.fetchPools()),
|
|
226
|
+
run(curve.tricryptoFactory.fetchPools()),
|
|
227
|
+
run(curve.stableNgFactory.fetchPools())
|
|
228
|
+
]);
|
|
229
|
+
}
|
|
230
|
+
async function loadFullCurveSessionForRpc(rpcUrl) {
|
|
231
|
+
const url = (rpcUrl ?? "").trim();
|
|
232
|
+
if (!url) return null;
|
|
233
|
+
try {
|
|
234
|
+
const { default: curve } = await import('@curvefi/api');
|
|
235
|
+
await curve.init("JsonRpc", { url }, {});
|
|
236
|
+
const wrapped = curve.getNetworkConstants().NATIVE_COIN?.wrappedAddress;
|
|
237
|
+
if (!curve.hasRouter || !curve.hasRouter()) {
|
|
238
|
+
return {
|
|
239
|
+
curve,
|
|
240
|
+
adj: /* @__PURE__ */ new Map(),
|
|
241
|
+
swappableNodeKeys: /* @__PURE__ */ new Set(),
|
|
242
|
+
wrappedNative: wrapped
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
await fetchAllCurvePools(curve);
|
|
246
|
+
const adj = buildCurveLiquidityGraphFromApi(curve);
|
|
247
|
+
addNativeWethBridge(adj, wrapped);
|
|
248
|
+
return {
|
|
249
|
+
curve,
|
|
250
|
+
adj,
|
|
251
|
+
swappableNodeKeys: swappableCurveGraphNodeKeys(adj),
|
|
252
|
+
wrappedNative: wrapped
|
|
253
|
+
};
|
|
254
|
+
} catch {
|
|
255
|
+
return null;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
162
258
|
|
|
163
259
|
// src/protocols/evm/curve-dao/index.ts
|
|
164
260
|
var CURVE_DAO_PROTOCOL_ID = "curve-dao";
|
|
@@ -248,7 +344,14 @@ var MULTISIGN_OUTPUT_DOC = {
|
|
|
248
344
|
}
|
|
249
345
|
};
|
|
250
346
|
var MANAGEMENT_SIG_DOC = {
|
|
251
|
-
description: "Management POST bodies embed NodeMgtKeySig: { nonce, clientSig, nodeKey }. Sign JSON with clientSig cleared; POST with
|
|
347
|
+
description: "Management POST bodies embed NodeMgtKeySig: { nonce, clientSig, nodeKey }. Sign JSON with clientSig cleared via messageToSignManagementBody; POST with withManagementClientSig(body, sig). Do not put signedMessage in the JSON body for standard management routes. Legacy Nonce/Sig/sig field names are not accepted.",
|
|
348
|
+
exceptions: {
|
|
349
|
+
configUpdateImplement: "POST /configUpdateImplement: include nodeKey + plannedYaml + signedMessage (opaque configUpdateImplement|<sha256> line). Sign the opaque line bytes, not the JSON body.",
|
|
350
|
+
postMSQTTKey: "POST /postMSQTTKey: include nodeKey + caCertPem + clientSig. Sign caCertPem PEM bytes directly (use buildPostMqttKeyBody).",
|
|
351
|
+
addManagementKey: "POST /addManagementKey / removeManagementKey (EIP-191): may still use signedMessage equal to the canonical JSON string for dual-mode Ethereum signing.",
|
|
352
|
+
agentLlmConfig: "POST /agentLlmConfig / agentLlmApiKey: sign canonical JSON with action + clientSig cleared; POST body has nonce, clientSig, nodeKey, endpoint fields \u2014 no signedMessage field.",
|
|
353
|
+
multiSignRequest: "POST /multiSignRequest (client key, not management): POST { ...bodyForSign, clientSig, signedMessage: messageToSign }."
|
|
354
|
+
},
|
|
252
355
|
fields: {
|
|
253
356
|
nonce: {
|
|
254
357
|
type: "number",
|
|
@@ -266,52 +369,592 @@ var MANAGEMENT_SIG_DOC = {
|
|
|
266
369
|
helpers: {
|
|
267
370
|
managementSigFields: "Base envelope with clientSig cleared.",
|
|
268
371
|
buildManagementPostBody: "Spread managementSigFields then endpoint fields.",
|
|
372
|
+
buildPostMqttKeyBody: "POST /postMSQTTKey unsigned body (sign PEM directly).",
|
|
373
|
+
buildPostPreferredKeyGenBody: "POST /postPreferredKeyGen unsigned body.",
|
|
374
|
+
buildConfigUpdateImplementPostBody: "POST /configUpdateImplement with opaque signedMessage line.",
|
|
375
|
+
buildSignRequestAgreeUnsignedBody: "POST /signRequestAgree unsigned body with nodeKey.",
|
|
269
376
|
messageToSignManagementBody: "Canonical JSON string to sign.",
|
|
270
377
|
withManagementClientSig: "Attach signature to POST body.",
|
|
271
378
|
fetchNodeKey: "GET /getNodeKey via nodeFetchWithReadAuth.",
|
|
272
|
-
fetchManagementNonce: "GET nonce for Ed25519 or Ethereum management key."
|
|
379
|
+
fetchManagementNonce: "GET nonce for Ed25519 or Ethereum management key.",
|
|
380
|
+
fetchPreferredKeyGen: "GET /getPreferredKeyGen for agent default KeyGen."
|
|
273
381
|
}
|
|
274
382
|
};
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
383
|
+
function zodSchemaToMcpJsonSchema(schema) {
|
|
384
|
+
const raw = zodToJsonSchema.zodToJsonSchema(schema, {
|
|
385
|
+
target: "openApi3",
|
|
386
|
+
$refStrategy: "none"
|
|
387
|
+
});
|
|
388
|
+
if (raw.type === "object" || raw.type === "array" || raw.type === "string") {
|
|
389
|
+
const { $schema: _s, ...rest } = raw;
|
|
390
|
+
return rest;
|
|
282
391
|
}
|
|
283
|
-
|
|
284
|
-
|
|
392
|
+
const defs = raw.definitions;
|
|
393
|
+
if (defs) {
|
|
394
|
+
const first = Object.values(defs)[0];
|
|
395
|
+
if (first?.type) {
|
|
396
|
+
const { $schema: _s, ...rest } = first;
|
|
397
|
+
return rest;
|
|
398
|
+
}
|
|
285
399
|
}
|
|
286
|
-
return
|
|
400
|
+
return raw;
|
|
287
401
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
402
|
+
var evmAddressSchema = zod.z.string().min(1).describe("EVM address (0x-prefixed, 40 hex nibbles)");
|
|
403
|
+
var keyGenSchema = zod.z.object({
|
|
404
|
+
pubkeyhex: zod.z.string().min(1).describe("MPC secp256k1 public key hex (required for multiSignRequest pubKey)"),
|
|
405
|
+
keylist: zod.z.array(zod.z.string()).optional().describe("Key list on the sign request"),
|
|
406
|
+
ClientKeys: zod.z.record(zod.z.string()).optional().describe("Optional client key map from keyGen")
|
|
407
|
+
}).describe(
|
|
408
|
+
"MPC key slice: { pubkeyhex, keylist?, ClientKeys? }. Used for pubKey/keyList on POST /multiSignRequest."
|
|
409
|
+
);
|
|
410
|
+
var chainDetailSchema = zod.z.object({
|
|
411
|
+
legacy: zod.z.boolean().optional(),
|
|
412
|
+
gasLimit: zod.z.number().optional(),
|
|
413
|
+
gasMultiplier: zod.z.number().optional(),
|
|
414
|
+
gasPrice: zod.z.number().optional(),
|
|
415
|
+
baseFee: zod.z.number().optional(),
|
|
416
|
+
priorityFee: zod.z.number().optional(),
|
|
417
|
+
baseFeeMultiplier: zod.z.number().optional()
|
|
418
|
+
}).passthrough().describe(
|
|
419
|
+
"Optional gas config: { legacy?, gasLimit?, gasMultiplier?, gasPrice?, baseFee?, priorityFee?, baseFeeMultiplier? }."
|
|
420
|
+
);
|
|
421
|
+
var evmMultisignCommonInputSchema = zod.z.object({
|
|
422
|
+
keyGen: keyGenSchema,
|
|
423
|
+
purposeText: zod.z.string().min(1).describe(
|
|
424
|
+
"Human-readable purpose for the sign request. Stored in bodyForSign.purpose (may be appended with an automatic batch suffix)."
|
|
425
|
+
),
|
|
426
|
+
useCustomGas: zod.z.boolean().describe(
|
|
427
|
+
"When true, apply chain gas settings from chainDetail / customGasChainDetails instead of raw RPC estimates only."
|
|
428
|
+
),
|
|
429
|
+
chainId: zod.z.number().int().positive().describe("EVM chain id (decimal). Becomes destinationChainID on the sign request."),
|
|
430
|
+
rpcUrl: zod.z.string().min(1).describe("HTTPS JSON-RPC URL for gas estimation, nonce, and allowance reads."),
|
|
431
|
+
executorAddress: evmAddressSchema.describe(
|
|
432
|
+
"MPC wallet address (from keyGen ethereumaddress) \u2014 tx sender for estimates and approvals."
|
|
433
|
+
),
|
|
434
|
+
chainDetail: chainDetailSchema,
|
|
435
|
+
customGasChainDetails: zod.z.record(zod.z.unknown()).optional().describe("Snapshot written to extraJSON.customGasChainDetails when useCustomGas is true.")
|
|
436
|
+
});
|
|
437
|
+
var multisignOutputSchema = zod.z.object({
|
|
438
|
+
bodyForSign: zod.z.record(zod.z.unknown()).describe(
|
|
439
|
+
"POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs."
|
|
440
|
+
),
|
|
441
|
+
messageToSign: zod.z.string().describe("JSON.stringify(bodyForSign) \u2014 exact string to sign before adding clientSig.")
|
|
442
|
+
}).describe(
|
|
443
|
+
"Unsigned mpc-auth multiSignRequest payload. Sign messageToSign and POST { ...bodyForSign, clientSig, signedMessage } to /multiSignRequest."
|
|
444
|
+
);
|
|
445
|
+
var jsonObjectSchema = zod.z.record(zod.z.unknown());
|
|
446
|
+
var uniswapQuoteTradeTypeSchema = zod.z.enum(["EXACT_INPUT", "EXACT_OUTPUT"]);
|
|
447
|
+
var mcpUniswapV4QuoteInputSchema = zod.z.object({
|
|
448
|
+
type: uniswapQuoteTradeTypeSchema.describe("EXACT_INPUT or EXACT_OUTPUT"),
|
|
449
|
+
amount: zod.z.string().min(1).describe("Amount in token-in base units (wei string for ERC-20)"),
|
|
450
|
+
tokenIn: zod.z.string().min(1).describe("Input token; 0x0 for native ETH"),
|
|
451
|
+
tokenOut: zod.z.string().min(1).describe("Output token address"),
|
|
452
|
+
chainId: zod.z.union([zod.z.number().int().positive(), zod.z.string().min(1)]).describe("tokenInChainId / same-chain default"),
|
|
453
|
+
uniswapApiKey: zod.z.string().min(1).describe("Uniswap Trade API x-api-key"),
|
|
454
|
+
swapper: evmAddressSchema.optional().describe("MPC executor; omit if keyGen + managementNodeUrl provided"),
|
|
455
|
+
slippage: zod.z.union([zod.z.number(), zod.z.string()]).optional().describe("Slippage percent; omit for API auto slippage"),
|
|
456
|
+
keyGen: zod.z.string().optional().describe("KeyGen id \u2014 resolves swapper via GET /getKeyGenResultById when swapper omitted"),
|
|
457
|
+
managementNodeUrl: zod.z.string().min(1).optional().describe("MPC node base URL; required with keyGen when swapper is omitted"),
|
|
458
|
+
tokenInChainId: zod.z.union([zod.z.number(), zod.z.string()]).optional(),
|
|
459
|
+
tokenOutChainId: zod.z.union([zod.z.number(), zod.z.string()]).optional(),
|
|
460
|
+
permit2Disabled: zod.z.boolean().optional(),
|
|
461
|
+
baseUrl: zod.z.string().optional(),
|
|
462
|
+
universalRouterVersion: zod.z.string().optional()
|
|
463
|
+
});
|
|
464
|
+
var mcpUniswapV4QuoteOutputSchema = jsonObjectSchema.describe(
|
|
465
|
+
"Full Uniswap POST /quote JSON (includes nested quote object with input/output amounts)."
|
|
466
|
+
);
|
|
467
|
+
var mcpUniswapV4CreateSwapInputSchema = zod.z.object({
|
|
468
|
+
uniswapApiKey: zod.z.string().min(1).describe("Uniswap Trade API key"),
|
|
469
|
+
fullQuoteFromPermit: jsonObjectSchema.describe("Full quote JSON from ctm_uniswap_v4_quote"),
|
|
470
|
+
swapTransactionDeadlineUnix: zod.z.number().int().positive().optional().describe("On-chain deadline unix seconds; default ~30 min from now"),
|
|
471
|
+
useServerProxy: zod.z.boolean().optional().describe("Set false in Node/agents; true only in browser via Next API route"),
|
|
472
|
+
baseUrl: zod.z.string().optional(),
|
|
473
|
+
universalRouterVersion: zod.z.string().optional()
|
|
474
|
+
});
|
|
475
|
+
var mcpUniswapV4CreateSwapOutputSchema = zod.z.object({
|
|
476
|
+
swap: jsonObjectSchema.describe("Universal Router tx: { to, data, value, gasLimit? }"),
|
|
477
|
+
requestId: zod.z.string().optional(),
|
|
478
|
+
gasFee: zod.z.string().optional()
|
|
479
|
+
}).passthrough().describe("{ swap: TransactionRequest, requestId?, gasFee? }");
|
|
480
|
+
var swapTxRequestSchema = jsonObjectSchema.describe("swap field from create_swap response (to, data, value)");
|
|
481
|
+
var mcpUniswapV4BuildSwapMultisignInputSchema = evmMultisignCommonInputSchema.extend({
|
|
482
|
+
tokenIn: evmAddressSchema.describe("Token in; 0x0 for native ETH"),
|
|
483
|
+
swap: swapTxRequestSchema,
|
|
484
|
+
createSwapResponse: zod.z.object({
|
|
485
|
+
swap: swapTxRequestSchema,
|
|
486
|
+
requestId: zod.z.string().optional(),
|
|
487
|
+
gasFee: zod.z.string().optional()
|
|
488
|
+
}).passthrough().describe("Full create_swap response"),
|
|
489
|
+
fullQuoteSnapshot: jsonObjectSchema.describe("Quote JSON used for the swap"),
|
|
490
|
+
swapDeadlineUnix: zod.z.number().describe("Same deadline passed to create_swap"),
|
|
491
|
+
slippagePercent: zod.z.number().optional().describe("Extra approve headroom for EXACT_OUTPUT")
|
|
492
|
+
});
|
|
493
|
+
var mcpCurveDaoBuildSwapMultisignInputSchema = evmMultisignCommonInputSchema.extend({
|
|
494
|
+
tokenIn: evmAddressSchema.describe("ERC-20 sold (native in uses WETH path in UI)"),
|
|
495
|
+
tokenOut: zod.z.string().min(1).describe("Output token or 0xeeee\u2026 native placeholder"),
|
|
496
|
+
amountHuman: zod.z.string().min(1).describe("Human-readable amount of tokenIn"),
|
|
497
|
+
slippagePercent: zod.z.number().gt(0).lt(100).describe("Slippage 0\u2013100 exclusive")
|
|
498
|
+
});
|
|
499
|
+
function mcpMultisignInput(fields) {
|
|
500
|
+
return evmMultisignCommonInputSchema.extend(fields);
|
|
297
501
|
}
|
|
298
|
-
var
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
502
|
+
var mcpLidoSubmitInputSchema = mcpMultisignInput({
|
|
503
|
+
valueWei: zod.z.string().min(1).describe("ETH to stake (wei decimal string)"),
|
|
504
|
+
referral: evmAddressSchema.optional()
|
|
505
|
+
});
|
|
506
|
+
var mcpLidoRequestWithdrawalsInputSchema = mcpMultisignInput({
|
|
507
|
+
stEthAmountsWei: zod.z.array(zod.z.string()).min(1).describe("stETH amounts per withdrawal request (wei strings)")
|
|
508
|
+
});
|
|
509
|
+
var mcpLidoClaimWithdrawalInputSchema = mcpMultisignInput({
|
|
510
|
+
requestId: zod.z.union([zod.z.string(), zod.z.number()]).describe("Withdrawal queue request id")
|
|
511
|
+
});
|
|
512
|
+
var mcpLidoWrapStEthInputSchema = mcpMultisignInput({
|
|
513
|
+
stEthAmountWei: zod.z.string().min(1)
|
|
514
|
+
});
|
|
515
|
+
var mcpLidoUnwrapWstEthInputSchema = mcpMultisignInput({
|
|
516
|
+
wstEthAmountWei: zod.z.string().min(1)
|
|
517
|
+
});
|
|
518
|
+
var mcpEthenaStakeInputSchema = mcpMultisignInput({
|
|
519
|
+
usdeAmountHuman: zod.z.string().min(1),
|
|
520
|
+
susdeVault: evmAddressSchema.optional()
|
|
521
|
+
});
|
|
522
|
+
var mcpEthenaRedeemInputSchema = mcpMultisignInput({
|
|
523
|
+
susdeSharesHuman: zod.z.string().min(1),
|
|
524
|
+
susdeVault: evmAddressSchema.optional()
|
|
525
|
+
});
|
|
526
|
+
var mcpEthenaCooldownInputSchema = mcpMultisignInput({
|
|
527
|
+
susdeSharesHuman: zod.z.string().min(1),
|
|
528
|
+
susdeVault: evmAddressSchema.optional()
|
|
529
|
+
});
|
|
530
|
+
var mcpEthenaClaimInputSchema = mcpMultisignInput({
|
|
531
|
+
susdeVault: evmAddressSchema.optional()
|
|
532
|
+
});
|
|
533
|
+
var mcpMapleDepositInputSchema = mcpMultisignInput({
|
|
534
|
+
syrupRouter: evmAddressSchema,
|
|
535
|
+
pool: evmAddressSchema,
|
|
536
|
+
asset: evmAddressSchema,
|
|
537
|
+
amountHuman: zod.z.string().min(1),
|
|
538
|
+
authorizeSig: jsonObjectSchema.optional()
|
|
539
|
+
});
|
|
540
|
+
var mcpMapleRequestRedeemInputSchema = mcpMultisignInput({
|
|
541
|
+
pool: evmAddressSchema,
|
|
542
|
+
sharesHuman: zod.z.string().min(1),
|
|
543
|
+
receiver: evmAddressSchema
|
|
544
|
+
});
|
|
545
|
+
var mcpSkyLockstakeStakeInputSchema = mcpMultisignInput({
|
|
546
|
+
skyAmountHuman: zod.z.string().min(1),
|
|
547
|
+
usdsDrawHuman: zod.z.string().optional(),
|
|
548
|
+
farmRef: zod.z.string().optional()
|
|
549
|
+
});
|
|
550
|
+
var mcpSkyLockstakeDrawInputSchema = mcpMultisignInput({
|
|
551
|
+
usdsAmountHuman: zod.z.string().min(1),
|
|
552
|
+
urnIndex: zod.z.number().int().nonnegative()
|
|
553
|
+
});
|
|
554
|
+
var mcpSkyLockstakeWipeInputSchema = mcpMultisignInput({
|
|
555
|
+
usdsAmountHuman: zod.z.string().min(1),
|
|
556
|
+
urnIndex: zod.z.number().int().nonnegative()
|
|
557
|
+
});
|
|
558
|
+
var mcpSkyLockstakeCloseInputSchema = mcpMultisignInput({
|
|
559
|
+
urnIndex: zod.z.number().int().nonnegative()
|
|
560
|
+
});
|
|
561
|
+
var mcpSkyLockstakeGetRewardInputSchema = mcpMultisignInput({
|
|
562
|
+
urnIndex: zod.z.number().int().nonnegative()
|
|
563
|
+
});
|
|
564
|
+
var mcpSkySusdsDepositInputSchema = mcpMultisignInput({
|
|
565
|
+
usdsAmountHuman: zod.z.string().min(1)
|
|
566
|
+
});
|
|
567
|
+
var mcpSkySusdsRedeemInputSchema = mcpMultisignInput({
|
|
568
|
+
sharesHuman: zod.z.string().min(1)
|
|
569
|
+
});
|
|
570
|
+
var mcpAaveV4DepositInputSchema = mcpMultisignInput({
|
|
571
|
+
spoke: evmAddressSchema,
|
|
572
|
+
underlying: evmAddressSchema,
|
|
573
|
+
amountHuman: zod.z.string().min(1),
|
|
574
|
+
marketId: zod.z.string().min(1)
|
|
575
|
+
});
|
|
576
|
+
var mcpAaveV4WithdrawInputSchema = mcpMultisignInput({
|
|
577
|
+
spoke: evmAddressSchema,
|
|
578
|
+
underlying: evmAddressSchema,
|
|
579
|
+
amountHuman: zod.z.string().min(1),
|
|
580
|
+
marketId: zod.z.string().min(1)
|
|
581
|
+
});
|
|
582
|
+
var mcpAaveV4BorrowInputSchema = mcpMultisignInput({
|
|
583
|
+
spoke: evmAddressSchema,
|
|
584
|
+
underlying: evmAddressSchema,
|
|
585
|
+
amountHuman: zod.z.string().min(1),
|
|
586
|
+
marketId: zod.z.string().min(1)
|
|
587
|
+
});
|
|
588
|
+
var mcpAaveV4RepayInputSchema = mcpMultisignInput({
|
|
589
|
+
spoke: evmAddressSchema,
|
|
590
|
+
underlying: evmAddressSchema,
|
|
591
|
+
amountHuman: zod.z.string().min(1),
|
|
592
|
+
marketId: zod.z.string().min(1)
|
|
593
|
+
});
|
|
594
|
+
var mcpEulerV2IsolatedLendInputSchema = mcpMultisignInput({
|
|
595
|
+
vault: evmAddressSchema,
|
|
596
|
+
assetAmountHuman: zod.z.string().min(1)
|
|
597
|
+
});
|
|
598
|
+
var mcpEulerV2IsolatedBorrowInputSchema = mcpMultisignInput({
|
|
599
|
+
vault: evmAddressSchema,
|
|
600
|
+
collateralAsset: evmAddressSchema,
|
|
601
|
+
borrowAsset: evmAddressSchema,
|
|
602
|
+
collateralAmountHuman: zod.z.string().min(1),
|
|
603
|
+
loopBorrowWeis: zod.z.array(zod.z.string()).min(1)
|
|
604
|
+
});
|
|
605
|
+
var mcpEulerV2VaultWithdrawInputSchema = mcpMultisignInput({
|
|
606
|
+
vault: evmAddressSchema,
|
|
607
|
+
sharesHuman: zod.z.string().min(1)
|
|
608
|
+
});
|
|
609
|
+
var mcpEulerV2BorrowRepayInputSchema = mcpMultisignInput({
|
|
610
|
+
vault: evmAddressSchema,
|
|
611
|
+
amountHuman: zod.z.string().min(1)
|
|
612
|
+
});
|
|
613
|
+
var mcpEulerV2CollateralDepositInputSchema = mcpMultisignInput({
|
|
614
|
+
vault: evmAddressSchema,
|
|
615
|
+
collateralAsset: evmAddressSchema,
|
|
616
|
+
amountHuman: zod.z.string().min(1)
|
|
617
|
+
});
|
|
618
|
+
var mcpEulerV2CollateralWithdrawInputSchema = mcpMultisignInput({
|
|
619
|
+
vault: evmAddressSchema,
|
|
620
|
+
collateralAsset: evmAddressSchema,
|
|
621
|
+
amountHuman: zod.z.string().min(1)
|
|
622
|
+
});
|
|
623
|
+
|
|
624
|
+
// src/agent/mcpProtocolTools.ts
|
|
625
|
+
function defineProtocolMcpTool(def) {
|
|
626
|
+
return {
|
|
627
|
+
...def,
|
|
628
|
+
outputZod: multisignOutputSchema,
|
|
629
|
+
inputSchema: zodSchemaToMcpJsonSchema(def.inputZod),
|
|
630
|
+
outputSchema: zodSchemaToMcpJsonSchema(multisignOutputSchema),
|
|
631
|
+
parseInput: (data) => def.inputZod.parse(data),
|
|
632
|
+
parseOutput: (data) => multisignOutputSchema.parse(data)
|
|
633
|
+
};
|
|
634
|
+
}
|
|
635
|
+
var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
636
|
+
defineProtocolMcpTool({
|
|
637
|
+
name: "ctm_lido_build_submit_multisign",
|
|
638
|
+
actionId: "lido.submit",
|
|
639
|
+
protocolId: "lido",
|
|
640
|
+
chainCategory: "evm",
|
|
641
|
+
description: "Build mpc-auth multiSignRequest for Lido ETH stake (submit).",
|
|
642
|
+
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
643
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
644
|
+
handler: { importPath: "protocols/evm/lido", exportName: "buildEvmMultisignBodyLidoSubmit" },
|
|
645
|
+
inputZod: mcpLidoSubmitInputSchema
|
|
646
|
+
}),
|
|
647
|
+
defineProtocolMcpTool({
|
|
648
|
+
name: "ctm_lido_build_request_withdrawals_multisign",
|
|
649
|
+
actionId: "lido.request-withdrawals",
|
|
650
|
+
protocolId: "lido",
|
|
651
|
+
chainCategory: "evm",
|
|
652
|
+
description: "Build batch for Lido withdrawal queue (approve + requestWithdrawals).",
|
|
653
|
+
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
654
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
655
|
+
handler: { importPath: "protocols/evm/lido", exportName: "buildEvmMultisignBodyLidoRequestWithdrawals" },
|
|
656
|
+
inputZod: mcpLidoRequestWithdrawalsInputSchema
|
|
657
|
+
}),
|
|
658
|
+
defineProtocolMcpTool({
|
|
659
|
+
name: "ctm_lido_build_claim_withdrawal_multisign",
|
|
660
|
+
actionId: "lido.claim-withdrawal",
|
|
661
|
+
protocolId: "lido",
|
|
662
|
+
chainCategory: "evm",
|
|
663
|
+
description: "Build tx for Lido claimWithdrawal.",
|
|
664
|
+
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
665
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
666
|
+
handler: { importPath: "protocols/evm/lido", exportName: "buildEvmMultisignBodyLidoClaimWithdrawal" },
|
|
667
|
+
inputZod: mcpLidoClaimWithdrawalInputSchema
|
|
668
|
+
}),
|
|
669
|
+
defineProtocolMcpTool({
|
|
670
|
+
name: "ctm_lido_build_wrap_steth_multisign",
|
|
671
|
+
actionId: "lido.wrap-steth",
|
|
672
|
+
protocolId: "lido",
|
|
673
|
+
chainCategory: "evm",
|
|
674
|
+
description: "Build batch for wstETH wrap.",
|
|
675
|
+
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
676
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
677
|
+
handler: { importPath: "protocols/evm/lido", exportName: "buildEvmMultisignBodyLidoWrapStEth" },
|
|
678
|
+
inputZod: mcpLidoWrapStEthInputSchema
|
|
679
|
+
}),
|
|
680
|
+
defineProtocolMcpTool({
|
|
681
|
+
name: "ctm_lido_build_unwrap_wsteth_multisign",
|
|
682
|
+
actionId: "lido.unwrap-wsteth",
|
|
683
|
+
protocolId: "lido",
|
|
684
|
+
chainCategory: "evm",
|
|
685
|
+
description: "Build tx for wstETH unwrap.",
|
|
686
|
+
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
687
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
688
|
+
handler: { importPath: "protocols/evm/lido", exportName: "buildEvmMultisignBodyLidoUnwrapWstEth" },
|
|
689
|
+
inputZod: mcpLidoUnwrapWstEthInputSchema
|
|
690
|
+
}),
|
|
691
|
+
defineProtocolMcpTool({
|
|
692
|
+
name: "ctm_ethena_build_stake_multisign",
|
|
693
|
+
actionId: "ethena.stake-usde",
|
|
694
|
+
protocolId: "ethena",
|
|
695
|
+
chainCategory: "evm",
|
|
696
|
+
description: "Build batch: USDe approve + sUSDe deposit.",
|
|
697
|
+
prerequisites: ["keyGen", "executorAddress", "Ethereum mainnet RPC"],
|
|
698
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
699
|
+
handler: { importPath: "protocols/evm/ethena", exportName: "buildEvmMultisignBodyEthenaUsdeStakeToSusde" },
|
|
700
|
+
inputZod: mcpEthenaStakeInputSchema
|
|
701
|
+
}),
|
|
702
|
+
defineProtocolMcpTool({
|
|
703
|
+
name: "ctm_ethena_build_redeem_multisign",
|
|
704
|
+
actionId: "ethena.redeem-susde",
|
|
705
|
+
protocolId: "ethena",
|
|
706
|
+
chainCategory: "evm",
|
|
707
|
+
description: "Build sUSDe redeem when cooldown is off.",
|
|
708
|
+
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
709
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
710
|
+
handler: { importPath: "protocols/evm/ethena", exportName: "buildEvmMultisignBodyEthenaSusdeRedeemToUsde" },
|
|
711
|
+
inputZod: mcpEthenaRedeemInputSchema
|
|
712
|
+
}),
|
|
713
|
+
defineProtocolMcpTool({
|
|
714
|
+
name: "ctm_ethena_build_cooldown_multisign",
|
|
715
|
+
actionId: "ethena.cooldown-shares",
|
|
716
|
+
protocolId: "ethena",
|
|
717
|
+
chainCategory: "evm",
|
|
718
|
+
description: "Build sUSDe cooldownShares batch step.",
|
|
719
|
+
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
720
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
721
|
+
handler: { importPath: "protocols/evm/ethena", exportName: "buildEvmMultisignBodyEthenaSusdeCooldownShares" },
|
|
722
|
+
inputZod: mcpEthenaCooldownInputSchema
|
|
723
|
+
}),
|
|
724
|
+
defineProtocolMcpTool({
|
|
725
|
+
name: "ctm_ethena_build_claim_multisign",
|
|
726
|
+
actionId: "ethena.claim-unstake",
|
|
727
|
+
protocolId: "ethena",
|
|
728
|
+
chainCategory: "evm",
|
|
729
|
+
description: "Build unstake claim after cooldown.",
|
|
730
|
+
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
731
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
732
|
+
handler: { importPath: "protocols/evm/ethena", exportName: "buildEvmMultisignBodyEthenaUnstakeClaim" },
|
|
733
|
+
inputZod: mcpEthenaClaimInputSchema
|
|
734
|
+
}),
|
|
735
|
+
defineProtocolMcpTool({
|
|
736
|
+
name: "ctm_maple_build_deposit_multisign",
|
|
737
|
+
actionId: "maple-syrup.deposit",
|
|
738
|
+
protocolId: "maple-syrup",
|
|
739
|
+
chainCategory: "evm",
|
|
740
|
+
description: "Build Maple Syrup router deposit batch.",
|
|
741
|
+
prerequisites: ["keyGen", "executorAddress", "router + pool addresses"],
|
|
742
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
743
|
+
handler: { importPath: "protocols/evm/maple", exportName: "buildEvmMultisignBodyMapleSyrupDeposit" },
|
|
744
|
+
inputZod: mcpMapleDepositInputSchema
|
|
745
|
+
}),
|
|
746
|
+
defineProtocolMcpTool({
|
|
747
|
+
name: "ctm_maple_build_request_redeem_multisign",
|
|
748
|
+
actionId: "maple-syrup.request-redeem",
|
|
749
|
+
protocolId: "maple-syrup",
|
|
750
|
+
chainCategory: "evm",
|
|
751
|
+
description: "Build Maple PoolV2 requestRedeem batch.",
|
|
752
|
+
prerequisites: ["keyGen", "executorAddress", "pool address"],
|
|
753
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
754
|
+
handler: { importPath: "protocols/evm/maple", exportName: "buildEvmMultisignBodyMaplePoolRequestRedeem" },
|
|
755
|
+
inputZod: mcpMapleRequestRedeemInputSchema
|
|
756
|
+
}),
|
|
757
|
+
defineProtocolMcpTool({
|
|
758
|
+
name: "ctm_sky_build_lockstake_stake_multisign",
|
|
759
|
+
actionId: "sky.lockstake-stake",
|
|
760
|
+
protocolId: "sky",
|
|
761
|
+
chainCategory: "evm",
|
|
762
|
+
description: "Build Sky Lockstake open/stake batch.",
|
|
763
|
+
prerequisites: ["keyGen", "executorAddress", "Ethereum mainnet RPC"],
|
|
764
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
765
|
+
handler: { importPath: "protocols/evm/sky", exportName: "buildSkyLockstakeStakePositionBatch" },
|
|
766
|
+
inputZod: mcpSkyLockstakeStakeInputSchema
|
|
767
|
+
}),
|
|
768
|
+
defineProtocolMcpTool({
|
|
769
|
+
name: "ctm_sky_build_lockstake_draw_multisign",
|
|
770
|
+
actionId: "sky.lockstake-draw",
|
|
771
|
+
protocolId: "sky",
|
|
772
|
+
chainCategory: "evm",
|
|
773
|
+
description: "Build Lockstake draw (borrow USDS).",
|
|
774
|
+
prerequisites: ["keyGen", "executorAddress", "open urn"],
|
|
775
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
776
|
+
handler: { importPath: "protocols/evm/sky", exportName: "buildSkyLockstakeDrawBatch" },
|
|
777
|
+
inputZod: mcpSkyLockstakeDrawInputSchema
|
|
778
|
+
}),
|
|
779
|
+
defineProtocolMcpTool({
|
|
780
|
+
name: "ctm_sky_build_lockstake_wipe_multisign",
|
|
781
|
+
actionId: "sky.lockstake-wipe",
|
|
782
|
+
protocolId: "sky",
|
|
783
|
+
chainCategory: "evm",
|
|
784
|
+
description: "Build Lockstake repay/wipe batch.",
|
|
785
|
+
prerequisites: ["keyGen", "executorAddress", "urn index"],
|
|
786
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
787
|
+
handler: { importPath: "protocols/evm/sky", exportName: "buildSkyLockstakeWipeBatch" },
|
|
788
|
+
inputZod: mcpSkyLockstakeWipeInputSchema
|
|
789
|
+
}),
|
|
790
|
+
defineProtocolMcpTool({
|
|
791
|
+
name: "ctm_sky_build_lockstake_close_multisign",
|
|
792
|
+
actionId: "sky.lockstake-close",
|
|
793
|
+
protocolId: "sky",
|
|
794
|
+
chainCategory: "evm",
|
|
795
|
+
description: "Build Lockstake close position batch.",
|
|
796
|
+
prerequisites: ["keyGen", "executorAddress", "urn index"],
|
|
797
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
798
|
+
handler: { importPath: "protocols/evm/sky", exportName: "buildSkyLockstakeCloseBatch" },
|
|
799
|
+
inputZod: mcpSkyLockstakeCloseInputSchema
|
|
800
|
+
}),
|
|
801
|
+
defineProtocolMcpTool({
|
|
802
|
+
name: "ctm_sky_build_lockstake_get_reward_multisign",
|
|
803
|
+
actionId: "sky.lockstake-get-reward",
|
|
804
|
+
protocolId: "sky",
|
|
805
|
+
chainCategory: "evm",
|
|
806
|
+
description: "Build Lockstake getReward batch.",
|
|
807
|
+
prerequisites: ["keyGen", "executorAddress", "urn index"],
|
|
808
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
809
|
+
handler: { importPath: "protocols/evm/sky", exportName: "buildSkyLockstakeGetRewardBatch" },
|
|
810
|
+
inputZod: mcpSkyLockstakeGetRewardInputSchema
|
|
811
|
+
}),
|
|
812
|
+
defineProtocolMcpTool({
|
|
813
|
+
name: "ctm_sky_build_susds_deposit_multisign",
|
|
814
|
+
actionId: "sky.susds-deposit",
|
|
815
|
+
protocolId: "sky",
|
|
816
|
+
chainCategory: "evm",
|
|
817
|
+
description: "Build USDS \u2192 sUSDS ERC-4626 deposit batch.",
|
|
818
|
+
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
819
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
820
|
+
handler: { importPath: "protocols/evm/sky", exportName: "buildSkySusdsDepositFromUsdsBatch" },
|
|
821
|
+
inputZod: mcpSkySusdsDepositInputSchema
|
|
822
|
+
}),
|
|
823
|
+
defineProtocolMcpTool({
|
|
824
|
+
name: "ctm_sky_build_susds_redeem_multisign",
|
|
825
|
+
actionId: "sky.susds-redeem",
|
|
826
|
+
protocolId: "sky",
|
|
827
|
+
chainCategory: "evm",
|
|
828
|
+
description: "Build sUSDS redeem to USDS batch.",
|
|
829
|
+
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
830
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
831
|
+
handler: { importPath: "protocols/evm/sky", exportName: "buildSkySusdsRedeemToUsdsBatch" },
|
|
832
|
+
inputZod: mcpSkySusdsRedeemInputSchema
|
|
833
|
+
}),
|
|
834
|
+
defineProtocolMcpTool({
|
|
835
|
+
name: "ctm_aave_v4_build_deposit_multisign",
|
|
836
|
+
actionId: "aave-v4.deposit",
|
|
837
|
+
protocolId: "aave-v4",
|
|
838
|
+
chainCategory: "evm",
|
|
839
|
+
description: "Build Aave v4 Spoke supply/deposit batch.",
|
|
840
|
+
prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
|
|
841
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
842
|
+
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4DepositBatch" },
|
|
843
|
+
inputZod: mcpAaveV4DepositInputSchema
|
|
844
|
+
}),
|
|
845
|
+
defineProtocolMcpTool({
|
|
846
|
+
name: "ctm_aave_v4_build_withdraw_multisign",
|
|
847
|
+
actionId: "aave-v4.withdraw",
|
|
848
|
+
protocolId: "aave-v4",
|
|
849
|
+
chainCategory: "evm",
|
|
850
|
+
description: "Build Aave v4 Spoke withdraw batch.",
|
|
851
|
+
prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
|
|
852
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
853
|
+
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeWithdraw" },
|
|
854
|
+
inputZod: mcpAaveV4WithdrawInputSchema
|
|
855
|
+
}),
|
|
856
|
+
defineProtocolMcpTool({
|
|
857
|
+
name: "ctm_aave_v4_build_borrow_multisign",
|
|
858
|
+
actionId: "aave-v4.borrow",
|
|
859
|
+
protocolId: "aave-v4",
|
|
860
|
+
chainCategory: "evm",
|
|
861
|
+
description: "Build Aave v4 Spoke borrow batch.",
|
|
862
|
+
prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
|
|
863
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
864
|
+
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeBorrow" },
|
|
865
|
+
inputZod: mcpAaveV4BorrowInputSchema
|
|
866
|
+
}),
|
|
867
|
+
defineProtocolMcpTool({
|
|
868
|
+
name: "ctm_aave_v4_build_repay_multisign",
|
|
869
|
+
actionId: "aave-v4.repay",
|
|
870
|
+
protocolId: "aave-v4",
|
|
871
|
+
chainCategory: "evm",
|
|
872
|
+
description: "Build Aave v4 Spoke repay batch.",
|
|
873
|
+
prerequisites: ["keyGen", "executorAddress", "spoke + underlying"],
|
|
874
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
875
|
+
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeRepay" },
|
|
876
|
+
inputZod: mcpAaveV4RepayInputSchema
|
|
877
|
+
}),
|
|
878
|
+
defineProtocolMcpTool({
|
|
879
|
+
name: "ctm_euler_v2_build_isolated_lend_multisign",
|
|
880
|
+
actionId: "euler-v2.isolated-lend",
|
|
881
|
+
protocolId: "euler-v2",
|
|
882
|
+
chainCategory: "evm",
|
|
883
|
+
description: "Build Euler v2 vault deposit/lend batch.",
|
|
884
|
+
prerequisites: ["keyGen", "executorAddress", "vault address"],
|
|
885
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
886
|
+
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2IsolatedLendDepositBatch" },
|
|
887
|
+
inputZod: mcpEulerV2IsolatedLendInputSchema
|
|
888
|
+
}),
|
|
889
|
+
defineProtocolMcpTool({
|
|
890
|
+
name: "ctm_euler_v2_build_isolated_borrow_multisign",
|
|
891
|
+
actionId: "euler-v2.isolated-borrow",
|
|
892
|
+
protocolId: "euler-v2",
|
|
893
|
+
chainCategory: "evm",
|
|
894
|
+
description: "Build Euler v2 isolated borrow loop batch.",
|
|
895
|
+
prerequisites: ["keyGen", "executorAddress", "vault + collateral"],
|
|
896
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
897
|
+
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2IsolatedBorrowBatch" },
|
|
898
|
+
inputZod: mcpEulerV2IsolatedBorrowInputSchema
|
|
899
|
+
}),
|
|
900
|
+
defineProtocolMcpTool({
|
|
901
|
+
name: "ctm_euler_v2_build_vault_withdraw_multisign",
|
|
902
|
+
actionId: "euler-v2.vault-withdraw",
|
|
903
|
+
protocolId: "euler-v2",
|
|
904
|
+
chainCategory: "evm",
|
|
905
|
+
description: "Build Euler v2 vault withdraw/redeem batch.",
|
|
906
|
+
prerequisites: ["keyGen", "executorAddress", "vault address"],
|
|
907
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
908
|
+
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2VaultWithdraw" },
|
|
909
|
+
inputZod: mcpEulerV2VaultWithdrawInputSchema
|
|
910
|
+
}),
|
|
911
|
+
defineProtocolMcpTool({
|
|
912
|
+
name: "ctm_euler_v2_build_borrow_repay_multisign",
|
|
913
|
+
actionId: "euler-v2.borrow-repay",
|
|
914
|
+
protocolId: "euler-v2",
|
|
915
|
+
chainCategory: "evm",
|
|
916
|
+
description: "Build Euler v2 borrow repay batch.",
|
|
917
|
+
prerequisites: ["keyGen", "executorAddress", "vault address"],
|
|
918
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
919
|
+
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2BorrowRepayBatch" },
|
|
920
|
+
inputZod: mcpEulerV2BorrowRepayInputSchema
|
|
921
|
+
}),
|
|
922
|
+
defineProtocolMcpTool({
|
|
923
|
+
name: "ctm_euler_v2_build_collateral_deposit_multisign",
|
|
924
|
+
actionId: "euler-v2.collateral-deposit",
|
|
925
|
+
protocolId: "euler-v2",
|
|
926
|
+
chainCategory: "evm",
|
|
927
|
+
description: "Build Euler v2 borrow collateral deposit batch.",
|
|
928
|
+
prerequisites: ["keyGen", "executorAddress", "vault + collateral asset"],
|
|
929
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
930
|
+
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2BorrowCollateralDepositBatch" },
|
|
931
|
+
inputZod: mcpEulerV2CollateralDepositInputSchema
|
|
932
|
+
}),
|
|
933
|
+
defineProtocolMcpTool({
|
|
934
|
+
name: "ctm_euler_v2_build_collateral_withdraw_multisign",
|
|
935
|
+
actionId: "euler-v2.collateral-withdraw",
|
|
936
|
+
protocolId: "euler-v2",
|
|
937
|
+
chainCategory: "evm",
|
|
938
|
+
description: "Build Euler v2 borrow collateral withdraw batch.",
|
|
939
|
+
prerequisites: ["keyGen", "executorAddress", "vault + collateral asset"],
|
|
940
|
+
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
941
|
+
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2BorrowCollateralWithdrawBatch" },
|
|
942
|
+
inputZod: mcpEulerV2CollateralWithdrawInputSchema
|
|
943
|
+
})
|
|
944
|
+
];
|
|
945
|
+
|
|
946
|
+
// src/agent/mcpTools.ts
|
|
947
|
+
function defineMcpTool(def) {
|
|
948
|
+
return {
|
|
949
|
+
...def,
|
|
950
|
+
inputSchema: zodSchemaToMcpJsonSchema(def.inputZod),
|
|
951
|
+
outputSchema: zodSchemaToMcpJsonSchema(def.outputZod),
|
|
952
|
+
parseInput: (data) => def.inputZod.parse(data),
|
|
953
|
+
parseOutput: (data) => def.outputZod.parse(data)
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
var CORE_MCP_TOOL_DEFINITIONS = [
|
|
957
|
+
defineMcpTool({
|
|
315
958
|
name: "ctm_uniswap_v4_quote",
|
|
316
959
|
actionId: "uniswap-v4.quote",
|
|
317
960
|
protocolId: "uniswap-v4",
|
|
@@ -320,33 +963,10 @@ var MCP_TOOL_DEFINITIONS = [
|
|
|
320
963
|
prerequisites: ["Chain must be supported by Uniswap V4 (Universal Router map)."],
|
|
321
964
|
followUp: ["ctm_uniswap_v4_create_swap", "ctm_uniswap_v4_build_swap_multisign"],
|
|
322
965
|
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapTradeQuote" },
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
amount: { type: "string", required: true, description: "Amount in token-in base units (wei string for ERC-20)" },
|
|
328
|
-
tokenIn: { type: "address", required: true, description: "Input token; 0x0 for native ETH" },
|
|
329
|
-
tokenOut: { type: "address", required: true, description: "Output token address" },
|
|
330
|
-
chainId: { type: "number", required: true, description: "tokenInChainId / same-chain default" },
|
|
331
|
-
uniswapApiKey: { type: "string", required: true, description: "Uniswap Trade API x-api-key" },
|
|
332
|
-
swapper: { type: "address", required: false, description: "MPC executor; omit if keyGen + managementNodeUrl provided" },
|
|
333
|
-
slippage: { type: "number", required: false, description: "Slippage percent; omit for API auto slippage" }
|
|
334
|
-
}),
|
|
335
|
-
required: requiredKeys({
|
|
336
|
-
type: { type: "string", required: true, description: "" },
|
|
337
|
-
amount: { type: "string", required: true, description: "" },
|
|
338
|
-
tokenIn: { type: "address", required: true, description: "" },
|
|
339
|
-
tokenOut: { type: "address", required: true, description: "" },
|
|
340
|
-
chainId: { type: "number", required: true, description: "" },
|
|
341
|
-
uniswapApiKey: { type: "string", required: true, description: "" }
|
|
342
|
-
})
|
|
343
|
-
},
|
|
344
|
-
outputSchema: {
|
|
345
|
-
type: "object",
|
|
346
|
-
description: "Full Uniswap POST /quote JSON (includes nested quote object with input/output amounts)."
|
|
347
|
-
}
|
|
348
|
-
},
|
|
349
|
-
{
|
|
966
|
+
inputZod: mcpUniswapV4QuoteInputSchema,
|
|
967
|
+
outputZod: mcpUniswapV4QuoteOutputSchema
|
|
968
|
+
}),
|
|
969
|
+
defineMcpTool({
|
|
350
970
|
name: "ctm_uniswap_v4_create_swap",
|
|
351
971
|
actionId: "uniswap-v4.create-swap",
|
|
352
972
|
protocolId: "uniswap-v4",
|
|
@@ -355,33 +975,10 @@ var MCP_TOOL_DEFINITIONS = [
|
|
|
355
975
|
prerequisites: ["ctm_uniswap_v4_quote output (fullQuoteFromPermit)"],
|
|
356
976
|
followUp: ["ctm_uniswap_v4_build_swap_multisign"],
|
|
357
977
|
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapCreateSwap" },
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
fullQuoteFromPermit: { type: "object", required: true, description: "Full quote JSON from ctm_uniswap_v4_quote" },
|
|
363
|
-
swapTransactionDeadlineUnix: {
|
|
364
|
-
type: "number",
|
|
365
|
-
required: false,
|
|
366
|
-
description: "On-chain deadline unix seconds; default ~30 min from now"
|
|
367
|
-
},
|
|
368
|
-
useServerProxy: {
|
|
369
|
-
type: "boolean",
|
|
370
|
-
required: false,
|
|
371
|
-
description: "Set false in Node/agents; true only in browser via Next API route"
|
|
372
|
-
}
|
|
373
|
-
}),
|
|
374
|
-
required: requiredKeys({
|
|
375
|
-
uniswapApiKey: { type: "string", required: true, description: "" },
|
|
376
|
-
fullQuoteFromPermit: { type: "object", required: true, description: "" }
|
|
377
|
-
})
|
|
378
|
-
},
|
|
379
|
-
outputSchema: {
|
|
380
|
-
type: "object",
|
|
381
|
-
description: "{ swap: TransactionRequest, requestId?, gasFee? }"
|
|
382
|
-
}
|
|
383
|
-
},
|
|
384
|
-
{
|
|
978
|
+
inputZod: mcpUniswapV4CreateSwapInputSchema,
|
|
979
|
+
outputZod: mcpUniswapV4CreateSwapOutputSchema
|
|
980
|
+
}),
|
|
981
|
+
defineMcpTool({
|
|
385
982
|
name: "ctm_uniswap_v4_build_swap_multisign",
|
|
386
983
|
actionId: "uniswap-v4.swap-exact-input",
|
|
387
984
|
protocolId: "uniswap-v4",
|
|
@@ -395,33 +992,10 @@ var MCP_TOOL_DEFINITIONS = [
|
|
|
395
992
|
],
|
|
396
993
|
followUp: ["Sign messageToSign", "POST /multiSignRequest with clientSig and signedMessage"],
|
|
397
994
|
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "buildEvmMultisignBodyUniswapV4SkipPermit2Batch" },
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
tokenIn: { type: "address", required: true, description: "Token in; 0x0 for native ETH" },
|
|
403
|
-
swap: { type: "object", required: true, description: "swap field from create_swap response" },
|
|
404
|
-
createSwapResponse: { type: "object", required: true, description: "Full create_swap response" },
|
|
405
|
-
fullQuoteSnapshot: { type: "object", required: true, description: "Quote JSON used for the swap" },
|
|
406
|
-
swapDeadlineUnix: { type: "number", required: true, description: "Same deadline passed to create_swap" },
|
|
407
|
-
slippagePercent: { type: "number", required: false, description: "Extra approve headroom for EXACT_OUTPUT" }
|
|
408
|
-
},
|
|
409
|
-
["keyGen", "purposeText", "useCustomGas", "chainId", "rpcUrl", "executorAddress", "chainDetail", "customGasChainDetails"]
|
|
410
|
-
),
|
|
411
|
-
required: requiredKeys(
|
|
412
|
-
{
|
|
413
|
-
tokenIn: { type: "address", required: true, description: "" },
|
|
414
|
-
swap: { type: "object", required: true, description: "" },
|
|
415
|
-
createSwapResponse: { type: "object", required: true, description: "" },
|
|
416
|
-
fullQuoteSnapshot: { type: "object", required: true, description: "" },
|
|
417
|
-
swapDeadlineUnix: { type: "number", required: true, description: "" }
|
|
418
|
-
},
|
|
419
|
-
["keyGen", "purposeText", "useCustomGas", "chainId", "rpcUrl", "executorAddress", "chainDetail"]
|
|
420
|
-
)
|
|
421
|
-
},
|
|
422
|
-
outputSchema: multisignOutputSchema
|
|
423
|
-
},
|
|
424
|
-
{
|
|
995
|
+
inputZod: mcpUniswapV4BuildSwapMultisignInputSchema,
|
|
996
|
+
outputZod: multisignOutputSchema
|
|
997
|
+
}),
|
|
998
|
+
defineMcpTool({
|
|
425
999
|
name: "ctm_curve_dao_build_swap_multisign",
|
|
426
1000
|
actionId: "curve-dao.swap",
|
|
427
1001
|
protocolId: "curve-dao",
|
|
@@ -430,36 +1004,45 @@ var MCP_TOOL_DEFINITIONS = [
|
|
|
430
1004
|
prerequisites: ["keyGen", "executorAddress", "tokenIn/tokenOut/amountHuman/slippage", "RPC URL"],
|
|
431
1005
|
followUp: ["Sign messageToSign", "POST /multiSignRequest with clientSig and signedMessage"],
|
|
432
1006
|
handler: { importPath: "protocols/evm/curve-dao", exportName: "buildEvmMultisignBodyCurveDaoBatch" },
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
slippagePercent: { type: "number", required: true, description: "Slippage 0\u2013100 exclusive" }
|
|
441
|
-
},
|
|
442
|
-
["keyGen", "purposeText", "useCustomGas", "chainId", "rpcUrl", "executorAddress", "chainDetail", "customGasChainDetails"]
|
|
443
|
-
),
|
|
444
|
-
required: requiredKeys(
|
|
445
|
-
{
|
|
446
|
-
tokenIn: { type: "address", required: true, description: "" },
|
|
447
|
-
tokenOut: { type: "string", required: true, description: "" },
|
|
448
|
-
amountHuman: { type: "string", required: true, description: "" },
|
|
449
|
-
slippagePercent: { type: "number", required: true, description: "" }
|
|
450
|
-
},
|
|
451
|
-
["keyGen", "purposeText", "useCustomGas", "chainId", "rpcUrl", "executorAddress", "chainDetail"]
|
|
452
|
-
)
|
|
453
|
-
},
|
|
454
|
-
outputSchema: multisignOutputSchema
|
|
455
|
-
}
|
|
1007
|
+
inputZod: mcpCurveDaoBuildSwapMultisignInputSchema,
|
|
1008
|
+
outputZod: multisignOutputSchema
|
|
1009
|
+
})
|
|
1010
|
+
];
|
|
1011
|
+
var MCP_TOOL_DEFINITIONS = [
|
|
1012
|
+
...CORE_MCP_TOOL_DEFINITIONS,
|
|
1013
|
+
...MCP_PROTOCOL_TOOL_DEFINITIONS
|
|
456
1014
|
];
|
|
1015
|
+
function buildToolSchemaMap(kind) {
|
|
1016
|
+
const out = {};
|
|
1017
|
+
for (const tool of MCP_TOOL_DEFINITIONS) {
|
|
1018
|
+
out[tool.name] = kind === "input" ? tool.inputZod : tool.outputZod;
|
|
1019
|
+
}
|
|
1020
|
+
return out;
|
|
1021
|
+
}
|
|
1022
|
+
var MCP_TOOL_INPUT_SCHEMAS = buildToolSchemaMap("input");
|
|
1023
|
+
var MCP_TOOL_OUTPUT_SCHEMAS = buildToolSchemaMap("output");
|
|
457
1024
|
function getMcpToolDefinitions() {
|
|
458
1025
|
return MCP_TOOL_DEFINITIONS;
|
|
459
1026
|
}
|
|
460
1027
|
function getMcpToolByName(name) {
|
|
461
1028
|
return MCP_TOOL_DEFINITIONS.find((t) => t.name === name);
|
|
462
1029
|
}
|
|
1030
|
+
function getMcpToolInputSchema(name) {
|
|
1031
|
+
const schema = MCP_TOOL_INPUT_SCHEMAS[name];
|
|
1032
|
+
if (!schema) throw new Error(`Unknown MCP tool: ${name}`);
|
|
1033
|
+
return schema;
|
|
1034
|
+
}
|
|
1035
|
+
function getMcpToolOutputSchema(name) {
|
|
1036
|
+
const schema = MCP_TOOL_OUTPUT_SCHEMAS[name];
|
|
1037
|
+
if (!schema) throw new Error(`Unknown MCP tool: ${name}`);
|
|
1038
|
+
return schema;
|
|
1039
|
+
}
|
|
1040
|
+
function parseMcpToolInput(name, data) {
|
|
1041
|
+
return getMcpToolInputSchema(name).parse(data);
|
|
1042
|
+
}
|
|
1043
|
+
function parseMcpToolOutput(name, data) {
|
|
1044
|
+
return getMcpToolOutputSchema(name).parse(data);
|
|
1045
|
+
}
|
|
463
1046
|
function getAgentCatalogForMcp() {
|
|
464
1047
|
return {
|
|
465
1048
|
tools: MCP_TOOL_DEFINITIONS,
|
|
@@ -467,6 +1050,9 @@ function getAgentCatalogForMcp() {
|
|
|
467
1050
|
commonParams: EVM_COMMON_PARAM_DOCS,
|
|
468
1051
|
multisignOutput: MULTISIGN_OUTPUT_DOC,
|
|
469
1052
|
managementSig: MANAGEMENT_SIG_DOC,
|
|
1053
|
+
/** Zod schemas for MCP tool I/O — source of truth for continuum-mcp-server validation. */
|
|
1054
|
+
inputSchemas: MCP_TOOL_INPUT_SCHEMAS,
|
|
1055
|
+
outputSchemas: MCP_TOOL_OUTPUT_SCHEMAS,
|
|
470
1056
|
workflow: {
|
|
471
1057
|
evmSwapTypical: [
|
|
472
1058
|
"1. Quote (protocol-specific API if needed)",
|
|
@@ -480,15 +1066,606 @@ function getAgentCatalogForMcp() {
|
|
|
480
1066
|
"2. GET /getPublicMgtKeyNonce or /getNodeMgtKeyNonce \u2192 nonce",
|
|
481
1067
|
"3. buildManagementPostBody(nonce, nodeKey, { \u2026endpoint fields })",
|
|
482
1068
|
"4. messageToSignManagementBody(body) \u2192 sign \u2192 withManagementClientSig(body, sig)",
|
|
483
|
-
"5. POST management route with signed body"
|
|
1069
|
+
"5. POST management route with signed body (no signedMessage field except configUpdateImplement opaque line)"
|
|
1070
|
+
],
|
|
1071
|
+
agentMultisignTypical: [
|
|
1072
|
+
"1. load_defi_protocol for the target protocol",
|
|
1073
|
+
"2. get_defi_protocol_supported_chains / get_token_registry to pick chainId and tokens",
|
|
1074
|
+
"3. MCP build_* tool with keyGenId + chainId \u2192 { requestId }",
|
|
1075
|
+
"4. Base MCP: wait_for_sign_request_ready \u2192 sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result"
|
|
484
1076
|
]
|
|
485
1077
|
}
|
|
486
1078
|
};
|
|
487
1079
|
}
|
|
1080
|
+
viem.getAddress(
|
|
1081
|
+
"0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84"
|
|
1082
|
+
);
|
|
1083
|
+
viem.getAddress(
|
|
1084
|
+
"0x7f39C581F595B853cBbF37C12FfeeA971C5a5bEa"
|
|
1085
|
+
);
|
|
1086
|
+
viem.getAddress("0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1");
|
|
1087
|
+
var LIDO_ETHEREUM_MAINNET_CHAIN_ID = 1;
|
|
1088
|
+
|
|
1089
|
+
// src/protocols/evm/lido/index.ts
|
|
1090
|
+
var LIDO_PROTOCOL_ID = "lido";
|
|
1091
|
+
var lidoProtocolModule = {
|
|
1092
|
+
id: LIDO_PROTOCOL_ID,
|
|
1093
|
+
chainCategory: "evm",
|
|
1094
|
+
isChainSupported(ctx) {
|
|
1095
|
+
if (ctx.chainCategory !== "evm") return false;
|
|
1096
|
+
return Number(ctx.chainId) === LIDO_ETHEREUM_MAINNET_CHAIN_ID;
|
|
1097
|
+
},
|
|
1098
|
+
isTokenSupported(token) {
|
|
1099
|
+
return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
|
|
1100
|
+
},
|
|
1101
|
+
actions: [
|
|
1102
|
+
{ id: "lido.submit", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Stake ETH via Lido submit()", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { valueWei: { type: "string", required: true, description: "ETH to stake (wei string)" } } },
|
|
1103
|
+
{ id: "lido.request-withdrawals", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Queue stETH withdrawal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1104
|
+
{ id: "lido.claim-withdrawal", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Claim finalized withdrawal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1105
|
+
{ id: "lido.wrap-steth", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Wrap stETH to wstETH", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1106
|
+
{ id: "lido.unwrap-wsteth", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Unwrap wstETH to stETH", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
|
|
1107
|
+
]
|
|
1108
|
+
};
|
|
1109
|
+
registerProtocolModule(lidoProtocolModule);
|
|
1110
|
+
var USDE_ETHEREUM_MAINNET = "0x4c9edd5852cd905f086c759e8383e09bff1e68b3";
|
|
1111
|
+
var SUSDE_ETHEREUM_MAINNET = "0x9d39a5de30e57443bff2a8307a4256c8797a3497";
|
|
1112
|
+
var USDE_MOST_L2S = "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34";
|
|
1113
|
+
var USDE_ZKSYNC_ERA = "0x39Fe7a0DACcE31Bd90418e3e659fb0b5f0B3Db0d";
|
|
1114
|
+
var L2_SAME_ADDRESS_CHAIN_IDS = /* @__PURE__ */ new Set([
|
|
1115
|
+
42161,
|
|
1116
|
+
// Arbitrum One
|
|
1117
|
+
10,
|
|
1118
|
+
// Optimism
|
|
1119
|
+
8453,
|
|
1120
|
+
// Base
|
|
1121
|
+
56,
|
|
1122
|
+
// BNB Chain
|
|
1123
|
+
59144,
|
|
1124
|
+
// Linea
|
|
1125
|
+
5e3,
|
|
1126
|
+
// Mantle
|
|
1127
|
+
81457,
|
|
1128
|
+
// Blast
|
|
1129
|
+
169,
|
|
1130
|
+
// Manta Pacific
|
|
1131
|
+
534352,
|
|
1132
|
+
// Scroll
|
|
1133
|
+
252,
|
|
1134
|
+
// Fraxtal
|
|
1135
|
+
34443,
|
|
1136
|
+
// Mode
|
|
1137
|
+
196,
|
|
1138
|
+
// X Layer
|
|
1139
|
+
1088,
|
|
1140
|
+
// Metis
|
|
1141
|
+
80084,
|
|
1142
|
+
// Berachain
|
|
1143
|
+
2222,
|
|
1144
|
+
// Kava
|
|
1145
|
+
2818,
|
|
1146
|
+
// Morph
|
|
1147
|
+
1923,
|
|
1148
|
+
// Swell
|
|
1149
|
+
48900
|
|
1150
|
+
// Zircuit
|
|
1151
|
+
]);
|
|
1152
|
+
var FALLBACK_NAME_BY_ID = {
|
|
1153
|
+
1: "Ethereum",
|
|
1154
|
+
42161: "Arbitrum One",
|
|
1155
|
+
10: "Optimism",
|
|
1156
|
+
8453: "Base",
|
|
1157
|
+
56: "BNB Chain",
|
|
1158
|
+
59144: "Linea",
|
|
1159
|
+
5e3: "Mantle",
|
|
1160
|
+
81457: "Blast",
|
|
1161
|
+
169: "Manta Pacific",
|
|
1162
|
+
534352: "Scroll",
|
|
1163
|
+
252: "Fraxtal",
|
|
1164
|
+
34443: "Mode",
|
|
1165
|
+
196: "X Layer",
|
|
1166
|
+
1088: "Metis",
|
|
1167
|
+
80084: "Berachain",
|
|
1168
|
+
2222: "Kava",
|
|
1169
|
+
2818: "Morph",
|
|
1170
|
+
1923: "Swell",
|
|
1171
|
+
48900: "Zircuit",
|
|
1172
|
+
324: "ZKSync Era"
|
|
1173
|
+
};
|
|
1174
|
+
function usdeTokenAddressOnEvmChain(chainId) {
|
|
1175
|
+
if (chainId === 1) return USDE_ETHEREUM_MAINNET;
|
|
1176
|
+
if (chainId === 324) return USDE_ZKSYNC_ERA;
|
|
1177
|
+
if (L2_SAME_ADDRESS_CHAIN_IDS.has(chainId)) return USDE_MOST_L2S;
|
|
1178
|
+
return null;
|
|
1179
|
+
}
|
|
1180
|
+
function listEthenaUsdeEvmNetworkRows() {
|
|
1181
|
+
const rows = [
|
|
1182
|
+
{ chainId: 1, label: FALLBACK_NAME_BY_ID[1], usde: USDE_ETHEREUM_MAINNET }
|
|
1183
|
+
];
|
|
1184
|
+
const l2 = [...L2_SAME_ADDRESS_CHAIN_IDS].sort((a, b) => a - b);
|
|
1185
|
+
for (const id of l2) {
|
|
1186
|
+
rows.push({
|
|
1187
|
+
chainId: id,
|
|
1188
|
+
label: FALLBACK_NAME_BY_ID[id] ?? `Chain ${id}`,
|
|
1189
|
+
usde: USDE_MOST_L2S
|
|
1190
|
+
});
|
|
1191
|
+
}
|
|
1192
|
+
rows.push({ chainId: 324, label: FALLBACK_NAME_BY_ID[324], usde: USDE_ZKSYNC_ERA });
|
|
1193
|
+
return rows.sort((a, b) => {
|
|
1194
|
+
if (a.chainId === 1) return -1;
|
|
1195
|
+
if (b.chainId === 1) return 1;
|
|
1196
|
+
return a.chainId - b.chainId;
|
|
1197
|
+
});
|
|
1198
|
+
}
|
|
1199
|
+
function isEvmChainInEthenaUsdeList(chainId) {
|
|
1200
|
+
return usdeTokenAddressOnEvmChain(chainId) != null;
|
|
1201
|
+
}
|
|
1202
|
+
|
|
1203
|
+
// src/protocols/evm/ethena/index.ts
|
|
1204
|
+
var ETHENA_PROTOCOL_ID = "ethena";
|
|
1205
|
+
var ethenaProtocolModule = {
|
|
1206
|
+
id: ETHENA_PROTOCOL_ID,
|
|
1207
|
+
chainCategory: "evm",
|
|
1208
|
+
isChainSupported(ctx) {
|
|
1209
|
+
if (ctx.chainCategory !== "evm") return false;
|
|
1210
|
+
const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
|
|
1211
|
+
return isEvmChainInEthenaUsdeList(n);
|
|
1212
|
+
},
|
|
1213
|
+
isTokenSupported(token) {
|
|
1214
|
+
return token.category === "evm" && token.kind === "erc20";
|
|
1215
|
+
},
|
|
1216
|
+
actions: [
|
|
1217
|
+
{ id: "ethena.stake-usde", protocolId: ETHENA_PROTOCOL_ID, chainCategory: "evm", description: "Stake USDe \u2192 sUSDe", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { amountHuman: { type: "string", required: true, description: "USDe amount" } } },
|
|
1218
|
+
{ id: "ethena.redeem-susde", protocolId: ETHENA_PROTOCOL_ID, chainCategory: "evm", description: "Redeem sUSDe \u2192 USDe (no cooldown)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1219
|
+
{ id: "ethena.cooldown-shares", protocolId: ETHENA_PROTOCOL_ID, chainCategory: "evm", description: "Start sUSDe cooldown", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1220
|
+
{ id: "ethena.claim-unstake", protocolId: ETHENA_PROTOCOL_ID, chainCategory: "evm", description: "Claim after cooldown", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
|
|
1221
|
+
]
|
|
1222
|
+
};
|
|
1223
|
+
registerProtocolModule(ethenaProtocolModule);
|
|
1224
|
+
|
|
1225
|
+
// src/protocols/evm/maple/constants.ts
|
|
1226
|
+
function isMapleSyrupSupportedChain(chainId) {
|
|
1227
|
+
return chainId === 1 || chainId === 11155111;
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
// src/protocols/evm/maple/index.ts
|
|
1231
|
+
var MAPLE_PROTOCOL_ID = "maple-syrup";
|
|
1232
|
+
var mapleProtocolModule = {
|
|
1233
|
+
id: MAPLE_PROTOCOL_ID,
|
|
1234
|
+
chainCategory: "evm",
|
|
1235
|
+
isChainSupported(ctx) {
|
|
1236
|
+
if (ctx.chainCategory !== "evm") return false;
|
|
1237
|
+
const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
|
|
1238
|
+
return isMapleSyrupSupportedChain(n);
|
|
1239
|
+
},
|
|
1240
|
+
isTokenSupported(token) {
|
|
1241
|
+
return token.category === "evm" && token.kind === "erc20";
|
|
1242
|
+
},
|
|
1243
|
+
actions: [
|
|
1244
|
+
{ id: "maple-syrup.deposit", protocolId: MAPLE_PROTOCOL_ID, chainCategory: "evm", description: "Deposit into Maple Syrup pool", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1245
|
+
{ id: "maple-syrup.request-redeem", protocolId: MAPLE_PROTOCOL_ID, chainCategory: "evm", description: "Request redeem from pool", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
|
|
1246
|
+
]
|
|
1247
|
+
};
|
|
1248
|
+
registerProtocolModule(mapleProtocolModule);
|
|
1249
|
+
|
|
1250
|
+
// src/protocols/evm/sky/mainnet.ts
|
|
1251
|
+
var SKY_ETHEREUM_MAINNET_CHAIN_ID = 1;
|
|
1252
|
+
|
|
1253
|
+
// src/protocols/evm/sky/index.ts
|
|
1254
|
+
var SKY_PROTOCOL_ID = "sky";
|
|
1255
|
+
var skyProtocolModule = {
|
|
1256
|
+
id: SKY_PROTOCOL_ID,
|
|
1257
|
+
chainCategory: "evm",
|
|
1258
|
+
isChainSupported(ctx) {
|
|
1259
|
+
if (ctx.chainCategory !== "evm") return false;
|
|
1260
|
+
return Number(ctx.chainId) === SKY_ETHEREUM_MAINNET_CHAIN_ID;
|
|
1261
|
+
},
|
|
1262
|
+
isTokenSupported(token) {
|
|
1263
|
+
return token.category === "evm" && token.kind === "erc20";
|
|
1264
|
+
},
|
|
1265
|
+
actions: [
|
|
1266
|
+
{ id: "sky.lockstake-stake", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Open Lockstake position", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1267
|
+
{ id: "sky.lockstake-draw", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Borrow USDS from Lockstake", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1268
|
+
{ id: "sky.lockstake-wipe", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Repay Lockstake debt", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1269
|
+
{ id: "sky.lockstake-close", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Close Lockstake position", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1270
|
+
{ id: "sky.susds-deposit", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Deposit USDS into sUSDS vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1271
|
+
{ id: "sky.susds-redeem", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Redeem sUSDS to USDS", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
|
|
1272
|
+
]
|
|
1273
|
+
};
|
|
1274
|
+
registerProtocolModule(skyProtocolModule);
|
|
1275
|
+
var AAVE_V4_GRAPHQL_URL = "https://api.v4.aave.com/graphql";
|
|
1276
|
+
async function aaveV4Gql(query, variables) {
|
|
1277
|
+
const r = await fetch(AAVE_V4_GRAPHQL_URL, {
|
|
1278
|
+
method: "POST",
|
|
1279
|
+
headers: { "content-type": "application/json" },
|
|
1280
|
+
body: JSON.stringify({ query, variables: variables ?? {} })
|
|
1281
|
+
});
|
|
1282
|
+
if (!r.ok) {
|
|
1283
|
+
const t = await r.text().catch(() => "");
|
|
1284
|
+
throw new Error(t ? `Aave V4 API HTTP ${r.status}: ${t.slice(0, 200)}` : `Aave V4 API HTTP ${r.status}`);
|
|
1285
|
+
}
|
|
1286
|
+
const j = await r.json();
|
|
1287
|
+
if (j.errors?.length) {
|
|
1288
|
+
const msg = j.errors.map((e) => e.message ?? "Unknown").join("; ");
|
|
1289
|
+
throw new Error(msg);
|
|
1290
|
+
}
|
|
1291
|
+
if (j.data == null) {
|
|
1292
|
+
throw new Error("Aave V4 API: empty response");
|
|
1293
|
+
}
|
|
1294
|
+
return j.data;
|
|
1295
|
+
}
|
|
1296
|
+
async function fetchAaveV4Chains() {
|
|
1297
|
+
const d = await aaveV4Gql(`
|
|
1298
|
+
query C($c: ChainsRequest!) { chains(request: $c) { chainId name nativeWrappedToken } }
|
|
1299
|
+
`, { c: { query: { filter: "ALL" } } });
|
|
1300
|
+
return d.chains ?? [];
|
|
1301
|
+
}
|
|
1302
|
+
async function loadAaveV4SupportedChainIdsFromV4Api() {
|
|
1303
|
+
const rows = await fetchAaveV4Chains();
|
|
1304
|
+
const s = /* @__PURE__ */ new Set();
|
|
1305
|
+
for (const c of rows) s.add(c.chainId);
|
|
1306
|
+
return s;
|
|
1307
|
+
}
|
|
1308
|
+
var RESERVES_ADDRESS_FRAGMENT = `
|
|
1309
|
+
asset { underlying { address } }
|
|
1310
|
+
`;
|
|
1311
|
+
async function fetchAaveV4NativeWrappedToken(chainId) {
|
|
1312
|
+
const all = await fetchAaveV4Chains();
|
|
1313
|
+
const c = all.find((x) => x.chainId === chainId);
|
|
1314
|
+
const t = (c?.nativeWrappedToken ?? "").trim();
|
|
1315
|
+
if (t && viem.isAddress(t)) return viem.getAddress(t);
|
|
1316
|
+
return null;
|
|
1317
|
+
}
|
|
1318
|
+
async function fetchAaveV4SupportedUnderlyingAddressSet(chainId) {
|
|
1319
|
+
const d = await aaveV4Gql(
|
|
1320
|
+
`
|
|
1321
|
+
query A($r: ReservesRequest!) { reserves(request: $r) { ${RESERVES_ADDRESS_FRAGMENT} } }
|
|
1322
|
+
`,
|
|
1323
|
+
{
|
|
1324
|
+
r: {
|
|
1325
|
+
query: { chainIds: [chainId] },
|
|
1326
|
+
filter: "ALL",
|
|
1327
|
+
orderBy: { supplyApy: "DESC" }
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
);
|
|
1331
|
+
const s = /* @__PURE__ */ new Set();
|
|
1332
|
+
for (const r of d.reserves ?? []) {
|
|
1333
|
+
const a = (r.asset?.underlying?.address ?? "").trim();
|
|
1334
|
+
if (a && viem.isAddress(a)) s.add(a.toLowerCase());
|
|
1335
|
+
}
|
|
1336
|
+
return s;
|
|
1337
|
+
}
|
|
1338
|
+
var aaveV4ChainTokenCache = /* @__PURE__ */ new Map();
|
|
1339
|
+
function ensureAaveV4ChainTokenCache(chainId) {
|
|
1340
|
+
const hit = aaveV4ChainTokenCache.get(chainId);
|
|
1341
|
+
if (hit) return hit;
|
|
1342
|
+
const p = (async () => {
|
|
1343
|
+
const [nativeWrapped, supportedUnderlying] = await Promise.all([
|
|
1344
|
+
fetchAaveV4NativeWrappedToken(chainId),
|
|
1345
|
+
fetchAaveV4SupportedUnderlyingAddressSet(chainId)
|
|
1346
|
+
]);
|
|
1347
|
+
return { supportedUnderlying, nativeWrapped };
|
|
1348
|
+
})();
|
|
1349
|
+
aaveV4ChainTokenCache.set(chainId, p);
|
|
1350
|
+
return p;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
// src/protocols/evm/aave-v4/index.ts
|
|
1354
|
+
var AAVE_V4_PROTOCOL_ID = "aave-v4";
|
|
1355
|
+
var aaveV4ProtocolModule = {
|
|
1356
|
+
id: AAVE_V4_PROTOCOL_ID,
|
|
1357
|
+
chainCategory: "evm",
|
|
1358
|
+
isChainSupported(ctx) {
|
|
1359
|
+
return ctx.chainCategory === "evm";
|
|
1360
|
+
},
|
|
1361
|
+
isTokenSupported(token) {
|
|
1362
|
+
return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
|
|
1363
|
+
},
|
|
1364
|
+
actions: [
|
|
1365
|
+
{ id: "aave-v4.deposit", protocolId: AAVE_V4_PROTOCOL_ID, chainCategory: "evm", description: "Supply to Aave v4 Spoke", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1366
|
+
{ id: "aave-v4.withdraw", protocolId: AAVE_V4_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw from Spoke", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1367
|
+
{ id: "aave-v4.borrow", protocolId: AAVE_V4_PROTOCOL_ID, chainCategory: "evm", description: "Borrow from Spoke", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1368
|
+
{ id: "aave-v4.repay", protocolId: AAVE_V4_PROTOCOL_ID, chainCategory: "evm", description: "Repay Spoke debt", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
|
|
1369
|
+
]
|
|
1370
|
+
};
|
|
1371
|
+
registerProtocolModule(aaveV4ProtocolModule);
|
|
1372
|
+
|
|
1373
|
+
// src/protocols/evm/euler-v2/index.ts
|
|
1374
|
+
var EULER_V2_PROTOCOL_ID = "euler-v2";
|
|
1375
|
+
var eulerV2ProtocolModule = {
|
|
1376
|
+
id: EULER_V2_PROTOCOL_ID,
|
|
1377
|
+
chainCategory: "evm",
|
|
1378
|
+
isChainSupported(ctx) {
|
|
1379
|
+
return ctx.chainCategory === "evm";
|
|
1380
|
+
},
|
|
1381
|
+
isTokenSupported(token) {
|
|
1382
|
+
return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
|
|
1383
|
+
},
|
|
1384
|
+
actions: [
|
|
1385
|
+
{ id: "euler-v2.isolated-lend", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Deposit into Euler vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1386
|
+
{ id: "euler-v2.isolated-borrow", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Borrow from Euler vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1387
|
+
{ id: "euler-v2.vault-withdraw", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw from Euler vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1388
|
+
{ id: "euler-v2.borrow-repay", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Repay Euler borrow", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1389
|
+
{ id: "euler-v2.collateral-deposit", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Deposit borrow collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
1390
|
+
{ id: "euler-v2.collateral-withdraw", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw borrow collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
|
|
1391
|
+
]
|
|
1392
|
+
};
|
|
1393
|
+
registerProtocolModule(eulerV2ProtocolModule);
|
|
1394
|
+
var skillsDir = path.join(path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('catalog.cjs', document.baseURI).href)))), "skills");
|
|
1395
|
+
var SKILL_PROTOCOL_IDS = [
|
|
1396
|
+
"aave-v4",
|
|
1397
|
+
"lido",
|
|
1398
|
+
"uniswap-v4",
|
|
1399
|
+
"curve-dao",
|
|
1400
|
+
"ethena",
|
|
1401
|
+
"euler-v2",
|
|
1402
|
+
"maple-syrup",
|
|
1403
|
+
"sky"
|
|
1404
|
+
];
|
|
1405
|
+
function getToolsForProtocol(protocolId) {
|
|
1406
|
+
return MCP_TOOL_DEFINITIONS.filter((t) => t.protocolId === protocolId);
|
|
1407
|
+
}
|
|
1408
|
+
function getProtocolSkill(protocolId) {
|
|
1409
|
+
if (!SKILL_PROTOCOL_IDS.includes(protocolId)) {
|
|
1410
|
+
return void 0;
|
|
1411
|
+
}
|
|
1412
|
+
try {
|
|
1413
|
+
return fs.readFileSync(path.join(skillsDir, protocolId, "SKILL.md"), "utf8");
|
|
1414
|
+
} catch {
|
|
1415
|
+
return void 0;
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
function listProtocolsWithSkills() {
|
|
1419
|
+
return [...SKILL_PROTOCOL_IDS];
|
|
1420
|
+
}
|
|
1421
|
+
function getProtocolDiscoverySummary(protocolId) {
|
|
1422
|
+
const mod = getProtocolModules().find((p) => p.id === protocolId);
|
|
1423
|
+
if (!mod) return void 0;
|
|
1424
|
+
return {
|
|
1425
|
+
protocolId: mod.id,
|
|
1426
|
+
chainCategory: mod.chainCategory,
|
|
1427
|
+
actions: mod.actions.map((a) => ({ id: a.id, description: a.description })),
|
|
1428
|
+
tools: getToolsForProtocol(protocolId).map((t) => ({
|
|
1429
|
+
name: t.name,
|
|
1430
|
+
actionId: t.actionId,
|
|
1431
|
+
description: t.description,
|
|
1432
|
+
prerequisites: t.prerequisites,
|
|
1433
|
+
followUp: t.followUp
|
|
1434
|
+
}))
|
|
1435
|
+
};
|
|
1436
|
+
}
|
|
1437
|
+
var EULER_V2_SUBGRAPH_CHAIN_IDS = [
|
|
1438
|
+
1,
|
|
1439
|
+
8453,
|
|
1440
|
+
42161,
|
|
1441
|
+
10,
|
|
1442
|
+
137,
|
|
1443
|
+
56,
|
|
1444
|
+
43114,
|
|
1445
|
+
100,
|
|
1446
|
+
59144,
|
|
1447
|
+
146,
|
|
1448
|
+
1923,
|
|
1449
|
+
130
|
|
1450
|
+
];
|
|
1451
|
+
function advisor(protocolId, tokenFilter, impl) {
|
|
1452
|
+
return { protocolId, tokenFilter, ...impl };
|
|
1453
|
+
}
|
|
1454
|
+
var PROTOCOL_SUPPORT_ADVISORS = {
|
|
1455
|
+
"aave-v4": advisor("aave-v4", "api_underlyings", {
|
|
1456
|
+
async supportedChainIds() {
|
|
1457
|
+
const set = await loadAaveV4SupportedChainIdsFromV4Api();
|
|
1458
|
+
return [...set].sort((a, b) => a - b);
|
|
1459
|
+
},
|
|
1460
|
+
async supportedTokens(chainId) {
|
|
1461
|
+
const cache = await ensureAaveV4ChainTokenCache(chainId);
|
|
1462
|
+
const tokens = [...cache.supportedUnderlying].map((address) => ({
|
|
1463
|
+
address,
|
|
1464
|
+
roles: ["underlying"]
|
|
1465
|
+
}));
|
|
1466
|
+
if (cache.nativeWrapped) {
|
|
1467
|
+
tokens.unshift({
|
|
1468
|
+
address: cache.nativeWrapped,
|
|
1469
|
+
symbol: "WETH",
|
|
1470
|
+
roles: ["native_wrapped"]
|
|
1471
|
+
});
|
|
1472
|
+
}
|
|
1473
|
+
return {
|
|
1474
|
+
tokens,
|
|
1475
|
+
nativeWrapped: cache.nativeWrapped ?? void 0,
|
|
1476
|
+
notes: "Native ETH deposits use wrapped native token address from Aave v4 API."
|
|
1477
|
+
};
|
|
1478
|
+
},
|
|
1479
|
+
async isTokenSupported(chainId, address) {
|
|
1480
|
+
const cache = await ensureAaveV4ChainTokenCache(chainId);
|
|
1481
|
+
let normalized;
|
|
1482
|
+
try {
|
|
1483
|
+
normalized = viem.getAddress(address).toLowerCase();
|
|
1484
|
+
} catch {
|
|
1485
|
+
return false;
|
|
1486
|
+
}
|
|
1487
|
+
if (cache.nativeWrapped && viem.getAddress(cache.nativeWrapped).toLowerCase() === normalized) {
|
|
1488
|
+
return true;
|
|
1489
|
+
}
|
|
1490
|
+
return cache.supportedUnderlying.has(normalized);
|
|
1491
|
+
}
|
|
1492
|
+
}),
|
|
1493
|
+
"uniswap-v4": advisor("uniswap-v4", "any_erc20_on_chain", {
|
|
1494
|
+
async supportedChainIds() {
|
|
1495
|
+
const ids = [];
|
|
1496
|
+
for (const id of [
|
|
1497
|
+
1,
|
|
1498
|
+
5,
|
|
1499
|
+
11155111,
|
|
1500
|
+
137,
|
|
1501
|
+
80001,
|
|
1502
|
+
10,
|
|
1503
|
+
420,
|
|
1504
|
+
42161,
|
|
1505
|
+
421613,
|
|
1506
|
+
42220,
|
|
1507
|
+
44787,
|
|
1508
|
+
56,
|
|
1509
|
+
43114,
|
|
1510
|
+
84531,
|
|
1511
|
+
8453,
|
|
1512
|
+
81457,
|
|
1513
|
+
7777777,
|
|
1514
|
+
324,
|
|
1515
|
+
480,
|
|
1516
|
+
1301,
|
|
1517
|
+
130,
|
|
1518
|
+
10143,
|
|
1519
|
+
84532,
|
|
1520
|
+
1868,
|
|
1521
|
+
143,
|
|
1522
|
+
59144,
|
|
1523
|
+
4217,
|
|
1524
|
+
196
|
|
1525
|
+
]) {
|
|
1526
|
+
if (isUniswapV4ChainSupported(id)) ids.push(id);
|
|
1527
|
+
}
|
|
1528
|
+
return ids;
|
|
1529
|
+
},
|
|
1530
|
+
async supportedTokens() {
|
|
1531
|
+
return {
|
|
1532
|
+
tokens: [],
|
|
1533
|
+
notes: "Any ERC-20 or native token on a supported chain may be used. Resolve addresses via get_token_registry; tokenOut may be any address."
|
|
1534
|
+
};
|
|
1535
|
+
}
|
|
1536
|
+
}),
|
|
1537
|
+
"curve-dao": advisor("curve-dao", "pool_graph", {
|
|
1538
|
+
async supportedChainIds() {
|
|
1539
|
+
return [1, 10, 56, 100, 137, 146, 196, 250, 252, 324, 999, 1284, 2222, 5e3, 8453, 42161, 42220, 43114, 1313161554];
|
|
1540
|
+
},
|
|
1541
|
+
async supportedTokens(chainId, ctx) {
|
|
1542
|
+
if (!isCurveApiChainSupported(chainId)) {
|
|
1543
|
+
return { tokens: [], notes: "Chain not supported by Curve SDK network constants." };
|
|
1544
|
+
}
|
|
1545
|
+
const rpcUrl = ctx?.rpcUrl?.trim();
|
|
1546
|
+
if (!rpcUrl) {
|
|
1547
|
+
return {
|
|
1548
|
+
tokens: [],
|
|
1549
|
+
notes: "Provide rpcUrl (from get_chain_registry) to load Curve pool graph token list."
|
|
1550
|
+
};
|
|
1551
|
+
}
|
|
1552
|
+
const session = await loadFullCurveSessionForRpc(rpcUrl);
|
|
1553
|
+
if (!session?.swappableNodeKeys?.size) {
|
|
1554
|
+
return { tokens: [], notes: "Curve session returned no swappable tokens for this RPC." };
|
|
1555
|
+
}
|
|
1556
|
+
return {
|
|
1557
|
+
tokens: [...session.swappableNodeKeys].map((key) => {
|
|
1558
|
+
const address = key.startsWith("0x") ? key : key.split(":")[0] ?? key;
|
|
1559
|
+
return { address, roles: ["swappable"] };
|
|
1560
|
+
})
|
|
1561
|
+
};
|
|
1562
|
+
}
|
|
1563
|
+
}),
|
|
1564
|
+
lido: advisor("lido", "mainnet_only", {
|
|
1565
|
+
async supportedChainIds() {
|
|
1566
|
+
return [LIDO_ETHEREUM_MAINNET_CHAIN_ID];
|
|
1567
|
+
},
|
|
1568
|
+
async supportedTokens() {
|
|
1569
|
+
return {
|
|
1570
|
+
tokens: [
|
|
1571
|
+
{ address: "0x0000000000000000000000000000000000000000", symbol: "ETH", roles: ["native", "stake"] },
|
|
1572
|
+
{ address: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84", symbol: "stETH", roles: ["erc20"] },
|
|
1573
|
+
{ address: "0x7f39C581F595B853cBbF37C12FfeeA971C5a5bEa", symbol: "wstETH", roles: ["erc20"] }
|
|
1574
|
+
],
|
|
1575
|
+
notes: "Lido staking and withdrawals are Ethereum mainnet only."
|
|
1576
|
+
};
|
|
1577
|
+
}
|
|
1578
|
+
}),
|
|
1579
|
+
ethena: advisor("ethena", "minting_contract", {
|
|
1580
|
+
async supportedChainIds() {
|
|
1581
|
+
return listEthenaUsdeEvmNetworkRows().map((r) => r.chainId);
|
|
1582
|
+
},
|
|
1583
|
+
async supportedTokens(chainId) {
|
|
1584
|
+
if (chainId === 1) {
|
|
1585
|
+
return {
|
|
1586
|
+
tokens: [
|
|
1587
|
+
{ address: USDE_ETHEREUM_MAINNET, symbol: "USDe", roles: ["stake"] },
|
|
1588
|
+
{ address: SUSDE_ETHEREUM_MAINNET, symbol: "sUSDe", roles: ["vault"] }
|
|
1589
|
+
],
|
|
1590
|
+
notes: "Ethena stake/redeem UI actions are mainnet-only; USDe exists on other chains for transfers."
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
if (isEvmChainInEthenaUsdeList(chainId)) {
|
|
1594
|
+
const row = listEthenaUsdeEvmNetworkRows().find((r) => r.chainId === chainId);
|
|
1595
|
+
return {
|
|
1596
|
+
tokens: row ? [{ address: row.usde, symbol: "USDe", roles: ["erc20"] }] : [],
|
|
1597
|
+
notes: "USDe on L2; staking MCP tools target mainnet only."
|
|
1598
|
+
};
|
|
1599
|
+
}
|
|
1600
|
+
return { tokens: [] };
|
|
1601
|
+
}
|
|
1602
|
+
}),
|
|
1603
|
+
"euler-v2": advisor("euler-v2", "subgraph_vaults", {
|
|
1604
|
+
async supportedChainIds() {
|
|
1605
|
+
return [...EULER_V2_SUBGRAPH_CHAIN_IDS];
|
|
1606
|
+
},
|
|
1607
|
+
async supportedTokens() {
|
|
1608
|
+
return {
|
|
1609
|
+
tokens: [],
|
|
1610
|
+
notes: "Euler vault/collateral assets vary by chain. Pass vault and asset addresses from Euler app or subgraph."
|
|
1611
|
+
};
|
|
1612
|
+
}
|
|
1613
|
+
}),
|
|
1614
|
+
[MAPLE_PROTOCOL_ID]: advisor(MAPLE_PROTOCOL_ID, "fixed_addresses", {
|
|
1615
|
+
async supportedChainIds() {
|
|
1616
|
+
return [1, 11155111];
|
|
1617
|
+
},
|
|
1618
|
+
async supportedTokens() {
|
|
1619
|
+
return {
|
|
1620
|
+
tokens: [],
|
|
1621
|
+
notes: "Maple Syrup pools are discovered via GraphQL; pass syrupRouter, pool, and asset from Maple UI."
|
|
1622
|
+
};
|
|
1623
|
+
}
|
|
1624
|
+
}),
|
|
1625
|
+
[SKY_PROTOCOL_ID]: advisor(SKY_PROTOCOL_ID, "fixed_addresses", {
|
|
1626
|
+
async supportedChainIds() {
|
|
1627
|
+
return [1];
|
|
1628
|
+
},
|
|
1629
|
+
async supportedTokens() {
|
|
1630
|
+
return {
|
|
1631
|
+
tokens: [],
|
|
1632
|
+
notes: "Sky Lockstake and sUSDS use fixed mainnet contract addresses in protocol builders."
|
|
1633
|
+
};
|
|
1634
|
+
}
|
|
1635
|
+
})
|
|
1636
|
+
};
|
|
1637
|
+
function getProtocolSupportAdvisor(protocolId) {
|
|
1638
|
+
return PROTOCOL_SUPPORT_ADVISORS[protocolId];
|
|
1639
|
+
}
|
|
1640
|
+
function listProtocolSupportAdvisorIds() {
|
|
1641
|
+
return Object.keys(PROTOCOL_SUPPORT_ADVISORS);
|
|
1642
|
+
}
|
|
1643
|
+
var mcpServerCommonInputSchema = zod.z.object({
|
|
1644
|
+
keyGenId: zod.z.string().min(1).describe("KeyGen id from fetch_key_gen_result / node preferred KeyGen"),
|
|
1645
|
+
chainId: zod.z.number().int().positive().describe("EVM chain id; RPC and gas config resolved from chain registry"),
|
|
1646
|
+
purposeText: zod.z.string().min(1).describe("Human-readable purpose for the sign request"),
|
|
1647
|
+
useCustomGas: zod.z.boolean().optional().describe("Apply chain gas settings from registry when true")
|
|
1648
|
+
});
|
|
1649
|
+
function mcpServerMultisignInput(fields) {
|
|
1650
|
+
return mcpServerCommonInputSchema.extend(fields);
|
|
1651
|
+
}
|
|
1652
|
+
var mcpServerSubmitOutputSchema = zod.z.object({
|
|
1653
|
+
requestId: zod.z.string().min(1)
|
|
1654
|
+
}).describe("mpc-auth multiSignRequest id; continue with trigger_sign_result / broadcast_sign_result");
|
|
1655
|
+
var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1656
|
+
"ctm_uniswap_v4_quote",
|
|
1657
|
+
"ctm_uniswap_v4_create_swap"
|
|
1658
|
+
]);
|
|
488
1659
|
|
|
489
1660
|
// src/agent/catalog.ts
|
|
490
1661
|
registerProtocolModule(uniswapV4ProtocolModule);
|
|
491
1662
|
registerProtocolModule(curveDaoProtocolModule);
|
|
1663
|
+
registerProtocolModule(lidoProtocolModule);
|
|
1664
|
+
registerProtocolModule(ethenaProtocolModule);
|
|
1665
|
+
registerProtocolModule(mapleProtocolModule);
|
|
1666
|
+
registerProtocolModule(skyProtocolModule);
|
|
1667
|
+
registerProtocolModule(aaveV4ProtocolModule);
|
|
1668
|
+
registerProtocolModule(eulerV2ProtocolModule);
|
|
492
1669
|
function getAgentCatalog() {
|
|
493
1670
|
return {
|
|
494
1671
|
protocols: getProtocolModules(),
|
|
@@ -499,6 +1676,12 @@ function getAgentCatalog() {
|
|
|
499
1676
|
},
|
|
500
1677
|
uniswapV4: uniswapV4ProtocolModule,
|
|
501
1678
|
curveDao: curveDaoProtocolModule,
|
|
1679
|
+
lido: lidoProtocolModule,
|
|
1680
|
+
ethena: ethenaProtocolModule,
|
|
1681
|
+
maple: mapleProtocolModule,
|
|
1682
|
+
sky: skyProtocolModule,
|
|
1683
|
+
aaveV4: aaveV4ProtocolModule,
|
|
1684
|
+
eulerV2: eulerV2ProtocolModule,
|
|
502
1685
|
/** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
|
|
503
1686
|
mcp: getAgentCatalogForMcp()
|
|
504
1687
|
};
|
|
@@ -506,13 +1689,74 @@ function getAgentCatalog() {
|
|
|
506
1689
|
|
|
507
1690
|
exports.EVM_COMMON_PARAM_DOCS = EVM_COMMON_PARAM_DOCS;
|
|
508
1691
|
exports.MANAGEMENT_SIG_DOC = MANAGEMENT_SIG_DOC;
|
|
1692
|
+
exports.MCP_NON_SUBMIT_TOOL_NAMES = MCP_NON_SUBMIT_TOOL_NAMES;
|
|
509
1693
|
exports.MCP_TOOL_DEFINITIONS = MCP_TOOL_DEFINITIONS;
|
|
1694
|
+
exports.MCP_TOOL_INPUT_SCHEMAS = MCP_TOOL_INPUT_SCHEMAS;
|
|
1695
|
+
exports.MCP_TOOL_OUTPUT_SCHEMAS = MCP_TOOL_OUTPUT_SCHEMAS;
|
|
510
1696
|
exports.MULTISIGN_OUTPUT_DOC = MULTISIGN_OUTPUT_DOC;
|
|
1697
|
+
exports.PROTOCOL_SUPPORT_ADVISORS = PROTOCOL_SUPPORT_ADVISORS;
|
|
1698
|
+
exports.chainDetailSchema = chainDetailSchema;
|
|
1699
|
+
exports.evmAddressSchema = evmAddressSchema;
|
|
1700
|
+
exports.evmMultisignCommonInputSchema = evmMultisignCommonInputSchema;
|
|
511
1701
|
exports.getActionsByChainCategory = getActionsByChainCategory;
|
|
512
1702
|
exports.getAgentCatalog = getAgentCatalog;
|
|
513
1703
|
exports.getAgentCatalogForMcp = getAgentCatalogForMcp;
|
|
514
1704
|
exports.getMcpToolByName = getMcpToolByName;
|
|
515
1705
|
exports.getMcpToolDefinitions = getMcpToolDefinitions;
|
|
1706
|
+
exports.getMcpToolInputSchema = getMcpToolInputSchema;
|
|
1707
|
+
exports.getMcpToolOutputSchema = getMcpToolOutputSchema;
|
|
1708
|
+
exports.getProtocolDiscoverySummary = getProtocolDiscoverySummary;
|
|
516
1709
|
exports.getProtocolModules = getProtocolModules;
|
|
1710
|
+
exports.getProtocolSkill = getProtocolSkill;
|
|
1711
|
+
exports.getProtocolSupportAdvisor = getProtocolSupportAdvisor;
|
|
1712
|
+
exports.getToolsForProtocol = getToolsForProtocol;
|
|
1713
|
+
exports.jsonObjectSchema = jsonObjectSchema;
|
|
1714
|
+
exports.keyGenSchema = keyGenSchema;
|
|
1715
|
+
exports.listProtocolSupportAdvisorIds = listProtocolSupportAdvisorIds;
|
|
1716
|
+
exports.listProtocolsWithSkills = listProtocolsWithSkills;
|
|
1717
|
+
exports.mcpAaveV4BorrowInputSchema = mcpAaveV4BorrowInputSchema;
|
|
1718
|
+
exports.mcpAaveV4DepositInputSchema = mcpAaveV4DepositInputSchema;
|
|
1719
|
+
exports.mcpAaveV4RepayInputSchema = mcpAaveV4RepayInputSchema;
|
|
1720
|
+
exports.mcpAaveV4WithdrawInputSchema = mcpAaveV4WithdrawInputSchema;
|
|
1721
|
+
exports.mcpCurveDaoBuildSwapMultisignInputSchema = mcpCurveDaoBuildSwapMultisignInputSchema;
|
|
1722
|
+
exports.mcpEthenaClaimInputSchema = mcpEthenaClaimInputSchema;
|
|
1723
|
+
exports.mcpEthenaCooldownInputSchema = mcpEthenaCooldownInputSchema;
|
|
1724
|
+
exports.mcpEthenaRedeemInputSchema = mcpEthenaRedeemInputSchema;
|
|
1725
|
+
exports.mcpEthenaStakeInputSchema = mcpEthenaStakeInputSchema;
|
|
1726
|
+
exports.mcpEulerV2BorrowRepayInputSchema = mcpEulerV2BorrowRepayInputSchema;
|
|
1727
|
+
exports.mcpEulerV2CollateralDepositInputSchema = mcpEulerV2CollateralDepositInputSchema;
|
|
1728
|
+
exports.mcpEulerV2CollateralWithdrawInputSchema = mcpEulerV2CollateralWithdrawInputSchema;
|
|
1729
|
+
exports.mcpEulerV2IsolatedBorrowInputSchema = mcpEulerV2IsolatedBorrowInputSchema;
|
|
1730
|
+
exports.mcpEulerV2IsolatedLendInputSchema = mcpEulerV2IsolatedLendInputSchema;
|
|
1731
|
+
exports.mcpEulerV2VaultWithdrawInputSchema = mcpEulerV2VaultWithdrawInputSchema;
|
|
1732
|
+
exports.mcpLidoClaimWithdrawalInputSchema = mcpLidoClaimWithdrawalInputSchema;
|
|
1733
|
+
exports.mcpLidoRequestWithdrawalsInputSchema = mcpLidoRequestWithdrawalsInputSchema;
|
|
1734
|
+
exports.mcpLidoSubmitInputSchema = mcpLidoSubmitInputSchema;
|
|
1735
|
+
exports.mcpLidoUnwrapWstEthInputSchema = mcpLidoUnwrapWstEthInputSchema;
|
|
1736
|
+
exports.mcpLidoWrapStEthInputSchema = mcpLidoWrapStEthInputSchema;
|
|
1737
|
+
exports.mcpMapleDepositInputSchema = mcpMapleDepositInputSchema;
|
|
1738
|
+
exports.mcpMapleRequestRedeemInputSchema = mcpMapleRequestRedeemInputSchema;
|
|
1739
|
+
exports.mcpMultisignInput = mcpMultisignInput;
|
|
1740
|
+
exports.mcpMultisignOutputSchema = multisignOutputSchema;
|
|
1741
|
+
exports.mcpServerCommonInputSchema = mcpServerCommonInputSchema;
|
|
1742
|
+
exports.mcpServerMultisignInput = mcpServerMultisignInput;
|
|
1743
|
+
exports.mcpServerSubmitOutputSchema = mcpServerSubmitOutputSchema;
|
|
1744
|
+
exports.mcpSkyLockstakeCloseInputSchema = mcpSkyLockstakeCloseInputSchema;
|
|
1745
|
+
exports.mcpSkyLockstakeDrawInputSchema = mcpSkyLockstakeDrawInputSchema;
|
|
1746
|
+
exports.mcpSkyLockstakeGetRewardInputSchema = mcpSkyLockstakeGetRewardInputSchema;
|
|
1747
|
+
exports.mcpSkyLockstakeStakeInputSchema = mcpSkyLockstakeStakeInputSchema;
|
|
1748
|
+
exports.mcpSkyLockstakeWipeInputSchema = mcpSkyLockstakeWipeInputSchema;
|
|
1749
|
+
exports.mcpSkySusdsDepositInputSchema = mcpSkySusdsDepositInputSchema;
|
|
1750
|
+
exports.mcpSkySusdsRedeemInputSchema = mcpSkySusdsRedeemInputSchema;
|
|
1751
|
+
exports.mcpUniswapV4BuildSwapMultisignInputSchema = mcpUniswapV4BuildSwapMultisignInputSchema;
|
|
1752
|
+
exports.mcpUniswapV4CreateSwapInputSchema = mcpUniswapV4CreateSwapInputSchema;
|
|
1753
|
+
exports.mcpUniswapV4CreateSwapOutputSchema = mcpUniswapV4CreateSwapOutputSchema;
|
|
1754
|
+
exports.mcpUniswapV4QuoteInputSchema = mcpUniswapV4QuoteInputSchema;
|
|
1755
|
+
exports.mcpUniswapV4QuoteOutputSchema = mcpUniswapV4QuoteOutputSchema;
|
|
1756
|
+
exports.multisignOutputSchema = multisignOutputSchema;
|
|
1757
|
+
exports.parseMcpToolInput = parseMcpToolInput;
|
|
1758
|
+
exports.parseMcpToolOutput = parseMcpToolOutput;
|
|
1759
|
+
exports.uniswapQuoteTradeTypeSchema = uniswapQuoteTradeTypeSchema;
|
|
1760
|
+
exports.zodSchemaToMcpJsonSchema = zodSchemaToMcpJsonSchema;
|
|
517
1761
|
//# sourceMappingURL=catalog.cjs.map
|
|
518
1762
|
//# sourceMappingURL=catalog.cjs.map
|