@continuumdao/ctm-mpc-defi 0.2.22 → 0.2.25
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 +806 -18
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +2400 -43
- package/dist/agent/catalog.js +772 -19
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/arcus/SKILL.md +72 -0
- package/dist/agent/skills/gmx/SKILL.md +32 -0
- package/dist/agent/skills/hyperliquid/SKILL.md +44 -3
- package/dist/agent/skills/uniswap-v4/SKILL.md +31 -1
- package/dist/core/index.cjs +55 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +15 -21
- package/dist/core/index.js +54 -1
- package/dist/core/index.js.map +1 -1
- package/dist/eip712Multisign-xhXpUYp3.d.ts +36 -0
- package/dist/index.cjs +399 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +398 -13
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/arcus/index.cjs +2061 -0
- package/dist/protocols/evm/arcus/index.cjs.map +1 -0
- package/dist/protocols/evm/arcus/index.d.ts +726 -0
- package/dist/protocols/evm/arcus/index.js +1964 -0
- package/dist/protocols/evm/arcus/index.js.map +1 -0
- package/dist/protocols/evm/gmx/index.cjs +39 -0
- package/dist/protocols/evm/gmx/index.cjs.map +1 -1
- package/dist/protocols/evm/gmx/index.d.ts +21 -1
- package/dist/protocols/evm/gmx/index.js +38 -1
- package/dist/protocols/evm/gmx/index.js.map +1 -1
- package/dist/protocols/evm/hyperliquid/index.cjs +478 -208
- package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
- package/dist/protocols/evm/hyperliquid/index.d.ts +166 -51
- package/dist/protocols/evm/hyperliquid/index.js +467 -210
- package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
- package/dist/protocols/evm/permit2/index.cjs.map +1 -1
- package/dist/protocols/evm/permit2/index.js.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.cjs +734 -15
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.d.ts +189 -17
- package/dist/protocols/evm/uniswap-v4/index.js +698 -16
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/package.json +6 -1
package/dist/agent/catalog.cjs
CHANGED
|
@@ -9,6 +9,36 @@ var fs = require('fs');
|
|
|
9
9
|
var path = require('path');
|
|
10
10
|
|
|
11
11
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __esm = (fn, res) => function __init() {
|
|
14
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// src/protocols/evm/arcus/support.ts
|
|
18
|
+
function isArcusChainSupported(chainId) {
|
|
19
|
+
return ARCUS_SUPPORTED_CHAIN_IDS.includes(chainId);
|
|
20
|
+
}
|
|
21
|
+
var ARCUS_SUPPORTED_CHAIN_IDS;
|
|
22
|
+
var init_support = __esm({
|
|
23
|
+
"src/protocols/evm/arcus/support.ts"() {
|
|
24
|
+
ARCUS_SUPPORTED_CHAIN_IDS = [4663];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
// src/protocols/evm/arcus/constants.ts
|
|
29
|
+
var ARCUS_PROTOCOL_ID;
|
|
30
|
+
var init_constants = __esm({
|
|
31
|
+
"src/protocols/evm/arcus/constants.ts"() {
|
|
32
|
+
ARCUS_PROTOCOL_ID = "arcus";
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// src/protocols/evm/arcus/api.ts
|
|
37
|
+
var init_api = __esm({
|
|
38
|
+
"src/protocols/evm/arcus/api.ts"() {
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
12
42
|
// src/core/registry.ts
|
|
13
43
|
var modules = [];
|
|
14
44
|
function registerProtocolModule(mod) {
|
|
@@ -79,7 +109,9 @@ var UNIVERSAL_ROUTER_SPENDER = {
|
|
|
79
109
|
143: "0x0d97dc33264bfc1c226207428a79b26757fb9dc3",
|
|
80
110
|
59144: "0x661e93cca42afacb172121ef892830ca3b70f08d",
|
|
81
111
|
4217: "0x1febb76be10aaf3a1402f04e8e835f2c382f7914",
|
|
82
|
-
196: "0x5507749f2c558bb3e162c6e90c314c092e7372ff"
|
|
112
|
+
196: "0x5507749f2c558bb3e162c6e90c314c092e7372ff",
|
|
113
|
+
/** Robinhood Chain mainnet — Universal Router v2.1.1 (Trade API / interface) */
|
|
114
|
+
4663: "0x8876789976decbfcbbbe364623c63652db8c0904"
|
|
83
115
|
};
|
|
84
116
|
function isUniswapV4ChainSupported(chainId) {
|
|
85
117
|
if (chainId == null) return false;
|
|
@@ -170,6 +202,17 @@ var uniswapV4ProtocolModule = {
|
|
|
170
202
|
type: { type: "EXACT_INPUT | EXACT_OUTPUT", required: true, description: "Trade type" }
|
|
171
203
|
}
|
|
172
204
|
},
|
|
205
|
+
{
|
|
206
|
+
id: "uniswap-v4.limit-order",
|
|
207
|
+
protocolId: UNISWAP_V4_PROTOCOL_ID,
|
|
208
|
+
chainCategory: "evm",
|
|
209
|
+
description: "Place UniswapX limit order via EIP-712 sign + POST /order (Ethereum mainnet only)",
|
|
210
|
+
commonParams: ["keyGen", "purposeText"],
|
|
211
|
+
params: {
|
|
212
|
+
fullLimitQuote: { type: "object", required: true, description: "Full limit order quote from Trade API" },
|
|
213
|
+
uniswapApiKey: { type: "string", required: true, description: "Uniswap Trade API key" }
|
|
214
|
+
}
|
|
215
|
+
},
|
|
173
216
|
{
|
|
174
217
|
id: "uniswap-v4.mint-liquidity",
|
|
175
218
|
protocolId: UNISWAP_V4_PROTOCOL_ID,
|
|
@@ -758,10 +801,15 @@ function preprocessHyperliquidLimitOrderInput(raw) {
|
|
|
758
801
|
if (!preprocessObject(o)) return raw;
|
|
759
802
|
aliasField(o, "limitPxHuman", "limitPxHuman", "limitPx", "markPx");
|
|
760
803
|
aliasField(o, "szHuman", "szHuman", "sz", "size");
|
|
804
|
+
aliasField(o, "takeProfitTriggerPxHuman", "takeProfitTriggerPxHuman", "takeProfitPxHuman", "tpTriggerPxHuman", "targetPxHuman");
|
|
805
|
+
aliasField(o, "stopLossTriggerPxHuman", "stopLossTriggerPxHuman", "stopLossPxHuman", "slTriggerPxHuman", "invalidationPxHuman");
|
|
761
806
|
derivePurposeIfMissing(o, (x) => {
|
|
762
807
|
const coin = String(x.coin ?? "").trim();
|
|
763
808
|
const side = x.isBuy === true || x.isBuy === "true" ? "buy" : "sell";
|
|
764
809
|
const sz = String(x.szHuman ?? "").trim();
|
|
810
|
+
const tp = String(x.takeProfitTriggerPxHuman ?? "").trim();
|
|
811
|
+
const sl = String(x.stopLossTriggerPxHuman ?? "").trim();
|
|
812
|
+
if (coin && sz && (tp || sl)) return `HL bracket ${side} ${coin} ${sz}`;
|
|
765
813
|
if (coin && sz) return `HL limit ${side} ${coin} ${sz}`;
|
|
766
814
|
return void 0;
|
|
767
815
|
});
|
|
@@ -859,6 +907,13 @@ function preprocessUniswapBuildSwapInput(raw) {
|
|
|
859
907
|
derivePurposeIfMissing(o, () => "Uniswap V4 swap");
|
|
860
908
|
return o;
|
|
861
909
|
}
|
|
910
|
+
function preprocessUniswapBuildLimitOrderInput(raw) {
|
|
911
|
+
const o = preprocessObject(raw);
|
|
912
|
+
if (!o) return raw;
|
|
913
|
+
aliasField(o, "fullLimitQuote", "fullLimitQuote", "fullLimitQuoteFromPermit", "limitQuote", "quote");
|
|
914
|
+
derivePurposeIfMissing(o, () => "Uniswap V4 limit order");
|
|
915
|
+
return o;
|
|
916
|
+
}
|
|
862
917
|
function preprocessUniswapBuildLpInput(raw) {
|
|
863
918
|
const o = preprocessUniswapLpNftInput(raw);
|
|
864
919
|
if (!preprocessObject(o)) return raw;
|
|
@@ -993,6 +1048,45 @@ var mcpUniswapV4BuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
|
|
|
993
1048
|
})
|
|
994
1049
|
)
|
|
995
1050
|
);
|
|
1051
|
+
var mcpUniswapV4LimitOrderQuoteInputSchema = zod.z.object({
|
|
1052
|
+
type: uniswapQuoteTradeTypeSchema.describe("EXACT_INPUT or EXACT_OUTPUT"),
|
|
1053
|
+
amount: zod.z.string().min(1).describe("Amount in token-in base units (wei string for ERC-20)"),
|
|
1054
|
+
limitPrice: zod.z.string().min(1).describe("Limit price string from Trade API (pair exchange rate)"),
|
|
1055
|
+
tokenIn: zod.z.string().min(1).describe("Input token; 0x0 for native ETH"),
|
|
1056
|
+
tokenOut: zod.z.string().min(1).describe("Output token address"),
|
|
1057
|
+
chainId: agentEvmChainIdSchema.describe("Must be 1 (Ethereum mainnet) for limit orders"),
|
|
1058
|
+
orderDeadline: agentCoercedIntSchema(zod.z.number().int().positive()).describe("Unix seconds when unfilled order expires"),
|
|
1059
|
+
uniswapApiKey: zod.z.string().min(1).describe("Uniswap Trade API x-api-key"),
|
|
1060
|
+
swapper: evmAddressSchema.optional().describe("MPC executor; omit if keyGen + managementNodeUrl provided"),
|
|
1061
|
+
keyGen: zod.z.string().optional(),
|
|
1062
|
+
managementNodeUrl: zod.z.string().min(1).optional(),
|
|
1063
|
+
tokenInChainId: zod.z.union([zod.z.number(), zod.z.string()]).optional(),
|
|
1064
|
+
tokenOutChainId: zod.z.union([zod.z.number(), zod.z.string()]).optional(),
|
|
1065
|
+
baseUrl: zod.z.string().optional()
|
|
1066
|
+
});
|
|
1067
|
+
var mcpUniswapV4LimitOrderQuoteOutputSchema = jsonObjectSchema.describe(
|
|
1068
|
+
"Full Uniswap POST /limit_order_quote JSON (includes quote, permitData, routing)."
|
|
1069
|
+
);
|
|
1070
|
+
var mcpUniswapV4BuildLimitOrderMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1071
|
+
zod.z.preprocess(
|
|
1072
|
+
preprocessUniswapBuildLimitOrderInput,
|
|
1073
|
+
evmMultisignCommonInputSchema.extend({
|
|
1074
|
+
fullLimitQuote: jsonObjectSchema.describe("Full limit order quote JSON from ctm_uniswap_v4_limit_order_quote"),
|
|
1075
|
+
uniswapApiKey: zod.z.string().min(1).describe("Uniswap Trade API key"),
|
|
1076
|
+
tradeApiBaseUrl: zod.z.string().optional()
|
|
1077
|
+
})
|
|
1078
|
+
)
|
|
1079
|
+
);
|
|
1080
|
+
var mcpUniswapV4FetchLimitOrdersInputSchema = zod.z.object({
|
|
1081
|
+
chainId: agentEvmChainIdSchema.optional().describe("Default 1 (mainnet)"),
|
|
1082
|
+
swapper: evmAddressSchema.optional(),
|
|
1083
|
+
keyGen: zod.z.string().optional(),
|
|
1084
|
+
managementNodeUrl: zod.z.string().min(1).optional(),
|
|
1085
|
+
uniswapApiKey: zod.z.string().min(1).optional(),
|
|
1086
|
+
limit: agentCoercedOptionalIntSchema(zod.z.number().int().positive().max(100)).optional(),
|
|
1087
|
+
baseUrl: zod.z.string().optional()
|
|
1088
|
+
});
|
|
1089
|
+
var mcpUniswapV4FetchLimitOrdersOutputSchema = jsonObjectSchema;
|
|
996
1090
|
var lpExistingPoolSchema = zod.z.object({
|
|
997
1091
|
token0Address: evmAddressSchema,
|
|
998
1092
|
token1Address: evmAddressSchema,
|
|
@@ -1214,6 +1308,8 @@ var mcpUniswapV4FetchOhlcvInputSchema = zod.z.object({
|
|
|
1214
1308
|
poolPreset: zod.z.string().optional().describe("presetId from ctm_uniswap_v4_list_lp_pools"),
|
|
1215
1309
|
poolReference: zod.z.string().optional().describe("bytes32 pool id"),
|
|
1216
1310
|
existingPool: uniswapV4ExistingPoolOhlcvSchema.optional(),
|
|
1311
|
+
currencyAddress: zod.z.string().optional().describe("Robinhood/Bitquery: token contract to chart (preferred over symbol)"),
|
|
1312
|
+
currencySymbol: zod.z.string().optional().describe("Robinhood/Bitquery: Stock Token symbol e.g. NVDA, AAPL"),
|
|
1217
1313
|
quoteToken: zod.z.enum(["token0", "token1"]).optional().describe("Default token0 per token1 (subgraph native)"),
|
|
1218
1314
|
lookbackDays: agentCoercedOptionalIntSchema(zod.z.number().int().positive().max(365)),
|
|
1219
1315
|
lookbackHours: agentCoercedOptionalIntSchema(zod.z.number().int().positive().max(365 * 24)),
|
|
@@ -1225,7 +1321,7 @@ var mcpUniswapV4FetchOhlcvOutputSchema = zod.z.object({
|
|
|
1225
1321
|
timeframe: uniswapV4OhlcvIntervalSchema,
|
|
1226
1322
|
chainId: agentEvmChainIdSchema,
|
|
1227
1323
|
poolReference: zod.z.string(),
|
|
1228
|
-
dataSource: zod.z.enum(["subgraph_native", "subgraph_aggregate", "swaps"]),
|
|
1324
|
+
dataSource: zod.z.enum(["subgraph_native", "subgraph_aggregate", "swaps", "bitquery"]),
|
|
1229
1325
|
baseSubgraphEntity: zod.z.enum(["hourly", "daily"]).optional(),
|
|
1230
1326
|
priceQuote: zod.z.enum(["token0PerToken1", "token1PerToken0"]),
|
|
1231
1327
|
startTimeMs: zod.z.number().int().positive().optional(),
|
|
@@ -1374,7 +1470,9 @@ var mcpServerSubmitOutputSchema = zod.z.object({
|
|
|
1374
1470
|
);
|
|
1375
1471
|
var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1376
1472
|
"ctm_uniswap_v4_quote",
|
|
1377
|
-
"ctm_uniswap_v4_create_swap"
|
|
1473
|
+
"ctm_uniswap_v4_create_swap",
|
|
1474
|
+
"ctm_uniswap_v4_limit_order_quote",
|
|
1475
|
+
"ctm_uniswap_v4_fetch_limit_orders"
|
|
1378
1476
|
]);
|
|
1379
1477
|
|
|
1380
1478
|
// src/agent/schemas/protocols.ts
|
|
@@ -1708,7 +1806,9 @@ var mcpGmxIncreaseInputSchema = mcpGmxMultisignInput(
|
|
|
1708
1806
|
collateralToken: zod.z.string().min(1),
|
|
1709
1807
|
collateralAmountHuman: zod.z.string().min(1),
|
|
1710
1808
|
triggerPriceUsdHuman: zod.z.string().optional(),
|
|
1711
|
-
|
|
1809
|
+
takeProfitPriceUsdHuman: zod.z.string().optional().describe("Take-profit trigger (USD) \u2014 GMX native TP order on increase; defaults to full position size"),
|
|
1810
|
+
stopLossPriceUsdHuman: zod.z.string().optional().describe("Stop-loss trigger (USD) \u2014 GMX native SL order on increase; defaults to full position size"),
|
|
1811
|
+
patternFailureUsdHuman: zod.z.string().optional().describe("Audit alias for stop-loss when stopLossPriceUsdHuman is omitted (trade-idea invalidation)"),
|
|
1712
1812
|
slippageBps: agentCoercedOptionalIntSchema(zod.z.number().int().nonnegative()),
|
|
1713
1813
|
executionFeeBufferBps: agentCoercedOptionalIntSchema(zod.z.number().int().nonnegative())
|
|
1714
1814
|
},
|
|
@@ -2080,6 +2180,7 @@ var mcpHyperliquidFetchDelegationsOutputSchema = zod.z.object({
|
|
|
2080
2180
|
})
|
|
2081
2181
|
)
|
|
2082
2182
|
});
|
|
2183
|
+
var hyperliquidTpslExecModeSchema = zod.z.enum(["limit_at_trigger", "market"]);
|
|
2083
2184
|
var mcpHyperliquidLimitOrderInputSchema = mcpHyperliquidMultisignInput(
|
|
2084
2185
|
{
|
|
2085
2186
|
coin: zod.z.string().min(1).describe("coin from fetch_markets (name) or search_markets"),
|
|
@@ -2088,7 +2189,10 @@ var mcpHyperliquidLimitOrderInputSchema = mcpHyperliquidMultisignInput(
|
|
|
2088
2189
|
szHuman: zod.z.string().min(1),
|
|
2089
2190
|
marketKind: zod.z.enum(["perp", "spot"]).optional(),
|
|
2090
2191
|
tif: hyperliquidTifSchema.optional(),
|
|
2091
|
-
dex: zod.z.string().optional()
|
|
2192
|
+
dex: zod.z.string().optional(),
|
|
2193
|
+
takeProfitTriggerPxHuman: zod.z.string().min(1).optional().describe("Take-profit trigger price \u2014 with SL enables L1 normalTpsl bracket (EIP-712, not CoreWriter)."),
|
|
2194
|
+
stopLossTriggerPxHuman: zod.z.string().min(1).optional().describe("Stop-loss trigger price \u2014 with TP enables L1 normalTpsl bracket (EIP-712, not CoreWriter)."),
|
|
2195
|
+
tpslExecMode: hyperliquidTpslExecModeSchema.optional().describe("Trigger execution: limit_at_trigger (default) or market.")
|
|
2092
2196
|
},
|
|
2093
2197
|
preprocessHyperliquidLimitOrderInput
|
|
2094
2198
|
);
|
|
@@ -2165,6 +2269,213 @@ var mcpHyperliquidUpdateLeverageInputSchema = mcpHyperliquidMultisignInput(
|
|
|
2165
2269
|
},
|
|
2166
2270
|
preprocessHyperliquidCoinInput
|
|
2167
2271
|
);
|
|
2272
|
+
var arcusFetchChainInputSchema = zod.z.object({
|
|
2273
|
+
chainId: zod.z.coerce.number().int().positive().default(4663).describe("Robinhood Chain (4663).")
|
|
2274
|
+
});
|
|
2275
|
+
var arcusOhlcvCandleSchema = zod.z.object({
|
|
2276
|
+
timestampMs: zod.z.number(),
|
|
2277
|
+
open: zod.z.string(),
|
|
2278
|
+
high: zod.z.string(),
|
|
2279
|
+
low: zod.z.string(),
|
|
2280
|
+
close: zod.z.string(),
|
|
2281
|
+
volume: zod.z.string()
|
|
2282
|
+
});
|
|
2283
|
+
var arcusOhlcvEnvelopeSchema = zod.z.object({
|
|
2284
|
+
ohlcv: zod.z.object({
|
|
2285
|
+
market: zod.z.string().optional(),
|
|
2286
|
+
coin: zod.z.string().optional(),
|
|
2287
|
+
tokenAddress: zod.z.string().optional(),
|
|
2288
|
+
interval: zod.z.string(),
|
|
2289
|
+
marketKind: zod.z.enum(["perp", "spot"]).optional(),
|
|
2290
|
+
candles: zod.z.array(arcusOhlcvCandleSchema),
|
|
2291
|
+
candleCount: zod.z.number().optional(),
|
|
2292
|
+
latestCandle: arcusOhlcvCandleSchema.nullable().optional(),
|
|
2293
|
+
dataSource: zod.z.literal("arcus").optional()
|
|
2294
|
+
}),
|
|
2295
|
+
dataSource: zod.z.literal("arcus").optional(),
|
|
2296
|
+
chainId: zod.z.number().optional(),
|
|
2297
|
+
resolvedMarket: zod.z.string().optional()
|
|
2298
|
+
});
|
|
2299
|
+
function mcpArcusMultisignInput(fields) {
|
|
2300
|
+
return withMultisignKeySourceRefine(
|
|
2301
|
+
evmMultisignCommonInputSchema.extend({
|
|
2302
|
+
secp256k1KeyGenId: zod.z.string().min(1).describe("Custody secp256k1 KeyGen id (billing + executor address)."),
|
|
2303
|
+
ed25519KeyGenId: zod.z.string().min(1).describe("Paired ed25519 KeyGen id (same GroupId) for Arcus API signing."),
|
|
2304
|
+
...fields
|
|
2305
|
+
})
|
|
2306
|
+
);
|
|
2307
|
+
}
|
|
2308
|
+
var mcpArcusFetchMarketsInputSchema = arcusFetchChainInputSchema;
|
|
2309
|
+
var mcpArcusFetchMarketsOutputSchema = zod.z.object({
|
|
2310
|
+
markets: zod.z.array(
|
|
2311
|
+
zod.z.object({
|
|
2312
|
+
marketDisplayName: zod.z.string(),
|
|
2313
|
+
marketId: zod.z.number(),
|
|
2314
|
+
baseAsset: zod.z.string().optional(),
|
|
2315
|
+
category: zod.z.string().optional(),
|
|
2316
|
+
status: zod.z.string().optional(),
|
|
2317
|
+
markPrice: zod.z.string().nullable().optional()
|
|
2318
|
+
})
|
|
2319
|
+
),
|
|
2320
|
+
marketKind: zod.z.literal("perp")
|
|
2321
|
+
});
|
|
2322
|
+
var mcpArcusSearchMarketsInputSchema = arcusFetchChainInputSchema.extend({
|
|
2323
|
+
query: zod.z.string().min(1),
|
|
2324
|
+
limit: zod.z.coerce.number().int().positive().max(50).optional()
|
|
2325
|
+
});
|
|
2326
|
+
var mcpArcusSearchMarketsOutputSchema = mcpArcusFetchMarketsOutputSchema;
|
|
2327
|
+
var mcpArcusFetchOhlcvInputSchema = arcusFetchChainInputSchema.extend({
|
|
2328
|
+
market: zod.z.string().optional(),
|
|
2329
|
+
coin: zod.z.string().optional(),
|
|
2330
|
+
interval: zod.z.string().optional(),
|
|
2331
|
+
lookbackDays: zod.z.coerce.number().positive().optional(),
|
|
2332
|
+
lookbackHours: zod.z.coerce.number().positive().optional(),
|
|
2333
|
+
candleCount: zod.z.coerce.number().int().positive().max(1500).optional()
|
|
2334
|
+
});
|
|
2335
|
+
var mcpArcusFetchOhlcvOutputSchema = arcusOhlcvEnvelopeSchema;
|
|
2336
|
+
var mcpArcusSpotFetchMarketsInputSchema = arcusFetchChainInputSchema;
|
|
2337
|
+
var mcpArcusSpotFetchMarketsOutputSchema = zod.z.object({
|
|
2338
|
+
tokens: zod.z.array(
|
|
2339
|
+
zod.z.object({
|
|
2340
|
+
ticker: zod.z.string(),
|
|
2341
|
+
contractAddress: zod.z.string(),
|
|
2342
|
+
name: zod.z.string(),
|
|
2343
|
+
logoUrl: zod.z.string().nullable().optional(),
|
|
2344
|
+
price: zod.z.string().nullable().optional()
|
|
2345
|
+
})
|
|
2346
|
+
),
|
|
2347
|
+
marketKind: zod.z.literal("spot")
|
|
2348
|
+
});
|
|
2349
|
+
var mcpArcusSpotFetchOhlcvInputSchema = arcusFetchChainInputSchema.extend({
|
|
2350
|
+
ticker: zod.z.string().optional(),
|
|
2351
|
+
tokenAddress: zod.z.string().optional(),
|
|
2352
|
+
currencySymbol: zod.z.string().optional(),
|
|
2353
|
+
interval: zod.z.string().optional(),
|
|
2354
|
+
lookbackDays: zod.z.coerce.number().positive().optional(),
|
|
2355
|
+
candleCount: zod.z.coerce.number().int().positive().optional()
|
|
2356
|
+
});
|
|
2357
|
+
var mcpArcusSpotFetchOhlcvOutputSchema = arcusOhlcvEnvelopeSchema;
|
|
2358
|
+
var mcpArcusFetchMarketSnapshotInputSchema = arcusFetchChainInputSchema.extend({
|
|
2359
|
+
market: zod.z.string().optional(),
|
|
2360
|
+
coin: zod.z.string().optional(),
|
|
2361
|
+
interval: zod.z.string().optional(),
|
|
2362
|
+
candleLimit: zod.z.coerce.number().int().positive().optional()
|
|
2363
|
+
});
|
|
2364
|
+
var mcpArcusFetchMarketSnapshotOutputSchema = zod.z.object({
|
|
2365
|
+
snapshot: zod.z.object({
|
|
2366
|
+
market: zod.z.string(),
|
|
2367
|
+
midUsd: zod.z.string(),
|
|
2368
|
+
interval: zod.z.string(),
|
|
2369
|
+
latestCandle: arcusOhlcvCandleSchema.nullable().optional(),
|
|
2370
|
+
candles: zod.z.array(arcusOhlcvCandleSchema),
|
|
2371
|
+
candleCount: zod.z.number(),
|
|
2372
|
+
fetchedAtMs: zod.z.number()
|
|
2373
|
+
}),
|
|
2374
|
+
resolvedMarket: zod.z.string()
|
|
2375
|
+
});
|
|
2376
|
+
var mcpArcusFetchAccountInputSchema = arcusFetchChainInputSchema.extend({
|
|
2377
|
+
executorAddress: evmAddressSchema
|
|
2378
|
+
});
|
|
2379
|
+
var mcpArcusFetchAccountOutputSchema = zod.z.object({
|
|
2380
|
+
account: jsonObjectSchema,
|
|
2381
|
+
executorAddress: evmAddressSchema
|
|
2382
|
+
});
|
|
2383
|
+
var mcpArcusFetchPositionsInputSchema = mcpArcusFetchAccountInputSchema;
|
|
2384
|
+
var mcpArcusFetchPositionsOutputSchema = zod.z.object({
|
|
2385
|
+
positions: zod.z.array(jsonObjectSchema),
|
|
2386
|
+
executorAddress: evmAddressSchema
|
|
2387
|
+
});
|
|
2388
|
+
var mcpArcusFetchOpenOrdersInputSchema = mcpArcusFetchAccountInputSchema;
|
|
2389
|
+
var mcpArcusFetchOpenOrdersOutputSchema = zod.z.object({
|
|
2390
|
+
orders: zod.z.array(jsonObjectSchema),
|
|
2391
|
+
executorAddress: evmAddressSchema
|
|
2392
|
+
});
|
|
2393
|
+
var mcpArcusFetchOpenContextInputSchema = mcpArcusFetchAccountInputSchema.extend({
|
|
2394
|
+
market: zod.z.string().optional().describe("Perp market display name (e.g. BTC-USD) to include activeAsset leverage context.")
|
|
2395
|
+
});
|
|
2396
|
+
var mcpArcusFetchOpenContextOutputSchema = zod.z.object({
|
|
2397
|
+
account: jsonObjectSchema.nullable(),
|
|
2398
|
+
positions: zod.z.array(jsonObjectSchema),
|
|
2399
|
+
orders: zod.z.array(jsonObjectSchema),
|
|
2400
|
+
apiKeys: zod.z.array(jsonObjectSchema),
|
|
2401
|
+
leverages: zod.z.array(
|
|
2402
|
+
zod.z.object({
|
|
2403
|
+
marketId: zod.z.number(),
|
|
2404
|
+
marketDisplayName: zod.z.string(),
|
|
2405
|
+
leverage: zod.z.number()
|
|
2406
|
+
})
|
|
2407
|
+
).optional(),
|
|
2408
|
+
activeAsset: zod.z.object({
|
|
2409
|
+
market: zod.z.string(),
|
|
2410
|
+
leverage: zod.z.number().nullable(),
|
|
2411
|
+
leverageLabel: zod.z.string().nullable(),
|
|
2412
|
+
maxLeverage: zod.z.number().nullable(),
|
|
2413
|
+
markPrice: zod.z.string().nullable()
|
|
2414
|
+
}).nullable().optional(),
|
|
2415
|
+
executorAddress: evmAddressSchema,
|
|
2416
|
+
hasRegisteredApiKey: zod.z.boolean()
|
|
2417
|
+
});
|
|
2418
|
+
var mcpArcusSpotFetchBalancesInputSchema = mcpArcusFetchAccountInputSchema;
|
|
2419
|
+
var mcpArcusSpotFetchBalancesOutputSchema = zod.z.object({
|
|
2420
|
+
balances: zod.z.array(
|
|
2421
|
+
zod.z.object({
|
|
2422
|
+
ticker: zod.z.string(),
|
|
2423
|
+
contractAddress: zod.z.string(),
|
|
2424
|
+
balanceHuman: zod.z.string(),
|
|
2425
|
+
balanceRaw: zod.z.string()
|
|
2426
|
+
})
|
|
2427
|
+
),
|
|
2428
|
+
executorAddress: evmAddressSchema
|
|
2429
|
+
});
|
|
2430
|
+
var mcpArcusBuildCreateApiKeyMultisignInputSchema = mcpArcusMultisignInput({
|
|
2431
|
+
ed25519PubKeyHex: zod.z.string().min(64).max(66).describe("Ed25519 public key (64 hex) from paired ed25519 KeyGen."),
|
|
2432
|
+
apiWalletName: zod.z.string().optional()
|
|
2433
|
+
});
|
|
2434
|
+
var mcpArcusBuildPlaceOrderMultisignInputSchema = mcpArcusMultisignInput({
|
|
2435
|
+
market: zod.z.string().min(1),
|
|
2436
|
+
isBuy: agentBooleanSchema(),
|
|
2437
|
+
limitPxHuman: zod.z.string().min(1),
|
|
2438
|
+
szHuman: zod.z.string().min(1),
|
|
2439
|
+
takeProfitTriggerPxHuman: zod.z.string().optional(),
|
|
2440
|
+
stopLossTriggerPxHuman: zod.z.string().optional(),
|
|
2441
|
+
leverageHuman: zod.z.string().optional().describe("Effective leverage label for purpose/audit (e.g. 10x). Fetch from open_context.activeAsset."),
|
|
2442
|
+
timeInForce: zod.z.coerce.number().int().min(0).max(3).optional().describe("Wire t: 0 GTT (default), 1 FOK, 2 IOC, 3 ALO."),
|
|
2443
|
+
clientId: zod.z.string().optional()
|
|
2444
|
+
});
|
|
2445
|
+
var mcpArcusBuildCloseMultisignInputSchema = mcpArcusMultisignInput({
|
|
2446
|
+
market: zod.z.string().min(1),
|
|
2447
|
+
isLong: agentBooleanSchema().describe("true when closing a long position (submits sell reduce-only IoC)."),
|
|
2448
|
+
limitPxHuman: zod.z.string().min(1),
|
|
2449
|
+
szHuman: zod.z.string().min(1),
|
|
2450
|
+
timeInForce: zod.z.coerce.number().int().min(0).max(3).optional().describe("Default 2 (IOC) for closes.")
|
|
2451
|
+
});
|
|
2452
|
+
var mcpArcusBuildCancelOrderMultisignInputSchema = mcpArcusMultisignInput({
|
|
2453
|
+
market: zod.z.string().min(1),
|
|
2454
|
+
orderId: zod.z.string().min(1)
|
|
2455
|
+
});
|
|
2456
|
+
var mcpArcusBuildSetLeverageMultisignInputSchema = mcpArcusMultisignInput({
|
|
2457
|
+
market: zod.z.string().min(1),
|
|
2458
|
+
leverage: zod.z.coerce.number().int().positive().max(100)
|
|
2459
|
+
});
|
|
2460
|
+
var mcpArcusSpotBuildRfqMultisignInputSchema = mcpArcusMultisignInput({
|
|
2461
|
+
ticker: zod.z.string().min(1),
|
|
2462
|
+
isBuy: agentBooleanSchema(),
|
|
2463
|
+
sizeHuman: zod.z.string().min(1),
|
|
2464
|
+
limitPxHuman: zod.z.string().optional()
|
|
2465
|
+
});
|
|
2466
|
+
var arcusFundProductSchema = zod.z.enum(["perp", "spot"]).default("perp").describe("perp = accountIndex 0; spot = accountIndex 1 (USDG Spot bucket).");
|
|
2467
|
+
var mcpArcusBuildDepositMultisignInputSchema = withMultisignKeySourceRefine(
|
|
2468
|
+
evmMultisignCommonInputSchema.extend({
|
|
2469
|
+
usdHuman: zod.z.string().min(1).describe("USD amount of USDG to deposit on chain 4663."),
|
|
2470
|
+
product: arcusFundProductSchema
|
|
2471
|
+
})
|
|
2472
|
+
);
|
|
2473
|
+
var mcpArcusBuildWithdrawMultisignInputSchema = withMultisignKeySourceRefine(
|
|
2474
|
+
evmMultisignCommonInputSchema.extend({
|
|
2475
|
+
usdHuman: zod.z.string().min(1).describe("USD amount to withdraw (min $1)."),
|
|
2476
|
+
product: arcusFundProductSchema
|
|
2477
|
+
})
|
|
2478
|
+
);
|
|
2168
2479
|
var mcpCctpFeeFieldsSchema = zod.z.object({
|
|
2169
2480
|
feeTierUsed: zod.z.enum(["low", "med", "high"]),
|
|
2170
2481
|
maxFee: zod.z.string().describe("Selected tier max fee in USDC base units (6 decimals)"),
|
|
@@ -2616,8 +2927,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2616
2927
|
actionId: "gmx.increase",
|
|
2617
2928
|
protocolId: "gmx",
|
|
2618
2929
|
chainCategory: "evm",
|
|
2619
|
-
description: "Create and submit mpc-auth multiSignRequest for GMX classic increase order (open/add perp). Keeper executes asynchronously after
|
|
2620
|
-
prerequisites: ["
|
|
2930
|
+
description: "Create and submit mpc-auth multiSignRequest for GMX classic increase order (open/add perp). Optional takeProfitPriceUsdHuman / stopLossPriceUsdHuman attach native on-chain TP/SL decrease orders (full size). On-chain EVM \u2014 useCustomGas applies (not EIP-712). Keeper executes asynchronously after broadcast.",
|
|
2931
|
+
prerequisites: ["keyGenId", "chainId", "purposeText", "GMX market symbol", "classic mode only \u2014 no subaccounts"],
|
|
2621
2932
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxIncreaseBatch" },
|
|
2622
2933
|
inputZod: mcpGmxIncreaseInputSchema
|
|
2623
2934
|
}),
|
|
@@ -2686,8 +2997,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2686
2997
|
actionId: "hyperliquid.limitOrder",
|
|
2687
2998
|
protocolId: "hyperliquid",
|
|
2688
2999
|
chainCategory: "evm",
|
|
2689
|
-
description: "Create and submit mpc-auth multiSignRequest for a Hyperliquid limit/IoC order
|
|
2690
|
-
prerequisites: ["
|
|
3000
|
+
description: "Create and submit mpc-auth multiSignRequest for a Hyperliquid limit/IoC order. Plain limit: CoreWriter (useCustomGas). When takeProfitTriggerPxHuman and/or stopLossTriggerPxHuman are set: one L1 EIP-712 normalTpsl bracket (entry + TP/SL) to /exchange \u2014 no useCustomGas.",
|
|
3001
|
+
prerequisites: ["keyGenId", "chainId 999 or 998", "coin", "limitPxHuman", "szHuman"],
|
|
2691
3002
|
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidLimitOrderBatch" },
|
|
2692
3003
|
inputZod: mcpHyperliquidLimitOrderInputSchema
|
|
2693
3004
|
}),
|
|
@@ -2742,8 +3053,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2742
3053
|
actionId: "hyperliquid.bridgeWithdraw",
|
|
2743
3054
|
protocolId: "hyperliquid",
|
|
2744
3055
|
chainCategory: "evm",
|
|
2745
|
-
description: "Create and submit mpc-auth multiSignRequest to withdraw USDC from Hyperliquid to Arbitrum via withdraw3 (EIP-712, delivered to /exchange). chainId 999 or 998. ~1 USDC bridge fee on Hyperliquid.",
|
|
2746
|
-
prerequisites: ["
|
|
3056
|
+
description: "Create and submit mpc-auth multiSignRequest to withdraw USDC from Hyperliquid to Arbitrum via withdraw3 (EIP-712, delivered to /exchange). chainId 999 or 998. No useCustomGas. ~1 USDC bridge fee on Hyperliquid.",
|
|
3057
|
+
prerequisites: ["keyGenId", "chainId 999 or 998", "usdHuman", "Hyperliquid withdrawable balance"],
|
|
2747
3058
|
handler: {
|
|
2748
3059
|
importPath: "protocols/evm/hyperliquid",
|
|
2749
3060
|
exportName: "buildHyperliquidBridgeWithdrawMultisign"
|
|
@@ -2815,7 +3126,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2815
3126
|
actionId: "hyperliquid.updateLeverage",
|
|
2816
3127
|
protocolId: "hyperliquid",
|
|
2817
3128
|
chainCategory: "evm",
|
|
2818
|
-
description: "Set per-market leverage (cross or isolated) on Hyperliquid via L1 /exchange EIP-712 signing \u2014 not CoreWriter
|
|
3129
|
+
description: "Set per-market leverage (cross or isolated) on Hyperliquid via L1 /exchange EIP-712 signing \u2014 not CoreWriter. No useCustomGas. trigger_sign_result without txParams; broadcast_sign_result POSTs to /exchange.",
|
|
2819
3130
|
prerequisites: [
|
|
2820
3131
|
"keyGenId",
|
|
2821
3132
|
"chainId 999 or 998",
|
|
@@ -2831,6 +3142,101 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2831
3142
|
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildHyperliquidUpdateLeverageMultisign" },
|
|
2832
3143
|
inputZod: mcpHyperliquidUpdateLeverageInputSchema
|
|
2833
3144
|
}),
|
|
3145
|
+
defineProtocolMcpTool({
|
|
3146
|
+
name: "ctm_arcus_build_create_api_key_multisign",
|
|
3147
|
+
actionId: "arcus.createApiKey",
|
|
3148
|
+
protocolId: "arcus",
|
|
3149
|
+
chainCategory: "evm",
|
|
3150
|
+
description: "Register Arcus Ed25519 API key. Requires paired KeyGens (same GroupId): secp256k1KeyGenId for personal_sign + ed25519KeyGenId pubkey. No useCustomGas.",
|
|
3151
|
+
prerequisites: ["secp256k1KeyGenId", "ed25519KeyGenId (same GroupId)", "ed25519PubKeyHex from ed25519 KeyGen"],
|
|
3152
|
+
followUp: ["sign_request_agree", "trigger_sign_result", "broadcast_sign_result"],
|
|
3153
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "buildEvmMultisignBodyArcusCreateApiKeyBatch" },
|
|
3154
|
+
inputZod: mcpArcusBuildCreateApiKeyMultisignInputSchema
|
|
3155
|
+
}),
|
|
3156
|
+
defineProtocolMcpTool({
|
|
3157
|
+
name: "ctm_arcus_build_place_order_multisign",
|
|
3158
|
+
actionId: "arcus.placeOrder",
|
|
3159
|
+
protocolId: "arcus",
|
|
3160
|
+
chainCategory: "evm",
|
|
3161
|
+
description: "Arcus perp limit order with optional TP/SL bracket (Ed25519 payload sign). Uses account leverage already set on Arcus (see fetch_open_context.activeAsset). ed25519KeyGenId signs; secp256k1KeyGenId bills globalNonce.",
|
|
3162
|
+
prerequisites: ["secp256k1KeyGenId", "ed25519KeyGenId", "registered API key", "market from fetch_markets", "leverage from fetch_open_context"],
|
|
3163
|
+
followUp: ["sign_request_agree", "trigger_sign_result", "broadcast_sign_result"],
|
|
3164
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "buildEvmMultisignBodyArcusPlaceOrderBatch" },
|
|
3165
|
+
inputZod: mcpArcusBuildPlaceOrderMultisignInputSchema
|
|
3166
|
+
}),
|
|
3167
|
+
defineProtocolMcpTool({
|
|
3168
|
+
name: "ctm_arcus_build_close_multisign",
|
|
3169
|
+
actionId: "arcus.close",
|
|
3170
|
+
protocolId: "arcus",
|
|
3171
|
+
chainCategory: "evm",
|
|
3172
|
+
description: "Close Arcus perp position with IoC reduce-only limit (Ed25519 payload sign). Inverts side from isLong. Fetch positions via fetch_open_context.",
|
|
3173
|
+
prerequisites: ["secp256k1KeyGenId", "ed25519KeyGenId", "market", "isLong from fetch_positions", "limitPxHuman", "szHuman"],
|
|
3174
|
+
followUp: ["sign_request_agree", "trigger_sign_result", "broadcast_sign_result"],
|
|
3175
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "buildEvmMultisignBodyArcusCloseBatch" },
|
|
3176
|
+
inputZod: mcpArcusBuildCloseMultisignInputSchema
|
|
3177
|
+
}),
|
|
3178
|
+
defineProtocolMcpTool({
|
|
3179
|
+
name: "ctm_arcus_build_cancel_order_multisign",
|
|
3180
|
+
actionId: "arcus.cancelOrder",
|
|
3181
|
+
protocolId: "arcus",
|
|
3182
|
+
chainCategory: "evm",
|
|
3183
|
+
description: "Cancel Arcus perp order (Ed25519 payload sign).",
|
|
3184
|
+
prerequisites: ["secp256k1KeyGenId", "ed25519KeyGenId", "orderId from fetch_open_orders"],
|
|
3185
|
+
followUp: ["sign_request_agree", "trigger_sign_result", "broadcast_sign_result"],
|
|
3186
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "buildEvmMultisignBodyArcusCancelOrderBatch" },
|
|
3187
|
+
inputZod: mcpArcusBuildCancelOrderMultisignInputSchema
|
|
3188
|
+
}),
|
|
3189
|
+
defineProtocolMcpTool({
|
|
3190
|
+
name: "ctm_arcus_build_set_leverage_multisign",
|
|
3191
|
+
actionId: "arcus.setLeverage",
|
|
3192
|
+
protocolId: "arcus",
|
|
3193
|
+
chainCategory: "evm",
|
|
3194
|
+
description: "Set Arcus perp leverage for a market (Scheme 2 Ed25519 \u2192 POST /v1/setLeverage). Call before place_order when leverage must change. Max leverage = floor(1 / initialMarginFraction) from fetch_markets.",
|
|
3195
|
+
prerequisites: ["secp256k1KeyGenId", "ed25519KeyGenId", "market", "leverage", "ctm_arcus_fetch_open_context for current leverage"],
|
|
3196
|
+
followUp: ["sign_request_agree", "trigger_sign_result", "broadcast_sign_result"],
|
|
3197
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "buildEvmMultisignBodyArcusSetLeverageBatch" },
|
|
3198
|
+
inputZod: mcpArcusBuildSetLeverageMultisignInputSchema
|
|
3199
|
+
}),
|
|
3200
|
+
defineProtocolMcpTool({
|
|
3201
|
+
name: "ctm_arcus_spot_build_rfq_multisign",
|
|
3202
|
+
actionId: "arcus.spotRfq",
|
|
3203
|
+
protocolId: "arcus",
|
|
3204
|
+
chainCategory: "evm",
|
|
3205
|
+
description: "Arcus spot Stock Token RFQ buy/sell. Post-fill: offer Add ERC20 with tokenContractAddress from delivery.",
|
|
3206
|
+
prerequisites: ["secp256k1KeyGenId", "ed25519KeyGenId", "ticker from spot_fetch_markets"],
|
|
3207
|
+
followUp: ["sign_request_agree", "trigger_sign_result", "broadcast_sign_result"],
|
|
3208
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "buildEvmMultisignBodyArcusSpotRfqBatch" },
|
|
3209
|
+
inputZod: mcpArcusSpotBuildRfqMultisignInputSchema
|
|
3210
|
+
}),
|
|
3211
|
+
defineProtocolMcpTool({
|
|
3212
|
+
name: "ctm_arcus_build_deposit_multisign",
|
|
3213
|
+
actionId: "arcus.deposit",
|
|
3214
|
+
protocolId: "arcus",
|
|
3215
|
+
chainCategory: "evm",
|
|
3216
|
+
description: "Deposit USDG on Robinhood Chain (4663) into Arcus collateral via approve + initiateDeposit. product=perp (accountIndex 0) or spot (accountIndex 1). Requires registered API key (createApiKey first). After broadcast, call ctm_arcus_fetch_account to confirm \u2014 no polling loop.",
|
|
3217
|
+
prerequisites: [
|
|
3218
|
+
"keyGenId",
|
|
3219
|
+
"chainId 4663",
|
|
3220
|
+
"executorAddress",
|
|
3221
|
+
"hasRegisteredApiKey from fetch_open_context",
|
|
3222
|
+
"USDG wallet balance on 4663",
|
|
3223
|
+
"usdHuman"
|
|
3224
|
+
],
|
|
3225
|
+
followUp: ["sign_request_agree", "trigger_sign_result", "broadcast_sign_result", "ctm_arcus_fetch_account"],
|
|
3226
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "buildEvmMultisignBodyArcusDepositBatch" },
|
|
3227
|
+
inputZod: mcpArcusBuildDepositMultisignInputSchema
|
|
3228
|
+
}),
|
|
3229
|
+
defineProtocolMcpTool({
|
|
3230
|
+
name: "ctm_arcus_build_withdraw_multisign",
|
|
3231
|
+
actionId: "arcus.withdraw",
|
|
3232
|
+
protocolId: "arcus",
|
|
3233
|
+
chainCategory: "evm",
|
|
3234
|
+
description: "Withdraw USDG collateral from Arcus to the signing wallet (EIP-712 + POST /v1/withdraw). product=perp or spot. Min $1. Async \u2014 refresh with ctm_arcus_fetch_account after broadcast.",
|
|
3235
|
+
prerequisites: ["keyGenId", "chainId 4663", "freeCollateral or spot balance", "usdHuman"],
|
|
3236
|
+
followUp: ["sign_request_agree", "trigger_sign_result", "broadcast_sign_result", "ctm_arcus_fetch_account"],
|
|
3237
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "buildArcusWithdrawMultisignBody" },
|
|
3238
|
+
inputZod: mcpArcusBuildWithdrawMultisignInputSchema
|
|
3239
|
+
}),
|
|
2834
3240
|
defineProtocolMcpTool({
|
|
2835
3241
|
name: "ctm_cctp_build_burn_multisign",
|
|
2836
3242
|
actionId: "circle-cctp.burn-forward",
|
|
@@ -2921,6 +3327,52 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
2921
3327
|
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "buildEvmMultisignBodyUniswapV4SkipPermit2Batch" },
|
|
2922
3328
|
inputZod: mcpUniswapV4BuildSwapMultisignInputSchema
|
|
2923
3329
|
}),
|
|
3330
|
+
defineMcpTool({
|
|
3331
|
+
name: "ctm_uniswap_v4_limit_order_quote",
|
|
3332
|
+
actionId: "uniswap-v4.limit-order-quote",
|
|
3333
|
+
protocolId: "uniswap-v4",
|
|
3334
|
+
chainCategory: "evm",
|
|
3335
|
+
description: "Fetch a UniswapX limit order quote (POST /v1/limit_order_quote). Ethereum mainnet (chainId 1) only. Returns quote + permitData for EIP-712 signing. Does NOT create a sign request \u2014 call ctm_uniswap_v4_build_limit_order_multisign next with this exact JSON as fullLimitQuote (re-quote if limitPrice or orderDeadline changes).",
|
|
3336
|
+
prerequisites: [
|
|
3337
|
+
"UNISWAP_API_KEY in node Variables",
|
|
3338
|
+
"chainId must be 1",
|
|
3339
|
+
"keyGenId or swapper (server resolves swapper from keyGenId)",
|
|
3340
|
+
"limitPrice, orderDeadline, amount, tokenIn, tokenOut"
|
|
3341
|
+
],
|
|
3342
|
+
followUp: ["ctm_uniswap_v4_build_limit_order_multisign", "ctm_uniswap_v4_fetch_limit_orders"],
|
|
3343
|
+
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapLimitOrderQuote" },
|
|
3344
|
+
inputZod: mcpUniswapV4LimitOrderQuoteInputSchema,
|
|
3345
|
+
outputZod: mcpUniswapV4LimitOrderQuoteOutputSchema
|
|
3346
|
+
}),
|
|
3347
|
+
defineMultisignSubmitMcpTool({
|
|
3348
|
+
name: "ctm_uniswap_v4_build_limit_order_multisign",
|
|
3349
|
+
actionId: "uniswap-v4.limit-order",
|
|
3350
|
+
protocolId: "uniswap-v4",
|
|
3351
|
+
chainCategory: "evm",
|
|
3352
|
+
description: "Create and submit mpc-auth multiSignRequest for a UniswapX limit order (EIP-712 Permit2 witness). After sign + execute, delivery POSTs to Trade API /v1/order. Mainnet only. EIP-712 only \u2014 useCustomGas is ignored.",
|
|
3353
|
+
prerequisites: [
|
|
3354
|
+
"Fresh ctm_uniswap_v4_limit_order_quote output (fullLimitQuote) \u2014 re-quote when limitPrice or orderDeadline changes",
|
|
3355
|
+
"keyGenId + chainId 1 + purposeText"
|
|
3356
|
+
],
|
|
3357
|
+
followUp: ["ctm_uniswap_v4_fetch_limit_orders"],
|
|
3358
|
+
handler: {
|
|
3359
|
+
importPath: "protocols/evm/uniswap-v4",
|
|
3360
|
+
exportName: "buildEvmMultisignBodyUniswapV4LimitOrderBatchFromMcp"
|
|
3361
|
+
},
|
|
3362
|
+
inputZod: mcpUniswapV4BuildLimitOrderMultisignInputSchema
|
|
3363
|
+
}),
|
|
3364
|
+
defineMcpTool({
|
|
3365
|
+
name: "ctm_uniswap_v4_fetch_limit_orders",
|
|
3366
|
+
actionId: "uniswap-v4.fetch-limit-orders",
|
|
3367
|
+
protocolId: "uniswap-v4",
|
|
3368
|
+
chainCategory: "evm",
|
|
3369
|
+
description: "List open UniswapX limit orders for a swapper (GET /v2/limit-orders). Ethereum mainnet only. Optional UNISWAP_API_KEY.",
|
|
3370
|
+
prerequisites: ["swapper or keyGenId", "chainId 1"],
|
|
3371
|
+
followUp: [],
|
|
3372
|
+
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapFetchLimitOrdersMcp" },
|
|
3373
|
+
inputZod: mcpUniswapV4FetchLimitOrdersInputSchema,
|
|
3374
|
+
outputZod: mcpUniswapV4FetchLimitOrdersOutputSchema
|
|
3375
|
+
}),
|
|
2924
3376
|
defineMcpTool({
|
|
2925
3377
|
name: "ctm_uniswap_v4_list_lp_pools",
|
|
2926
3378
|
actionId: "uniswap-v4.lp-list-pools",
|
|
@@ -2938,10 +3390,10 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
2938
3390
|
actionId: "uniswap-v4.fetch-ohlcv",
|
|
2939
3391
|
protocolId: "uniswap-v4",
|
|
2940
3392
|
chainCategory: "evm",
|
|
2941
|
-
description: "Pool OHLCV
|
|
3393
|
+
description: "Pool OHLCV: The Graph subgraph on pinned chains (1h/1d native, aggregated multiples, swap bucketing for sub-hour). Robinhood Chain (4663) uses Bitquery Uniswap v4 / Stock Token candles \u2014 set BITQUERY_API_KEY. Optional THE_GRAPH_API_KEY for subgraph gateway rate limits.",
|
|
2942
3394
|
prerequisites: [
|
|
2943
|
-
"chainId with
|
|
2944
|
-
"poolPreset or poolReference or existingPool",
|
|
3395
|
+
"chainId with OHLCV support (subgraph or Robinhood/Bitquery)",
|
|
3396
|
+
"poolPreset or poolReference or existingPool (subgraph); currencyAddress or currencySymbol or existingPool (Robinhood)",
|
|
2945
3397
|
"interval + lookbackDays or lookbackHours or startTimeMs"
|
|
2946
3398
|
],
|
|
2947
3399
|
followUp: ["ctm_uniswap_v4_list_lp_pools", "continuum__prepare_chart_from_rows"],
|
|
@@ -3372,6 +3824,158 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
3372
3824
|
inputZod: mcpHyperliquidFetchDelegationsInputSchema,
|
|
3373
3825
|
outputZod: mcpHyperliquidFetchDelegationsOutputSchema
|
|
3374
3826
|
}),
|
|
3827
|
+
defineMcpTool({
|
|
3828
|
+
name: "ctm_arcus_fetch_markets",
|
|
3829
|
+
actionId: "arcus.fetch-markets",
|
|
3830
|
+
protocolId: "arcus",
|
|
3831
|
+
chainCategory: "evm",
|
|
3832
|
+
description: "List Arcus perp markets on Robinhood Chain (4663). Crypto, equities, commodities.",
|
|
3833
|
+
prerequisites: ["chainId 4663"],
|
|
3834
|
+
followUp: ["ctm_arcus_fetch_open_context", "ctm_arcus_fetch_ohlcv", "ctm_arcus_build_place_order_multisign"],
|
|
3835
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusFetchMarketsSummary" },
|
|
3836
|
+
inputZod: mcpArcusFetchMarketsInputSchema,
|
|
3837
|
+
outputZod: mcpArcusFetchMarketsOutputSchema
|
|
3838
|
+
}),
|
|
3839
|
+
defineMcpTool({
|
|
3840
|
+
name: "ctm_arcus_search_markets",
|
|
3841
|
+
actionId: "arcus.search-markets",
|
|
3842
|
+
protocolId: "arcus",
|
|
3843
|
+
chainCategory: "evm",
|
|
3844
|
+
description: "Search Arcus perp markets by ticker or name.",
|
|
3845
|
+
prerequisites: ["chainId 4663", "query"],
|
|
3846
|
+
followUp: ["ctm_arcus_fetch_ohlcv", "ctm_arcus_build_place_order_multisign"],
|
|
3847
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusSearchMarketsSummary" },
|
|
3848
|
+
inputZod: mcpArcusSearchMarketsInputSchema,
|
|
3849
|
+
outputZod: mcpArcusSearchMarketsOutputSchema
|
|
3850
|
+
}),
|
|
3851
|
+
defineMcpTool({
|
|
3852
|
+
name: "ctm_arcus_fetch_ohlcv",
|
|
3853
|
+
actionId: "arcus.fetch-ohlcv",
|
|
3854
|
+
protocolId: "arcus",
|
|
3855
|
+
chainCategory: "evm",
|
|
3856
|
+
description: "OHLCV for Arcus perps (api.arcus.xyz). Returns HL-shaped { ohlcv: { market, interval, candles } } for chart/analysis binding. Use for perp charts only \u2014 spot uses ctm_arcus_spot_fetch_ohlcv.",
|
|
3857
|
+
prerequisites: ["chainId 4663", "market or coin"],
|
|
3858
|
+
followUp: ["ctm_arcus_fetch_market_snapshot", "continuum__prepare_chart_from_rows", "ctm_arcus_build_place_order_multisign"],
|
|
3859
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusFetchOhlcvSummary" },
|
|
3860
|
+
inputZod: mcpArcusFetchOhlcvInputSchema,
|
|
3861
|
+
outputZod: mcpArcusFetchOhlcvOutputSchema
|
|
3862
|
+
}),
|
|
3863
|
+
defineMcpTool({
|
|
3864
|
+
name: "ctm_arcus_spot_fetch_markets",
|
|
3865
|
+
actionId: "arcus.spot-fetch-markets",
|
|
3866
|
+
protocolId: "arcus",
|
|
3867
|
+
chainCategory: "evm",
|
|
3868
|
+
description: "Arcus spot Stock Token catalog (ticker, contract address, logo).",
|
|
3869
|
+
prerequisites: ["chainId 4663"],
|
|
3870
|
+
followUp: ["ctm_arcus_spot_fetch_ohlcv", "ctm_arcus_spot_fetch_balances", "ctm_arcus_spot_build_rfq_multisign"],
|
|
3871
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusSpotFetchMarketsSummary" },
|
|
3872
|
+
inputZod: mcpArcusSpotFetchMarketsInputSchema,
|
|
3873
|
+
outputZod: mcpArcusSpotFetchMarketsOutputSchema
|
|
3874
|
+
}),
|
|
3875
|
+
defineMcpTool({
|
|
3876
|
+
name: "ctm_arcus_spot_search_markets",
|
|
3877
|
+
actionId: "arcus.spot-search-markets",
|
|
3878
|
+
protocolId: "arcus",
|
|
3879
|
+
chainCategory: "evm",
|
|
3880
|
+
description: "Search Arcus spot Stock Tokens.",
|
|
3881
|
+
prerequisites: ["chainId 4663", "query"],
|
|
3882
|
+
followUp: ["ctm_arcus_spot_fetch_ohlcv", "ctm_arcus_spot_build_rfq_multisign"],
|
|
3883
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusSpotSearchMarketsSummary" },
|
|
3884
|
+
inputZod: mcpArcusSearchMarketsInputSchema,
|
|
3885
|
+
outputZod: mcpArcusSpotFetchMarketsOutputSchema
|
|
3886
|
+
}),
|
|
3887
|
+
defineMcpTool({
|
|
3888
|
+
name: "ctm_arcus_spot_fetch_ohlcv",
|
|
3889
|
+
actionId: "arcus.spot-fetch-ohlcv",
|
|
3890
|
+
protocolId: "arcus",
|
|
3891
|
+
chainCategory: "evm",
|
|
3892
|
+
description: "OHLCV for Arcus spot Stock Tokens (indexer.spot.arcus.xyz). Use for spot charts \u2014 not perp ctm_arcus_fetch_ohlcv.",
|
|
3893
|
+
prerequisites: ["chainId 4663", "ticker or tokenAddress"],
|
|
3894
|
+
followUp: ["continuum__prepare_chart_from_rows", "ctm_arcus_spot_build_rfq_multisign"],
|
|
3895
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusSpotFetchOhlcvSummary" },
|
|
3896
|
+
inputZod: mcpArcusSpotFetchOhlcvInputSchema,
|
|
3897
|
+
outputZod: mcpArcusSpotFetchOhlcvOutputSchema
|
|
3898
|
+
}),
|
|
3899
|
+
defineMcpTool({
|
|
3900
|
+
name: "ctm_arcus_fetch_market_snapshot",
|
|
3901
|
+
actionId: "arcus.fetch-market-snapshot",
|
|
3902
|
+
protocolId: "arcus",
|
|
3903
|
+
chainCategory: "evm",
|
|
3904
|
+
description: "Live mid price plus recent perp OHLCV candles.",
|
|
3905
|
+
prerequisites: ["chainId 4663", "market or coin"],
|
|
3906
|
+
followUp: ["ctm_arcus_fetch_open_context", "ctm_arcus_build_place_order_multisign"],
|
|
3907
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusFetchMarketSnapshotSummary" },
|
|
3908
|
+
inputZod: mcpArcusFetchMarketSnapshotInputSchema,
|
|
3909
|
+
outputZod: mcpArcusFetchMarketSnapshotOutputSchema
|
|
3910
|
+
}),
|
|
3911
|
+
defineMcpTool({
|
|
3912
|
+
name: "ctm_arcus_fetch_account",
|
|
3913
|
+
actionId: "arcus.fetch-account",
|
|
3914
|
+
protocolId: "arcus",
|
|
3915
|
+
chainCategory: "evm",
|
|
3916
|
+
description: "Arcus perp account summary (equity, collateral).",
|
|
3917
|
+
prerequisites: ["chainId 4663", "executorAddress"],
|
|
3918
|
+
followUp: ["ctm_arcus_build_create_api_key_multisign", "ctm_arcus_build_deposit_multisign", "ctm_arcus_build_withdraw_multisign"],
|
|
3919
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusFetchAccountSummary" },
|
|
3920
|
+
inputZod: mcpArcusFetchAccountInputSchema,
|
|
3921
|
+
outputZod: mcpArcusFetchAccountOutputSchema
|
|
3922
|
+
}),
|
|
3923
|
+
defineMcpTool({
|
|
3924
|
+
name: "ctm_arcus_fetch_positions",
|
|
3925
|
+
actionId: "arcus.fetch-positions",
|
|
3926
|
+
protocolId: "arcus",
|
|
3927
|
+
chainCategory: "evm",
|
|
3928
|
+
description: "Open Arcus perp positions.",
|
|
3929
|
+
prerequisites: ["chainId 4663", "executorAddress"],
|
|
3930
|
+
followUp: ["ctm_arcus_build_place_order_multisign", "ctm_arcus_build_close_multisign"],
|
|
3931
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusFetchPositionsSummary" },
|
|
3932
|
+
inputZod: mcpArcusFetchPositionsInputSchema,
|
|
3933
|
+
outputZod: mcpArcusFetchPositionsOutputSchema
|
|
3934
|
+
}),
|
|
3935
|
+
defineMcpTool({
|
|
3936
|
+
name: "ctm_arcus_fetch_open_orders",
|
|
3937
|
+
actionId: "arcus.fetch-open-orders",
|
|
3938
|
+
protocolId: "arcus",
|
|
3939
|
+
chainCategory: "evm",
|
|
3940
|
+
description: "Pending Arcus perp orders.",
|
|
3941
|
+
prerequisites: ["chainId 4663", "executorAddress"],
|
|
3942
|
+
followUp: ["ctm_arcus_build_cancel_order_multisign"],
|
|
3943
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusFetchOpenOrdersSummary" },
|
|
3944
|
+
inputZod: mcpArcusFetchOpenOrdersInputSchema,
|
|
3945
|
+
outputZod: mcpArcusFetchOpenOrdersOutputSchema
|
|
3946
|
+
}),
|
|
3947
|
+
defineMcpTool({
|
|
3948
|
+
name: "ctm_arcus_fetch_open_context",
|
|
3949
|
+
actionId: "arcus.fetch-open-context",
|
|
3950
|
+
protocolId: "arcus",
|
|
3951
|
+
chainCategory: "evm",
|
|
3952
|
+
description: "Account, positions, orders, API keys, per-market leverages, and optional activeAsset leverage for a market.",
|
|
3953
|
+
prerequisites: ["chainId 4663", "executorAddress"],
|
|
3954
|
+
followUp: [
|
|
3955
|
+
"ctm_arcus_build_create_api_key_multisign",
|
|
3956
|
+
"ctm_arcus_build_set_leverage_multisign",
|
|
3957
|
+
"ctm_arcus_build_place_order_multisign",
|
|
3958
|
+
"ctm_arcus_build_close_multisign",
|
|
3959
|
+
"ctm_arcus_build_cancel_order_multisign",
|
|
3960
|
+
"ctm_arcus_build_deposit_multisign",
|
|
3961
|
+
"ctm_arcus_build_withdraw_multisign"
|
|
3962
|
+
],
|
|
3963
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusFetchOpenContextSummary" },
|
|
3964
|
+
inputZod: mcpArcusFetchOpenContextInputSchema,
|
|
3965
|
+
outputZod: mcpArcusFetchOpenContextOutputSchema
|
|
3966
|
+
}),
|
|
3967
|
+
defineMcpTool({
|
|
3968
|
+
name: "ctm_arcus_spot_fetch_balances",
|
|
3969
|
+
actionId: "arcus.spot-fetch-balances",
|
|
3970
|
+
protocolId: "arcus",
|
|
3971
|
+
chainCategory: "evm",
|
|
3972
|
+
description: "On-chain Stock Token ERC20 balances for executor on 4663.",
|
|
3973
|
+
prerequisites: ["chainId 4663", "executorAddress"],
|
|
3974
|
+
followUp: ["ctm_arcus_spot_build_rfq_multisign", "ctm_arcus_build_deposit_multisign", "ctm_arcus_build_withdraw_multisign"],
|
|
3975
|
+
handler: { importPath: "protocols/evm/arcus", exportName: "arcusSpotFetchBalancesSummary" },
|
|
3976
|
+
inputZod: mcpArcusSpotFetchBalancesInputSchema,
|
|
3977
|
+
outputZod: mcpArcusSpotFetchBalancesOutputSchema
|
|
3978
|
+
}),
|
|
3375
3979
|
defineMcpTool({
|
|
3376
3980
|
name: "ctm_morpho_fetch_blue_markets",
|
|
3377
3981
|
actionId: "morpho.fetch-blue-markets",
|
|
@@ -4102,7 +4706,7 @@ var hyperliquidProtocolModule = {
|
|
|
4102
4706
|
id: "hyperliquid.limitOrder",
|
|
4103
4707
|
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
4104
4708
|
chainCategory: "evm",
|
|
4105
|
-
description: "Place a Hyperliquid limit/IoC order via
|
|
4709
|
+
description: "Place a Hyperliquid limit/IoC order via CoreWriter, or L1 normalTpsl bracket when TP/SL triggers are set",
|
|
4106
4710
|
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
4107
4711
|
params: {
|
|
4108
4712
|
coin: { type: "string", required: true, description: "Market coin e.g. BTC" },
|
|
@@ -4111,7 +4715,10 @@ var hyperliquidProtocolModule = {
|
|
|
4111
4715
|
szHuman: { type: "string", required: true, description: "Order size in coin units" },
|
|
4112
4716
|
marketKind: { type: "string", required: false, description: "perp (default) or spot" },
|
|
4113
4717
|
tif: { type: "string", required: false, description: "gtc, ioc, or alo" },
|
|
4114
|
-
dex: { type: "string", required: false, description: "HIP-3 dex name when applicable" }
|
|
4718
|
+
dex: { type: "string", required: false, description: "HIP-3 dex name when applicable" },
|
|
4719
|
+
takeProfitTriggerPxHuman: { type: "string", required: false, description: "TP trigger \u2014 enables L1 bracket with SL" },
|
|
4720
|
+
stopLossTriggerPxHuman: { type: "string", required: false, description: "SL trigger \u2014 enables L1 bracket with TP" },
|
|
4721
|
+
tpslExecMode: { type: "string", required: false, description: "limit_at_trigger (default) or market" }
|
|
4115
4722
|
}
|
|
4116
4723
|
},
|
|
4117
4724
|
{
|
|
@@ -4250,6 +4857,136 @@ var hyperliquidProtocolModule = {
|
|
|
4250
4857
|
]
|
|
4251
4858
|
};
|
|
4252
4859
|
registerProtocolModule(hyperliquidProtocolModule);
|
|
4860
|
+
|
|
4861
|
+
// src/protocols/evm/arcus/index.ts
|
|
4862
|
+
init_support();
|
|
4863
|
+
init_support();
|
|
4864
|
+
init_constants();
|
|
4865
|
+
init_api();
|
|
4866
|
+
init_constants();
|
|
4867
|
+
var arcusProtocolModule = {
|
|
4868
|
+
id: ARCUS_PROTOCOL_ID,
|
|
4869
|
+
chainCategory: "evm",
|
|
4870
|
+
isChainSupported(ctx) {
|
|
4871
|
+
if (ctx.chainCategory !== "evm") return false;
|
|
4872
|
+
const chainId = typeof ctx.chainId === "number" ? ctx.chainId : Number(ctx.chainId);
|
|
4873
|
+
return Number.isFinite(chainId) && isArcusChainSupported(chainId);
|
|
4874
|
+
},
|
|
4875
|
+
isTokenSupported(token) {
|
|
4876
|
+
if (token.category !== "evm") return false;
|
|
4877
|
+
return token.kind === "erc20" || token.kind === "native";
|
|
4878
|
+
},
|
|
4879
|
+
actions: [
|
|
4880
|
+
{
|
|
4881
|
+
id: "arcus.createApiKey",
|
|
4882
|
+
protocolId: ARCUS_PROTOCOL_ID,
|
|
4883
|
+
chainCategory: "evm",
|
|
4884
|
+
description: "Register Arcus Ed25519 API key (secp256k1 personal_sign + paired ed25519 KeyGen)",
|
|
4885
|
+
commonParams: ["keyGen", "purposeText"],
|
|
4886
|
+
params: {
|
|
4887
|
+
secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
|
|
4888
|
+
ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id (same GroupId)" },
|
|
4889
|
+
apiWalletName: { type: "string", required: false, description: "Label for the API key" }
|
|
4890
|
+
}
|
|
4891
|
+
},
|
|
4892
|
+
{
|
|
4893
|
+
id: "arcus.placeOrder",
|
|
4894
|
+
protocolId: ARCUS_PROTOCOL_ID,
|
|
4895
|
+
chainCategory: "evm",
|
|
4896
|
+
description: "Place Arcus perp order with optional TP/SL (Ed25519 payload sign)",
|
|
4897
|
+
commonParams: ["keyGen", "purposeText"],
|
|
4898
|
+
params: {
|
|
4899
|
+
secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
|
|
4900
|
+
ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id" },
|
|
4901
|
+
market: { type: "string", required: true, description: "e.g. BTC-USD" },
|
|
4902
|
+
isBuy: { type: "boolean", required: true, description: "true for buy/long" },
|
|
4903
|
+
limitPxHuman: { type: "string", required: true, description: "Entry limit price" },
|
|
4904
|
+
szHuman: { type: "string", required: true, description: "Order size" },
|
|
4905
|
+
takeProfitTriggerPxHuman: { type: "string", required: false, description: "Optional TP trigger" },
|
|
4906
|
+
stopLossTriggerPxHuman: { type: "string", required: false, description: "Optional SL trigger" }
|
|
4907
|
+
}
|
|
4908
|
+
},
|
|
4909
|
+
{
|
|
4910
|
+
id: "arcus.spotRfq",
|
|
4911
|
+
protocolId: ARCUS_PROTOCOL_ID,
|
|
4912
|
+
chainCategory: "evm",
|
|
4913
|
+
description: "Arcus spot Stock Token RFQ buy/sell",
|
|
4914
|
+
commonParams: ["keyGen", "purposeText"],
|
|
4915
|
+
params: {
|
|
4916
|
+
secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
|
|
4917
|
+
ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id" },
|
|
4918
|
+
ticker: { type: "string", required: true, description: "Spot ticker e.g. AAPL" },
|
|
4919
|
+
isBuy: { type: "boolean", required: true, description: "true for buy" },
|
|
4920
|
+
sizeHuman: { type: "string", required: true, description: "Token size" },
|
|
4921
|
+
limitPxHuman: { type: "string", required: false, description: "Optional limit price" }
|
|
4922
|
+
}
|
|
4923
|
+
},
|
|
4924
|
+
{
|
|
4925
|
+
id: "arcus.close",
|
|
4926
|
+
protocolId: ARCUS_PROTOCOL_ID,
|
|
4927
|
+
chainCategory: "evm",
|
|
4928
|
+
description: "Close Arcus perp position with IoC reduce-only limit order",
|
|
4929
|
+
commonParams: ["keyGen", "purposeText"],
|
|
4930
|
+
params: {
|
|
4931
|
+
secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
|
|
4932
|
+
ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id" },
|
|
4933
|
+
market: { type: "string", required: true, description: "Perp market" },
|
|
4934
|
+
isLong: { type: "boolean", required: true, description: "true when closing a long position" },
|
|
4935
|
+
limitPxHuman: { type: "string", required: true, description: "Limit price for IoC close" },
|
|
4936
|
+
szHuman: { type: "string", required: true, description: "Size to close" }
|
|
4937
|
+
}
|
|
4938
|
+
},
|
|
4939
|
+
{
|
|
4940
|
+
id: "arcus.cancelOrder",
|
|
4941
|
+
protocolId: ARCUS_PROTOCOL_ID,
|
|
4942
|
+
chainCategory: "evm",
|
|
4943
|
+
description: "Cancel Arcus perp order",
|
|
4944
|
+
commonParams: ["keyGen", "purposeText"],
|
|
4945
|
+
params: {
|
|
4946
|
+
secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
|
|
4947
|
+
ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id" },
|
|
4948
|
+
market: { type: "string", required: true, description: "Perp market" },
|
|
4949
|
+
orderId: { type: "string", required: true, description: "Server order id" }
|
|
4950
|
+
}
|
|
4951
|
+
},
|
|
4952
|
+
{
|
|
4953
|
+
id: "arcus.setLeverage",
|
|
4954
|
+
protocolId: ARCUS_PROTOCOL_ID,
|
|
4955
|
+
chainCategory: "evm",
|
|
4956
|
+
description: "Set Arcus perp leverage for a market",
|
|
4957
|
+
commonParams: ["keyGen", "purposeText"],
|
|
4958
|
+
params: {
|
|
4959
|
+
secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
|
|
4960
|
+
ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id" },
|
|
4961
|
+
market: { type: "string", required: true, description: "Perp market" },
|
|
4962
|
+
leverage: { type: "number", required: true, description: "Target leverage" }
|
|
4963
|
+
}
|
|
4964
|
+
},
|
|
4965
|
+
{
|
|
4966
|
+
id: "arcus.deposit",
|
|
4967
|
+
protocolId: ARCUS_PROTOCOL_ID,
|
|
4968
|
+
chainCategory: "evm",
|
|
4969
|
+
description: "Deposit USDG on Robinhood Chain into Arcus perp or spot collateral (approve + initiateDeposit). Requires registered API key.",
|
|
4970
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
4971
|
+
params: {
|
|
4972
|
+
usdHuman: { type: "string", required: true, description: "USD amount to deposit" },
|
|
4973
|
+
product: { type: "string", required: false, description: "perp (default) or spot" }
|
|
4974
|
+
}
|
|
4975
|
+
},
|
|
4976
|
+
{
|
|
4977
|
+
id: "arcus.withdraw",
|
|
4978
|
+
protocolId: ARCUS_PROTOCOL_ID,
|
|
4979
|
+
chainCategory: "evm",
|
|
4980
|
+
description: "Withdraw USDG collateral from Arcus to wallet (EIP-712 + POST /v1/withdraw)",
|
|
4981
|
+
commonParams: ["keyGen", "purposeText"],
|
|
4982
|
+
params: {
|
|
4983
|
+
usdHuman: { type: "string", required: true, description: "USD amount to withdraw" },
|
|
4984
|
+
product: { type: "string", required: false, description: "perp (default) or spot" }
|
|
4985
|
+
}
|
|
4986
|
+
}
|
|
4987
|
+
]
|
|
4988
|
+
};
|
|
4989
|
+
registerProtocolModule(arcusProtocolModule);
|
|
4253
4990
|
var MORPHO_GRAPHQL_URL = "https://api.morpho.org/graphql";
|
|
4254
4991
|
async function morphoGql(query, variables) {
|
|
4255
4992
|
const body = { query, variables: variables ?? {} };
|
|
@@ -4610,6 +5347,7 @@ var SKILL_PROTOCOL_IDS = [
|
|
|
4610
5347
|
"sky",
|
|
4611
5348
|
"gmx",
|
|
4612
5349
|
"hyperliquid",
|
|
5350
|
+
"arcus",
|
|
4613
5351
|
"morpho",
|
|
4614
5352
|
"circle-cctp"
|
|
4615
5353
|
];
|
|
@@ -4659,6 +5397,7 @@ function getProtocolDiscoverySummary(protocolId) {
|
|
|
4659
5397
|
}))
|
|
4660
5398
|
};
|
|
4661
5399
|
}
|
|
5400
|
+
init_support();
|
|
4662
5401
|
var EULER_V2_SUBGRAPH_CHAIN_IDS = [
|
|
4663
5402
|
1,
|
|
4664
5403
|
8453,
|
|
@@ -4746,7 +5485,8 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
4746
5485
|
143,
|
|
4747
5486
|
59144,
|
|
4748
5487
|
4217,
|
|
4749
|
-
196
|
|
5488
|
+
196,
|
|
5489
|
+
4663
|
|
4750
5490
|
]) {
|
|
4751
5491
|
if (isUniswapV4ChainSupported(id)) ids.push(id);
|
|
4752
5492
|
}
|
|
@@ -4928,6 +5668,17 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
4928
5668
|
notes: "Hyperliquid perp coins from fetch_markets; chainId 999 mainnet or 998 testnet for HyperEVM multisign."
|
|
4929
5669
|
};
|
|
4930
5670
|
}
|
|
5671
|
+
}),
|
|
5672
|
+
arcus: advisor("arcus", "api_underlyings", {
|
|
5673
|
+
async supportedChainIds() {
|
|
5674
|
+
return [...ARCUS_SUPPORTED_CHAIN_IDS];
|
|
5675
|
+
},
|
|
5676
|
+
async supportedTokens() {
|
|
5677
|
+
return {
|
|
5678
|
+
tokens: [],
|
|
5679
|
+
notes: "Arcus on Robinhood Chain (4663): perps via fetch_markets; spot Stock Tokens via spot_fetch_markets. Custody is secp256k1 on 4663; API signing uses paired ed25519 KeyGen (same GroupId)."
|
|
5680
|
+
};
|
|
5681
|
+
}
|
|
4931
5682
|
})
|
|
4932
5683
|
};
|
|
4933
5684
|
function getProtocolSupportAdvisor(protocolId) {
|
|
@@ -4948,6 +5699,7 @@ registerProtocolModule(aaveV4ProtocolModule);
|
|
|
4948
5699
|
registerProtocolModule(eulerV2ProtocolModule);
|
|
4949
5700
|
registerProtocolModule(gmxProtocolModule);
|
|
4950
5701
|
registerProtocolModule(hyperliquidProtocolModule);
|
|
5702
|
+
registerProtocolModule(arcusProtocolModule);
|
|
4951
5703
|
registerProtocolModule(morphoProtocolModule);
|
|
4952
5704
|
registerProtocolModule(circleCctpProtocolModule);
|
|
4953
5705
|
function getAgentCatalog() {
|
|
@@ -4968,6 +5720,7 @@ function getAgentCatalog() {
|
|
|
4968
5720
|
eulerV2: eulerV2ProtocolModule,
|
|
4969
5721
|
gmx: gmxProtocolModule,
|
|
4970
5722
|
hyperliquid: hyperliquidProtocolModule,
|
|
5723
|
+
arcus: arcusProtocolModule,
|
|
4971
5724
|
morpho: morphoProtocolModule,
|
|
4972
5725
|
circleCctp: circleCctpProtocolModule,
|
|
4973
5726
|
/** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
|
|
@@ -5007,6 +5760,36 @@ exports.mcpAaveV4BorrowInputSchema = mcpAaveV4BorrowInputSchema;
|
|
|
5007
5760
|
exports.mcpAaveV4DepositInputSchema = mcpAaveV4DepositInputSchema;
|
|
5008
5761
|
exports.mcpAaveV4RepayInputSchema = mcpAaveV4RepayInputSchema;
|
|
5009
5762
|
exports.mcpAaveV4WithdrawInputSchema = mcpAaveV4WithdrawInputSchema;
|
|
5763
|
+
exports.mcpArcusBuildCancelOrderMultisignInputSchema = mcpArcusBuildCancelOrderMultisignInputSchema;
|
|
5764
|
+
exports.mcpArcusBuildCloseMultisignInputSchema = mcpArcusBuildCloseMultisignInputSchema;
|
|
5765
|
+
exports.mcpArcusBuildCreateApiKeyMultisignInputSchema = mcpArcusBuildCreateApiKeyMultisignInputSchema;
|
|
5766
|
+
exports.mcpArcusBuildDepositMultisignInputSchema = mcpArcusBuildDepositMultisignInputSchema;
|
|
5767
|
+
exports.mcpArcusBuildPlaceOrderMultisignInputSchema = mcpArcusBuildPlaceOrderMultisignInputSchema;
|
|
5768
|
+
exports.mcpArcusBuildSetLeverageMultisignInputSchema = mcpArcusBuildSetLeverageMultisignInputSchema;
|
|
5769
|
+
exports.mcpArcusBuildWithdrawMultisignInputSchema = mcpArcusBuildWithdrawMultisignInputSchema;
|
|
5770
|
+
exports.mcpArcusFetchAccountInputSchema = mcpArcusFetchAccountInputSchema;
|
|
5771
|
+
exports.mcpArcusFetchAccountOutputSchema = mcpArcusFetchAccountOutputSchema;
|
|
5772
|
+
exports.mcpArcusFetchMarketSnapshotInputSchema = mcpArcusFetchMarketSnapshotInputSchema;
|
|
5773
|
+
exports.mcpArcusFetchMarketSnapshotOutputSchema = mcpArcusFetchMarketSnapshotOutputSchema;
|
|
5774
|
+
exports.mcpArcusFetchMarketsInputSchema = mcpArcusFetchMarketsInputSchema;
|
|
5775
|
+
exports.mcpArcusFetchMarketsOutputSchema = mcpArcusFetchMarketsOutputSchema;
|
|
5776
|
+
exports.mcpArcusFetchOhlcvInputSchema = mcpArcusFetchOhlcvInputSchema;
|
|
5777
|
+
exports.mcpArcusFetchOhlcvOutputSchema = mcpArcusFetchOhlcvOutputSchema;
|
|
5778
|
+
exports.mcpArcusFetchOpenContextInputSchema = mcpArcusFetchOpenContextInputSchema;
|
|
5779
|
+
exports.mcpArcusFetchOpenContextOutputSchema = mcpArcusFetchOpenContextOutputSchema;
|
|
5780
|
+
exports.mcpArcusFetchOpenOrdersInputSchema = mcpArcusFetchOpenOrdersInputSchema;
|
|
5781
|
+
exports.mcpArcusFetchOpenOrdersOutputSchema = mcpArcusFetchOpenOrdersOutputSchema;
|
|
5782
|
+
exports.mcpArcusFetchPositionsInputSchema = mcpArcusFetchPositionsInputSchema;
|
|
5783
|
+
exports.mcpArcusFetchPositionsOutputSchema = mcpArcusFetchPositionsOutputSchema;
|
|
5784
|
+
exports.mcpArcusSearchMarketsInputSchema = mcpArcusSearchMarketsInputSchema;
|
|
5785
|
+
exports.mcpArcusSearchMarketsOutputSchema = mcpArcusSearchMarketsOutputSchema;
|
|
5786
|
+
exports.mcpArcusSpotBuildRfqMultisignInputSchema = mcpArcusSpotBuildRfqMultisignInputSchema;
|
|
5787
|
+
exports.mcpArcusSpotFetchBalancesInputSchema = mcpArcusSpotFetchBalancesInputSchema;
|
|
5788
|
+
exports.mcpArcusSpotFetchBalancesOutputSchema = mcpArcusSpotFetchBalancesOutputSchema;
|
|
5789
|
+
exports.mcpArcusSpotFetchMarketsInputSchema = mcpArcusSpotFetchMarketsInputSchema;
|
|
5790
|
+
exports.mcpArcusSpotFetchMarketsOutputSchema = mcpArcusSpotFetchMarketsOutputSchema;
|
|
5791
|
+
exports.mcpArcusSpotFetchOhlcvInputSchema = mcpArcusSpotFetchOhlcvInputSchema;
|
|
5792
|
+
exports.mcpArcusSpotFetchOhlcvOutputSchema = mcpArcusSpotFetchOhlcvOutputSchema;
|
|
5010
5793
|
exports.mcpCurveDaoBuildSwapMultisignInputSchema = mcpCurveDaoBuildSwapMultisignInputSchema;
|
|
5011
5794
|
exports.mcpCurveDaoQuoteInputSchema = mcpCurveDaoQuoteInputSchema;
|
|
5012
5795
|
exports.mcpCurveDaoQuoteOutputSchema = mcpCurveDaoQuoteOutputSchema;
|
|
@@ -5117,12 +5900,17 @@ exports.mcpSkySusdsRedeemInputSchema = mcpSkySusdsRedeemInputSchema;
|
|
|
5117
5900
|
exports.mcpUniswapV4BuildCollectFeesMultisignInputSchema = mcpUniswapV4BuildCollectFeesMultisignInputSchema;
|
|
5118
5901
|
exports.mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema = mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema;
|
|
5119
5902
|
exports.mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema = mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema;
|
|
5903
|
+
exports.mcpUniswapV4BuildLimitOrderMultisignInputSchema = mcpUniswapV4BuildLimitOrderMultisignInputSchema;
|
|
5120
5904
|
exports.mcpUniswapV4BuildMintLiquidityMultisignInputSchema = mcpUniswapV4BuildMintLiquidityMultisignInputSchema;
|
|
5121
5905
|
exports.mcpUniswapV4BuildSwapMultisignInputSchema = mcpUniswapV4BuildSwapMultisignInputSchema;
|
|
5122
5906
|
exports.mcpUniswapV4CreateSwapInputSchema = mcpUniswapV4CreateSwapInputSchema;
|
|
5123
5907
|
exports.mcpUniswapV4CreateSwapOutputSchema = mcpUniswapV4CreateSwapOutputSchema;
|
|
5908
|
+
exports.mcpUniswapV4FetchLimitOrdersInputSchema = mcpUniswapV4FetchLimitOrdersInputSchema;
|
|
5909
|
+
exports.mcpUniswapV4FetchLimitOrdersOutputSchema = mcpUniswapV4FetchLimitOrdersOutputSchema;
|
|
5124
5910
|
exports.mcpUniswapV4FetchOhlcvInputSchema = mcpUniswapV4FetchOhlcvInputSchema;
|
|
5125
5911
|
exports.mcpUniswapV4FetchOhlcvOutputSchema = mcpUniswapV4FetchOhlcvOutputSchema;
|
|
5912
|
+
exports.mcpUniswapV4LimitOrderQuoteInputSchema = mcpUniswapV4LimitOrderQuoteInputSchema;
|
|
5913
|
+
exports.mcpUniswapV4LimitOrderQuoteOutputSchema = mcpUniswapV4LimitOrderQuoteOutputSchema;
|
|
5126
5914
|
exports.mcpUniswapV4LpClaimInputSchema = mcpUniswapV4LpClaimInputSchema;
|
|
5127
5915
|
exports.mcpUniswapV4LpClaimOutputSchema = mcpUniswapV4LpClaimOutputSchema;
|
|
5128
5916
|
exports.mcpUniswapV4LpCreatePositionInputSchema = mcpUniswapV4LpCreatePositionInputSchema;
|