@continuumdao/ctm-mpc-defi 0.2.24 → 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 +670 -11
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +2119 -1
- package/dist/agent/catalog.js +641 -12
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/arcus/SKILL.md +72 -0
- package/dist/agent/skills/gmx/SKILL.md +2 -0
- package/dist/agent/skills/hyperliquid/SKILL.md +12 -3
- package/dist/agent/skills/uniswap-v4/SKILL.md +5 -0
- package/dist/core/index.cjs +55 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +28 -2
- package/dist/core/index.js +54 -1
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +55 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +54 -1
- 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/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.d.ts +1 -1
- 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) {
|
|
@@ -2239,6 +2269,213 @@ var mcpHyperliquidUpdateLeverageInputSchema = mcpHyperliquidMultisignInput(
|
|
|
2239
2269
|
},
|
|
2240
2270
|
preprocessHyperliquidCoinInput
|
|
2241
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
|
+
);
|
|
2242
2479
|
var mcpCctpFeeFieldsSchema = zod.z.object({
|
|
2243
2480
|
feeTierUsed: zod.z.enum(["low", "med", "high"]),
|
|
2244
2481
|
maxFee: zod.z.string().describe("Selected tier max fee in USDC base units (6 decimals)"),
|
|
@@ -2690,8 +2927,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2690
2927
|
actionId: "gmx.increase",
|
|
2691
2928
|
protocolId: "gmx",
|
|
2692
2929
|
chainCategory: "evm",
|
|
2693
|
-
description: "Create and submit mpc-auth multiSignRequest for GMX classic increase order (open/add perp). Optional takeProfitPriceUsdHuman / stopLossPriceUsdHuman attach native TP/SL decrease orders (full size). Keeper executes asynchronously after
|
|
2694
|
-
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"],
|
|
2695
2932
|
handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxIncreaseBatch" },
|
|
2696
2933
|
inputZod: mcpGmxIncreaseInputSchema
|
|
2697
2934
|
}),
|
|
@@ -2760,8 +2997,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2760
2997
|
actionId: "hyperliquid.limitOrder",
|
|
2761
2998
|
protocolId: "hyperliquid",
|
|
2762
2999
|
chainCategory: "evm",
|
|
2763
|
-
description: "Create and submit mpc-auth multiSignRequest for a Hyperliquid limit/IoC order. Plain limit
|
|
2764
|
-
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"],
|
|
2765
3002
|
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidLimitOrderBatch" },
|
|
2766
3003
|
inputZod: mcpHyperliquidLimitOrderInputSchema
|
|
2767
3004
|
}),
|
|
@@ -2816,8 +3053,8 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2816
3053
|
actionId: "hyperliquid.bridgeWithdraw",
|
|
2817
3054
|
protocolId: "hyperliquid",
|
|
2818
3055
|
chainCategory: "evm",
|
|
2819
|
-
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.",
|
|
2820
|
-
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"],
|
|
2821
3058
|
handler: {
|
|
2822
3059
|
importPath: "protocols/evm/hyperliquid",
|
|
2823
3060
|
exportName: "buildHyperliquidBridgeWithdrawMultisign"
|
|
@@ -2889,7 +3126,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2889
3126
|
actionId: "hyperliquid.updateLeverage",
|
|
2890
3127
|
protocolId: "hyperliquid",
|
|
2891
3128
|
chainCategory: "evm",
|
|
2892
|
-
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.",
|
|
2893
3130
|
prerequisites: [
|
|
2894
3131
|
"keyGenId",
|
|
2895
3132
|
"chainId 999 or 998",
|
|
@@ -2905,6 +3142,101 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2905
3142
|
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildHyperliquidUpdateLeverageMultisign" },
|
|
2906
3143
|
inputZod: mcpHyperliquidUpdateLeverageInputSchema
|
|
2907
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
|
+
}),
|
|
2908
3240
|
defineProtocolMcpTool({
|
|
2909
3241
|
name: "ctm_cctp_build_burn_multisign",
|
|
2910
3242
|
actionId: "circle-cctp.burn-forward",
|
|
@@ -3000,11 +3332,11 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
3000
3332
|
actionId: "uniswap-v4.limit-order-quote",
|
|
3001
3333
|
protocolId: "uniswap-v4",
|
|
3002
3334
|
chainCategory: "evm",
|
|
3003
|
-
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.",
|
|
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).",
|
|
3004
3336
|
prerequisites: [
|
|
3005
3337
|
"UNISWAP_API_KEY in node Variables",
|
|
3006
3338
|
"chainId must be 1",
|
|
3007
|
-
"keyGenId or swapper",
|
|
3339
|
+
"keyGenId or swapper (server resolves swapper from keyGenId)",
|
|
3008
3340
|
"limitPrice, orderDeadline, amount, tokenIn, tokenOut"
|
|
3009
3341
|
],
|
|
3010
3342
|
followUp: ["ctm_uniswap_v4_build_limit_order_multisign", "ctm_uniswap_v4_fetch_limit_orders"],
|
|
@@ -3017,9 +3349,9 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
3017
3349
|
actionId: "uniswap-v4.limit-order",
|
|
3018
3350
|
protocolId: "uniswap-v4",
|
|
3019
3351
|
chainCategory: "evm",
|
|
3020
|
-
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.",
|
|
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.",
|
|
3021
3353
|
prerequisites: [
|
|
3022
|
-
"ctm_uniswap_v4_limit_order_quote output (fullLimitQuote)",
|
|
3354
|
+
"Fresh ctm_uniswap_v4_limit_order_quote output (fullLimitQuote) \u2014 re-quote when limitPrice or orderDeadline changes",
|
|
3023
3355
|
"keyGenId + chainId 1 + purposeText"
|
|
3024
3356
|
],
|
|
3025
3357
|
followUp: ["ctm_uniswap_v4_fetch_limit_orders"],
|
|
@@ -3492,6 +3824,158 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
3492
3824
|
inputZod: mcpHyperliquidFetchDelegationsInputSchema,
|
|
3493
3825
|
outputZod: mcpHyperliquidFetchDelegationsOutputSchema
|
|
3494
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
|
+
}),
|
|
3495
3979
|
defineMcpTool({
|
|
3496
3980
|
name: "ctm_morpho_fetch_blue_markets",
|
|
3497
3981
|
actionId: "morpho.fetch-blue-markets",
|
|
@@ -4373,6 +4857,136 @@ var hyperliquidProtocolModule = {
|
|
|
4373
4857
|
]
|
|
4374
4858
|
};
|
|
4375
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);
|
|
4376
4990
|
var MORPHO_GRAPHQL_URL = "https://api.morpho.org/graphql";
|
|
4377
4991
|
async function morphoGql(query, variables) {
|
|
4378
4992
|
const body = { query, variables: variables ?? {} };
|
|
@@ -4733,6 +5347,7 @@ var SKILL_PROTOCOL_IDS = [
|
|
|
4733
5347
|
"sky",
|
|
4734
5348
|
"gmx",
|
|
4735
5349
|
"hyperliquid",
|
|
5350
|
+
"arcus",
|
|
4736
5351
|
"morpho",
|
|
4737
5352
|
"circle-cctp"
|
|
4738
5353
|
];
|
|
@@ -4782,6 +5397,7 @@ function getProtocolDiscoverySummary(protocolId) {
|
|
|
4782
5397
|
}))
|
|
4783
5398
|
};
|
|
4784
5399
|
}
|
|
5400
|
+
init_support();
|
|
4785
5401
|
var EULER_V2_SUBGRAPH_CHAIN_IDS = [
|
|
4786
5402
|
1,
|
|
4787
5403
|
8453,
|
|
@@ -5052,6 +5668,17 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
5052
5668
|
notes: "Hyperliquid perp coins from fetch_markets; chainId 999 mainnet or 998 testnet for HyperEVM multisign."
|
|
5053
5669
|
};
|
|
5054
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
|
+
}
|
|
5055
5682
|
})
|
|
5056
5683
|
};
|
|
5057
5684
|
function getProtocolSupportAdvisor(protocolId) {
|
|
@@ -5072,6 +5699,7 @@ registerProtocolModule(aaveV4ProtocolModule);
|
|
|
5072
5699
|
registerProtocolModule(eulerV2ProtocolModule);
|
|
5073
5700
|
registerProtocolModule(gmxProtocolModule);
|
|
5074
5701
|
registerProtocolModule(hyperliquidProtocolModule);
|
|
5702
|
+
registerProtocolModule(arcusProtocolModule);
|
|
5075
5703
|
registerProtocolModule(morphoProtocolModule);
|
|
5076
5704
|
registerProtocolModule(circleCctpProtocolModule);
|
|
5077
5705
|
function getAgentCatalog() {
|
|
@@ -5092,6 +5720,7 @@ function getAgentCatalog() {
|
|
|
5092
5720
|
eulerV2: eulerV2ProtocolModule,
|
|
5093
5721
|
gmx: gmxProtocolModule,
|
|
5094
5722
|
hyperliquid: hyperliquidProtocolModule,
|
|
5723
|
+
arcus: arcusProtocolModule,
|
|
5095
5724
|
morpho: morphoProtocolModule,
|
|
5096
5725
|
circleCctp: circleCctpProtocolModule,
|
|
5097
5726
|
/** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
|
|
@@ -5131,6 +5760,36 @@ exports.mcpAaveV4BorrowInputSchema = mcpAaveV4BorrowInputSchema;
|
|
|
5131
5760
|
exports.mcpAaveV4DepositInputSchema = mcpAaveV4DepositInputSchema;
|
|
5132
5761
|
exports.mcpAaveV4RepayInputSchema = mcpAaveV4RepayInputSchema;
|
|
5133
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;
|
|
5134
5793
|
exports.mcpCurveDaoBuildSwapMultisignInputSchema = mcpCurveDaoBuildSwapMultisignInputSchema;
|
|
5135
5794
|
exports.mcpCurveDaoQuoteInputSchema = mcpCurveDaoQuoteInputSchema;
|
|
5136
5795
|
exports.mcpCurveDaoQuoteOutputSchema = mcpCurveDaoQuoteOutputSchema;
|