@continuumdao/ctm-mpc-defi 0.2.7 → 0.2.9
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/dist/agent/catalog.cjs +754 -104
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +693 -5
- package/dist/agent/catalog.js +721 -104
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/_shared/multisign-mcp-gas.md +20 -0
- package/dist/agent/skills/aave-v4/SKILL.md +0 -7
- package/dist/agent/skills/curve-dao/SKILL.md +0 -7
- package/dist/agent/skills/ethena/SKILL.md +1 -1
- package/dist/agent/skills/euler-v2/SKILL.md +1 -1
- package/dist/agent/skills/gmx/SKILL.md +29 -2
- package/dist/agent/skills/hyperliquid/SKILL.md +177 -0
- package/dist/agent/skills/lido/SKILL.md +1 -1
- package/dist/agent/skills/maple-syrup/SKILL.md +1 -1
- package/dist/agent/skills/sky/SKILL.md +1 -1
- package/dist/agent/skills/uniswap-v4/SKILL.md +0 -7
- package/dist/protocols/evm/hyperliquid/index.cjs +1177 -0
- package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -0
- package/dist/protocols/evm/hyperliquid/index.d.ts +515 -0
- package/dist/protocols/evm/hyperliquid/index.js +1109 -0
- package/dist/protocols/evm/hyperliquid/index.js.map +1 -0
- package/package.json +6 -1
package/dist/agent/catalog.js
CHANGED
|
@@ -379,7 +379,7 @@ var EVM_COMMON_PARAM_DOCS = {
|
|
|
379
379
|
useCustomGas: {
|
|
380
380
|
type: "boolean",
|
|
381
381
|
required: true,
|
|
382
|
-
description: "When true, apply
|
|
382
|
+
description: "When true, apply Custom Gas Config from chainDetail / customGasChainDetails. Omitted baseFee/priorityFee is valid \u2014 live RPC fees are used at proposal; configured values are optional floors/multipliers. When false, use live RPC estimates only."
|
|
383
383
|
},
|
|
384
384
|
chainId: {
|
|
385
385
|
type: "number",
|
|
@@ -407,8 +407,17 @@ var EVM_COMMON_PARAM_DOCS = {
|
|
|
407
407
|
description: "Snapshot written to extraJSON.customGasChainDetails when useCustomGas is true."
|
|
408
408
|
}
|
|
409
409
|
};
|
|
410
|
+
var MULTISIGN_SUBMIT_OUTPUT_DOC = {
|
|
411
|
+
description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with wait_for_sign_request_ready \u2192 sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result. Do not call the same build tool again if requestId was returned.",
|
|
412
|
+
fields: {
|
|
413
|
+
requestId: {
|
|
414
|
+
type: "string",
|
|
415
|
+
description: "Sign request id from POST /multiSignRequest."
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
};
|
|
410
419
|
var MULTISIGN_OUTPUT_DOC = {
|
|
411
|
-
description: "Unsigned mpc-auth multiSignRequest payload.
|
|
420
|
+
description: "Unsigned mpc-auth multiSignRequest payload from protocol builders. MCP agents receive { requestId } instead; node-app callers sign messageToSign and POST { ...bodyForSign, clientSig, signedMessage }.",
|
|
412
421
|
fields: {
|
|
413
422
|
bodyForSign: {
|
|
414
423
|
type: "object",
|
|
@@ -457,6 +466,21 @@ var MANAGEMENT_SIG_DOC = {
|
|
|
457
466
|
fetchPreferredKeyGen: "GET /getPreferredKeyGen for agent default KeyGen."
|
|
458
467
|
}
|
|
459
468
|
};
|
|
469
|
+
|
|
470
|
+
// src/agent/mcpMultisignSubmitMeta.ts
|
|
471
|
+
var MCP_MULTISIGN_SUBMIT_DESCRIPTION_SUFFIX = "Builds the unsigned batch, signs the management envelope, and POSTs /multiSignRequest. Returns { requestId } on success \u2014 do not call again; use list_sign_requests to verify duplicates.";
|
|
472
|
+
var MCP_MULTISIGN_SUBMIT_FOLLOW_UP = [
|
|
473
|
+
"wait_for_sign_request_ready",
|
|
474
|
+
"sign_request_agree",
|
|
475
|
+
"trigger_sign_result",
|
|
476
|
+
"broadcast_sign_result"
|
|
477
|
+
];
|
|
478
|
+
function withMultisignSubmitMcpMeta(description, followUp = MCP_MULTISIGN_SUBMIT_FOLLOW_UP) {
|
|
479
|
+
return {
|
|
480
|
+
description: `${description.trim()} ${MCP_MULTISIGN_SUBMIT_DESCRIPTION_SUFFIX}`,
|
|
481
|
+
followUp: [...followUp]
|
|
482
|
+
};
|
|
483
|
+
}
|
|
460
484
|
function zodSchemaToMcpJsonSchema(schema) {
|
|
461
485
|
const raw = zodToJsonSchema(schema, {
|
|
462
486
|
target: "openApi3",
|
|
@@ -501,7 +525,7 @@ var evmMultisignCommonInputSchema = z.object({
|
|
|
501
525
|
"Human-readable purpose for the sign request. Stored in bodyForSign.purpose (may be appended with an automatic batch suffix)."
|
|
502
526
|
),
|
|
503
527
|
useCustomGas: z.boolean().describe(
|
|
504
|
-
"When true, apply
|
|
528
|
+
"When true, apply Custom Gas Config from chainDetail / customGasChainDetails. Omitted baseFee/priorityFee is valid \u2014 builder uses live RPC fees; configured values are optional floors/multipliers. When false, use live RPC estimates only."
|
|
505
529
|
),
|
|
506
530
|
chainId: z.number().int().positive().describe("EVM chain id (decimal). Becomes destinationChainID on the sign request."),
|
|
507
531
|
rpcUrl: z.string().min(1).describe("HTTPS JSON-RPC URL for gas estimation, nonce, and allowance reads."),
|
|
@@ -517,9 +541,12 @@ var multisignOutputSchema = z.object({
|
|
|
517
541
|
),
|
|
518
542
|
messageToSign: z.string().describe("JSON.stringify(bodyForSign) \u2014 exact string to sign before adding clientSig.")
|
|
519
543
|
}).describe(
|
|
520
|
-
"Unsigned mpc-auth multiSignRequest payload
|
|
544
|
+
"Unsigned mpc-auth multiSignRequest payload from protocol builders (used internally before management submit)."
|
|
521
545
|
);
|
|
522
546
|
var jsonObjectSchema = z.record(z.unknown());
|
|
547
|
+
function parseMultisignBuilderOutput(data) {
|
|
548
|
+
return multisignOutputSchema.parse(data);
|
|
549
|
+
}
|
|
523
550
|
var uniswapQuoteTradeTypeSchema = z.enum(["EXACT_INPUT", "EXACT_OUTPUT"]);
|
|
524
551
|
var mcpUniswapV4QuoteInputSchema = z.object({
|
|
525
552
|
type: uniswapQuoteTradeTypeSchema.describe("EXACT_INPUT or EXACT_OUTPUT"),
|
|
@@ -738,6 +765,26 @@ var mcpCurveDaoBuildSwapMultisignInputSchema = evmMultisignCommonInputSchema.ext
|
|
|
738
765
|
amountHuman: z.string().min(1).describe("Human-readable amount of tokenIn"),
|
|
739
766
|
slippagePercent: z.number().gt(0).lt(100).describe("Slippage 0\u2013100 exclusive")
|
|
740
767
|
});
|
|
768
|
+
var mcpServerCommonInputSchema = z.object({
|
|
769
|
+
keyGenId: z.string().min(1).describe("KeyGen id from fetch_key_gen_result / node preferred KeyGen"),
|
|
770
|
+
chainId: z.number().int().positive().describe("EVM chain id; RPC and gas config resolved from chain registry"),
|
|
771
|
+
purposeText: z.string().min(1).describe("Human-readable purpose for the sign request"),
|
|
772
|
+
useCustomGas: z.boolean().optional().describe("Apply chain gas settings from registry when true")
|
|
773
|
+
});
|
|
774
|
+
function mcpServerMultisignInput(fields) {
|
|
775
|
+
return mcpServerCommonInputSchema.extend(fields);
|
|
776
|
+
}
|
|
777
|
+
var mcpServerSubmitOutputSchema = z.object({
|
|
778
|
+
requestId: z.string().min(1).describe("Sign request id from POST /multiSignRequest \u2014 success; do not retry the same build tool.")
|
|
779
|
+
}).describe(
|
|
780
|
+
"Submitted mpc-auth multiSignRequest. Continue with wait_for_sign_request_ready \u2192 sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result."
|
|
781
|
+
);
|
|
782
|
+
var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
783
|
+
"ctm_uniswap_v4_quote",
|
|
784
|
+
"ctm_uniswap_v4_create_swap"
|
|
785
|
+
]);
|
|
786
|
+
|
|
787
|
+
// src/agent/schemas/protocols.ts
|
|
741
788
|
function mcpMultisignInput(fields) {
|
|
742
789
|
return evmMultisignCommonInputSchema.extend(fields);
|
|
743
790
|
}
|
|
@@ -1025,16 +1072,254 @@ var mcpGmxFetchOhlcvOutputSchema = z.object({
|
|
|
1025
1072
|
timeframe: gmxOhlcvTimeframeSchema,
|
|
1026
1073
|
candles: z.array(gmxOhlcvCandleSchema)
|
|
1027
1074
|
});
|
|
1075
|
+
function mcpHyperliquidMultisignInput(fields) {
|
|
1076
|
+
return evmMultisignCommonInputSchema.extend(fields);
|
|
1077
|
+
}
|
|
1078
|
+
var hyperliquidTifSchema = z.enum(["alo", "gtc", "ioc"]);
|
|
1079
|
+
var hyperliquidOhlcvIntervalSchema = z.enum([
|
|
1080
|
+
"1m",
|
|
1081
|
+
"3m",
|
|
1082
|
+
"5m",
|
|
1083
|
+
"15m",
|
|
1084
|
+
"30m",
|
|
1085
|
+
"1h",
|
|
1086
|
+
"2h",
|
|
1087
|
+
"4h",
|
|
1088
|
+
"8h",
|
|
1089
|
+
"12h",
|
|
1090
|
+
"1d",
|
|
1091
|
+
"3d",
|
|
1092
|
+
"1w",
|
|
1093
|
+
"1M"
|
|
1094
|
+
]);
|
|
1095
|
+
var hyperliquidPositionRowSchema = z.object({
|
|
1096
|
+
key: z.string(),
|
|
1097
|
+
coin: z.string(),
|
|
1098
|
+
isLong: z.boolean(),
|
|
1099
|
+
size: z.string().nullable(),
|
|
1100
|
+
entryPx: z.string().nullable(),
|
|
1101
|
+
positionValueUsd: z.string().nullable(),
|
|
1102
|
+
unrealizedPnlUsd: z.string().nullable(),
|
|
1103
|
+
liquidationPx: z.string().nullable(),
|
|
1104
|
+
leverageLabel: z.string().nullable(),
|
|
1105
|
+
maxLeverage: z.number().nullable(),
|
|
1106
|
+
marginUsedUsd: z.string().nullable(),
|
|
1107
|
+
returnOnEquity: z.string().nullable()
|
|
1108
|
+
});
|
|
1109
|
+
var hyperliquidActiveAssetSchema = z.object({
|
|
1110
|
+
markPx: z.string().nullable(),
|
|
1111
|
+
leverageLabel: z.string().nullable(),
|
|
1112
|
+
availableToBuy: z.string().nullable(),
|
|
1113
|
+
availableToSell: z.string().nullable()
|
|
1114
|
+
});
|
|
1115
|
+
var hyperliquidAccountSummarySchema = z.object({
|
|
1116
|
+
accountValueUsd: z.string().nullable(),
|
|
1117
|
+
totalMarginUsedUsd: z.string().nullable(),
|
|
1118
|
+
withdrawableUsd: z.string().nullable()
|
|
1119
|
+
});
|
|
1120
|
+
var mcpHyperliquidFetchMarketsInputSchema = z.object({
|
|
1121
|
+
chainId: z.number().int().positive(),
|
|
1122
|
+
dex: z.string().optional()
|
|
1123
|
+
});
|
|
1124
|
+
var mcpHyperliquidFetchMarketsOutputSchema = z.object({
|
|
1125
|
+
markets: z.array(
|
|
1126
|
+
z.object({
|
|
1127
|
+
name: z.string(),
|
|
1128
|
+
asset: z.number(),
|
|
1129
|
+
szDecimals: z.number(),
|
|
1130
|
+
maxLeverage: z.number(),
|
|
1131
|
+
onlyIsolated: z.boolean().optional()
|
|
1132
|
+
})
|
|
1133
|
+
),
|
|
1134
|
+
dexes: z.array(
|
|
1135
|
+
z.object({
|
|
1136
|
+
name: z.string(),
|
|
1137
|
+
fullName: z.string()
|
|
1138
|
+
})
|
|
1139
|
+
)
|
|
1140
|
+
});
|
|
1141
|
+
var mcpHyperliquidFetchOpenContextInputSchema = z.object({
|
|
1142
|
+
chainId: z.number().int().positive(),
|
|
1143
|
+
executorAddress: evmAddressSchema,
|
|
1144
|
+
coin: z.string().min(1),
|
|
1145
|
+
dex: z.string().optional()
|
|
1146
|
+
});
|
|
1147
|
+
var mcpHyperliquidFetchOpenContextOutputSchema = z.object({
|
|
1148
|
+
context: z.object({
|
|
1149
|
+
account: hyperliquidAccountSummarySchema,
|
|
1150
|
+
activeAsset: hyperliquidActiveAssetSchema
|
|
1151
|
+
})
|
|
1152
|
+
});
|
|
1153
|
+
var mcpHyperliquidFetchPositionsInputSchema = z.object({
|
|
1154
|
+
chainId: z.number().int().positive(),
|
|
1155
|
+
executorAddress: evmAddressSchema,
|
|
1156
|
+
dex: z.string().optional()
|
|
1157
|
+
});
|
|
1158
|
+
var mcpHyperliquidFetchPositionsOutputSchema = z.object({
|
|
1159
|
+
positions: z.array(hyperliquidPositionRowSchema)
|
|
1160
|
+
});
|
|
1161
|
+
var mcpHyperliquidFetchOpenOrdersInputSchema = z.object({
|
|
1162
|
+
chainId: z.number().int().positive(),
|
|
1163
|
+
executorAddress: evmAddressSchema,
|
|
1164
|
+
dex: z.string().optional()
|
|
1165
|
+
});
|
|
1166
|
+
var mcpHyperliquidFetchOpenOrdersOutputSchema = z.object({
|
|
1167
|
+
orders: z.array(
|
|
1168
|
+
z.object({
|
|
1169
|
+
coin: z.string(),
|
|
1170
|
+
side: z.string(),
|
|
1171
|
+
limitPx: z.string(),
|
|
1172
|
+
sz: z.string(),
|
|
1173
|
+
oid: z.number(),
|
|
1174
|
+
timestamp: z.number(),
|
|
1175
|
+
reduceOnly: z.boolean().optional()
|
|
1176
|
+
})
|
|
1177
|
+
)
|
|
1178
|
+
});
|
|
1179
|
+
var mcpHyperliquidFetchMarketSnapshotInputSchema = z.object({
|
|
1180
|
+
chainId: z.number().int().positive(),
|
|
1181
|
+
coin: z.string().min(1),
|
|
1182
|
+
interval: hyperliquidOhlcvIntervalSchema.optional(),
|
|
1183
|
+
dex: z.string().optional()
|
|
1184
|
+
});
|
|
1185
|
+
var mcpHyperliquidFetchMarketSnapshotOutputSchema = z.object({
|
|
1186
|
+
snapshot: z.object({
|
|
1187
|
+
coin: z.string(),
|
|
1188
|
+
midUsd: z.string().nullable(),
|
|
1189
|
+
fetchedAtMs: z.number(),
|
|
1190
|
+
interval: hyperliquidOhlcvIntervalSchema,
|
|
1191
|
+
candles: z.array(
|
|
1192
|
+
z.object({
|
|
1193
|
+
timestampMs: z.number(),
|
|
1194
|
+
open: z.string(),
|
|
1195
|
+
high: z.string(),
|
|
1196
|
+
low: z.string(),
|
|
1197
|
+
close: z.string(),
|
|
1198
|
+
volume: z.string()
|
|
1199
|
+
})
|
|
1200
|
+
)
|
|
1201
|
+
})
|
|
1202
|
+
});
|
|
1203
|
+
var mcpHyperliquidFetchUsdClassBalancesInputSchema = z.object({
|
|
1204
|
+
chainId: z.number().int().positive(),
|
|
1205
|
+
executorAddress: evmAddressSchema
|
|
1206
|
+
});
|
|
1207
|
+
var mcpHyperliquidFetchUsdClassBalancesOutputSchema = z.object({
|
|
1208
|
+
balances: z.object({
|
|
1209
|
+
spotUsdcAvailable: z.string(),
|
|
1210
|
+
perpWithdrawable: z.string()
|
|
1211
|
+
})
|
|
1212
|
+
});
|
|
1213
|
+
var mcpHyperliquidFetchVaultsInputSchema = z.object({
|
|
1214
|
+
chainId: z.number().int().positive(),
|
|
1215
|
+
executorAddress: evmAddressSchema.optional()
|
|
1216
|
+
});
|
|
1217
|
+
var mcpHyperliquidFetchVaultsOutputSchema = z.object({
|
|
1218
|
+
vaults: z.array(
|
|
1219
|
+
z.object({
|
|
1220
|
+
vaultAddress: z.string(),
|
|
1221
|
+
name: z.string(),
|
|
1222
|
+
apr: z.number().nullable(),
|
|
1223
|
+
tvlUsd: z.string().nullable()
|
|
1224
|
+
})
|
|
1225
|
+
)
|
|
1226
|
+
});
|
|
1227
|
+
var mcpHyperliquidFetchUserVaultEquitiesInputSchema = z.object({
|
|
1228
|
+
chainId: z.number().int().positive(),
|
|
1229
|
+
executorAddress: evmAddressSchema
|
|
1230
|
+
});
|
|
1231
|
+
var mcpHyperliquidFetchUserVaultEquitiesOutputSchema = z.object({
|
|
1232
|
+
rows: z.array(
|
|
1233
|
+
z.object({
|
|
1234
|
+
vaultAddress: z.string(),
|
|
1235
|
+
equity: z.string()
|
|
1236
|
+
})
|
|
1237
|
+
)
|
|
1238
|
+
});
|
|
1239
|
+
var mcpHyperliquidFetchStakingSummaryInputSchema = z.object({
|
|
1240
|
+
chainId: z.number().int().positive(),
|
|
1241
|
+
executorAddress: evmAddressSchema
|
|
1242
|
+
});
|
|
1243
|
+
var mcpHyperliquidFetchStakingSummaryOutputSchema = z.object({
|
|
1244
|
+
summary: z.object({
|
|
1245
|
+
delegated: z.string(),
|
|
1246
|
+
undelegated: z.string()
|
|
1247
|
+
})
|
|
1248
|
+
});
|
|
1249
|
+
var mcpHyperliquidFetchDelegationsInputSchema = z.object({
|
|
1250
|
+
chainId: z.number().int().positive(),
|
|
1251
|
+
executorAddress: evmAddressSchema
|
|
1252
|
+
});
|
|
1253
|
+
var mcpHyperliquidFetchDelegationsOutputSchema = z.object({
|
|
1254
|
+
delegations: z.array(
|
|
1255
|
+
z.object({
|
|
1256
|
+
validator: z.string(),
|
|
1257
|
+
amount: z.string()
|
|
1258
|
+
})
|
|
1259
|
+
)
|
|
1260
|
+
});
|
|
1261
|
+
var mcpHyperliquidLimitOrderInputSchema = mcpHyperliquidMultisignInput({
|
|
1262
|
+
coin: z.string().min(1),
|
|
1263
|
+
isBuy: z.boolean(),
|
|
1264
|
+
limitPxHuman: z.string().min(1),
|
|
1265
|
+
szHuman: z.string().min(1),
|
|
1266
|
+
marketKind: z.enum(["perp", "spot"]).optional(),
|
|
1267
|
+
tif: hyperliquidTifSchema.optional(),
|
|
1268
|
+
dex: z.string().optional()
|
|
1269
|
+
});
|
|
1270
|
+
var mcpHyperliquidCloseInputSchema = mcpHyperliquidMultisignInput({
|
|
1271
|
+
coin: z.string().min(1),
|
|
1272
|
+
isLong: z.boolean(),
|
|
1273
|
+
limitPxHuman: z.string().min(1),
|
|
1274
|
+
szHuman: z.string().min(1),
|
|
1275
|
+
dex: z.string().optional(),
|
|
1276
|
+
tif: hyperliquidTifSchema.optional()
|
|
1277
|
+
});
|
|
1278
|
+
var mcpHyperliquidCancelInputSchema = mcpHyperliquidMultisignInput({
|
|
1279
|
+
coin: z.string().min(1),
|
|
1280
|
+
oid: z.number().int().positive(),
|
|
1281
|
+
marketKind: z.enum(["perp", "spot"]).optional(),
|
|
1282
|
+
dex: z.string().optional()
|
|
1283
|
+
});
|
|
1284
|
+
var mcpHyperliquidUsdTransferInputSchema = mcpHyperliquidMultisignInput({
|
|
1285
|
+
usdHuman: z.string().min(1),
|
|
1286
|
+
toPerp: z.boolean()
|
|
1287
|
+
});
|
|
1288
|
+
var mcpHyperliquidVaultDepositInputSchema = mcpHyperliquidMultisignInput({
|
|
1289
|
+
vaultAddress: evmAddressSchema,
|
|
1290
|
+
usdHuman: z.string().min(1)
|
|
1291
|
+
});
|
|
1292
|
+
var mcpHyperliquidVaultWithdrawInputSchema = mcpHyperliquidMultisignInput({
|
|
1293
|
+
vaultAddress: evmAddressSchema,
|
|
1294
|
+
usdHuman: z.string().min(1)
|
|
1295
|
+
});
|
|
1296
|
+
var mcpHyperliquidStakeInputSchema = mcpHyperliquidMultisignInput({
|
|
1297
|
+
hypeHuman: z.string().min(1)
|
|
1298
|
+
});
|
|
1299
|
+
var mcpHyperliquidUnstakeInputSchema = mcpHyperliquidMultisignInput({
|
|
1300
|
+
hypeHuman: z.string().min(1)
|
|
1301
|
+
});
|
|
1302
|
+
var mcpHyperliquidDelegateInputSchema = mcpHyperliquidMultisignInput({
|
|
1303
|
+
hypeHuman: z.string().min(1),
|
|
1304
|
+
validator: evmAddressSchema
|
|
1305
|
+
});
|
|
1306
|
+
var mcpHyperliquidUndelegateInputSchema = mcpHyperliquidMultisignInput({
|
|
1307
|
+
hypeHuman: z.string().min(1),
|
|
1308
|
+
validator: evmAddressSchema
|
|
1309
|
+
});
|
|
1028
1310
|
|
|
1029
1311
|
// src/agent/mcpProtocolTools.ts
|
|
1030
1312
|
function defineProtocolMcpTool(def) {
|
|
1313
|
+
const meta = withMultisignSubmitMcpMeta(def.description, def.followUp ?? MCP_MULTISIGN_SUBMIT_FOLLOW_UP);
|
|
1031
1314
|
return {
|
|
1032
1315
|
...def,
|
|
1033
|
-
|
|
1316
|
+
description: meta.description,
|
|
1317
|
+
followUp: meta.followUp,
|
|
1318
|
+
outputZod: mcpServerSubmitOutputSchema,
|
|
1034
1319
|
inputSchema: zodSchemaToMcpJsonSchema(def.inputZod),
|
|
1035
|
-
outputSchema: zodSchemaToMcpJsonSchema(
|
|
1320
|
+
outputSchema: zodSchemaToMcpJsonSchema(mcpServerSubmitOutputSchema),
|
|
1036
1321
|
parseInput: (data) => def.inputZod.parse(data),
|
|
1037
|
-
parseOutput: (data) =>
|
|
1322
|
+
parseOutput: (data) => mcpServerSubmitOutputSchema.parse(data)
|
|
1038
1323
|
};
|
|
1039
1324
|
}
|
|
1040
1325
|
var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
@@ -1043,9 +1328,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1043
1328
|
actionId: "lido.submit",
|
|
1044
1329
|
protocolId: "lido",
|
|
1045
1330
|
chainCategory: "evm",
|
|
1046
|
-
description: "
|
|
1331
|
+
description: "Create and submit mpc-auth multiSignRequest for Lido ETH stake (submit).",
|
|
1047
1332
|
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
1048
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1049
1333
|
handler: { importPath: "protocols/evm/lido", exportName: "buildEvmMultisignBodyLidoSubmit" },
|
|
1050
1334
|
inputZod: mcpLidoSubmitInputSchema
|
|
1051
1335
|
}),
|
|
@@ -1056,7 +1340,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1056
1340
|
chainCategory: "evm",
|
|
1057
1341
|
description: "Build batch for Lido withdrawal queue (approve + requestWithdrawals).",
|
|
1058
1342
|
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
1059
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1060
1343
|
handler: { importPath: "protocols/evm/lido", exportName: "buildEvmMultisignBodyLidoRequestWithdrawals" },
|
|
1061
1344
|
inputZod: mcpLidoRequestWithdrawalsInputSchema
|
|
1062
1345
|
}),
|
|
@@ -1067,7 +1350,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1067
1350
|
chainCategory: "evm",
|
|
1068
1351
|
description: "Build tx for Lido claimWithdrawal.",
|
|
1069
1352
|
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
1070
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1071
1353
|
handler: { importPath: "protocols/evm/lido", exportName: "buildEvmMultisignBodyLidoClaimWithdrawal" },
|
|
1072
1354
|
inputZod: mcpLidoClaimWithdrawalInputSchema
|
|
1073
1355
|
}),
|
|
@@ -1078,7 +1360,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1078
1360
|
chainCategory: "evm",
|
|
1079
1361
|
description: "Build batch for wstETH wrap.",
|
|
1080
1362
|
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
1081
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1082
1363
|
handler: { importPath: "protocols/evm/lido", exportName: "buildEvmMultisignBodyLidoWrapStEth" },
|
|
1083
1364
|
inputZod: mcpLidoWrapStEthInputSchema
|
|
1084
1365
|
}),
|
|
@@ -1089,7 +1370,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1089
1370
|
chainCategory: "evm",
|
|
1090
1371
|
description: "Build tx for wstETH unwrap.",
|
|
1091
1372
|
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
1092
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1093
1373
|
handler: { importPath: "protocols/evm/lido", exportName: "buildEvmMultisignBodyLidoUnwrapWstEth" },
|
|
1094
1374
|
inputZod: mcpLidoUnwrapWstEthInputSchema
|
|
1095
1375
|
}),
|
|
@@ -1100,7 +1380,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1100
1380
|
chainCategory: "evm",
|
|
1101
1381
|
description: "Build batch: USDe approve + sUSDe deposit.",
|
|
1102
1382
|
prerequisites: ["keyGen", "executorAddress", "Ethereum mainnet RPC"],
|
|
1103
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1104
1383
|
handler: { importPath: "protocols/evm/ethena", exportName: "buildEvmMultisignBodyEthenaUsdeStakeToSusde" },
|
|
1105
1384
|
inputZod: mcpEthenaStakeInputSchema
|
|
1106
1385
|
}),
|
|
@@ -1111,7 +1390,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1111
1390
|
chainCategory: "evm",
|
|
1112
1391
|
description: "Build sUSDe redeem when cooldown is off.",
|
|
1113
1392
|
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
1114
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1115
1393
|
handler: { importPath: "protocols/evm/ethena", exportName: "buildEvmMultisignBodyEthenaSusdeRedeemToUsde" },
|
|
1116
1394
|
inputZod: mcpEthenaRedeemInputSchema
|
|
1117
1395
|
}),
|
|
@@ -1122,7 +1400,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1122
1400
|
chainCategory: "evm",
|
|
1123
1401
|
description: "Build sUSDe cooldownShares batch step.",
|
|
1124
1402
|
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
1125
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1126
1403
|
handler: { importPath: "protocols/evm/ethena", exportName: "buildEvmMultisignBodyEthenaSusdeCooldownShares" },
|
|
1127
1404
|
inputZod: mcpEthenaCooldownInputSchema
|
|
1128
1405
|
}),
|
|
@@ -1133,7 +1410,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1133
1410
|
chainCategory: "evm",
|
|
1134
1411
|
description: "Build unstake claim after cooldown.",
|
|
1135
1412
|
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
1136
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1137
1413
|
handler: { importPath: "protocols/evm/ethena", exportName: "buildEvmMultisignBodyEthenaUnstakeClaim" },
|
|
1138
1414
|
inputZod: mcpEthenaClaimInputSchema
|
|
1139
1415
|
}),
|
|
@@ -1144,7 +1420,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1144
1420
|
chainCategory: "evm",
|
|
1145
1421
|
description: "Build Maple Syrup router deposit batch.",
|
|
1146
1422
|
prerequisites: ["keyGen", "executorAddress", "router + pool addresses"],
|
|
1147
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1148
1423
|
handler: { importPath: "protocols/evm/maple", exportName: "buildEvmMultisignBodyMapleSyrupDeposit" },
|
|
1149
1424
|
inputZod: mcpMapleDepositInputSchema
|
|
1150
1425
|
}),
|
|
@@ -1155,7 +1430,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1155
1430
|
chainCategory: "evm",
|
|
1156
1431
|
description: "Build Maple PoolV2 requestRedeem batch.",
|
|
1157
1432
|
prerequisites: ["keyGen", "executorAddress", "pool address"],
|
|
1158
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1159
1433
|
handler: { importPath: "protocols/evm/maple", exportName: "buildEvmMultisignBodyMaplePoolRequestRedeem" },
|
|
1160
1434
|
inputZod: mcpMapleRequestRedeemInputSchema
|
|
1161
1435
|
}),
|
|
@@ -1166,7 +1440,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1166
1440
|
chainCategory: "evm",
|
|
1167
1441
|
description: "Build Sky Lockstake open/stake batch.",
|
|
1168
1442
|
prerequisites: ["keyGen", "executorAddress", "Ethereum mainnet RPC"],
|
|
1169
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1170
1443
|
handler: { importPath: "protocols/evm/sky", exportName: "buildSkyLockstakeStakePositionBatch" },
|
|
1171
1444
|
inputZod: mcpSkyLockstakeStakeInputSchema
|
|
1172
1445
|
}),
|
|
@@ -1177,7 +1450,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1177
1450
|
chainCategory: "evm",
|
|
1178
1451
|
description: "Build Lockstake draw (borrow USDS).",
|
|
1179
1452
|
prerequisites: ["keyGen", "executorAddress", "open urn"],
|
|
1180
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1181
1453
|
handler: { importPath: "protocols/evm/sky", exportName: "buildSkyLockstakeDrawBatch" },
|
|
1182
1454
|
inputZod: mcpSkyLockstakeDrawInputSchema
|
|
1183
1455
|
}),
|
|
@@ -1188,7 +1460,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1188
1460
|
chainCategory: "evm",
|
|
1189
1461
|
description: "Build Lockstake repay/wipe batch.",
|
|
1190
1462
|
prerequisites: ["keyGen", "executorAddress", "urn index"],
|
|
1191
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1192
1463
|
handler: { importPath: "protocols/evm/sky", exportName: "buildSkyLockstakeWipeBatch" },
|
|
1193
1464
|
inputZod: mcpSkyLockstakeWipeInputSchema
|
|
1194
1465
|
}),
|
|
@@ -1199,7 +1470,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1199
1470
|
chainCategory: "evm",
|
|
1200
1471
|
description: "Build Lockstake close position batch.",
|
|
1201
1472
|
prerequisites: ["keyGen", "executorAddress", "urn index"],
|
|
1202
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1203
1473
|
handler: { importPath: "protocols/evm/sky", exportName: "buildSkyLockstakeCloseBatch" },
|
|
1204
1474
|
inputZod: mcpSkyLockstakeCloseInputSchema
|
|
1205
1475
|
}),
|
|
@@ -1210,7 +1480,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1210
1480
|
chainCategory: "evm",
|
|
1211
1481
|
description: "Build Lockstake getReward batch.",
|
|
1212
1482
|
prerequisites: ["keyGen", "executorAddress", "urn index"],
|
|
1213
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1214
1483
|
handler: { importPath: "protocols/evm/sky", exportName: "buildSkyLockstakeGetRewardBatch" },
|
|
1215
1484
|
inputZod: mcpSkyLockstakeGetRewardInputSchema
|
|
1216
1485
|
}),
|
|
@@ -1221,7 +1490,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1221
1490
|
chainCategory: "evm",
|
|
1222
1491
|
description: "Build USDS \u2192 sUSDS ERC-4626 deposit batch.",
|
|
1223
1492
|
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
1224
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1225
1493
|
handler: { importPath: "protocols/evm/sky", exportName: "buildSkySusdsDepositFromUsdsBatch" },
|
|
1226
1494
|
inputZod: mcpSkySusdsDepositInputSchema
|
|
1227
1495
|
}),
|
|
@@ -1232,7 +1500,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1232
1500
|
chainCategory: "evm",
|
|
1233
1501
|
description: "Build sUSDS redeem to USDS batch.",
|
|
1234
1502
|
prerequisites: ["keyGen", "executorAddress", "RPC URL"],
|
|
1235
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1236
1503
|
handler: { importPath: "protocols/evm/sky", exportName: "buildSkySusdsRedeemToUsdsBatch" },
|
|
1237
1504
|
inputZod: mcpSkySusdsRedeemInputSchema
|
|
1238
1505
|
}),
|
|
@@ -1243,7 +1510,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1243
1510
|
chainCategory: "evm",
|
|
1244
1511
|
description: "Build Aave v4 Spoke supply/deposit batch (wrap native, approve, supply).",
|
|
1245
1512
|
prerequisites: ["keyGenId", "chainId", "underlying", "amountHuman", "get_defi_protocol_skill for hubs/spokes"],
|
|
1246
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1247
1513
|
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4DepositBatch" },
|
|
1248
1514
|
inputZod: mcpAaveV4DepositInputSchema
|
|
1249
1515
|
}),
|
|
@@ -1254,7 +1520,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1254
1520
|
chainCategory: "evm",
|
|
1255
1521
|
description: "Build Aave v4 Spoke withdraw; health-factor preview when user has borrow debt.",
|
|
1256
1522
|
prerequisites: ["keyGenId", "chainId", "underlying (supplied asset)", "amountHuman"],
|
|
1257
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1258
1523
|
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeWithdraw" },
|
|
1259
1524
|
inputZod: mcpAaveV4WithdrawInputSchema
|
|
1260
1525
|
}),
|
|
@@ -1271,7 +1536,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1271
1536
|
"amountHuman",
|
|
1272
1537
|
"collateral supplied via deposit"
|
|
1273
1538
|
],
|
|
1274
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1275
1539
|
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeBorrow" },
|
|
1276
1540
|
inputZod: mcpAaveV4BorrowInputSchema
|
|
1277
1541
|
}),
|
|
@@ -1282,7 +1546,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1282
1546
|
chainCategory: "evm",
|
|
1283
1547
|
description: "Build Aave v4 Spoke repay (approve if needed + repay).",
|
|
1284
1548
|
prerequisites: ["keyGenId", "chainId", "underlying (debt token)", "amountHuman"],
|
|
1285
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1286
1549
|
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4SpokeRepay" },
|
|
1287
1550
|
inputZod: mcpAaveV4RepayInputSchema
|
|
1288
1551
|
}),
|
|
@@ -1293,7 +1556,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1293
1556
|
chainCategory: "evm",
|
|
1294
1557
|
description: "Build Euler v2 vault deposit/lend batch.",
|
|
1295
1558
|
prerequisites: ["keyGen", "executorAddress", "vault address"],
|
|
1296
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1297
1559
|
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2IsolatedLendDepositBatch" },
|
|
1298
1560
|
inputZod: mcpEulerV2IsolatedLendInputSchema
|
|
1299
1561
|
}),
|
|
@@ -1304,7 +1566,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1304
1566
|
chainCategory: "evm",
|
|
1305
1567
|
description: "Build Euler v2 isolated borrow loop batch.",
|
|
1306
1568
|
prerequisites: ["keyGen", "executorAddress", "vault + collateral"],
|
|
1307
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1308
1569
|
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2IsolatedBorrowBatch" },
|
|
1309
1570
|
inputZod: mcpEulerV2IsolatedBorrowInputSchema
|
|
1310
1571
|
}),
|
|
@@ -1315,7 +1576,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1315
1576
|
chainCategory: "evm",
|
|
1316
1577
|
description: "Build Euler v2 vault withdraw/redeem batch.",
|
|
1317
1578
|
prerequisites: ["keyGen", "executorAddress", "vault address"],
|
|
1318
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1319
1579
|
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2VaultWithdraw" },
|
|
1320
1580
|
inputZod: mcpEulerV2VaultWithdrawInputSchema
|
|
1321
1581
|
}),
|
|
@@ -1326,7 +1586,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1326
1586
|
chainCategory: "evm",
|
|
1327
1587
|
description: "Build Euler v2 borrow repay batch.",
|
|
1328
1588
|
prerequisites: ["keyGen", "executorAddress", "vault address"],
|
|
1329
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1330
1589
|
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2BorrowRepayBatch" },
|
|
1331
1590
|
inputZod: mcpEulerV2BorrowRepayInputSchema
|
|
1332
1591
|
}),
|
|
@@ -1337,7 +1596,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1337
1596
|
chainCategory: "evm",
|
|
1338
1597
|
description: "Build Euler v2 borrow collateral deposit batch.",
|
|
1339
1598
|
prerequisites: ["keyGen", "executorAddress", "vault + collateral asset"],
|
|
1340
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1341
1599
|
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2BorrowCollateralDepositBatch" },
|
|
1342
1600
|
inputZod: mcpEulerV2CollateralDepositInputSchema
|
|
1343
1601
|
}),
|
|
@@ -1348,7 +1606,6 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1348
1606
|
chainCategory: "evm",
|
|
1349
1607
|
description: "Build Euler v2 borrow collateral withdraw batch.",
|
|
1350
1608
|
prerequisites: ["keyGen", "executorAddress", "vault + collateral asset"],
|
|
1351
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1352
1609
|
handler: { importPath: "protocols/evm/euler-v2", exportName: "buildEvmMultisignBodyEulerV2BorrowCollateralWithdrawBatch" },
|
|
1353
1610
|
inputZod: mcpEulerV2CollateralWithdrawInputSchema
|
|
1354
1611
|
}),
|
|
@@ -1357,9 +1614,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1357
1614
|
actionId: "gmx.increase",
|
|
1358
1615
|
protocolId: "gmx",
|
|
1359
1616
|
chainCategory: "evm",
|
|
1360
|
-
description: "
|
|
1617
|
+
description: "Create and submit mpc-auth multiSignRequest for GMX classic increase order (open/add perp). Keeper executes asynchronously after on-chain broadcast.",
|
|
1361
1618
|
prerequisites: ["keyGen", "executorAddress", "GMX market symbol", "classic mode only \u2014 no subaccounts"],
|
|
1362
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1363
1619
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxIncreaseBatch" },
|
|
1364
1620
|
inputZod: mcpGmxIncreaseInputSchema
|
|
1365
1621
|
}),
|
|
@@ -1368,9 +1624,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1368
1624
|
actionId: "gmx.decrease",
|
|
1369
1625
|
protocolId: "gmx",
|
|
1370
1626
|
chainCategory: "evm",
|
|
1371
|
-
description: "
|
|
1627
|
+
description: "Create and submit mpc-auth multiSignRequest for GMX classic decrease order (close/reduce perp).",
|
|
1372
1628
|
prerequisites: ["keyGen", "executorAddress", "position market symbol"],
|
|
1373
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1374
1629
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxDecreaseBatch" },
|
|
1375
1630
|
inputZod: mcpGmxDecreaseInputSchema
|
|
1376
1631
|
}),
|
|
@@ -1379,9 +1634,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1379
1634
|
actionId: "gmx.cancel",
|
|
1380
1635
|
protocolId: "gmx",
|
|
1381
1636
|
chainCategory: "evm",
|
|
1382
|
-
description: "
|
|
1637
|
+
description: "Create and submit mpc-auth multiSignRequest to cancel a pending GMX order (classic on-chain).",
|
|
1383
1638
|
prerequisites: ["keyGen", "executorAddress", "orderId from fetchOrders"],
|
|
1384
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1385
1639
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxCancelBatch" },
|
|
1386
1640
|
inputZod: mcpGmxCancelInputSchema
|
|
1387
1641
|
}),
|
|
@@ -1390,9 +1644,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1390
1644
|
actionId: "gmx.gmDeposit",
|
|
1391
1645
|
protocolId: "gmx",
|
|
1392
1646
|
chainCategory: "evm",
|
|
1393
|
-
description: "
|
|
1647
|
+
description: "Create and submit mpc-auth multiSignRequest for GMX GM pool deposit (ExchangeRouter multicall). Keeper executes asynchronously.",
|
|
1394
1648
|
prerequisites: ["keyGen", "executorAddress", "marketSymbol", "collateral token"],
|
|
1395
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1396
1649
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxGmDepositBatch" },
|
|
1397
1650
|
inputZod: mcpGmxGmDepositInputSchema
|
|
1398
1651
|
}),
|
|
@@ -1401,9 +1654,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1401
1654
|
actionId: "gmx.gmWithdraw",
|
|
1402
1655
|
protocolId: "gmx",
|
|
1403
1656
|
chainCategory: "evm",
|
|
1404
|
-
description: "
|
|
1657
|
+
description: "Create and submit mpc-auth multiSignRequest for GMX GM pool withdrawal (ExchangeRouter multicall). Keeper executes asynchronously.",
|
|
1405
1658
|
prerequisites: ["keyGen", "executorAddress", "GM market token balance"],
|
|
1406
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1407
1659
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxGmWithdrawBatch" },
|
|
1408
1660
|
inputZod: mcpGmxGmWithdrawInputSchema
|
|
1409
1661
|
}),
|
|
@@ -1412,9 +1664,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1412
1664
|
actionId: "gmx.stakeGmx",
|
|
1413
1665
|
protocolId: "gmx",
|
|
1414
1666
|
chainCategory: "evm",
|
|
1415
|
-
description: "
|
|
1667
|
+
description: "Create and submit mpc-auth multiSignRequest to stake GMX via RewardRouter.",
|
|
1416
1668
|
prerequisites: ["keyGen", "executorAddress", "GMX token balance"],
|
|
1417
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1418
1669
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxStakeGmxBatch" },
|
|
1419
1670
|
inputZod: mcpGmxStakeGmxInputSchema
|
|
1420
1671
|
}),
|
|
@@ -1423,11 +1674,113 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
1423
1674
|
actionId: "gmx.unstakeGmx",
|
|
1424
1675
|
protocolId: "gmx",
|
|
1425
1676
|
chainCategory: "evm",
|
|
1426
|
-
description: "
|
|
1677
|
+
description: "Create and submit mpc-auth multiSignRequest to unstake GMX via RewardRouter.",
|
|
1427
1678
|
prerequisites: ["keyGen", "executorAddress", "staked GMX balance"],
|
|
1428
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1429
1679
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxUnstakeGmxBatch" },
|
|
1430
1680
|
inputZod: mcpGmxUnstakeGmxInputSchema
|
|
1681
|
+
}),
|
|
1682
|
+
defineProtocolMcpTool({
|
|
1683
|
+
name: "ctm_hyperliquid_build_limit_order_multisign",
|
|
1684
|
+
actionId: "hyperliquid.limitOrder",
|
|
1685
|
+
protocolId: "hyperliquid",
|
|
1686
|
+
chainCategory: "evm",
|
|
1687
|
+
description: "Create and submit mpc-auth multiSignRequest for a Hyperliquid limit/IoC order via HyperEVM CoreWriter.",
|
|
1688
|
+
prerequisites: ["keyGen", "executorAddress", "chainId 999 or 998", "coin", "limitPxHuman", "szHuman"],
|
|
1689
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidLimitOrderBatch" },
|
|
1690
|
+
inputZod: mcpHyperliquidLimitOrderInputSchema
|
|
1691
|
+
}),
|
|
1692
|
+
defineProtocolMcpTool({
|
|
1693
|
+
name: "ctm_hyperliquid_build_close_multisign",
|
|
1694
|
+
actionId: "hyperliquid.close",
|
|
1695
|
+
protocolId: "hyperliquid",
|
|
1696
|
+
chainCategory: "evm",
|
|
1697
|
+
description: "Create and submit mpc-auth multiSignRequest to close/reduce a perp (IoC reduce-only limit via CoreWriter).",
|
|
1698
|
+
prerequisites: ["keyGen", "executorAddress", "open position from fetch_positions", "isLong matches position"],
|
|
1699
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidCloseBatch" },
|
|
1700
|
+
inputZod: mcpHyperliquidCloseInputSchema
|
|
1701
|
+
}),
|
|
1702
|
+
defineProtocolMcpTool({
|
|
1703
|
+
name: "ctm_hyperliquid_build_cancel_multisign",
|
|
1704
|
+
actionId: "hyperliquid.cancel",
|
|
1705
|
+
protocolId: "hyperliquid",
|
|
1706
|
+
chainCategory: "evm",
|
|
1707
|
+
description: "Create and submit mpc-auth multiSignRequest to cancel a Hyperliquid open order.",
|
|
1708
|
+
prerequisites: ["keyGen", "executorAddress", "oid from fetch_open_orders"],
|
|
1709
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidCancelBatch" },
|
|
1710
|
+
inputZod: mcpHyperliquidCancelInputSchema
|
|
1711
|
+
}),
|
|
1712
|
+
defineProtocolMcpTool({
|
|
1713
|
+
name: "ctm_hyperliquid_build_usd_transfer_multisign",
|
|
1714
|
+
actionId: "hyperliquid.usdTransfer",
|
|
1715
|
+
protocolId: "hyperliquid",
|
|
1716
|
+
chainCategory: "evm",
|
|
1717
|
+
description: "Create and submit mpc-auth multiSignRequest to move USDC between spot and perp margin.",
|
|
1718
|
+
prerequisites: ["keyGen", "executorAddress", "usdHuman", "toPerp boolean"],
|
|
1719
|
+
handler: {
|
|
1720
|
+
importPath: "protocols/evm/hyperliquid",
|
|
1721
|
+
exportName: "buildEvmMultisignBodyHyperliquidUsdClassTransferBatch"
|
|
1722
|
+
},
|
|
1723
|
+
inputZod: mcpHyperliquidUsdTransferInputSchema
|
|
1724
|
+
}),
|
|
1725
|
+
defineProtocolMcpTool({
|
|
1726
|
+
name: "ctm_hyperliquid_build_vault_deposit_multisign",
|
|
1727
|
+
actionId: "hyperliquid.vaultDeposit",
|
|
1728
|
+
protocolId: "hyperliquid",
|
|
1729
|
+
chainCategory: "evm",
|
|
1730
|
+
description: "Create and submit mpc-auth multiSignRequest for Hyperliquid vault deposit.",
|
|
1731
|
+
prerequisites: ["keyGen", "executorAddress", "vaultAddress from fetch_vaults"],
|
|
1732
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidVaultDepositBatch" },
|
|
1733
|
+
inputZod: mcpHyperliquidVaultDepositInputSchema
|
|
1734
|
+
}),
|
|
1735
|
+
defineProtocolMcpTool({
|
|
1736
|
+
name: "ctm_hyperliquid_build_vault_withdraw_multisign",
|
|
1737
|
+
actionId: "hyperliquid.vaultWithdraw",
|
|
1738
|
+
protocolId: "hyperliquid",
|
|
1739
|
+
chainCategory: "evm",
|
|
1740
|
+
description: "Create and submit mpc-auth multiSignRequest for Hyperliquid vault withdraw (includes accrued PnL).",
|
|
1741
|
+
prerequisites: ["keyGen", "executorAddress", "vaultAddress", "equity from fetch_user_vault_equities"],
|
|
1742
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidVaultWithdrawBatch" },
|
|
1743
|
+
inputZod: mcpHyperliquidVaultWithdrawInputSchema
|
|
1744
|
+
}),
|
|
1745
|
+
defineProtocolMcpTool({
|
|
1746
|
+
name: "ctm_hyperliquid_build_stake_multisign",
|
|
1747
|
+
actionId: "hyperliquid.stake",
|
|
1748
|
+
protocolId: "hyperliquid",
|
|
1749
|
+
chainCategory: "evm",
|
|
1750
|
+
description: "Create and submit mpc-auth multiSignRequest to stake HYPE via CoreWriter.",
|
|
1751
|
+
prerequisites: ["keyGen", "executorAddress", "HYPE balance on Hyperliquid account"],
|
|
1752
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidStakeDepositBatch" },
|
|
1753
|
+
inputZod: mcpHyperliquidStakeInputSchema
|
|
1754
|
+
}),
|
|
1755
|
+
defineProtocolMcpTool({
|
|
1756
|
+
name: "ctm_hyperliquid_build_unstake_multisign",
|
|
1757
|
+
actionId: "hyperliquid.unstake",
|
|
1758
|
+
protocolId: "hyperliquid",
|
|
1759
|
+
chainCategory: "evm",
|
|
1760
|
+
description: "Create and submit mpc-auth multiSignRequest to unstake HYPE via CoreWriter.",
|
|
1761
|
+
prerequisites: ["keyGen", "executorAddress", "staked HYPE"],
|
|
1762
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidStakeWithdrawBatch" },
|
|
1763
|
+
inputZod: mcpHyperliquidUnstakeInputSchema
|
|
1764
|
+
}),
|
|
1765
|
+
defineProtocolMcpTool({
|
|
1766
|
+
name: "ctm_hyperliquid_build_delegate_multisign",
|
|
1767
|
+
actionId: "hyperliquid.delegate",
|
|
1768
|
+
protocolId: "hyperliquid",
|
|
1769
|
+
chainCategory: "evm",
|
|
1770
|
+
description: "Create and submit mpc-auth multiSignRequest to delegate staked HYPE to a validator.",
|
|
1771
|
+
prerequisites: ["keyGen", "executorAddress", "validator address", "hypeHuman"],
|
|
1772
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidDelegateOnlyBatch" },
|
|
1773
|
+
inputZod: mcpHyperliquidDelegateInputSchema
|
|
1774
|
+
}),
|
|
1775
|
+
defineProtocolMcpTool({
|
|
1776
|
+
name: "ctm_hyperliquid_build_undelegate_multisign",
|
|
1777
|
+
actionId: "hyperliquid.undelegate",
|
|
1778
|
+
protocolId: "hyperliquid",
|
|
1779
|
+
chainCategory: "evm",
|
|
1780
|
+
description: "Create and submit mpc-auth multiSignRequest to undelegate HYPE from a validator.",
|
|
1781
|
+
prerequisites: ["keyGen", "executorAddress", "delegation from fetch_delegations"],
|
|
1782
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidUndelegateBatch" },
|
|
1783
|
+
inputZod: mcpHyperliquidUndelegateInputSchema
|
|
1431
1784
|
})
|
|
1432
1785
|
];
|
|
1433
1786
|
|
|
@@ -1441,6 +1794,15 @@ function defineMcpTool(def) {
|
|
|
1441
1794
|
parseOutput: (data) => def.outputZod.parse(data)
|
|
1442
1795
|
};
|
|
1443
1796
|
}
|
|
1797
|
+
function defineMultisignSubmitMcpTool(def) {
|
|
1798
|
+
const meta = withMultisignSubmitMcpMeta(def.description, def.followUp ?? MCP_MULTISIGN_SUBMIT_FOLLOW_UP);
|
|
1799
|
+
return defineMcpTool({
|
|
1800
|
+
...def,
|
|
1801
|
+
description: meta.description,
|
|
1802
|
+
followUp: meta.followUp,
|
|
1803
|
+
outputZod: mcpServerSubmitOutputSchema
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1444
1806
|
var CORE_MCP_TOOL_DEFINITIONS = [
|
|
1445
1807
|
defineMcpTool({
|
|
1446
1808
|
name: "ctm_uniswap_v4_quote",
|
|
@@ -1473,20 +1835,18 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1473
1835
|
inputZod: mcpUniswapV4CreateSwapInputSchema,
|
|
1474
1836
|
outputZod: mcpUniswapV4CreateSwapOutputSchema
|
|
1475
1837
|
}),
|
|
1476
|
-
|
|
1838
|
+
defineMultisignSubmitMcpTool({
|
|
1477
1839
|
name: "ctm_uniswap_v4_build_swap_multisign",
|
|
1478
1840
|
actionId: "uniswap-v4.swap-exact-input",
|
|
1479
1841
|
protocolId: "uniswap-v4",
|
|
1480
1842
|
chainCategory: "evm",
|
|
1481
|
-
description: "
|
|
1843
|
+
description: "Create and submit mpc-auth multiSignRequest for a Uniswap V4 swap. May batch 1\u20133 EVM txs: ERC-20 approve(s) + Universal Router swap (or 1 tx for native-in).",
|
|
1482
1844
|
prerequisites: [
|
|
1483
1845
|
"ctm_uniswap_v4_create_swap output + matching quote snapshot and swapDeadlineUnix",
|
|
1484
1846
|
"keyGenId + chainId + purposeText"
|
|
1485
1847
|
],
|
|
1486
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest with clientSig and signedMessage"],
|
|
1487
1848
|
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "buildEvmMultisignBodyUniswapV4SkipPermit2Batch" },
|
|
1488
|
-
inputZod: mcpUniswapV4BuildSwapMultisignInputSchema
|
|
1489
|
-
outputZod: multisignOutputSchema
|
|
1849
|
+
inputZod: mcpUniswapV4BuildSwapMultisignInputSchema
|
|
1490
1850
|
}),
|
|
1491
1851
|
defineMcpTool({
|
|
1492
1852
|
name: "ctm_uniswap_v4_list_lp_pools",
|
|
@@ -1516,24 +1876,22 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1516
1876
|
inputZod: mcpUniswapV4LpCreatePositionInputSchema,
|
|
1517
1877
|
outputZod: mcpUniswapV4LpCreatePositionOutputSchema
|
|
1518
1878
|
}),
|
|
1519
|
-
|
|
1879
|
+
defineMultisignSubmitMcpTool({
|
|
1520
1880
|
name: "ctm_uniswap_v4_build_mint_liquidity_multisign",
|
|
1521
1881
|
actionId: "uniswap-v4.mint-liquidity",
|
|
1522
1882
|
protocolId: "uniswap-v4",
|
|
1523
1883
|
chainCategory: "evm",
|
|
1524
|
-
description: "
|
|
1884
|
+
description: "Create and submit mpc-auth multiSignRequest for minting a Uniswap V4 LP position. Batches ERC-20 approve(s) + Position Manager tx from LP create response.",
|
|
1525
1885
|
prerequisites: ["ctm_uniswap_v4_lp_create_position output", "keyGenId + chainId + purposeText"],
|
|
1526
1886
|
followUp: [
|
|
1527
|
-
|
|
1528
|
-
"
|
|
1529
|
-
"After execute: ctm_uniswap_v4_register_position_from_mint_tx (mint tx hash)"
|
|
1887
|
+
...MCP_MULTISIGN_SUBMIT_FOLLOW_UP,
|
|
1888
|
+
"After broadcast: ctm_uniswap_v4_register_position_from_mint_tx (mint tx hash)"
|
|
1530
1889
|
],
|
|
1531
1890
|
handler: {
|
|
1532
1891
|
importPath: "protocols/evm/uniswap-v4",
|
|
1533
1892
|
exportName: "buildEvmMultisignBodyUniswapV4MintLiquidityBatch"
|
|
1534
1893
|
},
|
|
1535
|
-
inputZod: mcpUniswapV4BuildMintLiquidityMultisignInputSchema
|
|
1536
|
-
outputZod: multisignOutputSchema
|
|
1894
|
+
inputZod: mcpUniswapV4BuildMintLiquidityMultisignInputSchema
|
|
1537
1895
|
}),
|
|
1538
1896
|
defineMcpTool({
|
|
1539
1897
|
name: "ctm_uniswap_v4_lp_increase",
|
|
@@ -1547,20 +1905,18 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1547
1905
|
inputZod: mcpUniswapV4LpIncreaseInputSchema,
|
|
1548
1906
|
outputZod: mcpUniswapV4LpIncreaseOutputSchema
|
|
1549
1907
|
}),
|
|
1550
|
-
|
|
1908
|
+
defineMultisignSubmitMcpTool({
|
|
1551
1909
|
name: "ctm_uniswap_v4_build_increase_liquidity_multisign",
|
|
1552
1910
|
actionId: "uniswap-v4.increase-liquidity",
|
|
1553
1911
|
protocolId: "uniswap-v4",
|
|
1554
1912
|
chainCategory: "evm",
|
|
1555
|
-
description: "
|
|
1913
|
+
description: "Create and submit mpc-auth multiSignRequest to increase Uniswap V4 position liquidity.",
|
|
1556
1914
|
prerequisites: ["ctm_uniswap_v4_lp_increase output"],
|
|
1557
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1558
1915
|
handler: {
|
|
1559
1916
|
importPath: "protocols/evm/uniswap-v4",
|
|
1560
1917
|
exportName: "buildEvmMultisignBodyUniswapV4IncreaseLiquidityBatch"
|
|
1561
1918
|
},
|
|
1562
|
-
inputZod: mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema
|
|
1563
|
-
outputZod: multisignOutputSchema
|
|
1919
|
+
inputZod: mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema
|
|
1564
1920
|
}),
|
|
1565
1921
|
defineMcpTool({
|
|
1566
1922
|
name: "ctm_uniswap_v4_lp_decrease",
|
|
@@ -1574,20 +1930,18 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1574
1930
|
inputZod: mcpUniswapV4LpDecreaseInputSchema,
|
|
1575
1931
|
outputZod: mcpUniswapV4LpDecreaseOutputSchema
|
|
1576
1932
|
}),
|
|
1577
|
-
|
|
1933
|
+
defineMultisignSubmitMcpTool({
|
|
1578
1934
|
name: "ctm_uniswap_v4_build_decrease_liquidity_multisign",
|
|
1579
1935
|
actionId: "uniswap-v4.decrease-liquidity",
|
|
1580
1936
|
protocolId: "uniswap-v4",
|
|
1581
1937
|
chainCategory: "evm",
|
|
1582
|
-
description: "
|
|
1938
|
+
description: "Create and submit mpc-auth multiSignRequest to decrease Uniswap V4 position liquidity.",
|
|
1583
1939
|
prerequisites: ["ctm_uniswap_v4_lp_decrease output"],
|
|
1584
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1585
1940
|
handler: {
|
|
1586
1941
|
importPath: "protocols/evm/uniswap-v4",
|
|
1587
1942
|
exportName: "buildEvmMultisignBodyUniswapV4DecreaseLiquidityBatch"
|
|
1588
1943
|
},
|
|
1589
|
-
inputZod: mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema
|
|
1590
|
-
outputZod: multisignOutputSchema
|
|
1944
|
+
inputZod: mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema
|
|
1591
1945
|
}),
|
|
1592
1946
|
defineMcpTool({
|
|
1593
1947
|
name: "ctm_uniswap_v4_lp_collect",
|
|
@@ -1601,20 +1955,18 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1601
1955
|
inputZod: mcpUniswapV4LpClaimInputSchema,
|
|
1602
1956
|
outputZod: mcpUniswapV4LpClaimOutputSchema
|
|
1603
1957
|
}),
|
|
1604
|
-
|
|
1958
|
+
defineMultisignSubmitMcpTool({
|
|
1605
1959
|
name: "ctm_uniswap_v4_build_collect_fees_multisign",
|
|
1606
1960
|
actionId: "uniswap-v4.collect-fees",
|
|
1607
1961
|
protocolId: "uniswap-v4",
|
|
1608
1962
|
chainCategory: "evm",
|
|
1609
|
-
description: "
|
|
1963
|
+
description: "Create and submit mpc-auth multiSignRequest to collect fees from a Uniswap V4 position.",
|
|
1610
1964
|
prerequisites: ["ctm_uniswap_v4_lp_collect output"],
|
|
1611
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest"],
|
|
1612
1965
|
handler: {
|
|
1613
1966
|
importPath: "protocols/evm/uniswap-v4",
|
|
1614
1967
|
exportName: "buildEvmMultisignBodyUniswapV4CollectFeesBatch"
|
|
1615
1968
|
},
|
|
1616
|
-
inputZod: mcpUniswapV4BuildCollectFeesMultisignInputSchema
|
|
1617
|
-
outputZod: multisignOutputSchema
|
|
1969
|
+
inputZod: mcpUniswapV4BuildCollectFeesMultisignInputSchema
|
|
1618
1970
|
}),
|
|
1619
1971
|
defineMcpTool({
|
|
1620
1972
|
name: "ctm_uniswap_v4_lp_list_positions",
|
|
@@ -1677,21 +2029,19 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1677
2029
|
inputZod: mcpCurveDaoQuoteInputSchema,
|
|
1678
2030
|
outputZod: mcpCurveDaoQuoteOutputSchema
|
|
1679
2031
|
}),
|
|
1680
|
-
|
|
2032
|
+
defineMultisignSubmitMcpTool({
|
|
1681
2033
|
name: "ctm_curve_dao_build_swap_multisign",
|
|
1682
2034
|
actionId: "curve-dao.swap",
|
|
1683
2035
|
protocolId: "curve-dao",
|
|
1684
2036
|
chainCategory: "evm",
|
|
1685
|
-
description: "
|
|
2037
|
+
description: "Create and submit mpc-auth multiSignRequest for a Curve Router NG swap via @curvefi/api populateSwap. Optionally batches ERC-20 approve txs when allowance is insufficient, then exchange.",
|
|
1686
2038
|
prerequisites: [
|
|
1687
2039
|
"ctm_curve_dao_quote (recommended)",
|
|
1688
2040
|
"keyGenId + chainId + purposeText + slippagePercent (0\u2013100 exclusive)",
|
|
1689
2041
|
"get_defi_protocol_skill for tokenIn address rules"
|
|
1690
2042
|
],
|
|
1691
|
-
followUp: ["Sign messageToSign", "POST /multiSignRequest with clientSig and signedMessage"],
|
|
1692
2043
|
handler: { importPath: "protocols/evm/curve-dao", exportName: "buildEvmMultisignBodyCurveDaoBatch" },
|
|
1693
|
-
inputZod: mcpCurveDaoBuildSwapMultisignInputSchema
|
|
1694
|
-
outputZod: multisignOutputSchema
|
|
2044
|
+
inputZod: mcpCurveDaoBuildSwapMultisignInputSchema
|
|
1695
2045
|
}),
|
|
1696
2046
|
defineMcpTool({
|
|
1697
2047
|
name: "ctm_gmx_fetch_markets",
|
|
@@ -1776,6 +2126,126 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
1776
2126
|
handler: { importPath: "protocols/evm/gmx", exportName: "gmxFetchStakingPower" },
|
|
1777
2127
|
inputZod: mcpGmxFetchStakingPowerInputSchema,
|
|
1778
2128
|
outputZod: mcpGmxFetchStakingPowerOutputSchema
|
|
2129
|
+
}),
|
|
2130
|
+
defineMcpTool({
|
|
2131
|
+
name: "ctm_hyperliquid_fetch_markets",
|
|
2132
|
+
actionId: "hyperliquid.fetch-markets",
|
|
2133
|
+
protocolId: "hyperliquid",
|
|
2134
|
+
chainCategory: "evm",
|
|
2135
|
+
description: "List Hyperliquid perp markets (coin, maxLeverage, szDecimals) and HIP-3 dex names. chainId 999 mainnet or 998 testnet.",
|
|
2136
|
+
prerequisites: ["chainId 999 or 998"],
|
|
2137
|
+
followUp: ["ctm_hyperliquid_fetch_open_context", "ctm_hyperliquid_build_limit_order_multisign"],
|
|
2138
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchMarketsSummary" },
|
|
2139
|
+
inputZod: mcpHyperliquidFetchMarketsInputSchema,
|
|
2140
|
+
outputZod: mcpHyperliquidFetchMarketsOutputSchema
|
|
2141
|
+
}),
|
|
2142
|
+
defineMcpTool({
|
|
2143
|
+
name: "ctm_hyperliquid_fetch_open_context",
|
|
2144
|
+
actionId: "hyperliquid.fetch-open-context",
|
|
2145
|
+
protocolId: "hyperliquid",
|
|
2146
|
+
chainCategory: "evm",
|
|
2147
|
+
description: "Per-market trading context: account value, withdrawable, margin used, leverage setting, mark price, available buy/sell size.",
|
|
2148
|
+
prerequisites: ["chainId", "executorAddress", "coin from fetch_markets"],
|
|
2149
|
+
followUp: ["ctm_hyperliquid_build_limit_order_multisign"],
|
|
2150
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchOpenContextSummary" },
|
|
2151
|
+
inputZod: mcpHyperliquidFetchOpenContextInputSchema,
|
|
2152
|
+
outputZod: mcpHyperliquidFetchOpenContextOutputSchema
|
|
2153
|
+
}),
|
|
2154
|
+
defineMcpTool({
|
|
2155
|
+
name: "ctm_hyperliquid_fetch_positions",
|
|
2156
|
+
actionId: "hyperliquid.fetch-positions",
|
|
2157
|
+
protocolId: "hyperliquid",
|
|
2158
|
+
chainCategory: "evm",
|
|
2159
|
+
description: "Open Hyperliquid perp positions for executor (size, entry, uPnL, liq price, leverage, margin).",
|
|
2160
|
+
prerequisites: ["chainId", "executorAddress"],
|
|
2161
|
+
followUp: ["ctm_hyperliquid_build_close_multisign"],
|
|
2162
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchPositionsForExecutor" },
|
|
2163
|
+
inputZod: mcpHyperliquidFetchPositionsInputSchema,
|
|
2164
|
+
outputZod: mcpHyperliquidFetchPositionsOutputSchema
|
|
2165
|
+
}),
|
|
2166
|
+
defineMcpTool({
|
|
2167
|
+
name: "ctm_hyperliquid_fetch_open_orders",
|
|
2168
|
+
actionId: "hyperliquid.fetch-open-orders",
|
|
2169
|
+
protocolId: "hyperliquid",
|
|
2170
|
+
chainCategory: "evm",
|
|
2171
|
+
description: "Pending Hyperliquid open orders for executor (oid, coin, side, price, size).",
|
|
2172
|
+
prerequisites: ["chainId", "executorAddress"],
|
|
2173
|
+
followUp: ["ctm_hyperliquid_build_cancel_multisign"],
|
|
2174
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchOpenOrdersSummary" },
|
|
2175
|
+
inputZod: mcpHyperliquidFetchOpenOrdersInputSchema,
|
|
2176
|
+
outputZod: mcpHyperliquidFetchOpenOrdersOutputSchema
|
|
2177
|
+
}),
|
|
2178
|
+
defineMcpTool({
|
|
2179
|
+
name: "ctm_hyperliquid_fetch_market_snapshot",
|
|
2180
|
+
actionId: "hyperliquid.fetch-market-snapshot",
|
|
2181
|
+
protocolId: "hyperliquid",
|
|
2182
|
+
chainCategory: "evm",
|
|
2183
|
+
description: "Mid price and OHLCV candles for a Hyperliquid perp coin. Default interval 15m.",
|
|
2184
|
+
prerequisites: ["chainId", "coin"],
|
|
2185
|
+
followUp: ["ctm_hyperliquid_fetch_open_context", "ctm_hyperliquid_build_limit_order_multisign"],
|
|
2186
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchMarketSnapshotSummary" },
|
|
2187
|
+
inputZod: mcpHyperliquidFetchMarketSnapshotInputSchema,
|
|
2188
|
+
outputZod: mcpHyperliquidFetchMarketSnapshotOutputSchema
|
|
2189
|
+
}),
|
|
2190
|
+
defineMcpTool({
|
|
2191
|
+
name: "ctm_hyperliquid_fetch_usd_class_balances",
|
|
2192
|
+
actionId: "hyperliquid.fetch-usd-balances",
|
|
2193
|
+
protocolId: "hyperliquid",
|
|
2194
|
+
chainCategory: "evm",
|
|
2195
|
+
description: "Spot USDC available and perp withdrawable USD for spot\u2194perp transfers.",
|
|
2196
|
+
prerequisites: ["chainId", "executorAddress"],
|
|
2197
|
+
followUp: ["ctm_hyperliquid_build_usd_transfer_multisign"],
|
|
2198
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchUsdClassBalancesSummary" },
|
|
2199
|
+
inputZod: mcpHyperliquidFetchUsdClassBalancesInputSchema,
|
|
2200
|
+
outputZod: mcpHyperliquidFetchUsdClassBalancesOutputSchema
|
|
2201
|
+
}),
|
|
2202
|
+
defineMcpTool({
|
|
2203
|
+
name: "ctm_hyperliquid_fetch_vaults",
|
|
2204
|
+
actionId: "hyperliquid.fetch-vaults",
|
|
2205
|
+
protocolId: "hyperliquid",
|
|
2206
|
+
chainCategory: "evm",
|
|
2207
|
+
description: "Vault catalog by TVL with APR (mainnet only; may take ~10\u201315s). Pass executorAddress to merge user-held vaults.",
|
|
2208
|
+
prerequisites: ["chainId 999 for catalog"],
|
|
2209
|
+
followUp: ["ctm_hyperliquid_build_vault_deposit_multisign"],
|
|
2210
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchVaultCatalogSummary" },
|
|
2211
|
+
inputZod: mcpHyperliquidFetchVaultsInputSchema,
|
|
2212
|
+
outputZod: mcpHyperliquidFetchVaultsOutputSchema
|
|
2213
|
+
}),
|
|
2214
|
+
defineMcpTool({
|
|
2215
|
+
name: "ctm_hyperliquid_fetch_user_vault_equities",
|
|
2216
|
+
actionId: "hyperliquid.fetch-user-vault-equities",
|
|
2217
|
+
protocolId: "hyperliquid",
|
|
2218
|
+
chainCategory: "evm",
|
|
2219
|
+
description: "USD equity the user holds in Hyperliquid vaults.",
|
|
2220
|
+
prerequisites: ["chainId", "executorAddress"],
|
|
2221
|
+
followUp: ["ctm_hyperliquid_build_vault_withdraw_multisign"],
|
|
2222
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchUserVaultEquitiesSummary" },
|
|
2223
|
+
inputZod: mcpHyperliquidFetchUserVaultEquitiesInputSchema,
|
|
2224
|
+
outputZod: mcpHyperliquidFetchUserVaultEquitiesOutputSchema
|
|
2225
|
+
}),
|
|
2226
|
+
defineMcpTool({
|
|
2227
|
+
name: "ctm_hyperliquid_fetch_staking_summary",
|
|
2228
|
+
actionId: "hyperliquid.fetch-staking-summary",
|
|
2229
|
+
protocolId: "hyperliquid",
|
|
2230
|
+
chainCategory: "evm",
|
|
2231
|
+
description: "HYPE staking summary: delegated and undelegated amounts.",
|
|
2232
|
+
prerequisites: ["chainId", "executorAddress"],
|
|
2233
|
+
followUp: ["ctm_hyperliquid_build_stake_multisign", "ctm_hyperliquid_build_delegate_multisign"],
|
|
2234
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchStakingSummaryForExecutor" },
|
|
2235
|
+
inputZod: mcpHyperliquidFetchStakingSummaryInputSchema,
|
|
2236
|
+
outputZod: mcpHyperliquidFetchStakingSummaryOutputSchema
|
|
2237
|
+
}),
|
|
2238
|
+
defineMcpTool({
|
|
2239
|
+
name: "ctm_hyperliquid_fetch_delegations",
|
|
2240
|
+
actionId: "hyperliquid.fetch-delegations",
|
|
2241
|
+
protocolId: "hyperliquid",
|
|
2242
|
+
chainCategory: "evm",
|
|
2243
|
+
description: "HYPE delegations by validator for executor.",
|
|
2244
|
+
prerequisites: ["chainId", "executorAddress"],
|
|
2245
|
+
followUp: ["ctm_hyperliquid_build_undelegate_multisign"],
|
|
2246
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchDelegationsForExecutor" },
|
|
2247
|
+
inputZod: mcpHyperliquidFetchDelegationsInputSchema,
|
|
2248
|
+
outputZod: mcpHyperliquidFetchDelegationsOutputSchema
|
|
1779
2249
|
})
|
|
1780
2250
|
];
|
|
1781
2251
|
var MCP_TOOL_DEFINITIONS = [
|
|
@@ -1819,6 +2289,7 @@ function getAgentCatalogForMcp() {
|
|
|
1819
2289
|
protocols: getProtocolModules(),
|
|
1820
2290
|
commonParams: EVM_COMMON_PARAM_DOCS,
|
|
1821
2291
|
multisignOutput: MULTISIGN_OUTPUT_DOC,
|
|
2292
|
+
multisignSubmitOutput: MULTISIGN_SUBMIT_OUTPUT_DOC,
|
|
1822
2293
|
managementSig: MANAGEMENT_SIG_DOC,
|
|
1823
2294
|
/** Zod schemas for MCP tool I/O — source of truth for continuum-mcp-server validation. */
|
|
1824
2295
|
inputSchemas: MCP_TOOL_INPUT_SCHEMAS,
|
|
@@ -1827,9 +2298,14 @@ function getAgentCatalogForMcp() {
|
|
|
1827
2298
|
evmSwapTypical: [
|
|
1828
2299
|
"1. Quote (protocol-specific API if needed)",
|
|
1829
2300
|
"2. Build protocol calldata (e.g. create_swap)",
|
|
1830
|
-
"3. build_*_multisign \u2192 {
|
|
1831
|
-
"4.
|
|
1832
|
-
|
|
2301
|
+
"3. build_*_multisign \u2192 { requestId } (MCP auto-submits)",
|
|
2302
|
+
"4. wait_for_sign_request_ready \u2192 sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result"
|
|
2303
|
+
],
|
|
2304
|
+
evmSwapManualTypical: [
|
|
2305
|
+
"1. Quote (protocol-specific API if needed)",
|
|
2306
|
+
"2. Build protocol calldata",
|
|
2307
|
+
"3. Protocol builder \u2192 { bodyForSign, messageToSign } (node app only)",
|
|
2308
|
+
"4. Sign messageToSign and POST /multiSignRequest with clientSig and signedMessage"
|
|
1833
2309
|
],
|
|
1834
2310
|
managementPostTypical: [
|
|
1835
2311
|
"1. GET /getNodeKey \u2192 nodeKey (128 hex)",
|
|
@@ -2392,6 +2868,146 @@ var gmxProtocolModule = {
|
|
|
2392
2868
|
]
|
|
2393
2869
|
};
|
|
2394
2870
|
registerProtocolModule(gmxProtocolModule);
|
|
2871
|
+
|
|
2872
|
+
// src/protocols/evm/hyperliquid/support.ts
|
|
2873
|
+
var HYPERLIQUID_SUPPORTED_CHAIN_IDS = [999, 998];
|
|
2874
|
+
function isHyperliquidChainSupported(chainId) {
|
|
2875
|
+
return HYPERLIQUID_SUPPORTED_CHAIN_IDS.includes(chainId);
|
|
2876
|
+
}
|
|
2877
|
+
|
|
2878
|
+
// src/protocols/evm/hyperliquid/index.ts
|
|
2879
|
+
var HYPERLIQUID_PROTOCOL_ID = "hyperliquid";
|
|
2880
|
+
var hyperliquidProtocolModule = {
|
|
2881
|
+
id: HYPERLIQUID_PROTOCOL_ID,
|
|
2882
|
+
chainCategory: "evm",
|
|
2883
|
+
isChainSupported(ctx) {
|
|
2884
|
+
if (ctx.chainCategory !== "evm") return false;
|
|
2885
|
+
const chainId = typeof ctx.chainId === "number" ? ctx.chainId : Number(ctx.chainId);
|
|
2886
|
+
return Number.isFinite(chainId) && isHyperliquidChainSupported(chainId);
|
|
2887
|
+
},
|
|
2888
|
+
isTokenSupported(token) {
|
|
2889
|
+
if (token.category !== "evm") return false;
|
|
2890
|
+
return token.kind === "erc20" || token.kind === "native";
|
|
2891
|
+
},
|
|
2892
|
+
actions: [
|
|
2893
|
+
{
|
|
2894
|
+
id: "hyperliquid.limitOrder",
|
|
2895
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
2896
|
+
chainCategory: "evm",
|
|
2897
|
+
description: "Place a Hyperliquid limit/IoC order via HyperEVM CoreWriter",
|
|
2898
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
2899
|
+
params: {
|
|
2900
|
+
coin: { type: "string", required: true, description: "Market coin e.g. BTC" },
|
|
2901
|
+
isBuy: { type: "boolean", required: true, description: "true for buy/long, false for sell/short" },
|
|
2902
|
+
limitPxHuman: { type: "string", required: true, description: "Limit price" },
|
|
2903
|
+
szHuman: { type: "string", required: true, description: "Order size in coin units" },
|
|
2904
|
+
marketKind: { type: "string", required: false, description: "perp (default) or spot" },
|
|
2905
|
+
tif: { type: "string", required: false, description: "gtc, ioc, or alo" },
|
|
2906
|
+
dex: { type: "string", required: false, description: "HIP-3 dex name when applicable" }
|
|
2907
|
+
}
|
|
2908
|
+
},
|
|
2909
|
+
{
|
|
2910
|
+
id: "hyperliquid.close",
|
|
2911
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
2912
|
+
chainCategory: "evm",
|
|
2913
|
+
description: "Close or reduce a perp via IoC reduce-only limit order (CoreWriter)",
|
|
2914
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
2915
|
+
params: {
|
|
2916
|
+
coin: { type: "string", required: true, description: "Market coin" },
|
|
2917
|
+
isLong: { type: "boolean", required: true, description: "true if closing a long position" },
|
|
2918
|
+
limitPxHuman: { type: "string", required: true, description: "Limit price" },
|
|
2919
|
+
szHuman: { type: "string", required: true, description: "Size to close in coin units" }
|
|
2920
|
+
}
|
|
2921
|
+
},
|
|
2922
|
+
{
|
|
2923
|
+
id: "hyperliquid.cancel",
|
|
2924
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
2925
|
+
chainCategory: "evm",
|
|
2926
|
+
description: "Cancel a Hyperliquid open order via CoreWriter",
|
|
2927
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
2928
|
+
params: {
|
|
2929
|
+
coin: { type: "string", required: true, description: "Market coin" },
|
|
2930
|
+
oid: { type: "number", required: true, description: "Order id from openOrders" }
|
|
2931
|
+
}
|
|
2932
|
+
},
|
|
2933
|
+
{
|
|
2934
|
+
id: "hyperliquid.usdTransfer",
|
|
2935
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
2936
|
+
chainCategory: "evm",
|
|
2937
|
+
description: "Move USDC between Hyperliquid spot and perp margin accounts",
|
|
2938
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
2939
|
+
params: {
|
|
2940
|
+
usdHuman: { type: "string", required: true, description: "USD amount" },
|
|
2941
|
+
toPerp: { type: "boolean", required: true, description: "true spot\u2192perp, false perp\u2192spot" }
|
|
2942
|
+
}
|
|
2943
|
+
},
|
|
2944
|
+
{
|
|
2945
|
+
id: "hyperliquid.vaultDeposit",
|
|
2946
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
2947
|
+
chainCategory: "evm",
|
|
2948
|
+
description: "Deposit USD into a Hyperliquid vault",
|
|
2949
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
2950
|
+
params: {
|
|
2951
|
+
vaultAddress: { type: "string", required: true, description: "Vault address" },
|
|
2952
|
+
usdHuman: { type: "string", required: true, description: "USD amount" }
|
|
2953
|
+
}
|
|
2954
|
+
},
|
|
2955
|
+
{
|
|
2956
|
+
id: "hyperliquid.vaultWithdraw",
|
|
2957
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
2958
|
+
chainCategory: "evm",
|
|
2959
|
+
description: "Withdraw USD from a Hyperliquid vault (includes accrued PnL)",
|
|
2960
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
2961
|
+
params: {
|
|
2962
|
+
vaultAddress: { type: "string", required: true, description: "Vault address" },
|
|
2963
|
+
usdHuman: { type: "string", required: true, description: "USD amount" }
|
|
2964
|
+
}
|
|
2965
|
+
},
|
|
2966
|
+
{
|
|
2967
|
+
id: "hyperliquid.stake",
|
|
2968
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
2969
|
+
chainCategory: "evm",
|
|
2970
|
+
description: "Stake HYPE via CoreWriter",
|
|
2971
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
2972
|
+
params: {
|
|
2973
|
+
hypeHuman: { type: "string", required: true, description: "HYPE amount" }
|
|
2974
|
+
}
|
|
2975
|
+
},
|
|
2976
|
+
{
|
|
2977
|
+
id: "hyperliquid.unstake",
|
|
2978
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
2979
|
+
chainCategory: "evm",
|
|
2980
|
+
description: "Unstake HYPE via CoreWriter",
|
|
2981
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
2982
|
+
params: {
|
|
2983
|
+
hypeHuman: { type: "string", required: true, description: "HYPE amount" }
|
|
2984
|
+
}
|
|
2985
|
+
},
|
|
2986
|
+
{
|
|
2987
|
+
id: "hyperliquid.delegate",
|
|
2988
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
2989
|
+
chainCategory: "evm",
|
|
2990
|
+
description: "Delegate staked HYPE to a validator",
|
|
2991
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
2992
|
+
params: {
|
|
2993
|
+
hypeHuman: { type: "string", required: true, description: "HYPE amount" },
|
|
2994
|
+
validator: { type: "string", required: true, description: "Validator address" }
|
|
2995
|
+
}
|
|
2996
|
+
},
|
|
2997
|
+
{
|
|
2998
|
+
id: "hyperliquid.undelegate",
|
|
2999
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
3000
|
+
chainCategory: "evm",
|
|
3001
|
+
description: "Undelegate HYPE from a validator",
|
|
3002
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
3003
|
+
params: {
|
|
3004
|
+
hypeHuman: { type: "string", required: true, description: "HYPE amount" },
|
|
3005
|
+
validator: { type: "string", required: true, description: "Validator address" }
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
]
|
|
3009
|
+
};
|
|
3010
|
+
registerProtocolModule(hyperliquidProtocolModule);
|
|
2395
3011
|
var skillsDir = join(dirname(fileURLToPath(import.meta.url)), "skills");
|
|
2396
3012
|
var SKILL_PROTOCOL_IDS = [
|
|
2397
3013
|
"aave-v4",
|
|
@@ -2402,17 +3018,32 @@ var SKILL_PROTOCOL_IDS = [
|
|
|
2402
3018
|
"euler-v2",
|
|
2403
3019
|
"maple-syrup",
|
|
2404
3020
|
"sky",
|
|
2405
|
-
"gmx"
|
|
3021
|
+
"gmx",
|
|
3022
|
+
"hyperliquid"
|
|
2406
3023
|
];
|
|
2407
3024
|
function getToolsForProtocol(protocolId) {
|
|
2408
3025
|
return MCP_TOOL_DEFINITIONS.filter((t) => t.protocolId === protocolId);
|
|
2409
3026
|
}
|
|
3027
|
+
function readSharedMultisignMcpGasSection() {
|
|
3028
|
+
try {
|
|
3029
|
+
return readFileSync(join(skillsDir, "_shared", "multisign-mcp-gas.md"), "utf8").trim();
|
|
3030
|
+
} catch {
|
|
3031
|
+
return "";
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
2410
3034
|
function getProtocolSkill(protocolId) {
|
|
2411
3035
|
if (!SKILL_PROTOCOL_IDS.includes(protocolId)) {
|
|
2412
3036
|
return void 0;
|
|
2413
3037
|
}
|
|
2414
3038
|
try {
|
|
2415
|
-
|
|
3039
|
+
const skill = readFileSync(join(skillsDir, protocolId, "SKILL.md"), "utf8").trim();
|
|
3040
|
+
const shared = readSharedMultisignMcpGasSection();
|
|
3041
|
+
if (!shared) return skill;
|
|
3042
|
+
if (skill.includes("## Gas and MCP submit")) return skill;
|
|
3043
|
+
return `${skill}
|
|
3044
|
+
|
|
3045
|
+
${shared}
|
|
3046
|
+
`;
|
|
2416
3047
|
} catch {
|
|
2417
3048
|
return void 0;
|
|
2418
3049
|
}
|
|
@@ -2671,22 +3302,6 @@ function getProtocolSupportAdvisor(protocolId) {
|
|
|
2671
3302
|
function listProtocolSupportAdvisorIds() {
|
|
2672
3303
|
return Object.keys(PROTOCOL_SUPPORT_ADVISORS);
|
|
2673
3304
|
}
|
|
2674
|
-
var mcpServerCommonInputSchema = z.object({
|
|
2675
|
-
keyGenId: z.string().min(1).describe("KeyGen id from fetch_key_gen_result / node preferred KeyGen"),
|
|
2676
|
-
chainId: z.number().int().positive().describe("EVM chain id; RPC and gas config resolved from chain registry"),
|
|
2677
|
-
purposeText: z.string().min(1).describe("Human-readable purpose for the sign request"),
|
|
2678
|
-
useCustomGas: z.boolean().optional().describe("Apply chain gas settings from registry when true")
|
|
2679
|
-
});
|
|
2680
|
-
function mcpServerMultisignInput(fields) {
|
|
2681
|
-
return mcpServerCommonInputSchema.extend(fields);
|
|
2682
|
-
}
|
|
2683
|
-
var mcpServerSubmitOutputSchema = z.object({
|
|
2684
|
-
requestId: z.string().min(1)
|
|
2685
|
-
}).describe("mpc-auth multiSignRequest id; continue with trigger_sign_result / broadcast_sign_result");
|
|
2686
|
-
var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
2687
|
-
"ctm_uniswap_v4_quote",
|
|
2688
|
-
"ctm_uniswap_v4_create_swap"
|
|
2689
|
-
]);
|
|
2690
3305
|
|
|
2691
3306
|
// src/agent/catalog.ts
|
|
2692
3307
|
registerProtocolModule(uniswapV4ProtocolModule);
|
|
@@ -2698,6 +3313,7 @@ registerProtocolModule(skyProtocolModule);
|
|
|
2698
3313
|
registerProtocolModule(aaveV4ProtocolModule);
|
|
2699
3314
|
registerProtocolModule(eulerV2ProtocolModule);
|
|
2700
3315
|
registerProtocolModule(gmxProtocolModule);
|
|
3316
|
+
registerProtocolModule(hyperliquidProtocolModule);
|
|
2701
3317
|
function getAgentCatalog() {
|
|
2702
3318
|
return {
|
|
2703
3319
|
protocols: getProtocolModules(),
|
|
@@ -2715,11 +3331,12 @@ function getAgentCatalog() {
|
|
|
2715
3331
|
aaveV4: aaveV4ProtocolModule,
|
|
2716
3332
|
eulerV2: eulerV2ProtocolModule,
|
|
2717
3333
|
gmx: gmxProtocolModule,
|
|
3334
|
+
hyperliquid: hyperliquidProtocolModule,
|
|
2718
3335
|
/** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
|
|
2719
3336
|
mcp: getAgentCatalogForMcp()
|
|
2720
3337
|
};
|
|
2721
3338
|
}
|
|
2722
3339
|
|
|
2723
|
-
export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGmxCancelInputSchema, mcpGmxDecreaseInputSchema, mcpGmxFetchGmApyInputSchema, mcpGmxFetchGmApyOutputSchema, mcpGmxFetchGmMarketsInputSchema, mcpGmxFetchGmMarketsOutputSchema, mcpGmxFetchMarketPricesInputSchema, mcpGmxFetchMarketPricesOutputSchema, mcpGmxFetchMarketsInputSchema, mcpGmxFetchMarketsOutputSchema, mcpGmxFetchOhlcvInputSchema, mcpGmxFetchOhlcvOutputSchema, mcpGmxFetchPositionsInputSchema, mcpGmxFetchPositionsOutputSchema, mcpGmxFetchStakingPowerInputSchema, mcpGmxFetchStakingPowerOutputSchema, mcpGmxGmDepositInputSchema, mcpGmxGmWithdrawInputSchema, mcpGmxIncreaseInputSchema,
|
|
3340
|
+
export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, MULTISIGN_SUBMIT_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGmxCancelInputSchema, mcpGmxDecreaseInputSchema, mcpGmxFetchGmApyInputSchema, mcpGmxFetchGmApyOutputSchema, mcpGmxFetchGmMarketsInputSchema, mcpGmxFetchGmMarketsOutputSchema, mcpGmxFetchMarketPricesInputSchema, mcpGmxFetchMarketPricesOutputSchema, mcpGmxFetchMarketsInputSchema, mcpGmxFetchMarketsOutputSchema, mcpGmxFetchOhlcvInputSchema, mcpGmxFetchOhlcvOutputSchema, mcpGmxFetchPositionsInputSchema, mcpGmxFetchPositionsOutputSchema, mcpGmxFetchStakingPowerInputSchema, mcpGmxFetchStakingPowerOutputSchema, mcpGmxGmDepositInputSchema, mcpGmxGmWithdrawInputSchema, mcpGmxIncreaseInputSchema, mcpServerSubmitOutputSchema as mcpGmxMultisignOutputSchema, mcpGmxStakeGmxInputSchema, mcpGmxUnstakeGmxInputSchema, mcpHyperliquidCancelInputSchema, mcpHyperliquidCloseInputSchema, mcpHyperliquidDelegateInputSchema, mcpHyperliquidFetchDelegationsInputSchema, mcpHyperliquidFetchDelegationsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildCollectFeesMultisignInputSchema, mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildMintLiquidityMultisignInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4LpClaimInputSchema, mcpUniswapV4LpClaimOutputSchema, mcpUniswapV4LpCreatePositionInputSchema, mcpUniswapV4LpCreatePositionOutputSchema, mcpUniswapV4LpDecreaseInputSchema, mcpUniswapV4LpDecreaseOutputSchema, mcpUniswapV4LpIncreaseInputSchema, mcpUniswapV4LpIncreaseOutputSchema, mcpUniswapV4LpListPoolsInputSchema, mcpUniswapV4LpListPoolsOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, multisignOutputSchema, parseMcpToolInput, parseMcpToolOutput, parseMultisignBuilderOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
|
|
2724
3341
|
//# sourceMappingURL=catalog.js.map
|
|
2725
3342
|
//# sourceMappingURL=catalog.js.map
|