@continuumdao/ctm-mpc-defi 0.2.44 → 0.2.45
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 +130 -0
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +183 -1
- package/dist/agent/catalog.js +126 -1
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/hyperliquid/SKILL.md +32 -2
- package/dist/agent/skills/yield-compare/SKILL.md +4 -1
- package/dist/protocols/evm/hyperliquid/index.cjs +320 -0
- package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
- package/dist/protocols/evm/hyperliquid/index.d.ts +153 -1
- package/dist/protocols/evm/hyperliquid/index.js +303 -1
- package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
- package/package.json +1 -1
package/dist/agent/catalog.cjs
CHANGED
|
@@ -1288,6 +1288,25 @@ function preprocessHyperliquidUndelegateInput(raw) {
|
|
|
1288
1288
|
aliasField(o, "hypeHuman", "hypeHuman", "amount");
|
|
1289
1289
|
return o;
|
|
1290
1290
|
}
|
|
1291
|
+
function preprocessHyperliquidLendInput(raw) {
|
|
1292
|
+
const o = preprocessHyperliquidCoinInput(raw);
|
|
1293
|
+
if (!preprocessObject(o)) return raw;
|
|
1294
|
+
aliasField(o, "amountHuman", "amountHuman", "amount", "sz", "szHuman");
|
|
1295
|
+
const amount = String(o.amountHuman ?? "").trim().toLowerCase();
|
|
1296
|
+
if (amount === "max") {
|
|
1297
|
+
o.amountMax = true;
|
|
1298
|
+
o.amountHuman = void 0;
|
|
1299
|
+
}
|
|
1300
|
+
derivePurposeIfMissing(o, (x) => {
|
|
1301
|
+
const coin = String(x.coin ?? "").trim();
|
|
1302
|
+
const op = String(x.operation ?? "").trim();
|
|
1303
|
+
const amt = x.amountMax === true || x.amountMax === "true" ? "max" : String(x.amountHuman ?? "").trim();
|
|
1304
|
+
if (coin && op && amt) return `HL ${op} ${amt} ${coin}`;
|
|
1305
|
+
if (coin && op) return `HL ${op} ${coin}`;
|
|
1306
|
+
return void 0;
|
|
1307
|
+
});
|
|
1308
|
+
return o;
|
|
1309
|
+
}
|
|
1291
1310
|
function preprocessUniswapLpCreateInput(raw) {
|
|
1292
1311
|
const o = preprocessObject(raw);
|
|
1293
1312
|
if (!o) return raw;
|
|
@@ -4504,6 +4523,57 @@ var mcpHyperliquidUpdateLeverageInputSchema = mcpHyperliquidMultisignInput(
|
|
|
4504
4523
|
},
|
|
4505
4524
|
preprocessHyperliquidCoinInput
|
|
4506
4525
|
);
|
|
4526
|
+
var hyperliquidLendMarketRowSchema = zod.z.object({
|
|
4527
|
+
tokenIndex: zod.z.number(),
|
|
4528
|
+
coin: zod.z.string().describe("Spot token name \u2014 pass as coin to build_lend_multisign (USDT aliases to USDT0, BTC to UBTC)"),
|
|
4529
|
+
role: zod.z.enum(["collateral", "quote"]),
|
|
4530
|
+
szDecimals: zod.z.number().nullable(),
|
|
4531
|
+
supplyYearlyRate: zod.z.string().describe("Current supply APR as a yearly decimal (0.05 = 5% APR)"),
|
|
4532
|
+
borrowYearlyRate: zod.z.string().describe("Current borrow APR as a yearly decimal (0.05 = 5% APR)"),
|
|
4533
|
+
supplyAprPercent: zod.z.number().nullable(),
|
|
4534
|
+
borrowAprPercent: zod.z.number().nullable(),
|
|
4535
|
+
utilization: zod.z.string(),
|
|
4536
|
+
oraclePx: zod.z.string(),
|
|
4537
|
+
ltv: zod.z.string(),
|
|
4538
|
+
totalSupplied: zod.z.string(),
|
|
4539
|
+
totalBorrowed: zod.z.string(),
|
|
4540
|
+
balance: zod.z.string()
|
|
4541
|
+
});
|
|
4542
|
+
var mcpHyperliquidFetchLendMarketsInputSchema = hyperliquidFetchChainInputSchema;
|
|
4543
|
+
var mcpHyperliquidFetchLendMarketsOutputSchema = zod.z.object({
|
|
4544
|
+
markets: zod.z.array(hyperliquidLendMarketRowSchema),
|
|
4545
|
+
notes: zod.z.string()
|
|
4546
|
+
});
|
|
4547
|
+
var mcpHyperliquidFetchLendPositionsInputSchema = hyperliquidFetchChainInputSchema.extend({
|
|
4548
|
+
executorAddress: evmAddressSchema
|
|
4549
|
+
});
|
|
4550
|
+
var mcpHyperliquidFetchLendPositionsOutputSchema = zod.z.object({
|
|
4551
|
+
positions: zod.z.array(
|
|
4552
|
+
zod.z.object({
|
|
4553
|
+
tokenIndex: zod.z.number(),
|
|
4554
|
+
coin: zod.z.string(),
|
|
4555
|
+
role: zod.z.enum(["collateral", "quote"]).nullable(),
|
|
4556
|
+
suppliedBasis: zod.z.string(),
|
|
4557
|
+
suppliedValue: zod.z.string().describe("Copy as amountHuman for withdraw when not using amountMax"),
|
|
4558
|
+
borrowedBasis: zod.z.string(),
|
|
4559
|
+
borrowedValue: zod.z.string().describe("Copy as amountHuman for repay when not using amountMax")
|
|
4560
|
+
})
|
|
4561
|
+
),
|
|
4562
|
+
health: zod.z.string(),
|
|
4563
|
+
healthFactor: zod.z.string().nullable(),
|
|
4564
|
+
userAbstraction: zod.z.string(),
|
|
4565
|
+
manualBorrowEnabled: zod.z.boolean(),
|
|
4566
|
+
notes: zod.z.string()
|
|
4567
|
+
});
|
|
4568
|
+
var mcpHyperliquidLendInputSchema = mcpHyperliquidMultisignInput(
|
|
4569
|
+
{
|
|
4570
|
+
coin: zod.z.string().min(1).describe("Spot token from fetch_lend_markets (USDC, USDT/USDT0, HYPE, BTC/UBTC)"),
|
|
4571
|
+
operation: zod.z.enum(["supply", "withdraw", "borrow", "repay"]),
|
|
4572
|
+
amountHuman: zod.z.string().min(1).optional().describe("Human amount. Omit or set amountMax for full withdraw/repay."),
|
|
4573
|
+
amountMax: agentBooleanSchema().optional().describe("true = wire amount null (max withdraw/repay).")
|
|
4574
|
+
},
|
|
4575
|
+
preprocessHyperliquidLendInput
|
|
4576
|
+
);
|
|
4507
4577
|
var arcusFetchChainInputSchema = zod.z.object({
|
|
4508
4578
|
chainId: zod.z.coerce.number().int().positive().default(4663).describe("Robinhood Chain (4663).")
|
|
4509
4579
|
});
|
|
@@ -5566,6 +5636,24 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
5566
5636
|
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildHyperliquidUpdateLeverageMultisign" },
|
|
5567
5637
|
inputZod: mcpHyperliquidUpdateLeverageInputSchema
|
|
5568
5638
|
}),
|
|
5639
|
+
defineProtocolMcpTool({
|
|
5640
|
+
name: "ctm_hyperliquid_build_lend_multisign",
|
|
5641
|
+
actionId: "hyperliquid.lend",
|
|
5642
|
+
protocolId: "hyperliquid",
|
|
5643
|
+
chainCategory: "evm",
|
|
5644
|
+
description: "Supply, withdraw, borrow, or repay on Hyperliquid Core lend via L1 /exchange EIP-712 \u2014 not CoreWriter. No useCustomGas. trigger_sign_result without txParams; broadcast_sign_result POSTs to /exchange. Manual borrow is disabled on portfolio-margin accounts. HYPE/UBTC supply is collateral (no yield); USDC/USDT0 supply earns APR but does not increase borrow capacity.",
|
|
5645
|
+
prerequisites: [
|
|
5646
|
+
"keyGenId",
|
|
5647
|
+
"chainId 999 or 998",
|
|
5648
|
+
"coin from ctm_hyperliquid_fetch_lend_markets",
|
|
5649
|
+
"operation supply|withdraw|borrow|repay",
|
|
5650
|
+
"amountHuman or amountMax",
|
|
5651
|
+
"ctm_hyperliquid_fetch_lend_positions for health and manualBorrowEnabled before borrow"
|
|
5652
|
+
],
|
|
5653
|
+
followUp: ["sign_request_agree", "trigger_sign_result", "broadcast_sign_result"],
|
|
5654
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildHyperliquidBorrowLendMultisign" },
|
|
5655
|
+
inputZod: mcpHyperliquidLendInputSchema
|
|
5656
|
+
}),
|
|
5569
5657
|
defineProtocolMcpTool({
|
|
5570
5658
|
name: "ctm_arcus_build_create_api_key_multisign",
|
|
5571
5659
|
actionId: "arcus.createApiKey",
|
|
@@ -6894,6 +6982,30 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
6894
6982
|
inputZod: mcpHyperliquidFetchDelegationsInputSchema,
|
|
6895
6983
|
outputZod: mcpHyperliquidFetchDelegationsOutputSchema
|
|
6896
6984
|
}),
|
|
6985
|
+
defineMcpTool({
|
|
6986
|
+
name: "ctm_hyperliquid_fetch_lend_markets",
|
|
6987
|
+
actionId: "hyperliquid.fetch-lend-markets",
|
|
6988
|
+
protocolId: "hyperliquid",
|
|
6989
|
+
chainCategory: "evm",
|
|
6990
|
+
description: "Hyperliquid Core lend reserves with current supply APR and borrow APR (yearly rates, not APY), utilization, LTV, and totals. Collateral (HYPE, UBTC) earns no supply interest. Quote (USDC, USDT0, USDH) earns utilization APR. chainId 999 mainnet or 998 testnet.",
|
|
6991
|
+
prerequisites: ["chainId 999 or 998"],
|
|
6992
|
+
followUp: ["ctm_hyperliquid_fetch_lend_positions", "ctm_hyperliquid_build_lend_multisign"],
|
|
6993
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchLendMarketsSummary" },
|
|
6994
|
+
inputZod: mcpHyperliquidFetchLendMarketsInputSchema,
|
|
6995
|
+
outputZod: mcpHyperliquidFetchLendMarketsOutputSchema
|
|
6996
|
+
}),
|
|
6997
|
+
defineMcpTool({
|
|
6998
|
+
name: "ctm_hyperliquid_fetch_lend_positions",
|
|
6999
|
+
actionId: "hyperliquid.fetch-lend-positions",
|
|
7000
|
+
protocolId: "hyperliquid",
|
|
7001
|
+
chainCategory: "evm",
|
|
7002
|
+
description: "User Hyperliquid Core lend positions (supplied/borrowed), health, and whether manual borrow is enabled. Portfolio-margin accounts disable the manual borrow action.",
|
|
7003
|
+
prerequisites: ["chainId 999 or 998", "executorAddress"],
|
|
7004
|
+
followUp: ["ctm_hyperliquid_build_lend_multisign"],
|
|
7005
|
+
handler: { importPath: "protocols/evm/hyperliquid", exportName: "hyperliquidFetchLendPositionsSummary" },
|
|
7006
|
+
inputZod: mcpHyperliquidFetchLendPositionsInputSchema,
|
|
7007
|
+
outputZod: mcpHyperliquidFetchLendPositionsOutputSchema
|
|
7008
|
+
}),
|
|
6897
7009
|
defineMcpTool({
|
|
6898
7010
|
name: "ctm_arcus_fetch_markets",
|
|
6899
7011
|
actionId: "arcus.fetch-markets",
|
|
@@ -9151,6 +9263,19 @@ var hyperliquidProtocolModule = {
|
|
|
9151
9263
|
marketKind: { type: "string", required: false, description: "perp (default) or spot" }
|
|
9152
9264
|
}
|
|
9153
9265
|
},
|
|
9266
|
+
{
|
|
9267
|
+
id: "hyperliquid.lend",
|
|
9268
|
+
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
9269
|
+
chainCategory: "evm",
|
|
9270
|
+
description: "Hyperliquid Core borrow/lend via L1 /exchange EIP-712 (supply, withdraw, borrow, repay). Not CoreWriter.",
|
|
9271
|
+
commonParams: ["keyGen", "purposeText"],
|
|
9272
|
+
params: {
|
|
9273
|
+
coin: { type: "string", required: true, description: "Spot token e.g. USDC, USDT, HYPE, BTC/UBTC" },
|
|
9274
|
+
operation: { type: "string", required: true, description: "supply | withdraw | borrow | repay" },
|
|
9275
|
+
amountHuman: { type: "string", required: false, description: "Amount; omit or max for full withdraw/repay" },
|
|
9276
|
+
amountMax: { type: "boolean", required: false, description: "true = full amount (amount null on wire)" }
|
|
9277
|
+
}
|
|
9278
|
+
},
|
|
9154
9279
|
{
|
|
9155
9280
|
id: "hyperliquid.undelegate",
|
|
9156
9281
|
protocolId: HYPERLIQUID_PROTOCOL_ID,
|
|
@@ -11955,6 +12080,10 @@ exports.mcpHyperliquidCloseInputSchema = mcpHyperliquidCloseInputSchema;
|
|
|
11955
12080
|
exports.mcpHyperliquidDelegateInputSchema = mcpHyperliquidDelegateInputSchema;
|
|
11956
12081
|
exports.mcpHyperliquidFetchDelegationsInputSchema = mcpHyperliquidFetchDelegationsInputSchema;
|
|
11957
12082
|
exports.mcpHyperliquidFetchDelegationsOutputSchema = mcpHyperliquidFetchDelegationsOutputSchema;
|
|
12083
|
+
exports.mcpHyperliquidFetchLendMarketsInputSchema = mcpHyperliquidFetchLendMarketsInputSchema;
|
|
12084
|
+
exports.mcpHyperliquidFetchLendMarketsOutputSchema = mcpHyperliquidFetchLendMarketsOutputSchema;
|
|
12085
|
+
exports.mcpHyperliquidFetchLendPositionsInputSchema = mcpHyperliquidFetchLendPositionsInputSchema;
|
|
12086
|
+
exports.mcpHyperliquidFetchLendPositionsOutputSchema = mcpHyperliquidFetchLendPositionsOutputSchema;
|
|
11958
12087
|
exports.mcpHyperliquidFetchMarketSnapshotInputSchema = mcpHyperliquidFetchMarketSnapshotInputSchema;
|
|
11959
12088
|
exports.mcpHyperliquidFetchMarketSnapshotOutputSchema = mcpHyperliquidFetchMarketSnapshotOutputSchema;
|
|
11960
12089
|
exports.mcpHyperliquidFetchMarketsInputSchema = mcpHyperliquidFetchMarketsInputSchema;
|
|
@@ -11979,6 +12108,7 @@ exports.mcpHyperliquidFetchVaultApysInputSchema = mcpHyperliquidFetchVaultApysIn
|
|
|
11979
12108
|
exports.mcpHyperliquidFetchVaultApysOutputSchema = mcpHyperliquidFetchVaultApysOutputSchema;
|
|
11980
12109
|
exports.mcpHyperliquidFetchVaultsInputSchema = mcpHyperliquidFetchVaultsInputSchema;
|
|
11981
12110
|
exports.mcpHyperliquidFetchVaultsOutputSchema = mcpHyperliquidFetchVaultsOutputSchema;
|
|
12111
|
+
exports.mcpHyperliquidLendInputSchema = mcpHyperliquidLendInputSchema;
|
|
11982
12112
|
exports.mcpHyperliquidLimitOrderInputSchema = mcpHyperliquidLimitOrderInputSchema;
|
|
11983
12113
|
exports.mcpHyperliquidSearchMarketsInputSchema = mcpHyperliquidSearchMarketsInputSchema;
|
|
11984
12114
|
exports.mcpHyperliquidSearchMarketsOutputSchema = mcpHyperliquidSearchMarketsOutputSchema;
|