@continuumdao/ctm-mpc-defi 0.2.29 → 0.2.31

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.
Files changed (60) hide show
  1. package/dist/agent/catalog.cjs +2892 -13
  2. package/dist/agent/catalog.cjs.map +1 -1
  3. package/dist/agent/catalog.d.ts +5454 -977
  4. package/dist/agent/catalog.js +2784 -15
  5. package/dist/agent/catalog.js.map +1 -1
  6. package/dist/agent/skills/aerodrome/SKILL.md +93 -0
  7. package/dist/agent/skills/compound-v3/SKILL.md +132 -0
  8. package/dist/agent/skills/continuum-dao/SKILL.md +139 -0
  9. package/dist/agent/skills/morpho/SKILL.md +16 -8
  10. package/dist/buildBatch-CngvebiD.d.ts +45 -0
  11. package/dist/chains/evm/index.d.ts +6 -44
  12. package/dist/core/index.cjs +44 -40
  13. package/dist/core/index.cjs.map +1 -1
  14. package/dist/core/index.d.ts +1 -1
  15. package/dist/core/index.js +44 -40
  16. package/dist/core/index.js.map +1 -1
  17. package/dist/{eip712Multisign-xhXpUYp3.d.ts → eip712Multisign-DCW7heqX.d.ts} +11 -8
  18. package/dist/index.cjs +183 -58
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.ts +5 -2
  21. package/dist/index.js +182 -58
  22. package/dist/index.js.map +1 -1
  23. package/dist/protocols/evm/aerodrome/index.cjs +3922 -0
  24. package/dist/protocols/evm/aerodrome/index.cjs.map +1 -0
  25. package/dist/protocols/evm/aerodrome/index.d.ts +792 -0
  26. package/dist/protocols/evm/aerodrome/index.js +3843 -0
  27. package/dist/protocols/evm/aerodrome/index.js.map +1 -0
  28. package/dist/protocols/evm/arcus/index.cjs +62 -55
  29. package/dist/protocols/evm/arcus/index.cjs.map +1 -1
  30. package/dist/protocols/evm/arcus/index.js +62 -55
  31. package/dist/protocols/evm/arcus/index.js.map +1 -1
  32. package/dist/protocols/evm/compound-v3/index.cjs +1542 -0
  33. package/dist/protocols/evm/compound-v3/index.cjs.map +1 -0
  34. package/dist/protocols/evm/compound-v3/index.d.ts +683 -0
  35. package/dist/protocols/evm/compound-v3/index.js +1488 -0
  36. package/dist/protocols/evm/compound-v3/index.js.map +1 -0
  37. package/dist/protocols/evm/continuum-dao/index.cjs +2237 -0
  38. package/dist/protocols/evm/continuum-dao/index.cjs.map +1 -0
  39. package/dist/protocols/evm/continuum-dao/index.d.ts +700 -0
  40. package/dist/protocols/evm/continuum-dao/index.js +2110 -0
  41. package/dist/protocols/evm/continuum-dao/index.js.map +1 -0
  42. package/dist/protocols/evm/hyperliquid/index.cjs +125 -110
  43. package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
  44. package/dist/protocols/evm/hyperliquid/index.js +125 -110
  45. package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
  46. package/dist/protocols/evm/morpho/index.cjs +746 -39
  47. package/dist/protocols/evm/morpho/index.cjs.map +1 -1
  48. package/dist/protocols/evm/morpho/index.d.ts +161 -14
  49. package/dist/protocols/evm/morpho/index.js +736 -42
  50. package/dist/protocols/evm/morpho/index.js.map +1 -1
  51. package/dist/protocols/evm/permit2/index.cjs +66 -59
  52. package/dist/protocols/evm/permit2/index.cjs.map +1 -1
  53. package/dist/protocols/evm/permit2/index.js +66 -59
  54. package/dist/protocols/evm/permit2/index.js.map +1 -1
  55. package/dist/protocols/evm/uniswap-v4/index.cjs +63 -56
  56. package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
  57. package/dist/protocols/evm/uniswap-v4/index.d.ts +1 -1
  58. package/dist/protocols/evm/uniswap-v4/index.js +63 -56
  59. package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
  60. package/package.json +20 -1
@@ -1,4 +1,4 @@
1
- import { getAddress, isAddress } from 'viem';
1
+ import { getAddress, parseAbi, stringToHex, keccak256, toBytes, isAddress, zeroAddress, defineChain, createPublicClient, http } from 'viem';
2
2
  import { MidnightApi } from '@morpho-org/midnight-sdk/api';
3
3
  import { zodToJsonSchema } from 'zod-to-json-schema';
4
4
  import { z } from 'zod';
@@ -92,17 +92,27 @@ var init_api = __esm({
92
92
  // src/protocols/evm/morpho/midnightConstants.ts
93
93
  var midnightConstants_exports = {};
94
94
  __export(midnightConstants_exports, {
95
+ MORPHO_BLUE_CANONICAL: () => MORPHO_BLUE_CANONICAL,
95
96
  MORPHO_MIDNIGHT_ADDRESSES: () => MORPHO_MIDNIGHT_ADDRESSES,
96
97
  MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS: () => MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS,
97
98
  MORPHO_MIDNIGHT_BASE_CHAIN_ID: () => MORPHO_MIDNIGHT_BASE_CHAIN_ID,
99
+ MORPHO_MIDNIGHT_BLUE_SUPPLY_FALLBACK_GAS: () => MORPHO_MIDNIGHT_BLUE_SUPPLY_FALLBACK_GAS,
100
+ MORPHO_MIDNIGHT_BLUE_WITHDRAW_FALLBACK_GAS: () => MORPHO_MIDNIGHT_BLUE_WITHDRAW_FALLBACK_GAS,
98
101
  MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT: () => MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT,
99
102
  MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS: () => MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS,
103
+ MORPHO_MIDNIGHT_CALLBACK_SALT: () => MORPHO_MIDNIGHT_CALLBACK_SALT,
104
+ MORPHO_MIDNIGHT_CREATE_CALLBACK_FALLBACK_GAS: () => MORPHO_MIDNIGHT_CREATE_CALLBACK_FALLBACK_GAS,
100
105
  MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS: () => MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS,
106
+ MORPHO_MIDNIGHT_DEFAULT_OFFER_TTL_SECONDS: () => MORPHO_MIDNIGHT_DEFAULT_OFFER_TTL_SECONDS,
101
107
  MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT: () => MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT,
102
108
  MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK: () => MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK,
109
+ MORPHO_MIDNIGHT_ETHEREUM_CHAIN_ID: () => MORPHO_MIDNIGHT_ETHEREUM_CHAIN_ID,
103
110
  MORPHO_MIDNIGHT_LEND_FALLBACK_GAS: () => MORPHO_MIDNIGHT_LEND_FALLBACK_GAS,
111
+ MORPHO_MIDNIGHT_MEMPOOL_PUBLISH_FALLBACK_GAS: () => MORPHO_MIDNIGHT_MEMPOOL_PUBLISH_FALLBACK_GAS,
104
112
  MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS: () => MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS,
105
113
  MORPHO_MIDNIGHT_REST_BASE: () => MORPHO_MIDNIGHT_REST_BASE,
114
+ MORPHO_MIDNIGHT_SET_CONSUMED_FALLBACK_GAS: () => MORPHO_MIDNIGHT_SET_CONSUMED_FALLBACK_GAS,
115
+ MORPHO_MIDNIGHT_SET_ROOT_FALLBACK_GAS: () => MORPHO_MIDNIGHT_SET_ROOT_FALLBACK_GAS,
106
116
  MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK: () => MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK,
107
117
  TOKEN_PERMIT_NONE: () => TOKEN_PERMIT_NONE,
108
118
  morphoMidnightAddressesForChain: () => morphoMidnightAddressesForChain
@@ -110,18 +120,36 @@ __export(midnightConstants_exports, {
110
120
  function morphoMidnightAddressesForChain(chainId) {
111
121
  return MORPHO_MIDNIGHT_ADDRESSES[chainId] ?? null;
112
122
  }
113
- var MORPHO_MIDNIGHT_REST_BASE, MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT, MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT, MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS, MORPHO_MIDNIGHT_BASE_CHAIN_ID, MORPHO_MIDNIGHT_ADDRESSES, TOKEN_PERMIT_NONE, MORPHO_MIDNIGHT_LEND_FALLBACK_GAS, MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS, MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS, MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS, MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK, MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK;
123
+ var MORPHO_MIDNIGHT_REST_BASE, MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT, MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT, MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS, MORPHO_MIDNIGHT_DEFAULT_OFFER_TTL_SECONDS, MORPHO_MIDNIGHT_BASE_CHAIN_ID, MORPHO_MIDNIGHT_ETHEREUM_CHAIN_ID, MORPHO_BLUE_CANONICAL, MORPHO_MIDNIGHT_CALLBACK_SALT, MORPHO_MIDNIGHT_ADDRESSES, TOKEN_PERMIT_NONE, MORPHO_MIDNIGHT_LEND_FALLBACK_GAS, MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS, MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS, MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS, MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK, MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK, MORPHO_MIDNIGHT_CREATE_CALLBACK_FALLBACK_GAS, MORPHO_MIDNIGHT_BLUE_SUPPLY_FALLBACK_GAS, MORPHO_MIDNIGHT_BLUE_WITHDRAW_FALLBACK_GAS, MORPHO_MIDNIGHT_SET_ROOT_FALLBACK_GAS, MORPHO_MIDNIGHT_MEMPOOL_PUBLISH_FALLBACK_GAS, MORPHO_MIDNIGHT_SET_CONSUMED_FALLBACK_GAS;
114
124
  var init_midnightConstants = __esm({
115
125
  "src/protocols/evm/morpho/midnightConstants.ts"() {
116
126
  MORPHO_MIDNIGHT_REST_BASE = "https://api.morpho.org/v0/midnight";
117
127
  MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT = 20;
118
128
  MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT = "0.5";
119
129
  MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS = 3600;
130
+ MORPHO_MIDNIGHT_DEFAULT_OFFER_TTL_SECONDS = 7 * 24 * 3600;
120
131
  MORPHO_MIDNIGHT_BASE_CHAIN_ID = 8453;
132
+ MORPHO_MIDNIGHT_ETHEREUM_CHAIN_ID = 1;
133
+ MORPHO_BLUE_CANONICAL = "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb";
134
+ MORPHO_MIDNIGHT_CALLBACK_SALT = keccak256(toBytes("continuum-midnight-lend-v1"));
121
135
  MORPHO_MIDNIGHT_ADDRESSES = {
136
+ [MORPHO_MIDNIGHT_ETHEREUM_CHAIN_ID]: {
137
+ midnight: "0x471686c42792F93528B000beF54bC10E3aa2045f",
138
+ bundles: "0x7c00dBB2b6b6b9B28745332e550dC8782Fcf77EC",
139
+ mempool: "0xde2d62449301a09A51EbF9326EA60d2e8BF4A8F7",
140
+ setterRatifier: "0xb72c416382c8A6399D0765CebfB032F040B00B3c",
141
+ ecrecoverRatifier: "0xAC439c81CAA6ef4C7B7E8F0110F8CE63A4b6D43e",
142
+ blueBuyCallbackFactory: "0x172d1FdC5f79bFe1ED46448f18541E591E5c93a7",
143
+ morphoBlue: MORPHO_BLUE_CANONICAL
144
+ },
122
145
  [MORPHO_MIDNIGHT_BASE_CHAIN_ID]: {
123
- midnight: "0xadedd8ab6de832766fedf0fac4992e5c4d3ea18a",
124
- bundles: "0x6688dEc8878f43905e11B3C6Bc025E098133144f"
146
+ midnight: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A",
147
+ bundles: "0x091183d729BE9f808c212b475E387A12E67850A7",
148
+ mempool: "0xdD6DCE32e21f7b020898a8258dA37355b4017993",
149
+ setterRatifier: "0x800B5F12A61B8198a5a6EfD794Cac6699B294d63",
150
+ ecrecoverRatifier: "0xd6e70365C8E8DDa9a4ca662C07bbE663b017755E",
151
+ blueBuyCallbackFactory: "0x7337f119Eca028bD39E0e543cEf71631D2333425",
152
+ morphoBlue: MORPHO_BLUE_CANONICAL
125
153
  }
126
154
  };
127
155
  TOKEN_PERMIT_NONE = { kind: 0, data: "0x" };
@@ -131,6 +159,12 @@ var init_midnightConstants = __esm({
131
159
  MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS = 80000n;
132
160
  MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK = 100000n;
133
161
  MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK = 120000n;
162
+ MORPHO_MIDNIGHT_CREATE_CALLBACK_FALLBACK_GAS = 1200000n;
163
+ MORPHO_MIDNIGHT_BLUE_SUPPLY_FALLBACK_GAS = 400000n;
164
+ MORPHO_MIDNIGHT_BLUE_WITHDRAW_FALLBACK_GAS = 350000n;
165
+ MORPHO_MIDNIGHT_SET_ROOT_FALLBACK_GAS = 80000n;
166
+ MORPHO_MIDNIGHT_MEMPOOL_PUBLISH_FALLBACK_GAS = 250000n;
167
+ MORPHO_MIDNIGHT_SET_CONSUMED_FALLBACK_GAS = 80000n;
134
168
  }
135
169
  });
136
170
 
@@ -140,6 +174,7 @@ __export(midnightApi_exports, {
140
174
  fetchMorphoMidnightBook: () => fetchMorphoMidnightBook,
141
175
  fetchMorphoMidnightBookQuote: () => fetchMorphoMidnightBookQuote,
142
176
  fetchMorphoMidnightBooks: () => fetchMorphoMidnightBooks,
177
+ fetchMorphoMidnightMakerOffers: () => fetchMorphoMidnightMakerOffers,
143
178
  fetchMorphoMidnightMarketById: () => fetchMorphoMidnightMarketById,
144
179
  fetchMorphoMidnightUserMarketPosition: () => fetchMorphoMidnightUserMarketPosition,
145
180
  fetchMorphoMidnightUserPositions: () => fetchMorphoMidnightUserPositions,
@@ -281,6 +316,39 @@ async function fetchMorphoMidnightUserPositions(args) {
281
316
  }
282
317
  return rows;
283
318
  }
319
+ async function fetchMorphoMidnightMakerOffers(args) {
320
+ const qs = new URLSearchParams();
321
+ qs.set("maker", getAddress(args.maker));
322
+ if (args.chainId != null) qs.set("chain_ids", String(args.chainId));
323
+ const j = await midnightGetJson(`/takeable-offers?${qs}`);
324
+ const out = [];
325
+ for (const row of j.data ?? []) {
326
+ const o = row.offer;
327
+ if (!o?.maker || !isAddress(o.maker) || !o.market?.loan_token || !isAddress(o.market.loan_token)) continue;
328
+ if (!o.market.midnight || !isAddress(o.market.midnight)) continue;
329
+ const group = (o.group ?? "").trim();
330
+ if (!group.startsWith("0x") || group.length !== 66) continue;
331
+ const callback = o.callback && isAddress(o.callback) ? getAddress(o.callback) : "0x0000000000000000000000000000000000000000";
332
+ out.push({
333
+ marketId: String(row.market_id ?? ""),
334
+ chainId: Number(o.market.chain_id ?? args.chainId ?? 0),
335
+ midnight: getAddress(o.market.midnight),
336
+ loanToken: getAddress(o.market.loan_token),
337
+ maker: getAddress(o.maker),
338
+ buy: o.buy === true,
339
+ tick: String(o.tick ?? "0"),
340
+ maxAssets: String(o.max_assets ?? "0"),
341
+ maxUnits: String(o.max_units ?? "0"),
342
+ expiry: Number(o.expiry ?? 0),
343
+ group,
344
+ callback,
345
+ callbackData: o.callback_data ?? "0x",
346
+ units: String(row.units ?? "0"),
347
+ maturity: o.market.maturity != null ? Number(o.market.maturity) : null
348
+ });
349
+ }
350
+ return out;
351
+ }
284
352
  async function fetchMorphoMidnightUserMarketPosition(args) {
285
353
  const marketId = args.marketId.trim();
286
354
  const user = args.user.trim();
@@ -918,7 +986,7 @@ var evmMultisignCommonInputSchema = z.object({
918
986
  chainDetail: chainDetailSchema.optional().describe("Server-filled gas row from chain registry when keyGenId is set."),
919
987
  customGasChainDetails: z.record(z.unknown()).optional().describe("Snapshot written to extraJSON.customGasChainDetails when useCustomGas is true."),
920
988
  expiryDate: z.number().int().positive().optional().describe(
921
- "Optional Unix seconds (UTC) when the MPC sign request expires. Uniswap V4, GMX, Hyperliquid, and Curve DAO default to 30 minutes when omitted; other protocols use the node default (7 days)."
989
+ "Optional Unix seconds (UTC) when the MPC sign request expires. Uniswap V4, GMX, Hyperliquid, Curve DAO, and Aerodrome default to 30 minutes when omitted; other protocols use the node default (7 days)."
922
990
  )
923
991
  });
924
992
  function withMultisignKeySourceRefine(schema) {
@@ -1654,6 +1722,182 @@ var mcpCurveDaoBuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
1654
1722
  })
1655
1723
  )
1656
1724
  );
1725
+ var chain8453 = agentEvmChainIdSchema.describe("Must be 8453 (Base). Aerodrome is Base-only.");
1726
+ var rpcUrlOptional = z.string().min(1).optional().describe("JSON-RPC URL; continuum-mcp-server injects from chain registry \u2014 do not pass a public RPC URL");
1727
+ var mcpAerodromeDiscoverPoolsInputSchema = z.object({
1728
+ chainId: chain8453,
1729
+ rpcUrl: rpcUrlOptional,
1730
+ token: z.string().min(1).describe("Ticker or 0x address to find pools for (AAPLc, USDC, ETH, WETH, AERO)."),
1731
+ tokenOut: z.string().min(1).optional().describe("Optional counterpart. Defaults to USDC so B20 stocks resolve. Tickers OK.")
1732
+ });
1733
+ var mcpAerodromeDiscoverPoolsOutputSchema = jsonObjectSchema.describe(
1734
+ "{ token, tokenOut, pools[] (lp, kind, tickSpacing, factory), notes }. Factory getPool only \u2014 not LpSugar. Then call ctm_aerodrome_quote."
1735
+ );
1736
+ var mcpAerodromeFetchPoolsInputSchema = z.object({
1737
+ chainId: chain8453,
1738
+ rpcUrl: rpcUrlOptional,
1739
+ limit: z.number().int().positive().max(200).optional(),
1740
+ offset: z.number().int().min(0).optional()
1741
+ });
1742
+ var mcpAerodromeFetchPoolsOutputSchema = jsonObjectSchema.describe("{ chainId, pools[] }");
1743
+ var mcpAerodromeFetchPositionsInputSchema = z.object({
1744
+ chainId: chain8453,
1745
+ rpcUrl: rpcUrlOptional,
1746
+ account: evmAddressSchema.optional(),
1747
+ executorAddress: evmAddressSchema.optional().describe("Server-filled from keyGenId when omitted")
1748
+ });
1749
+ var mcpAerodromeFetchPositionsOutputSchema = jsonObjectSchema.describe(
1750
+ "{ chainId, account, notes, positions[] } \u2014 each row has label (vAMM-USDC/AERO \xB7 #id), kind, gauge, stakedInGauge, claimFees.pool, claimEmissions (gauge + tokenId/cl for Slipstream, or null if no gauge). Dust v2 rows omitted."
1751
+ );
1752
+ var mcpAerodromeQuoteInputSchema = z.object({
1753
+ chainId: chain8453,
1754
+ rpcUrl: rpcUrlOptional,
1755
+ tokenIn: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x address. Native: 0x0 / eth. B20 stocks need no address lookup."),
1756
+ tokenOut: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x address. Native: 0x0 / eth."),
1757
+ amountHuman: z.string().min(1).describe("Human-readable amount of tokenIn (B20 stocks are 8 decimals)"),
1758
+ tokenInDecimals: z.number().int().min(0).max(18).optional().describe("Optional override. Omit for known tickers \u2014 AAPLc and other B20 stocks always use 8.")
1759
+ });
1760
+ var mcpAerodromeQuoteOutputSchema = jsonObjectSchema.describe(
1761
+ "{ tokenIn, tokenOut, amountInWei, amountOutWei, amountOutHuman, priceImpactPercent (0\u2013100 vs a tiny same-route probe, or null), hops, pathPacked, isNativeIn, isNativeOut, source }"
1762
+ );
1763
+ var mcpAerodromeBuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
1764
+ evmMultisignCommonInputSchema.extend({
1765
+ tokenIn: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x address / 0x0 native"),
1766
+ tokenOut: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x address / 0x0 native"),
1767
+ amountHuman: z.string().min(1),
1768
+ slippagePercent: z.number().gt(0).lt(100),
1769
+ quoteSnapshot: jsonObjectSchema.optional()
1770
+ })
1771
+ );
1772
+ var mcpAerodromeQuoteAddLiquidityInputSchema = z.object({
1773
+ chainId: chain8453,
1774
+ rpcUrl: rpcUrlOptional,
1775
+ tokenA: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x / 0x0 native"),
1776
+ tokenB: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x / 0x0 native"),
1777
+ stable: agentBooleanSchema(false),
1778
+ amountAHuman: z.string().optional().describe("Human amount of tokenA. Omit to solve from tokenB (one-sided, same as the dialog)."),
1779
+ amountBHuman: z.string().optional().describe("Human amount of tokenB. Omit to solve from tokenA (one-sided, same as the dialog)."),
1780
+ tokenADecimals: z.number().int().min(0).max(18).optional(),
1781
+ tokenBDecimals: z.number().int().min(0).max(18).optional()
1782
+ }).refine((v) => Boolean((v.amountAHuman ?? "").trim() || (v.amountBHuman ?? "").trim()), {
1783
+ message: "Enter amountAHuman or amountBHuman. The other side is filled from the current vAMM, sAMM, or Slipstream pool."
1784
+ });
1785
+ var mcpAerodromeQuoteAddLiquidityOutputSchema = jsonObjectSchema.describe(
1786
+ "{ tokenA, tokenB, amountAHuman, amountBHuman, kind (stable|volatile|cl), tickSpacing?, emptyPool, seedable, hint }. seedable:false = do not first-deposit (ETH/AAPLc has no pool \u2014 pair vs USDC). kind:cl is a Slipstream ratio; basic addLiquidity is v2 only."
1787
+ );
1788
+ var mcpAerodromeQuoteClDepositInputSchema = z.object({
1789
+ chainId: chain8453,
1790
+ rpcUrl: rpcUrlOptional,
1791
+ token0: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native"),
1792
+ token1: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native"),
1793
+ amount0Human: z.string().optional(),
1794
+ amount1Human: z.string().optional(),
1795
+ tickSpacing: z.number().int(),
1796
+ tickLower: z.number().int(),
1797
+ tickUpper: z.number().int(),
1798
+ sqrtPriceX96: z.string().min(1).describe("0 if the CL pool already exists")
1799
+ });
1800
+ var mcpAerodromeQuoteClDepositOutputSchema = jsonObjectSchema;
1801
+ var mcpAerodromeBuildAddLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
1802
+ evmMultisignCommonInputSchema.extend({
1803
+ tokenA: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native"),
1804
+ tokenB: z.string().min(1).describe("Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native"),
1805
+ stable: agentBooleanSchema(false),
1806
+ amountAHuman: z.string().optional().describe("Omit to solve from amountBHuman (one-sided)."),
1807
+ amountBHuman: z.string().optional().describe("Omit to solve from amountAHuman (one-sided)."),
1808
+ slippagePercent: z.number().gt(0).lt(100)
1809
+ }).refine((v) => Boolean((v.amountAHuman ?? "").trim() || (v.amountBHuman ?? "").trim()), {
1810
+ message: "Enter amountAHuman or amountBHuman."
1811
+ })
1812
+ );
1813
+ var mcpAerodromeBuildRemoveLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
1814
+ evmMultisignCommonInputSchema.extend({
1815
+ tokenA: z.string().min(1),
1816
+ tokenB: z.string().min(1),
1817
+ stable: agentBooleanSchema(false),
1818
+ lpToken: evmAddressSchema,
1819
+ liquidityHuman: z.string().min(1),
1820
+ lpDecimals: z.number().int().min(0).max(18).optional(),
1821
+ amountAMinHuman: z.string().optional(),
1822
+ amountBMinHuman: z.string().optional()
1823
+ })
1824
+ );
1825
+ var mcpAerodromeBuildClMintMultisignInputSchema = withMultisignKeySourceRefine(
1826
+ evmMultisignCommonInputSchema.extend({
1827
+ token0: z.string().min(1),
1828
+ token1: z.string().min(1),
1829
+ amount0Human: z.string().optional(),
1830
+ amount1Human: z.string().optional(),
1831
+ tickSpacing: z.number().int(),
1832
+ tickLower: z.number().int(),
1833
+ tickUpper: z.number().int(),
1834
+ sqrtPriceX96: z.string().min(1),
1835
+ slippagePercent: z.number().gt(0).lt(100)
1836
+ })
1837
+ );
1838
+ var mcpAerodromeBuildClIncreaseMultisignInputSchema = withMultisignKeySourceRefine(
1839
+ evmMultisignCommonInputSchema.extend({
1840
+ tokenId: z.string().min(1),
1841
+ token0: z.string().min(1),
1842
+ token1: z.string().min(1),
1843
+ amount0Wei: z.string().min(1),
1844
+ amount1Wei: z.string().min(1),
1845
+ slippagePercent: z.number().gt(0).lt(100)
1846
+ })
1847
+ );
1848
+ var mcpAerodromeBuildClDecreaseMultisignInputSchema = withMultisignKeySourceRefine(
1849
+ evmMultisignCommonInputSchema.extend({
1850
+ tokenId: z.string().min(1),
1851
+ liquidity: z.string().min(1),
1852
+ amount0MinWei: z.string().optional(),
1853
+ amount1MinWei: z.string().optional()
1854
+ })
1855
+ );
1856
+ var mcpAerodromeBuildClBurnMultisignInputSchema = withMultisignKeySourceRefine(
1857
+ evmMultisignCommonInputSchema.extend({
1858
+ tokenId: z.string().min(1)
1859
+ })
1860
+ );
1861
+ var mcpAerodromeBuildGaugeStakeMultisignInputSchema = withMultisignKeySourceRefine(
1862
+ evmMultisignCommonInputSchema.extend({
1863
+ gauge: evmAddressSchema,
1864
+ lpToken: evmAddressSchema.optional(),
1865
+ amountHuman: z.string().optional(),
1866
+ lpDecimals: z.number().int().min(0).max(18).optional(),
1867
+ tokenId: z.string().optional(),
1868
+ cl: agentBooleanSchema(false)
1869
+ })
1870
+ );
1871
+ var mcpAerodromeBuildGaugeUnstakeMultisignInputSchema = withMultisignKeySourceRefine(
1872
+ evmMultisignCommonInputSchema.extend({
1873
+ gauge: evmAddressSchema,
1874
+ amountHuman: z.string().optional(),
1875
+ lpDecimals: z.number().int().min(0).max(18).optional(),
1876
+ tokenId: z.string().optional(),
1877
+ cl: agentBooleanSchema(false)
1878
+ })
1879
+ );
1880
+ var mcpAerodromeBuildClaimFeesMultisignInputSchema = withMultisignKeySourceRefine(
1881
+ evmMultisignCommonInputSchema.extend({
1882
+ pool: evmAddressSchema.describe(
1883
+ "Pool (lp) from ctm_aerodrome_fetch_positions claimFees.pool \u2014 not the gauge. Dialog: \u201CFees from the pool\u201D."
1884
+ )
1885
+ })
1886
+ );
1887
+ var mcpAerodromeBuildClCollectFeesMultisignInputSchema = withMultisignKeySourceRefine(
1888
+ evmMultisignCommonInputSchema.extend({
1889
+ tokenId: z.string().min(1)
1890
+ })
1891
+ );
1892
+ var mcpAerodromeBuildClaimEmissionsMultisignInputSchema = withMultisignKeySourceRefine(
1893
+ evmMultisignCommonInputSchema.extend({
1894
+ gauge: evmAddressSchema.describe(
1895
+ "Gauge from fetch_positions claimEmissions.gauge \u2014 not the pool. Dialog: \u201CEmissions from the gauge in AERO\u201D. Skip if claimEmissions is null."
1896
+ ),
1897
+ tokenId: z.string().optional().describe("Required for Slipstream staked positions (claimEmissions.tokenId)."),
1898
+ cl: agentBooleanSchema(false).describe("true when claimEmissions.cl (Slipstream NFT getReward).")
1899
+ })
1900
+ );
1657
1901
 
1658
1902
  // src/protocols/evm/morpho/robinhoodEarn.ts
1659
1903
  var ROBINHOOD_CHAIN_ID = 4663;
@@ -1830,6 +2074,23 @@ function preprocessMorphoMidnightBorrowInput(raw) {
1830
2074
  }
1831
2075
  return o;
1832
2076
  }
2077
+ function preprocessMorphoMidnightLendOfferInput(raw) {
2078
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
2079
+ const o = { ...raw };
2080
+ const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
2081
+ if (!purposeText) {
2082
+ const amt = String(o.amountHuman ?? "").trim();
2083
+ if (amt) o.purposeText = `Morpho Midnight lend offer ${amt}`;
2084
+ }
2085
+ return o;
2086
+ }
2087
+ function preprocessMorphoMidnightCancelLendOfferInput(raw) {
2088
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
2089
+ const o = { ...raw };
2090
+ const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
2091
+ if (!purposeText) o.purposeText = "Morpho Midnight cancel lend offer";
2092
+ return o;
2093
+ }
1833
2094
  function preprocessMorphoMidnightRepayInput(raw) {
1834
2095
  if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
1835
2096
  const o = { ...raw };
@@ -1911,6 +2172,34 @@ var mcpMorphoFetchMidnightPositionsOutputSchema = z.object({
1911
2172
  })
1912
2173
  )
1913
2174
  });
2175
+ var mcpMorphoFetchMidnightOffersInputSchema = z.object({
2176
+ user: z.string().min(1).describe("Maker EVM address"),
2177
+ chainId: agentEvmChainIdSchema.optional()
2178
+ });
2179
+ var mcpMorphoFetchMidnightOffersOutputSchema = z.object({
2180
+ offers: z.array(
2181
+ z.object({
2182
+ marketId: z.string(),
2183
+ chainId: z.number().int(),
2184
+ midnightAddress: z.string(),
2185
+ loanTokenAddress: z.string(),
2186
+ maker: z.string(),
2187
+ group: z.string().describe("Pass to ctm_morpho_build_midnight_cancel_lend_offer_multisign"),
2188
+ callback: z.string(),
2189
+ callbackData: z.string(),
2190
+ tick: z.string(),
2191
+ maxAssets: z.string(),
2192
+ remainingUnits: z.string(),
2193
+ expiry: z.number(),
2194
+ expiryIso: z.string(),
2195
+ maturity: z.number().nullable(),
2196
+ maturityIso: z.string(),
2197
+ lendApr: z.string(),
2198
+ lendAprNumeric: z.number().nullable(),
2199
+ marketLabel: z.string()
2200
+ })
2201
+ )
2202
+ });
1914
2203
  var mcpServerCommonInputSchema = z.object({
1915
2204
  keyGenId: z.string().min(1).describe("KeyGen id from fetch_key_gen_result / node preferred KeyGen"),
1916
2205
  chainId: z.number().int().positive().describe("EVM chain id; RPC and gas config resolved from chain registry"),
@@ -2290,6 +2579,35 @@ var mcpMorphoMidnightBorrowInputSchema = withMultisignKeySourceRefine(
2290
2579
  })
2291
2580
  )
2292
2581
  );
2582
+ var mcpMorphoMidnightLendOfferInputSchema = withMultisignKeySourceRefine(
2583
+ z.preprocess(
2584
+ preprocessMorphoMidnightLendOfferInput,
2585
+ evmMultisignCommonInputSchema.extend({
2586
+ marketId: z.string().min(1).describe("marketId from ctm_morpho_fetch_midnight_books"),
2587
+ amountHuman: z.string().min(1).describe("Loan-token amount to park in Blue and quote on Midnight"),
2588
+ loanToken: evmAddressSchema.optional(),
2589
+ lendAprPct: z.string().optional().describe("Target fixed lend APR percent, e.g. 5.2. Defaults to book best bid."),
2590
+ tick: z.string().optional().describe("Override Midnight tick (takes precedence over lendAprPct)"),
2591
+ blueMarketId: z.string().optional().describe("Morpho Blue market to earn variable yield until the offer fills"),
2592
+ expirySeconds: agentCoercedOptionalIntSchema(z.number().int().min(60)),
2593
+ marketLabel: z.string().optional(),
2594
+ isNativeIn: agentOptionalBooleanSchema()
2595
+ })
2596
+ )
2597
+ );
2598
+ var mcpMorphoMidnightCancelLendOfferInputSchema = withMultisignKeySourceRefine(
2599
+ z.preprocess(
2600
+ preprocessMorphoMidnightCancelLendOfferInput,
2601
+ evmMultisignCommonInputSchema.extend({
2602
+ group: z.string().min(1).describe("Offer group id from ctm_morpho_fetch_midnight_offers"),
2603
+ callback: evmAddressSchema.optional(),
2604
+ callbackData: z.string().optional().describe("Hex Blue MarketParams from the offer row"),
2605
+ midnight: evmAddressSchema.optional(),
2606
+ withdrawRemaining: agentOptionalBooleanSchema(),
2607
+ marketLabel: z.string().optional()
2608
+ })
2609
+ )
2610
+ );
2293
2611
  var mcpMorphoMidnightRepayInputSchema = withMultisignKeySourceRefine(
2294
2612
  z.preprocess(
2295
2613
  preprocessMorphoMidnightRepayInput,
@@ -2302,6 +2620,473 @@ var mcpMorphoMidnightRepayInputSchema = withMultisignKeySourceRefine(
2302
2620
  })
2303
2621
  )
2304
2622
  );
2623
+ var mcpContinuumDaoCreateLockInputSchema = mcpMultisignInput({
2624
+ amountHuman: z.string().min(1).describe("CTM amount to lock"),
2625
+ lockDurationSeconds: z.union([z.string(), z.number()]).describe("Lock duration in seconds"),
2626
+ ctm: evmAddressSchema.optional(),
2627
+ votingEscrow: evmAddressSchema.optional()
2628
+ });
2629
+ var mcpContinuumDaoIncreaseAmountInputSchema = mcpMultisignInput({
2630
+ tokenId: z.union([z.string(), z.number()]),
2631
+ amountHuman: z.string().min(1),
2632
+ ctm: evmAddressSchema.optional(),
2633
+ votingEscrow: evmAddressSchema.optional()
2634
+ });
2635
+ var mcpContinuumDaoIncreaseUnlockTimeInputSchema = mcpMultisignInput({
2636
+ tokenId: z.union([z.string(), z.number()]),
2637
+ lockDurationSeconds: z.union([z.string(), z.number()]),
2638
+ votingEscrow: evmAddressSchema.optional()
2639
+ });
2640
+ var mcpContinuumDaoSplitInputSchema = mcpMultisignInput({
2641
+ tokenId: z.union([z.string(), z.number()]),
2642
+ extractedHuman: z.string().min(1),
2643
+ votingEscrow: evmAddressSchema.optional()
2644
+ });
2645
+ var mcpContinuumDaoMergeInputSchema = mcpMultisignInput({
2646
+ fromTokenId: z.union([z.string(), z.number()]),
2647
+ toTokenId: z.union([z.string(), z.number()]),
2648
+ votingEscrow: evmAddressSchema.optional()
2649
+ });
2650
+ var mcpContinuumDaoTokenIdInputSchema = mcpMultisignInput({
2651
+ tokenId: z.union([z.string(), z.number()]),
2652
+ votingEscrow: evmAddressSchema.optional()
2653
+ });
2654
+ var mcpContinuumDaoDelegateInputSchema = mcpMultisignInput({
2655
+ delegatee: evmAddressSchema,
2656
+ votingEscrow: evmAddressSchema.optional()
2657
+ });
2658
+ var mcpContinuumDaoUndelegateInputSchema = mcpMultisignInput({
2659
+ votingEscrow: evmAddressSchema.optional()
2660
+ });
2661
+ var mcpContinuumDaoFetchDelegatesInputSchema = z.object({
2662
+ chainId: z.union([z.string(), z.number()]),
2663
+ rpcUrl: z.string().min(1),
2664
+ account: evmAddressSchema,
2665
+ votingEscrow: evmAddressSchema.optional()
2666
+ });
2667
+ var mcpContinuumDaoFetchDelegatesOutputSchema = z.object({
2668
+ account: evmAddressSchema,
2669
+ delegatee: evmAddressSchema,
2670
+ self: z.boolean()
2671
+ });
2672
+ var mcpContinuumDaoTransferInputSchema = mcpMultisignInput({
2673
+ tokenId: z.union([z.string(), z.number()]),
2674
+ to: evmAddressSchema,
2675
+ votingEscrow: evmAddressSchema.optional()
2676
+ });
2677
+ var mcpContinuumDaoAttachInputSchema = mcpMultisignInput({
2678
+ nodeKey: z.string().min(1),
2679
+ tokenId: z.union([z.string(), z.number()]),
2680
+ mpaWallet: evmAddressSchema,
2681
+ forumHandle: z.string().optional(),
2682
+ email: z.string().optional(),
2683
+ vps: z.string().optional(),
2684
+ ram: z.union([z.string(), z.number()]).optional(),
2685
+ cpu: z.union([z.string(), z.number()]).optional(),
2686
+ dIDType: z.string().optional(),
2687
+ dID: z.string().optional()
2688
+ });
2689
+ var mcpContinuumDaoRequestDetachInputSchema = mcpMultisignInput({
2690
+ tokenId: z.union([z.string(), z.number()]),
2691
+ nodeProperties: evmAddressSchema
2692
+ });
2693
+ var govActionSchema = z.object({
2694
+ target: evmAddressSchema,
2695
+ value: z.string().optional(),
2696
+ signature: z.string().optional(),
2697
+ inputs: z.array(z.object({ name: z.string().optional(), type: z.string(), value: z.string() })).optional()
2698
+ });
2699
+ var govOptionSchema = z.object({
2700
+ label: z.string().min(1),
2701
+ actions: z.array(govActionSchema)
2702
+ });
2703
+ var forumTopicKeyField = z.string().min(1).describe(
2704
+ "URL of the Governance forum thread created first with ctm_continuum_dao_forum_create_topic (decision / election / treasury / constitution / admin). Must be /topic/:tid or /t/:tid. Ideas threads and the homepage are refused."
2705
+ );
2706
+ var mcpContinuumDaoProposeBravoInputSchema = mcpMultisignInput({
2707
+ title: z.string().min(1).max(128),
2708
+ actions: z.array(govActionSchema).optional(),
2709
+ governor: evmAddressSchema.optional(),
2710
+ noOpTarget: evmAddressSchema.optional(),
2711
+ forumKey: forumTopicKeyField,
2712
+ forumUrl: z.string().optional()
2713
+ });
2714
+ var mcpContinuumDaoProposeDeltaInputSchema = mcpMultisignInput({
2715
+ title: z.string().min(1).max(128),
2716
+ options: z.array(govOptionSchema).min(2),
2717
+ nWinners: z.union([z.string(), z.number()]),
2718
+ governor: evmAddressSchema.optional(),
2719
+ noOpTarget: evmAddressSchema.optional(),
2720
+ forumKey: forumTopicKeyField,
2721
+ forumUrl: z.string().optional()
2722
+ });
2723
+ var mcpContinuumDaoCastVoteBravoInputSchema = mcpMultisignInput({
2724
+ proposalId: z.union([z.string(), z.number()]),
2725
+ support: z.union([z.literal(0), z.literal(1), z.literal(2), z.string()]),
2726
+ governor: evmAddressSchema.optional()
2727
+ });
2728
+ var mcpContinuumDaoCastVoteDeltaInputSchema = mcpMultisignInput({
2729
+ proposalId: z.union([z.string(), z.number()]),
2730
+ weights: z.array(z.union([z.string(), z.number()])),
2731
+ governor: evmAddressSchema.optional()
2732
+ });
2733
+ var mcpContinuumDaoProposalIdInputSchema = mcpMultisignInput({
2734
+ proposalId: z.union([z.string(), z.number()]),
2735
+ governor: evmAddressSchema.optional()
2736
+ });
2737
+ var mcpContinuumDaoFetchVotingPowerInputSchema = z.object({
2738
+ chainId: z.union([z.string(), z.number()]),
2739
+ rpcUrl: z.string().min(1),
2740
+ account: evmAddressSchema,
2741
+ governor: evmAddressSchema.optional()
2742
+ });
2743
+ var mcpContinuumDaoFetchVotingPowerOutputSchema = z.object({
2744
+ votes: z.string(),
2745
+ threshold: z.string(),
2746
+ clock: z.string()
2747
+ });
2748
+ var mcpContinuumDaoFetchProposalStateInputSchema = z.object({
2749
+ chainId: z.union([z.string(), z.number()]),
2750
+ rpcUrl: z.string().min(1),
2751
+ proposalId: z.union([z.string(), z.number()]),
2752
+ governor: evmAddressSchema.optional()
2753
+ });
2754
+ var mcpContinuumDaoFetchProposalStateOutputSchema = z.object({
2755
+ state: z.number(),
2756
+ againstVotes: z.string(),
2757
+ forVotes: z.string(),
2758
+ abstainVotes: z.string()
2759
+ });
2760
+ var mcpContinuumDaoFetchProposalsInputSchema = z.object({
2761
+ start: z.number().int().nonnegative().optional(),
2762
+ end: z.number().int().positive().optional()
2763
+ });
2764
+ var mcpContinuumDaoFetchProposalsOutputSchema = z.object({
2765
+ proposals: z.array(z.unknown()),
2766
+ total: z.number().optional()
2767
+ });
2768
+ var mcpContinuumDaoFetchProposalInputSchema = z.object({
2769
+ id: z.union([z.string(), z.number()])
2770
+ });
2771
+ var mcpContinuumDaoFetchProposalOutputSchema = z.object({
2772
+ proposal: z.unknown()
2773
+ });
2774
+ var liveProposalRowSchema = z.object({
2775
+ id: z.number().optional(),
2776
+ onchainId: z.string(),
2777
+ title: z.string(),
2778
+ configuration: z.number().optional(),
2779
+ state: z.number().nullable(),
2780
+ stateLabel: z.string(),
2781
+ bucket: z.enum(["live", "pending", "readyToExecute", "recentlyCompleted", "unknown"]),
2782
+ againstVotes: z.string().optional(),
2783
+ forVotes: z.string().optional(),
2784
+ abstainVotes: z.string().optional()
2785
+ });
2786
+ var mcpContinuumDaoFetchLiveProposalsInputSchema = z.object({
2787
+ chainId: z.union([z.string(), z.number()]).optional(),
2788
+ rpcUrl: z.string().optional(),
2789
+ governor: evmAddressSchema.optional(),
2790
+ limit: z.number().int().positive().max(100).optional(),
2791
+ completedLimit: z.number().int().nonnegative().max(20).optional()
2792
+ });
2793
+ var mcpContinuumDaoFetchLiveProposalsOutputSchema = z.object({
2794
+ overlay: z.enum(["on-chain", "backend-only"]),
2795
+ scanned: z.number(),
2796
+ live: z.array(liveProposalRowSchema),
2797
+ pending: z.array(liveProposalRowSchema),
2798
+ readyToExecute: z.array(liveProposalRowSchema),
2799
+ recentlyCompleted: z.array(liveProposalRowSchema),
2800
+ unknown: z.array(liveProposalRowSchema),
2801
+ note: z.string()
2802
+ });
2803
+ var mcpContinuumDaoExplainProposalInputSchema = z.object({
2804
+ id: z.union([z.string(), z.number()]).optional(),
2805
+ onchainId: z.string().optional(),
2806
+ forumUrl: z.string().optional()
2807
+ });
2808
+ var mcpContinuumDaoExplainProposalOutputSchema = z.object({
2809
+ id: z.number().optional(),
2810
+ onchainId: z.string(),
2811
+ title: z.string(),
2812
+ description: z.string(),
2813
+ proposer: z.string(),
2814
+ forumKey: z.string(),
2815
+ forumSection: z.string().nullable().optional(),
2816
+ forumCid: z.number().nullable().optional(),
2817
+ typeLabel: z.string(),
2818
+ configuration: z.enum(["bravo", "delta"]),
2819
+ nWinners: z.number().optional(),
2820
+ briefing: z.string(),
2821
+ actions: z.array(z.unknown()),
2822
+ options: z.array(z.unknown()),
2823
+ risks: z.array(z.string())
2824
+ });
2825
+ var mcpContinuumDaoRegisterProposalInputSchema = z.object({
2826
+ onchainId: z.string().min(1),
2827
+ title: z.string().min(1),
2828
+ description: z.string(),
2829
+ proposer: evmAddressSchema,
2830
+ forumKey: forumTopicKeyField,
2831
+ type: z.number().int().min(0).max(4),
2832
+ configuration: z.union([z.literal(0), z.literal(1)]),
2833
+ actions: z.array(z.unknown()).optional(),
2834
+ options: z.array(z.unknown()).optional()
2835
+ });
2836
+ var mcpContinuumDaoRegisterProposalOutputSchema = z.object({
2837
+ ok: z.literal(true),
2838
+ result: z.unknown()
2839
+ });
2840
+ var forumUrlField = { forumUrl: z.string().optional(), ticket: z.string().optional() };
2841
+ var mcpContinuumDaoForumResolveInputSchema = z.object({
2842
+ url: z.string().optional(),
2843
+ tid: z.union([z.string(), z.number()]).optional(),
2844
+ forumUrl: z.string().optional()
2845
+ });
2846
+ var mcpContinuumDaoForumResolveOutputSchema = z.object({
2847
+ tid: z.number(),
2848
+ slug: z.string().optional(),
2849
+ url: z.string()
2850
+ });
2851
+ var mcpContinuumDaoForumFetchThreadInputSchema = z.object({
2852
+ url: z.string().optional(),
2853
+ tid: z.union([z.string(), z.number()]).optional(),
2854
+ index: z.number().int().nonnegative().optional(),
2855
+ start: z.number().int().nonnegative().optional(),
2856
+ limit: z.number().int().positive().max(100).optional(),
2857
+ forumUrl: z.string().optional()
2858
+ });
2859
+ var mcpContinuumDaoForumFetchThreadOutputSchema = z.unknown();
2860
+ var mcpContinuumDaoForumReplyCountInputSchema = z.object({
2861
+ url: z.string().optional(),
2862
+ tid: z.union([z.string(), z.number()]).optional(),
2863
+ forumUrl: z.string().optional()
2864
+ });
2865
+ var mcpContinuumDaoForumReplyCountOutputSchema = z.object({
2866
+ tid: z.number(),
2867
+ postcount: z.number(),
2868
+ replyCount: z.number()
2869
+ });
2870
+ var mcpContinuumDaoForumFetchPostInputSchema = z.object({
2871
+ pid: z.union([z.string(), z.number()]),
2872
+ forumUrl: z.string().optional()
2873
+ });
2874
+ var mcpContinuumDaoForumFetchPostOutputSchema = z.unknown();
2875
+ var forumRecencyFields = {
2876
+ hours: agentCoercedOptionalNumberSchema(z.number().positive().max(24 * 365)).describe(
2877
+ "Only posts from the last X hours."
2878
+ ),
2879
+ since: z.string().min(1).optional().describe("Only posts at or after this ISO date (YYYY-MM-DD or full ISO) or unix timestamp."),
2880
+ start: agentCoercedOptionalIntSchema(z.number().int().nonnegative()),
2881
+ limit: agentCoercedOptionalIntSchema(z.number().int().positive().max(100)),
2882
+ forumUrl: z.string().optional()
2883
+ };
2884
+ var mcpContinuumDaoForumSearchInputSchema = z.object({
2885
+ query: z.string().max(200).optional().describe(
2886
+ "Case-insensitive substring. Matches a new thread title or any post body. Omit with hours/since to list recent posts."
2887
+ ),
2888
+ ...forumRecencyFields
2889
+ }).refine((v) => Boolean(v.query?.trim()) || v.hours != null || Boolean(v.since?.trim()), {
2890
+ message: "Provide query and/or a time filter (hours or since)"
2891
+ });
2892
+ var forumPostListItemSchema = z.object({
2893
+ id: z.number().int().positive().describe("Post id (pid). Open with ctm_continuum_dao_forum_fetch_post."),
2894
+ title: z.string().describe("Thread title (new thread, or parent thread title for a reply)."),
2895
+ username: z.string().describe("Author username."),
2896
+ timestamp: z.number().int().nonnegative().describe("Creation time as unix milliseconds."),
2897
+ createdAt: z.string().describe("Creation time as UTC ISO-8601.")
2898
+ });
2899
+ var mcpContinuumDaoForumSearchOutputSchema = z.object({
2900
+ results: z.array(forumPostListItemSchema),
2901
+ start: z.number().optional(),
2902
+ limit: z.number().optional(),
2903
+ nextStart: z.number().nullable().optional()
2904
+ });
2905
+ var mcpContinuumDaoForumRecentInputSchema = z.object({
2906
+ ...forumRecencyFields,
2907
+ ticket: z.string().optional().describe("Optional forum ticket so private categories the user can read are included.")
2908
+ }).refine((v) => v.hours != null || Boolean(v.since?.trim()), {
2909
+ message: "Provide a time filter (hours or since)"
2910
+ });
2911
+ var mcpContinuumDaoForumRecentOutputSchema = z.object({
2912
+ results: z.array(forumPostListItemSchema),
2913
+ start: z.number().optional(),
2914
+ limit: z.number().optional(),
2915
+ nextStart: z.number().nullable().optional()
2916
+ });
2917
+ var mcpContinuumDaoForumDeleteInputSchema = z.object({
2918
+ pid: z.union([z.string(), z.number()]).optional().describe("Delete this post (pid)."),
2919
+ tid: z.union([z.string(), z.number()]).optional().describe("Delete this thread (tid)."),
2920
+ url: z.string().optional().describe("Delete this thread by forum topic URL."),
2921
+ username: z.string().min(1).optional().describe("Delete all posts by this username (privilege-filtered)."),
2922
+ hours: agentCoercedOptionalNumberSchema(z.number().positive().max(24 * 365)).describe(
2923
+ "Only delete posts/threads in the last X hours. Omit with since for all."
2924
+ ),
2925
+ since: z.string().min(1).optional().describe("Only delete posts/threads at or after this ISO date or unix timestamp. Omit with hours for all."),
2926
+ ticket: z.string().min(1).describe("Forum write ticket from EIP-712 sign-in. Caller must be an admin or moderator."),
2927
+ forumUrl: z.string().optional()
2928
+ }).refine(
2929
+ (v) => {
2930
+ const post = v.pid != null && String(v.pid).trim() !== "";
2931
+ const thread = Boolean(v.url?.trim() || v.tid != null && String(v.tid).trim() !== "");
2932
+ const user = Boolean(v.username?.trim());
2933
+ return Number(post) + Number(thread) + Number(user) === 1;
2934
+ },
2935
+ { message: "Provide exactly one of pid, tid/url, or username" }
2936
+ );
2937
+ var mcpContinuumDaoForumDeleteOutputSchema = z.object({
2938
+ ok: z.literal(true),
2939
+ mode: z.enum(["post", "thread", "user"]),
2940
+ username: z.string().optional(),
2941
+ uid: z.number().optional(),
2942
+ deleted: z.array(
2943
+ z.object({
2944
+ id: z.number().int().positive(),
2945
+ kind: z.enum(["post", "thread"]),
2946
+ title: z.string().optional(),
2947
+ username: z.string().optional()
2948
+ })
2949
+ ),
2950
+ skipped: z.array(
2951
+ z.object({
2952
+ id: z.number().int().nonnegative(),
2953
+ reason: z.string()
2954
+ })
2955
+ )
2956
+ });
2957
+ var mcpContinuumDaoForumUserPostIdsInputSchema = z.object({
2958
+ username: z.string().min(1),
2959
+ start: z.number().int().nonnegative().optional(),
2960
+ limit: z.number().int().positive().max(100).optional(),
2961
+ forumUrl: z.string().optional()
2962
+ });
2963
+ var mcpContinuumDaoForumUserPostIdsOutputSchema = z.object({
2964
+ username: z.string(),
2965
+ uid: z.number(),
2966
+ pids: z.array(z.number()),
2967
+ start: z.number().optional(),
2968
+ limit: z.number().optional(),
2969
+ nextStart: z.number().nullable().optional()
2970
+ });
2971
+ var mcpContinuumDaoForumReplyInputSchema = z.object({
2972
+ url: z.string().optional(),
2973
+ tid: z.union([z.string(), z.number()]).optional(),
2974
+ content: z.string().min(1).max(8e3),
2975
+ toPid: z.number().int().positive().optional(),
2976
+ ...forumUrlField
2977
+ });
2978
+ var mcpContinuumDaoForumReplyOutputSchema = z.unknown();
2979
+ var mcpContinuumDaoForumReactInputSchema = z.object({
2980
+ pid: z.union([z.string(), z.number()]),
2981
+ emoji: z.string().min(1),
2982
+ ...forumUrlField
2983
+ });
2984
+ var mcpContinuumDaoForumReactOutputSchema = z.unknown();
2985
+ var mcpContinuumDaoForumCreateTopicInputSchema = z.object({
2986
+ section: z.enum(["decision", "election", "treasury", "constitution", "admin"]).optional(),
2987
+ cid: z.number().int().positive().optional(),
2988
+ title: z.string().min(8).max(128),
2989
+ content: z.string().min(1).max(8e3),
2990
+ ...forumUrlField
2991
+ });
2992
+ var mcpContinuumDaoForumCreateTopicOutputSchema = z.unknown();
2993
+ var mcpContinuumDaoForumCreateIdeaInputSchema = z.object({
2994
+ title: z.string().min(8).max(128),
2995
+ content: z.string().min(1).max(8e3),
2996
+ ...forumUrlField
2997
+ });
2998
+ var mcpContinuumDaoForumCreateIdeaOutputSchema = z.unknown();
2999
+ var mcpContinuumDaoForumMeInputSchema = z.object({
3000
+ ...forumUrlField
3001
+ });
3002
+ var mcpContinuumDaoForumMeOutputSchema = z.unknown();
3003
+ var mcpContinuumDaoForumUnreadInputSchema = z.object({
3004
+ ticket: z.string().min(1).describe("Forum write ticket from EIP-712 sign-in"),
3005
+ filter: z.enum(["all", "new", "watched", "unreplied"]).optional().describe("NodeBB Unread filter. Default all (watched/tracked categories + followed topics)."),
3006
+ start: agentCoercedOptionalIntSchema(z.number().int().nonnegative()),
3007
+ limit: agentCoercedOptionalIntSchema(z.number().int().positive().max(100)),
3008
+ forumUrl: z.string().optional()
3009
+ });
3010
+ var mcpContinuumDaoForumUnreadOutputSchema = z.object({
3011
+ username: z.string().optional(),
3012
+ uid: z.number().optional(),
3013
+ filter: z.string().optional(),
3014
+ counts: z.object({
3015
+ all: z.number(),
3016
+ new: z.number(),
3017
+ watched: z.number(),
3018
+ unreplied: z.number()
3019
+ }).optional(),
3020
+ results: z.array(
3021
+ z.object({
3022
+ tid: z.number().int().positive(),
3023
+ title: z.string(),
3024
+ url: z.string(),
3025
+ cid: z.number().nullable().optional(),
3026
+ section: z.string().nullable().optional(),
3027
+ postcount: z.number().optional(),
3028
+ replyCount: z.number().optional(),
3029
+ lastposttime: z.number().optional(),
3030
+ lastPostAt: z.string().optional()
3031
+ })
3032
+ ),
3033
+ start: z.number().optional(),
3034
+ limit: z.number().optional(),
3035
+ nextStart: z.number().nullable().optional()
3036
+ });
3037
+ var mcpContinuumDaoForumMarkReadInputSchema = z.object({
3038
+ ticket: z.string().min(1).describe("Forum write ticket from EIP-712 sign-in"),
3039
+ tid: z.union([z.string(), z.number()]).optional().describe("Mark this thread read."),
3040
+ url: z.string().optional().describe("Mark this thread read by topic URL."),
3041
+ tids: z.array(z.union([z.string(), z.number()])).optional().describe("Mark these threads read."),
3042
+ all: agentOptionalBooleanSchema().describe("Mark every unread topic read. Confirm with the operator first."),
3043
+ forumUrl: z.string().optional()
3044
+ }).refine(
3045
+ (v) => {
3046
+ const one = Boolean(v.url?.trim() || v.tid != null && String(v.tid).trim() !== "");
3047
+ const many = Boolean(v.tids && v.tids.length > 0);
3048
+ return Number(Boolean(v.all)) + Number(one) + Number(many) === 1;
3049
+ },
3050
+ { message: "Provide exactly one of tid/url, tids, or all" }
3051
+ );
3052
+ var mcpContinuumDaoForumMarkReadOutputSchema = z.unknown();
3053
+ var mcpContinuumDaoForumMarkUnreadInputSchema = z.object({
3054
+ ticket: z.string().min(1).describe("Forum write ticket from EIP-712 sign-in"),
3055
+ tid: z.union([z.string(), z.number()]).optional(),
3056
+ url: z.string().optional(),
3057
+ forumUrl: z.string().optional()
3058
+ }).refine((v) => Boolean(v.url?.trim() || v.tid != null && String(v.tid).trim() !== ""), {
3059
+ message: "Provide tid or url"
3060
+ });
3061
+ var mcpContinuumDaoForumMarkUnreadOutputSchema = z.unknown();
3062
+ var mcpContinuumDaoForumSignOutInputSchema = z.object({
3063
+ ticket: z.string().min(1).describe("Forum write ticket from EIP-712 sign-in"),
3064
+ forumUrl: z.string().optional()
3065
+ });
3066
+ var mcpContinuumDaoForumSignOutOutputSchema = z.object({
3067
+ ok: z.literal(true),
3068
+ loggedIn: z.literal(false),
3069
+ uid: z.number().optional()
3070
+ });
3071
+ var mcpContinuumDaoForumSectionsInputSchema = z.object({
3072
+ forumUrl: z.string().optional()
3073
+ });
3074
+ var mcpContinuumDaoForumSectionsOutputSchema = z.unknown();
3075
+ var mcpContinuumDaoForumSignInEligibleInputSchema = z.object({
3076
+ address: evmAddressSchema.describe("KeyGen or personal wallet address to check against the forum veCTM login gate"),
3077
+ forumUrl: z.string().optional()
3078
+ });
3079
+ var mcpContinuumDaoForumSignInEligibleOutputSchema = z.object({
3080
+ ok: z.boolean(),
3081
+ eligible: z.boolean(),
3082
+ address: z.string().optional(),
3083
+ reason: z.string().optional()
3084
+ });
3085
+ var mcpContinuumDaoForumSignInInputSchema = mcpMultisignInput({
3086
+ nodeKey: z.string().optional().describe("Attached node key. When set, username is the first 16 characters. Optional for a personal/KeyGen address with no node."),
3087
+ username: z.string().min(2).max(16).optional().describe("Required on first login when there is no node key (2\u201316 letters, numbers, . _ -)."),
3088
+ forumUrl: z.string().optional()
3089
+ });
2305
3090
  var mcpEulerV2FetchLendVaultsInputSchema = z.object({
2306
3091
  chainId: agentEvmChainIdSchema,
2307
3092
  underlyingAddress: evmAddressSchema.describe(
@@ -2324,6 +3109,96 @@ var mcpEulerV2FetchLendVaultsOutputSchema = z.object({
2324
3109
  })
2325
3110
  )
2326
3111
  });
3112
+ var mcpCompoundV3FetchMarketsInputSchema = z.object({
3113
+ chainId: agentEvmChainIdSchema,
3114
+ rpcUrl: z.string().min(1).optional().describe("Server-filled from chain registry. Agents should omit.")
3115
+ });
3116
+ var mcpCompoundV3MarketAssetSchema = z.object({
3117
+ asset: z.string(),
3118
+ symbol: z.string(),
3119
+ decimals: z.number(),
3120
+ borrowCollateralFactorPercent: z.number(),
3121
+ liquidateCollateralFactorPercent: z.number(),
3122
+ priceRaw: z.string(),
3123
+ role: z.enum(["base", "collateral"])
3124
+ });
3125
+ var mcpCompoundV3MarketSummarySchema = z.object({
3126
+ chainId: z.number(),
3127
+ slug: z.string(),
3128
+ symbol: z.string(),
3129
+ comet: z.string().describe("Comet proxy \u2014 copy as comet for write tools"),
3130
+ rewards: z.string(),
3131
+ bulker: z.string().nullable(),
3132
+ baseToken: z.string().nullable(),
3133
+ utilization: z.number().nullable(),
3134
+ supplyAprPercent: z.string().nullable(),
3135
+ borrowAprPercent: z.string().nullable(),
3136
+ assets: z.array(mcpCompoundV3MarketAssetSchema)
3137
+ });
3138
+ var mcpCompoundV3FetchMarketsOutputSchema = z.object({
3139
+ markets: z.array(mcpCompoundV3MarketSummarySchema),
3140
+ notes: z.string()
3141
+ });
3142
+ var mcpCompoundV3FetchMarketInputSchema = z.object({
3143
+ chainId: agentEvmChainIdSchema,
3144
+ comet: evmAddressSchema.describe("Comet proxy from ctm_compound_v3_fetch_markets"),
3145
+ rpcUrl: z.string().min(1).optional().describe("Server-filled from chain registry. Agents should omit.")
3146
+ });
3147
+ var mcpCompoundV3FetchMarketOutputSchema = mcpCompoundV3MarketSummarySchema;
3148
+ var mcpCompoundV3FetchAccountInputSchema = z.object({
3149
+ chainId: agentEvmChainIdSchema,
3150
+ comet: evmAddressSchema.describe("Comet proxy from ctm_compound_v3_fetch_markets"),
3151
+ account: evmAddressSchema.describe("MPC executor / user address"),
3152
+ rpcUrl: z.string().min(1).optional().describe("Server-filled from chain registry. Agents should omit.")
3153
+ });
3154
+ var mcpCompoundV3FetchAccountOutputSchema = z.object({
3155
+ comet: z.string(),
3156
+ symbol: z.string(),
3157
+ baseSupplied: z.string(),
3158
+ baseBorrowed: z.string(),
3159
+ collaterals: z.array(
3160
+ z.object({
3161
+ asset: z.string(),
3162
+ symbol: z.string(),
3163
+ balance: z.string()
3164
+ })
3165
+ ),
3166
+ isBorrowCollateralized: z.boolean(),
3167
+ isLiquidatable: z.boolean(),
3168
+ rewardToken: z.string().nullable(),
3169
+ rewardOwed: z.string().nullable()
3170
+ });
3171
+ var compoundV3WriteFields = {
3172
+ comet: evmAddressSchema.describe("Comet proxy from ctm_compound_v3_fetch_markets. Never the implementation."),
3173
+ asset: evmAddressSchema.describe(
3174
+ "Token to supply/withdraw. Native ETH: 0x0000000000000000000000000000000000000000 or set isNative true."
3175
+ ),
3176
+ amountHuman: z.string().min(1).describe('Human amount (e.g. "100"). Withdraw base while undercollateralized borrows.'),
3177
+ isNative: agentOptionalBooleanSchema().describe(
3178
+ "Wrap/unwrap native ETH automatically (WETH.deposit/withdraw). Independent of useBulker."
3179
+ ),
3180
+ isNativeIn: agentOptionalBooleanSchema().describe("Alias of isNative for supply/repay."),
3181
+ useBulker: agentOptionalBooleanSchema().describe(
3182
+ "If true, prefer ctm_compound_v3_build_bulker_multisign for combined actions. ETH wrap still works when false."
3183
+ )
3184
+ };
3185
+ var mcpCompoundV3SupplyInputSchema = mcpMultisignInput(compoundV3WriteFields);
3186
+ var mcpCompoundV3WithdrawInputSchema = mcpMultisignInput(compoundV3WriteFields);
3187
+ var mcpCompoundV3RepayInputSchema = mcpMultisignInput(compoundV3WriteFields);
3188
+ var mcpCompoundV3ClaimRewardsInputSchema = mcpMultisignInput({
3189
+ comet: evmAddressSchema.describe("Comet proxy from ctm_compound_v3_fetch_markets")
3190
+ });
3191
+ var mcpCompoundV3BulkerInputSchema = mcpMultisignInput({
3192
+ comet: evmAddressSchema.describe("Comet proxy from ctm_compound_v3_fetch_markets"),
3193
+ steps: z.array(
3194
+ z.object({
3195
+ action: z.enum(["supply", "withdraw", "claim"]),
3196
+ asset: evmAddressSchema.optional(),
3197
+ amountHuman: z.string().optional(),
3198
+ isNative: agentOptionalBooleanSchema()
3199
+ })
3200
+ ).min(1).describe("Combined Bulker actions. Native supply/withdraw uses Bulker native token actions.")
3201
+ });
2327
3202
  function mcpGmxMultisignInput(fields, preprocess) {
2328
3203
  const inner = evmMultisignCommonInputSchema.extend(fields);
2329
3204
  const shaped = preprocess ? z.preprocess(preprocess, inner) : inner;
@@ -3608,6 +4483,26 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
3608
4483
  handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoMidnightLendBatch" },
3609
4484
  inputZod: mcpMorphoMidnightLendInputSchema
3610
4485
  }),
4486
+ defineProtocolMcpTool({
4487
+ name: "ctm_morpho_build_midnight_lend_offer_multisign",
4488
+ actionId: "morpho.midnight-lend-offer",
4489
+ protocolId: "morpho",
4490
+ chainCategory: "evm",
4491
+ description: "Build a Morpho Midnight lend limit offer. Parks the loan token in Morpho Blue (variable yield) until a borrower takes the offer via BlueBuyCallback.",
4492
+ prerequisites: ["keyGenId", "chainId", "marketId from ctm_morpho_fetch_midnight_books", "amountHuman"],
4493
+ handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoMidnightLendOfferBatch" },
4494
+ inputZod: mcpMorphoMidnightLendOfferInputSchema
4495
+ }),
4496
+ defineProtocolMcpTool({
4497
+ name: "ctm_morpho_build_midnight_cancel_lend_offer_multisign",
4498
+ actionId: "morpho.midnight-cancel-lend-offer",
4499
+ protocolId: "morpho",
4500
+ chainCategory: "evm",
4501
+ description: "Cancel a Morpho Midnight lend offer (exhaust the offer group) and withdraw unused Blue-parked funds.",
4502
+ prerequisites: ["keyGenId", "chainId", "group from ctm_morpho_fetch_midnight_offers"],
4503
+ handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoMidnightCancelLendOfferBatch" },
4504
+ inputZod: mcpMorphoMidnightCancelLendOfferInputSchema
4505
+ }),
3611
4506
  defineProtocolMcpTool({
3612
4507
  name: "ctm_morpho_build_midnight_borrow_multisign",
3613
4508
  actionId: "morpho.midnight-borrow",
@@ -3969,6 +4864,267 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
3969
4864
  exportName: "buildEvmMultisignBodyCctpBurnBatchFromMcp"
3970
4865
  },
3971
4866
  inputZod: mcpCctpBuildBurnMultisignInputSchema
4867
+ }),
4868
+ defineProtocolMcpTool({
4869
+ name: "ctm_continuum_dao_build_create_lock_multisign",
4870
+ actionId: "continuum-dao.create-lock",
4871
+ protocolId: "continuum-dao",
4872
+ chainCategory: "evm",
4873
+ description: "Build batch: CTM approve (if needed) + VotingEscrow.create_lock. Linea only. Do not prepend billing legs.",
4874
+ prerequisites: ["keyGen", "executorAddress", "Linea RPC", "configured CTM and VotingEscrow addresses"],
4875
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoCreateLock" },
4876
+ inputZod: mcpContinuumDaoCreateLockInputSchema
4877
+ }),
4878
+ defineProtocolMcpTool({
4879
+ name: "ctm_continuum_dao_build_increase_amount_multisign",
4880
+ actionId: "continuum-dao.increase-amount",
4881
+ protocolId: "continuum-dao",
4882
+ chainCategory: "evm",
4883
+ description: "Build batch: CTM approve (if needed) + increase_amount.",
4884
+ prerequisites: ["keyGen", "tokenId", "Linea RPC"],
4885
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoIncreaseAmount" },
4886
+ inputZod: mcpContinuumDaoIncreaseAmountInputSchema
4887
+ }),
4888
+ defineProtocolMcpTool({
4889
+ name: "ctm_continuum_dao_build_increase_unlock_time_multisign",
4890
+ actionId: "continuum-dao.increase-unlock-time",
4891
+ protocolId: "continuum-dao",
4892
+ chainCategory: "evm",
4893
+ description: "Build increase_unlock_time. lockDurationSeconds is from the week boundary to the new unlock.",
4894
+ prerequisites: ["keyGen", "tokenId", "Linea RPC"],
4895
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoIncreaseUnlockTime" },
4896
+ inputZod: mcpContinuumDaoIncreaseUnlockTimeInputSchema
4897
+ }),
4898
+ defineProtocolMcpTool({
4899
+ name: "ctm_continuum_dao_build_split_multisign",
4900
+ actionId: "continuum-dao.split",
4901
+ protocolId: "continuum-dao",
4902
+ chainCategory: "evm",
4903
+ description: "Build VotingEscrow.split. Blocked on-chain while the token is node-attached.",
4904
+ prerequisites: ["keyGen", "tokenId", "Linea RPC"],
4905
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoSplit" },
4906
+ inputZod: mcpContinuumDaoSplitInputSchema
4907
+ }),
4908
+ defineProtocolMcpTool({
4909
+ name: "ctm_continuum_dao_build_merge_multisign",
4910
+ actionId: "continuum-dao.merge",
4911
+ protocolId: "continuum-dao",
4912
+ chainCategory: "evm",
4913
+ description: "Build VotingEscrow.merge. Blocked on-chain while either token is node-attached.",
4914
+ prerequisites: ["keyGen", "fromTokenId", "toTokenId", "Linea RPC"],
4915
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoMerge" },
4916
+ inputZod: mcpContinuumDaoMergeInputSchema
4917
+ }),
4918
+ defineProtocolMcpTool({
4919
+ name: "ctm_continuum_dao_build_withdraw_multisign",
4920
+ actionId: "continuum-dao.withdraw",
4921
+ protocolId: "continuum-dao",
4922
+ chainCategory: "evm",
4923
+ description: "Build VotingEscrow.withdraw for an expired, unattached lock.",
4924
+ prerequisites: ["keyGen", "tokenId", "Linea RPC"],
4925
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoWithdraw" },
4926
+ inputZod: mcpContinuumDaoTokenIdInputSchema
4927
+ }),
4928
+ defineProtocolMcpTool({
4929
+ name: "ctm_continuum_dao_build_liquidate_multisign",
4930
+ actionId: "continuum-dao.liquidate",
4931
+ protocolId: "continuum-dao",
4932
+ chainCategory: "evm",
4933
+ description: "Build VotingEscrow.liquidate. Blocked on-chain while the token is node-attached.",
4934
+ prerequisites: ["keyGen", "tokenId", "Linea RPC"],
4935
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoLiquidate" },
4936
+ inputZod: mcpContinuumDaoTokenIdInputSchema
4937
+ }),
4938
+ defineProtocolMcpTool({
4939
+ name: "ctm_continuum_dao_build_delegate_multisign",
4940
+ actionId: "continuum-dao.delegate",
4941
+ protocolId: "continuum-dao",
4942
+ chainCategory: "evm",
4943
+ description: "Build VotingEscrow.delegate(delegatee). Moves all veCTM voting power from the KeyGen to delegatee. Governor getVotes is then at the delegatee. Use undelegate to return power to the KeyGen.",
4944
+ prerequisites: ["keyGen", "delegatee", "Linea RPC"],
4945
+ followUp: ["ctm_continuum_dao_fetch_delegates", "ctm_continuum_dao_build_undelegate_multisign"],
4946
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoDelegate" },
4947
+ inputZod: mcpContinuumDaoDelegateInputSchema
4948
+ }),
4949
+ defineProtocolMcpTool({
4950
+ name: "ctm_continuum_dao_build_undelegate_multisign",
4951
+ actionId: "continuum-dao.undelegate",
4952
+ protocolId: "continuum-dao",
4953
+ chainCategory: "evm",
4954
+ description: "Return veCTM voting power to the KeyGen. There is no undelegate() on VotingEscrow \u2014 this calls delegate(self). address(0) would also become self on-chain.",
4955
+ prerequisites: ["keyGen", "Linea RPC"],
4956
+ followUp: ["ctm_continuum_dao_fetch_delegates"],
4957
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoUndelegate" },
4958
+ inputZod: mcpContinuumDaoUndelegateInputSchema
4959
+ }),
4960
+ defineProtocolMcpTool({
4961
+ name: "ctm_continuum_dao_build_transfer_multisign",
4962
+ actionId: "continuum-dao.transfer",
4963
+ protocolId: "continuum-dao",
4964
+ chainCategory: "evm",
4965
+ description: "Build VotingEscrow.transferFrom. Blocked on-chain while the token is node-attached.",
4966
+ prerequisites: ["keyGen", "tokenId", "to", "Linea RPC"],
4967
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoTransfer" },
4968
+ inputZod: mcpContinuumDaoTransferInputSchema
4969
+ }),
4970
+ defineProtocolMcpTool({
4971
+ name: "ctm_continuum_dao_build_attach_multisign",
4972
+ actionId: "continuum-dao.attach",
4973
+ protocolId: "continuum-dao",
4974
+ chainCategory: "evm",
4975
+ description: "Build MultiSignAgentWallet.attachVeCtm. Authority KeyGen only. Cannot replace an attached NFT. No billing legs.",
4976
+ prerequisites: ["keyGen", "nodeKey", "tokenId", "mpaWallet"],
4977
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoAttachVeCtmFromMcp" },
4978
+ inputZod: mcpContinuumDaoAttachInputSchema
4979
+ }),
4980
+ defineProtocolMcpTool({
4981
+ name: "ctm_continuum_dao_build_request_detach_multisign",
4982
+ actionId: "continuum-dao.request-detach",
4983
+ protocolId: "continuum-dao",
4984
+ chainCategory: "evm",
4985
+ description: "Build NodeProperties.setNodeRemovalStatus(tokenId, true). Governance must complete detach.",
4986
+ prerequisites: ["keyGen", "tokenId", "nodeProperties"],
4987
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoRequestDetach" },
4988
+ inputZod: mcpContinuumDaoRequestDetachInputSchema
4989
+ }),
4990
+ defineProtocolMcpTool({
4991
+ name: "ctm_continuum_dao_build_propose_bravo_multisign",
4992
+ actionId: "continuum-dao.propose-bravo",
4993
+ protocolId: "continuum-dao",
4994
+ chainCategory: "evm",
4995
+ description: "Build ContinuumDAO.propose for a Bravo (For/Against/Abstain) proposal. Refuses if getVotes(KeyGen) < live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). forumKey is required and must be a Governance thread (/topic/:tid) from ctm_continuum_dao_forum_create_topic (decision / election / treasury / constitution / admin). Ideas threads and the homepage are refused. Empty actions insert a no-op to the KeyGen address. Linea only. No billing legs. After the request is mined, call ctm_continuum_dao_register_proposal with the same forumKey.",
4996
+ prerequisites: [
4997
+ "keyGen",
4998
+ "Linea RPC",
4999
+ "configured governor",
5000
+ "veCTM voting power >= live proposalThreshold()",
5001
+ "forumKey from forum_create_topic"
5002
+ ],
5003
+ followUp: [...MCP_MULTISIGN_SUBMIT_FOLLOW_UP, "ctm_continuum_dao_register_proposal"],
5004
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoProposeBravo" },
5005
+ inputZod: mcpContinuumDaoProposeBravoInputSchema
5006
+ }),
5007
+ defineProtocolMcpTool({
5008
+ name: "ctm_continuum_dao_build_propose_delta_multisign",
5009
+ actionId: "continuum-dao.propose-delta",
5010
+ protocolId: "continuum-dao",
5011
+ chainCategory: "evm",
5012
+ description: "Build ContinuumDAO.propose for a Delta multi-option proposal. Refuses if getVotes(KeyGen) < live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). forumKey is required and must be a Governance thread from ctm_continuum_dao_forum_create_topic. Ideas threads are not valid forumKey values. Empty options get a no-op so indices increment. Linea only. No billing legs.",
5013
+ prerequisites: [
5014
+ "keyGen",
5015
+ "at least 2 options",
5016
+ "nWinners < nOptions",
5017
+ "veCTM voting power >= live proposalThreshold()",
5018
+ "forumKey from forum_create_topic"
5019
+ ],
5020
+ followUp: [...MCP_MULTISIGN_SUBMIT_FOLLOW_UP, "ctm_continuum_dao_register_proposal"],
5021
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoProposeDeltaFromMcp" },
5022
+ inputZod: mcpContinuumDaoProposeDeltaInputSchema
5023
+ }),
5024
+ defineProtocolMcpTool({
5025
+ name: "ctm_continuum_dao_build_cast_vote_bravo_multisign",
5026
+ actionId: "continuum-dao.cast-vote-bravo",
5027
+ protocolId: "continuum-dao",
5028
+ chainCategory: "evm",
5029
+ description: "Build ContinuumDAO.castVote. support: 0 against, 1 for, 2 abstain.",
5030
+ prerequisites: ["keyGen", "proposalId", "Active proposal"],
5031
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoCastVoteBravoFromMcp" },
5032
+ inputZod: mcpContinuumDaoCastVoteBravoInputSchema
5033
+ }),
5034
+ defineProtocolMcpTool({
5035
+ name: "ctm_continuum_dao_build_cast_vote_delta_multisign",
5036
+ actionId: "continuum-dao.cast-vote-delta",
5037
+ protocolId: "continuum-dao",
5038
+ chainCategory: "evm",
5039
+ description: "Build ContinuumDAO.castVoteWithReasonAndParams. weights must be nOptions + 1 (final slot is NOTA).",
5040
+ prerequisites: ["keyGen", "proposalId", "weights including NOTA"],
5041
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoCastVoteDelta" },
5042
+ inputZod: mcpContinuumDaoCastVoteDeltaInputSchema
5043
+ }),
5044
+ defineProtocolMcpTool({
5045
+ name: "ctm_continuum_dao_build_execute_multisign",
5046
+ actionId: "continuum-dao.execute",
5047
+ protocolId: "continuum-dao",
5048
+ chainCategory: "evm",
5049
+ description: "Build ContinuumDAO.execute(proposalId). Call after Succeeded. Queue is not implemented.",
5050
+ prerequisites: ["keyGen", "proposalId", "Succeeded state"],
5051
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoExecute" },
5052
+ inputZod: mcpContinuumDaoProposalIdInputSchema
5053
+ }),
5054
+ defineProtocolMcpTool({
5055
+ name: "ctm_continuum_dao_build_cancel_multisign",
5056
+ actionId: "continuum-dao.cancel",
5057
+ protocolId: "continuum-dao",
5058
+ chainCategory: "evm",
5059
+ description: "Build ContinuumDAO.cancel(proposalId). Proposer while Pending, or the proposal guardian.",
5060
+ prerequisites: ["keyGen", "proposalId"],
5061
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoCancel" },
5062
+ inputZod: mcpContinuumDaoProposalIdInputSchema
5063
+ }),
5064
+ defineProtocolMcpTool({
5065
+ name: "ctm_continuum_dao_build_forum_sign_in_multisign",
5066
+ actionId: "continuum-dao.forum-sign-in",
5067
+ protocolId: "continuum-dao",
5068
+ chainCategory: "evm",
5069
+ description: "Build an EIP-712 forum login multi-sign (no EVM tx). Checks the KeyGen address against the forum veCTM threshold first and refuses if ineligible so other nodes never enter the sign loop. Pass nodeKey (username = first 16 chars) or a username on first login. After Get Sig, node-app exchanges the signature for a forum ticket.",
5070
+ prerequisites: [
5071
+ "keyGen",
5072
+ "veCTM at or above MultiSignAgentWallet.veCtmThresholdPower (holder or attach-key)",
5073
+ "nodeKey or username"
5074
+ ],
5075
+ followUp: [...MCP_MULTISIGN_SUBMIT_FOLLOW_UP, "ctm_continuum_dao_forum_me"],
5076
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoForumSignIn" },
5077
+ inputZod: mcpContinuumDaoForumSignInInputSchema
5078
+ }),
5079
+ defineProtocolMcpTool({
5080
+ name: "ctm_compound_v3_build_supply_multisign",
5081
+ actionId: "compound-v3.supply",
5082
+ protocolId: "compound-v3",
5083
+ chainCategory: "evm",
5084
+ description: "Supply base (earn or repay) or collateral to a Comet proxy. Native ETH always wraps via WETH.deposit even when useBulker is false.",
5085
+ prerequisites: ["keyGenId", "chainId", "comet from ctm_compound_v3_fetch_markets", "asset", "amountHuman"],
5086
+ handler: { importPath: "protocols/evm/compound-v3", exportName: "buildEvmMultisignBodyCompoundV3Supply" },
5087
+ inputZod: mcpCompoundV3SupplyInputSchema
5088
+ }),
5089
+ defineProtocolMcpTool({
5090
+ name: "ctm_compound_v3_build_withdraw_multisign",
5091
+ actionId: "compound-v3.withdraw",
5092
+ protocolId: "compound-v3",
5093
+ chainCategory: "evm",
5094
+ description: "Withdraw collateral or base from a Comet. Withdraw of base while undercollateralized borrows. Native ETH always unwraps via WETH.withdraw.",
5095
+ prerequisites: ["keyGenId", "chainId", "comet", "asset", "amountHuman", "ctm_compound_v3_fetch_account"],
5096
+ handler: { importPath: "protocols/evm/compound-v3", exportName: "buildEvmMultisignBodyCompoundV3Withdraw" },
5097
+ inputZod: mcpCompoundV3WithdrawInputSchema
5098
+ }),
5099
+ defineProtocolMcpTool({
5100
+ name: "ctm_compound_v3_build_repay_multisign",
5101
+ actionId: "compound-v3.repay",
5102
+ protocolId: "compound-v3",
5103
+ chainCategory: "evm",
5104
+ description: "Repay Comet base debt by supplying the base asset (same as supply of base while borrowed).",
5105
+ prerequisites: ["keyGenId", "chainId", "comet", "asset (base token)", "amountHuman"],
5106
+ handler: { importPath: "protocols/evm/compound-v3", exportName: "buildEvmMultisignBodyCompoundV3Repay" },
5107
+ inputZod: mcpCompoundV3RepayInputSchema
5108
+ }),
5109
+ defineProtocolMcpTool({
5110
+ name: "ctm_compound_v3_build_claim_rewards_multisign",
5111
+ actionId: "compound-v3.claim-rewards",
5112
+ protocolId: "compound-v3",
5113
+ chainCategory: "evm",
5114
+ description: "Claim COMP / reward token from the market Rewards contract.",
5115
+ prerequisites: ["keyGenId", "chainId", "comet", "ctm_compound_v3_fetch_account for claimable"],
5116
+ handler: { importPath: "protocols/evm/compound-v3", exportName: "buildEvmMultisignBodyCompoundV3ClaimRewards" },
5117
+ inputZod: mcpCompoundV3ClaimRewardsInputSchema
5118
+ }),
5119
+ defineProtocolMcpTool({
5120
+ name: "ctm_compound_v3_build_bulker_multisign",
5121
+ actionId: "compound-v3.bulker",
5122
+ protocolId: "compound-v3",
5123
+ chainCategory: "evm",
5124
+ description: "Optional combined Bulker.invoke (supply + borrow, claim + withdraw, native via Bulker). ETH wrap still works without this tool.",
5125
+ prerequisites: ["keyGenId", "chainId", "comet", "steps"],
5126
+ handler: { importPath: "protocols/evm/compound-v3", exportName: "buildEvmMultisignBodyCompoundV3Bulker" },
5127
+ inputZod: mcpCompoundV3BulkerInputSchema
3972
5128
  })
3973
5129
  ];
3974
5130
 
@@ -4347,14 +5503,218 @@ var CORE_MCP_TOOL_DEFINITIONS = [
4347
5503
  inputZod: mcpCurveDaoBuildSwapMultisignInputSchema
4348
5504
  }),
4349
5505
  defineMcpTool({
4350
- name: "ctm_gmx_fetch_markets",
4351
- actionId: "gmx.fetch-markets",
4352
- protocolId: "gmx",
5506
+ name: "ctm_aerodrome_discover_pools",
5507
+ actionId: "aerodrome.discover-pools",
5508
+ protocolId: "aerodrome",
4353
5509
  chainCategory: "evm",
4354
- description: "List GMX V2 perp markets for a chain (symbol, market token, maxLeverageLabel). Read-only; uses GMX HTTP API.",
4355
- prerequisites: ["chainId"],
4356
- followUp: ["ctm_gmx_build_increase_multisign", "ctm_gmx_build_decrease_multisign"],
4357
- handler: { importPath: "protocols/evm/gmx", exportName: "gmxFetchMarketsSummary" },
5510
+ description: "Find Aerodrome v2 + Slipstream pools for one token (optional tokenOut, default USDC) via factory getPool. Tickers OK (AAPLc, USDC, ETH). Use this instead of dumping listed tokens or LpSugar.all. For a price, skip this and call ctm_aerodrome_quote. rpcUrl is injected.",
5511
+ prerequisites: ["chainId 8453", "token (ticker or 0x)"],
5512
+ followUp: ["ctm_aerodrome_quote", "ctm_aerodrome_quote_add_liquidity"],
5513
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeDiscoverPoolsSummary" },
5514
+ inputZod: mcpAerodromeDiscoverPoolsInputSchema,
5515
+ outputZod: mcpAerodromeDiscoverPoolsOutputSchema
5516
+ }),
5517
+ defineMcpTool({
5518
+ name: "ctm_aerodrome_fetch_pools",
5519
+ actionId: "aerodrome.fetch-pools",
5520
+ protocolId: "aerodrome",
5521
+ chainCategory: "evm",
5522
+ description: "Paginated LpSugar.all pool dump on Base. Heavy \u2014 can time out. Not required for swaps: ctm_aerodrome_quote discovers Slipstream 3 / v2 routes itself (including AAPLc/USDC). Use only when browsing LP inventory.",
5523
+ prerequisites: ["chainId 8453"],
5524
+ followUp: ["ctm_aerodrome_quote_add_liquidity", "ctm_aerodrome_fetch_positions"],
5525
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeFetchPoolsSummary" },
5526
+ inputZod: mcpAerodromeFetchPoolsInputSchema,
5527
+ outputZod: mcpAerodromeFetchPoolsOutputSchema
5528
+ }),
5529
+ defineMcpTool({
5530
+ name: "ctm_aerodrome_fetch_positions",
5531
+ actionId: "aerodrome.fetch-positions",
5532
+ protocolId: "aerodrome",
5533
+ chainCategory: "evm",
5534
+ description: "KeyGen Aerodrome positions (same picker as the Multi-Sign Rewards tab). Each row has label, kind (vAMM/sAMM/CL), gauge, stakedInGauge, claimFees.pool, and claimEmissions (gauge + tokenId/cl, or null). Dust v2 rows omitted. Read-only.",
5535
+ prerequisites: ["chainId 8453", "account or keyGenId"],
5536
+ followUp: [
5537
+ "ctm_aerodrome_build_claim_fees_multisign",
5538
+ "ctm_aerodrome_build_claim_emissions_multisign",
5539
+ "ctm_aerodrome_build_cl_collect_fees_multisign"
5540
+ ],
5541
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeFetchPositionsSummary" },
5542
+ inputZod: mcpAerodromeFetchPositionsInputSchema,
5543
+ outputZod: mcpAerodromeFetchPositionsOutputSchema
5544
+ }),
5545
+ defineMcpTool({
5546
+ name: "ctm_aerodrome_quote",
5547
+ actionId: "aerodrome.quote",
5548
+ protocolId: "aerodrome",
5549
+ chainCategory: "evm",
5550
+ description: "Quote an Aerodrome swap on Base. tokenIn/tokenOut accept tickers (AAPLc, USDC, ETH, WETH, AERO) or 0x addresses. Coinbase B20 stocks are 8 decimals and route via Slipstream 3 (usually a USDC hop). Returns amountOutHuman and priceImpactPercent (0\u2013100 vs a tiny same-route probe). Call this directly \u2014 do not fetch_pools or ask the user for a stock address. Does NOT create a sign request.",
5551
+ prerequisites: ["chainId 8453", "tokenIn + tokenOut + amountHuman (tickers OK)"],
5552
+ followUp: ["ctm_aerodrome_build_swap_multisign"],
5553
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeQuote" },
5554
+ inputZod: mcpAerodromeQuoteInputSchema,
5555
+ outputZod: mcpAerodromeQuoteOutputSchema
5556
+ }),
5557
+ defineMultisignSubmitMcpTool({
5558
+ name: "ctm_aerodrome_build_swap_multisign",
5559
+ actionId: "aerodrome.swap",
5560
+ protocolId: "aerodrome",
5561
+ chainCategory: "evm",
5562
+ description: "Create and submit mpc-auth multiSignRequest for an Aerodrome swap (optional ERC-20 approve + Router / Slipstream SwapRouter). Default deadline 30 minutes \u2014 ask the user to confirm that window and useCustomGas (via get_multi_sign_gas_options) before calling. Activate aerodrome:swap first.",
5563
+ prerequisites: [
5564
+ "ctm_aerodrome_quote",
5565
+ "get_multi_sign_gas_options + user confirms useCustomGas and 30-minute deadline",
5566
+ "keyGenId + chainId 8453 + purposeText + slippagePercent"
5567
+ ],
5568
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeSwapBatch" },
5569
+ inputZod: mcpAerodromeBuildSwapMultisignInputSchema
5570
+ }),
5571
+ defineMcpTool({
5572
+ name: "ctm_aerodrome_quote_add_liquidity",
5573
+ actionId: "aerodrome.quote-add-liquidity",
5574
+ protocolId: "aerodrome",
5575
+ chainCategory: "evm",
5576
+ description: "Quote an Aerodrome deposit on Base (same as the Liquidity tab). One-sided: pass amountAHuman or amountBHuman; the other side comes from the current vAMM/sAMM reserves or Slipstream slot0. Tickers OK (AAPLc, USDC, ETH). B20 stocks are 8 decimals. ETH/stock has no pool \u2014 seedable:false and hint says pair vs USDC. Do not first-deposit an empty vAMM. Read-only.",
5577
+ prerequisites: ["chainId 8453", "tokenA + tokenB + amountAHuman or amountBHuman (tickers OK)"],
5578
+ followUp: ["ctm_aerodrome_build_add_liquidity_multisign"],
5579
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeQuoteAddLiquidity" },
5580
+ inputZod: mcpAerodromeQuoteAddLiquidityInputSchema,
5581
+ outputZod: mcpAerodromeQuoteAddLiquidityOutputSchema
5582
+ }),
5583
+ defineMcpTool({
5584
+ name: "ctm_aerodrome_quote_cl_deposit",
5585
+ actionId: "aerodrome.quote-cl-deposit",
5586
+ protocolId: "aerodrome",
5587
+ chainCategory: "evm",
5588
+ description: "Quote a Slipstream CL deposit (SugarHelper estimate when one side is omitted). token0/token1 accept tickers (AAPLc, USDC, ETH). Use when quote_add_liquidity returns kind:cl. Read-only.",
5589
+ prerequisites: ["chainId 8453", "ticks + sqrtPriceX96"],
5590
+ followUp: ["ctm_aerodrome_build_cl_mint_multisign"],
5591
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "aerodromeQuoteClDeposit" },
5592
+ inputZod: mcpAerodromeQuoteClDepositInputSchema,
5593
+ outputZod: mcpAerodromeQuoteClDepositOutputSchema
5594
+ }),
5595
+ defineMultisignSubmitMcpTool({
5596
+ name: "ctm_aerodrome_build_add_liquidity_multisign",
5597
+ actionId: "aerodrome.add-liquidity",
5598
+ protocolId: "aerodrome",
5599
+ chainCategory: "evm",
5600
+ description: "Submit multiSignRequest to add basic vAMM/sAMM liquidity (approve + addLiquidity / addLiquidityETH). One-sided amounts OK. Refuses empty/unseedable pairs (ETH/AAPLc) and Slipstream-only quotes (use CL mint). Activate aerodrome:lp first.",
5601
+ prerequisites: [
5602
+ "ctm_aerodrome_quote_add_liquidity",
5603
+ "get_multi_sign_gas_options + user confirms useCustomGas and 30-minute deadline",
5604
+ "keyGenId + purposeText + slippagePercent"
5605
+ ],
5606
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeAddLiquidityBatch" },
5607
+ inputZod: mcpAerodromeBuildAddLiquidityMultisignInputSchema
5608
+ }),
5609
+ defineMultisignSubmitMcpTool({
5610
+ name: "ctm_aerodrome_build_remove_liquidity_multisign",
5611
+ actionId: "aerodrome.remove-liquidity",
5612
+ protocolId: "aerodrome",
5613
+ chainCategory: "evm",
5614
+ description: "Submit multiSignRequest to remove basic-pool liquidity.",
5615
+ prerequisites: ["keyGenId", "lpToken + liquidityHuman"],
5616
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeRemoveLiquidityBatch" },
5617
+ inputZod: mcpAerodromeBuildRemoveLiquidityMultisignInputSchema
5618
+ }),
5619
+ defineMultisignSubmitMcpTool({
5620
+ name: "ctm_aerodrome_build_cl_mint_multisign",
5621
+ actionId: "aerodrome.cl-mint",
5622
+ protocolId: "aerodrome",
5623
+ chainCategory: "evm",
5624
+ description: "Submit multiSignRequest to mint a Slipstream concentrated liquidity NFT.",
5625
+ prerequisites: ["ctm_aerodrome_quote_cl_deposit", "keyGenId"],
5626
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClMintBatch" },
5627
+ inputZod: mcpAerodromeBuildClMintMultisignInputSchema
5628
+ }),
5629
+ defineMultisignSubmitMcpTool({
5630
+ name: "ctm_aerodrome_build_cl_increase_multisign",
5631
+ actionId: "aerodrome.cl-increase",
5632
+ protocolId: "aerodrome",
5633
+ chainCategory: "evm",
5634
+ description: "Submit multiSignRequest to increase Slipstream liquidity.",
5635
+ prerequisites: ["keyGenId", "tokenId"],
5636
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClIncreaseBatch" },
5637
+ inputZod: mcpAerodromeBuildClIncreaseMultisignInputSchema
5638
+ }),
5639
+ defineMultisignSubmitMcpTool({
5640
+ name: "ctm_aerodrome_build_cl_decrease_multisign",
5641
+ actionId: "aerodrome.cl-decrease",
5642
+ protocolId: "aerodrome",
5643
+ chainCategory: "evm",
5644
+ description: "Submit multiSignRequest to decrease Slipstream liquidity.",
5645
+ prerequisites: ["keyGenId", "tokenId + liquidity"],
5646
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClDecreaseBatch" },
5647
+ inputZod: mcpAerodromeBuildClDecreaseMultisignInputSchema
5648
+ }),
5649
+ defineMultisignSubmitMcpTool({
5650
+ name: "ctm_aerodrome_build_cl_burn_multisign",
5651
+ actionId: "aerodrome.cl-burn",
5652
+ protocolId: "aerodrome",
5653
+ chainCategory: "evm",
5654
+ description: "Submit multiSignRequest to burn an empty Slipstream position NFT.",
5655
+ prerequisites: ["keyGenId", "tokenId (liquidity withdrawn, fees collected)"],
5656
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClBurnBatch" },
5657
+ inputZod: mcpAerodromeBuildClBurnMultisignInputSchema
5658
+ }),
5659
+ defineMultisignSubmitMcpTool({
5660
+ name: "ctm_aerodrome_build_gauge_stake_multisign",
5661
+ actionId: "aerodrome.gauge-stake",
5662
+ protocolId: "aerodrome",
5663
+ chainCategory: "evm",
5664
+ description: "Submit multiSignRequest to stake basic LP tokens or a Slipstream NFT in a gauge.",
5665
+ prerequisites: ["keyGenId", "gauge + lpToken or tokenId"],
5666
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeGaugeStakeBatch" },
5667
+ inputZod: mcpAerodromeBuildGaugeStakeMultisignInputSchema
5668
+ }),
5669
+ defineMultisignSubmitMcpTool({
5670
+ name: "ctm_aerodrome_build_gauge_unstake_multisign",
5671
+ actionId: "aerodrome.gauge-unstake",
5672
+ protocolId: "aerodrome",
5673
+ chainCategory: "evm",
5674
+ description: "Submit multiSignRequest to unstake from an Aerodrome gauge.",
5675
+ prerequisites: ["keyGenId", "gauge"],
5676
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeGaugeUnstakeBatch" },
5677
+ inputZod: mcpAerodromeBuildGaugeUnstakeMultisignInputSchema
5678
+ }),
5679
+ defineMultisignSubmitMcpTool({
5680
+ name: "ctm_aerodrome_build_claim_fees_multisign",
5681
+ actionId: "aerodrome.claim-fees",
5682
+ protocolId: "aerodrome",
5683
+ chainCategory: "evm",
5684
+ description: "Claim unstaked fees from the pool (dialog: \u201CFees from the pool\u201D). Pass claimFees.pool from ctm_aerodrome_fetch_positions \u2014 not the gauge. Activate aerodrome:rewards first.",
5685
+ prerequisites: ["ctm_aerodrome_fetch_positions", "keyGenId + purposeText + pool=claimFees.pool"],
5686
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClaimFeesBatch" },
5687
+ inputZod: mcpAerodromeBuildClaimFeesMultisignInputSchema
5688
+ }),
5689
+ defineMultisignSubmitMcpTool({
5690
+ name: "ctm_aerodrome_build_cl_collect_fees_multisign",
5691
+ actionId: "aerodrome.cl-collect-fees",
5692
+ protocolId: "aerodrome",
5693
+ chainCategory: "evm",
5694
+ description: "Collect Slipstream NFT fees via NFPM.collect. Pass the position id from fetch_positions (kind:cl). Activate aerodrome:rewards first.",
5695
+ prerequisites: ["ctm_aerodrome_fetch_positions", "keyGenId + tokenId"],
5696
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClCollectBatch" },
5697
+ inputZod: mcpAerodromeBuildClCollectFeesMultisignInputSchema
5698
+ }),
5699
+ defineMultisignSubmitMcpTool({
5700
+ name: "ctm_aerodrome_build_claim_emissions_multisign",
5701
+ actionId: "aerodrome.claim-emissions",
5702
+ protocolId: "aerodrome",
5703
+ chainCategory: "evm",
5704
+ description: "Claim gauge emissions in AERO (dialog: \u201CEmissions from the gauge in AERO\u201D). Pass claimEmissions from ctm_aerodrome_fetch_positions (gauge; CL staked also needs tokenId + cl:true). Skip when claimEmissions is null. Activate aerodrome:rewards first.",
5705
+ prerequisites: ["ctm_aerodrome_fetch_positions", "keyGenId + purposeText + gauge=claimEmissions.gauge"],
5706
+ handler: { importPath: "protocols/evm/aerodrome", exportName: "buildEvmMultisignBodyAerodromeClaimEmissionsBatch" },
5707
+ inputZod: mcpAerodromeBuildClaimEmissionsMultisignInputSchema
5708
+ }),
5709
+ defineMcpTool({
5710
+ name: "ctm_gmx_fetch_markets",
5711
+ actionId: "gmx.fetch-markets",
5712
+ protocolId: "gmx",
5713
+ chainCategory: "evm",
5714
+ description: "List GMX V2 perp markets for a chain (symbol, market token, maxLeverageLabel). Read-only; uses GMX HTTP API.",
5715
+ prerequisites: ["chainId"],
5716
+ followUp: ["ctm_gmx_build_increase_multisign", "ctm_gmx_build_decrease_multisign"],
5717
+ handler: { importPath: "protocols/evm/gmx", exportName: "gmxFetchMarketsSummary" },
4358
5718
  inputZod: mcpGmxFetchMarketsInputSchema,
4359
5719
  outputZod: mcpGmxFetchMarketsOutputSchema
4360
5720
  }),
@@ -4764,6 +6124,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
4764
6124
  followUp: [
4765
6125
  "ctm_morpho_fetch_midnight_quote",
4766
6126
  "ctm_morpho_build_midnight_lend_multisign",
6127
+ "ctm_morpho_build_midnight_lend_offer_multisign",
4767
6128
  "ctm_morpho_build_midnight_borrow_multisign"
4768
6129
  ],
4769
6130
  handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchMidnightBooksSummary" },
@@ -4777,7 +6138,11 @@ var CORE_MCP_TOOL_DEFINITIONS = [
4777
6138
  chainCategory: "evm",
4778
6139
  description: "Quote a Morpho Midnight book fill. side asks = lend, bids = borrow. assets is raw loan-token units.",
4779
6140
  prerequisites: ["marketId from ctm_morpho_fetch_midnight_books", "assets raw amount"],
4780
- followUp: ["ctm_morpho_build_midnight_lend_multisign", "ctm_morpho_build_midnight_borrow_multisign"],
6141
+ followUp: [
6142
+ "ctm_morpho_build_midnight_lend_multisign",
6143
+ "ctm_morpho_build_midnight_lend_offer_multisign",
6144
+ "ctm_morpho_build_midnight_borrow_multisign"
6145
+ ],
4781
6146
  handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchMidnightQuoteSummary" },
4782
6147
  inputZod: mcpMorphoFetchMidnightQuoteInputSchema,
4783
6148
  outputZod: mcpMorphoFetchMidnightQuoteOutputSchema
@@ -4794,6 +6159,18 @@ var CORE_MCP_TOOL_DEFINITIONS = [
4794
6159
  inputZod: mcpMorphoFetchMidnightPositionsInputSchema,
4795
6160
  outputZod: mcpMorphoFetchMidnightPositionsOutputSchema
4796
6161
  }),
6162
+ defineMcpTool({
6163
+ name: "ctm_morpho_fetch_midnight_offers",
6164
+ actionId: "morpho.fetch-midnight-offers",
6165
+ protocolId: "morpho",
6166
+ chainCategory: "evm",
6167
+ description: "Open Morpho Midnight maker lend offers for a user. Use group/callback/callbackData to cancel and withdraw unused Blue park.",
6168
+ prerequisites: ["user address"],
6169
+ followUp: ["ctm_morpho_build_midnight_cancel_lend_offer_multisign"],
6170
+ handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchMidnightMakerOffersSummary" },
6171
+ inputZod: mcpMorphoFetchMidnightOffersInputSchema,
6172
+ outputZod: mcpMorphoFetchMidnightOffersOutputSchema
6173
+ }),
4797
6174
  defineMcpTool({
4798
6175
  name: "ctm_euler_v2_fetch_lend_vaults",
4799
6176
  actionId: "euler-v2.fetch-lend-vaults",
@@ -4908,6 +6285,395 @@ var CORE_MCP_TOOL_DEFINITIONS = [
4908
6285
  handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchEarnVaultsSummary" },
4909
6286
  inputZod: mcpMorphoFetchEarnVaultsInputSchema,
4910
6287
  outputZod: mcpMorphoFetchEarnVaultsOutputSchema
6288
+ }),
6289
+ defineMcpTool({
6290
+ name: "ctm_continuum_dao_fetch_voting_power",
6291
+ actionId: "continuum-dao.fetch-voting-power",
6292
+ protocolId: "continuum-dao",
6293
+ chainCategory: "evm",
6294
+ description: "Read ContinuumDAO getVotes(account) and live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). Gate propose on votes >= threshold. Linea only.",
6295
+ prerequisites: ["rpcUrl", "account (KeyGen ETH address)", "governor"],
6296
+ followUp: [
6297
+ "ctm_continuum_dao_fetch_delegates",
6298
+ "ctm_continuum_dao_build_propose_bravo_multisign",
6299
+ "ctm_continuum_dao_build_propose_delta_multisign"
6300
+ ],
6301
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoFetchVotingPower" },
6302
+ inputZod: mcpContinuumDaoFetchVotingPowerInputSchema,
6303
+ outputZod: mcpContinuumDaoFetchVotingPowerOutputSchema
6304
+ }),
6305
+ defineMcpTool({
6306
+ name: "ctm_continuum_dao_fetch_delegates",
6307
+ actionId: "continuum-dao.fetch-delegates",
6308
+ protocolId: "continuum-dao",
6309
+ chainCategory: "evm",
6310
+ description: "Read VotingEscrow.delegates(account). self is true when voting power is not delegated away. Linea only.",
6311
+ prerequisites: ["rpcUrl", "account (KeyGen ETH address)", "votingEscrow"],
6312
+ followUp: [
6313
+ "ctm_continuum_dao_build_delegate_multisign",
6314
+ "ctm_continuum_dao_build_undelegate_multisign"
6315
+ ],
6316
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoFetchDelegates" },
6317
+ inputZod: mcpContinuumDaoFetchDelegatesInputSchema,
6318
+ outputZod: mcpContinuumDaoFetchDelegatesOutputSchema
6319
+ }),
6320
+ defineMcpTool({
6321
+ name: "ctm_continuum_dao_fetch_proposal_state",
6322
+ actionId: "continuum-dao.fetch-proposal-state",
6323
+ protocolId: "continuum-dao",
6324
+ chainCategory: "evm",
6325
+ description: "Read ContinuumDAO.state and proposalVotes for an on-chain proposal id.",
6326
+ prerequisites: ["rpcUrl", "proposalId", "governor"],
6327
+ followUp: [
6328
+ "ctm_continuum_dao_build_cast_vote_bravo_multisign",
6329
+ "ctm_continuum_dao_build_execute_multisign"
6330
+ ],
6331
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoFetchProposalState" },
6332
+ inputZod: mcpContinuumDaoFetchProposalStateInputSchema,
6333
+ outputZod: mcpContinuumDaoFetchProposalStateOutputSchema
6334
+ }),
6335
+ defineMcpTool({
6336
+ name: "ctm_continuum_dao_fetch_proposals",
6337
+ actionId: "continuum-dao.fetch-proposals",
6338
+ protocolId: "continuum-dao",
6339
+ chainCategory: "evm",
6340
+ description: "List proposals from the public ContinuumDAO backend (POST /proposals). Do not use this to answer \u201Cwhat is live now\u201D \u2014 use ctm_continuum_dao_fetch_live_proposals so on-chain state is overlaid.",
6341
+ prerequisites: [],
6342
+ followUp: ["ctm_continuum_dao_fetch_live_proposals", "ctm_continuum_dao_fetch_proposal"],
6343
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoFetchProposals" },
6344
+ inputZod: mcpContinuumDaoFetchProposalsInputSchema,
6345
+ outputZod: mcpContinuumDaoFetchProposalsOutputSchema
6346
+ }),
6347
+ defineMcpTool({
6348
+ name: "ctm_continuum_dao_fetch_proposal",
6349
+ actionId: "continuum-dao.fetch-proposal",
6350
+ protocolId: "continuum-dao",
6351
+ chainCategory: "evm",
6352
+ description: "Fetch one proposal from the public ContinuumDAO backend (GET /proposals/:id).",
6353
+ prerequisites: ["id"],
6354
+ followUp: ["ctm_continuum_dao_explain_proposal", "ctm_continuum_dao_fetch_proposal_state"],
6355
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoFetchProposal" },
6356
+ inputZod: mcpContinuumDaoFetchProposalInputSchema,
6357
+ outputZod: mcpContinuumDaoFetchProposalOutputSchema
6358
+ }),
6359
+ defineMcpTool({
6360
+ name: "ctm_continuum_dao_fetch_live_proposals",
6361
+ actionId: "continuum-dao.fetch-live-proposals",
6362
+ protocolId: "continuum-dao",
6363
+ chainCategory: "evm",
6364
+ description: "Answer \u201Cwhat proposals are live now?\u201D. Lists the backend catalog and overlays ContinuumDAO.state. live = Active (voting). pending = Pending. readyToExecute = Succeeded (execute from here; no queue). recentlyCompleted = Canceled/Defeated/Expired/Executed in this scan. Requires Linea chainId + rpcUrl + governor for on-chain overlay. Read the `note` field aloud.",
6365
+ prerequisites: ["load_defi_protocol continuum-dao", "Linea chainId 59144 or 59141", "rpcUrl", "governor if constant is zero"],
6366
+ followUp: [
6367
+ "ctm_continuum_dao_explain_proposal",
6368
+ "ctm_continuum_dao_fetch_proposal",
6369
+ "ctm_continuum_dao_build_cast_vote_bravo_multisign",
6370
+ "ctm_continuum_dao_build_execute_multisign"
6371
+ ],
6372
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoFetchLiveProposals" },
6373
+ inputZod: mcpContinuumDaoFetchLiveProposalsInputSchema,
6374
+ outputZod: mcpContinuumDaoFetchLiveProposalsOutputSchema
6375
+ }),
6376
+ defineMcpTool({
6377
+ name: "ctm_continuum_dao_explain_proposal",
6378
+ actionId: "continuum-dao.explain-proposal",
6379
+ protocolId: "continuum-dao",
6380
+ chainCategory: "evm",
6381
+ description: "Deconstruct a ContinuumDAO proposal for the operator. Walks every user action (Bravo) or every option (Delta), labels encoder no-ops as signaling, flags C3 / value / approve / unknown signatures, and checks the forum thread section against the proposal type. Read the `briefing` field aloud. Does not vote. For a policy recommendation load the mpc-config continuum-dao-vote-policy skill.",
6382
+ prerequisites: ["id (backend) or onchainId"],
6383
+ followUp: ["ctm_continuum_dao_fetch_proposal_state", "ctm_continuum_dao_forum_fetch_thread"],
6384
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoExplainProposal" },
6385
+ inputZod: mcpContinuumDaoExplainProposalInputSchema,
6386
+ outputZod: mcpContinuumDaoExplainProposalOutputSchema
6387
+ }),
6388
+ defineMcpTool({
6389
+ name: "ctm_continuum_dao_register_proposal",
6390
+ actionId: "continuum-dao.register-proposal",
6391
+ protocolId: "continuum-dao",
6392
+ chainCategory: "evm",
6393
+ description: "POST /proposals/create so app.continuumdao.org stays in sync. Call after the propose multi-sign request is mined. Does not revert the chain tx if this fails \u2014 retry.",
6394
+ prerequisites: ["onchainId from hashProposal or ProposalCreated", "title", "proposer", "forumKey", "type", "configuration"],
6395
+ followUp: [],
6396
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoRegisterProposal" },
6397
+ inputZod: mcpContinuumDaoRegisterProposalInputSchema,
6398
+ outputZod: mcpContinuumDaoRegisterProposalOutputSchema
6399
+ }),
6400
+ defineMcpTool({
6401
+ name: "ctm_continuum_dao_forum_sign_in_eligible",
6402
+ actionId: "continuum-dao.forum-sign-in-eligible",
6403
+ protocolId: "continuum-dao",
6404
+ chainCategory: "evm",
6405
+ description: "Check whether an address may EIP-712 sign in to the forum (holder or attach-key veCTM at MultiSignAgentWallet.veCtmThresholdPower). Call this before ctm_continuum_dao_build_forum_sign_in_multisign. If eligible is false, do not start a multi-sign request.",
6406
+ prerequisites: ["address (KeyGen ethereumaddress)"],
6407
+ followUp: ["ctm_continuum_dao_build_forum_sign_in_multisign"],
6408
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumSignInEligible" },
6409
+ inputZod: mcpContinuumDaoForumSignInEligibleInputSchema,
6410
+ outputZod: mcpContinuumDaoForumSignInEligibleOutputSchema
6411
+ }),
6412
+ defineMcpTool({
6413
+ name: "ctm_continuum_dao_forum_resolve",
6414
+ actionId: "continuum-dao.forum-resolve",
6415
+ protocolId: "continuum-dao",
6416
+ chainCategory: "evm",
6417
+ description: "Parse a ContinuumDAO forumKey URL into a NodeBB topic id.",
6418
+ prerequisites: ["url or tid"],
6419
+ followUp: ["ctm_continuum_dao_forum_fetch_thread"],
6420
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumResolve" },
6421
+ inputZod: mcpContinuumDaoForumResolveInputSchema,
6422
+ outputZod: mcpContinuumDaoForumResolveOutputSchema
6423
+ }),
6424
+ defineMcpTool({
6425
+ name: "ctm_continuum_dao_forum_fetch_thread",
6426
+ actionId: "continuum-dao.forum-fetch-thread",
6427
+ protocolId: "continuum-dao",
6428
+ chainCategory: "evm",
6429
+ description: "Fetch a forum thread from forum.continuumdao.org. Returns cid and section (ideas / decision / election / treasury / constitution / admin). index 0 is the original post. Omit index to page through posts (start/limit). Prefer forum_fetch_post for one pid. Compare section to proposal type when evaluating.",
6430
+ prerequisites: ["url or tid"],
6431
+ followUp: ["ctm_continuum_dao_forum_fetch_post", "ctm_continuum_dao_forum_reply"],
6432
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumFetchThread" },
6433
+ inputZod: mcpContinuumDaoForumFetchThreadInputSchema,
6434
+ outputZod: mcpContinuumDaoForumFetchThreadOutputSchema
6435
+ }),
6436
+ defineMcpTool({
6437
+ name: "ctm_continuum_dao_forum_fetch_post",
6438
+ actionId: "continuum-dao.forum-fetch-post",
6439
+ protocolId: "continuum-dao",
6440
+ chainCategory: "evm",
6441
+ description: "Read one forum post by pid. Not the whole thread.",
6442
+ prerequisites: ["pid"],
6443
+ followUp: ["ctm_continuum_dao_forum_react", "ctm_continuum_dao_forum_reply"],
6444
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumFetchPost" },
6445
+ inputZod: mcpContinuumDaoForumFetchPostInputSchema,
6446
+ outputZod: mcpContinuumDaoForumFetchPostOutputSchema
6447
+ }),
6448
+ defineMcpTool({
6449
+ name: "ctm_continuum_dao_forum_search",
6450
+ actionId: "continuum-dao.forum-search",
6451
+ protocolId: "continuum-dao",
6452
+ chainCategory: "evm",
6453
+ description: "Search forum.continuumdao.org. Case-insensitive match on a new thread title or any post body. Optional hours (last X hours) or since (ISO date / unix timestamp). Empty query with a time filter lists recent posts. Returns id (pid), thread title, author username, and createdAt \u2014 then ctm_continuum_dao_forum_fetch_post.",
6454
+ prerequisites: ["query and/or hours or since"],
6455
+ followUp: ["ctm_continuum_dao_forum_fetch_post", "ctm_continuum_dao_forum_fetch_thread"],
6456
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumSearch" },
6457
+ inputZod: mcpContinuumDaoForumSearchInputSchema,
6458
+ outputZod: mcpContinuumDaoForumSearchOutputSchema
6459
+ }),
6460
+ defineMcpTool({
6461
+ name: "ctm_continuum_dao_forum_recent",
6462
+ actionId: "continuum-dao.forum-recent",
6463
+ protocolId: "continuum-dao",
6464
+ chainCategory: "evm",
6465
+ description: "List the most recent posts across the whole forum that the caller may read. Requires hours (last X hours) or since (ISO date / unix timestamp). Newest first. Returns id (pid), thread title, author username, and createdAt \u2014 then ctm_continuum_dao_forum_fetch_post. Optional ticket includes private categories the user can access.",
6466
+ prerequisites: ["hours or since"],
6467
+ followUp: ["ctm_continuum_dao_forum_fetch_post", "ctm_continuum_dao_forum_search"],
6468
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumRecent" },
6469
+ inputZod: mcpContinuumDaoForumRecentInputSchema,
6470
+ outputZod: mcpContinuumDaoForumRecentOutputSchema
6471
+ }),
6472
+ defineMcpTool({
6473
+ name: "ctm_continuum_dao_forum_delete",
6474
+ actionId: "continuum-dao.forum-delete",
6475
+ protocolId: "continuum-dao",
6476
+ chainCategory: "evm",
6477
+ description: "Admin or moderator soft-delete on forum.continuumdao.org. Requires a forum ticket. Caller must be an administrator or category moderator \u2014 post owners are refused. Exactly one of: pid (one post), tid/url (one thread), or username (that user\u2019s posts). Optional hours or since; omit both to delete all matches. Confirm with the operator before calling, especially username. Then forum_fetch_post / forum_search to verify.",
6478
+ prerequisites: ["ticket", "exactly one of pid, tid/url, or username"],
6479
+ followUp: ["ctm_continuum_dao_forum_fetch_post", "ctm_continuum_dao_forum_recent", "ctm_continuum_dao_forum_sign_out"],
6480
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumDelete" },
6481
+ inputZod: mcpContinuumDaoForumDeleteInputSchema,
6482
+ outputZod: mcpContinuumDaoForumDeleteOutputSchema
6483
+ }),
6484
+ defineMcpTool({
6485
+ name: "ctm_continuum_dao_forum_user_post_ids",
6486
+ actionId: "continuum-dao.forum-user-post-ids",
6487
+ protocolId: "continuum-dao",
6488
+ chainCategory: "evm",
6489
+ description: "List forum post ids for a username (no bodies). Then call forum_fetch_post for each pid.",
6490
+ prerequisites: ["username"],
6491
+ followUp: ["ctm_continuum_dao_forum_fetch_post"],
6492
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumUserPostIds" },
6493
+ inputZod: mcpContinuumDaoForumUserPostIdsInputSchema,
6494
+ outputZod: mcpContinuumDaoForumUserPostIdsOutputSchema
6495
+ }),
6496
+ defineMcpTool({
6497
+ name: "ctm_continuum_dao_forum_reply_count",
6498
+ actionId: "continuum-dao.forum-reply-count",
6499
+ protocolId: "continuum-dao",
6500
+ chainCategory: "evm",
6501
+ description: "Reply count for a forum thread (excludes the original post).",
6502
+ prerequisites: ["url or tid"],
6503
+ followUp: ["ctm_continuum_dao_forum_fetch_thread"],
6504
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumReplyCount" },
6505
+ inputZod: mcpContinuumDaoForumReplyCountInputSchema,
6506
+ outputZod: mcpContinuumDaoForumReplyCountOutputSchema
6507
+ }),
6508
+ defineMcpTool({
6509
+ name: "ctm_continuum_dao_forum_reply",
6510
+ actionId: "continuum-dao.forum-reply",
6511
+ protocolId: "continuum-dao",
6512
+ chainCategory: "evm",
6513
+ description: "Post an English reply (max 8000 characters) to a forum thread. Requires forumTicket from EIP-712 login.",
6514
+ prerequisites: ["ticket", "content", "url or tid"],
6515
+ followUp: ["ctm_continuum_dao_forum_fetch_thread"],
6516
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumReply" },
6517
+ inputZod: mcpContinuumDaoForumReplyInputSchema,
6518
+ outputZod: mcpContinuumDaoForumReplyOutputSchema
6519
+ }),
6520
+ defineMcpTool({
6521
+ name: "ctm_continuum_dao_forum_react",
6522
+ actionId: "continuum-dao.forum-react",
6523
+ protocolId: "continuum-dao",
6524
+ chainCategory: "evm",
6525
+ description: "Toggle an allowlisted reaction on a post: +1, -1, heart, tada, eyes. Requires forumTicket.",
6526
+ prerequisites: ["ticket", "pid", "emoji"],
6527
+ followUp: ["ctm_continuum_dao_forum_fetch_post"],
6528
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumReact" },
6529
+ inputZod: mcpContinuumDaoForumReactInputSchema,
6530
+ outputZod: mcpContinuumDaoForumReactOutputSchema
6531
+ }),
6532
+ defineMcpTool({
6533
+ name: "ctm_continuum_dao_forum_create_topic",
6534
+ actionId: "continuum-dao.forum-create-topic",
6535
+ protocolId: "continuum-dao",
6536
+ chainCategory: "evm",
6537
+ description: "Create a formal proposal thread in a Governance section: decision, election, treasury, constitution, or admin. Requires getVotes >= live proposalThreshold() and a forumTicket. Never use Ideas & Suggestions here. Pass the returned url as forumKey on build_propose_* and register_proposal. Map type Decision\u2192decision, Election\u2192election, Treasury\u2192treasury, Constitution\u2192constitution, Admin\u2192admin.",
6538
+ prerequisites: ["ticket", "title", "content", "section or cid", "governor configured on the forum"],
6539
+ followUp: ["ctm_continuum_dao_build_propose_bravo_multisign", "ctm_continuum_dao_build_propose_delta_multisign"],
6540
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumCreateTopic" },
6541
+ inputZod: mcpContinuumDaoForumCreateTopicInputSchema,
6542
+ outputZod: mcpContinuumDaoForumCreateTopicOutputSchema
6543
+ }),
6544
+ defineMcpTool({
6545
+ name: "ctm_continuum_dao_forum_create_idea",
6546
+ actionId: "continuum-dao.forum-create-idea",
6547
+ protocolId: "continuum-dao",
6548
+ chainCategory: "evm",
6549
+ description: "Post an Idea or Suggestion (discussion only) to Ideas & Suggestions. Not a proposal and not a valid forumKey. Use this when the operator wants feedback before a Temperature Check, or the ask is not ready for on-chain governance. Wallet login required; proposalThreshold is not. Do not follow with build_propose_*.",
6550
+ prerequisites: ["ticket", "title", "content"],
6551
+ followUp: ["ctm_continuum_dao_forum_reply", "ctm_continuum_dao_forum_sign_out"],
6552
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumCreateIdea" },
6553
+ inputZod: mcpContinuumDaoForumCreateIdeaInputSchema,
6554
+ outputZod: mcpContinuumDaoForumCreateIdeaOutputSchema
6555
+ }),
6556
+ defineMcpTool({
6557
+ name: "ctm_continuum_dao_forum_me",
6558
+ actionId: "continuum-dao.forum-me",
6559
+ protocolId: "continuum-dao",
6560
+ chainCategory: "evm",
6561
+ description: "Current forum user, votes, canPropose (Governance threads), and canPostIdea (Ideas & Suggestions).",
6562
+ prerequisites: [],
6563
+ followUp: [
6564
+ "ctm_continuum_dao_forum_unread",
6565
+ "ctm_continuum_dao_forum_sections",
6566
+ "ctm_continuum_dao_forum_sign_out"
6567
+ ],
6568
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumMe" },
6569
+ inputZod: mcpContinuumDaoForumMeInputSchema,
6570
+ outputZod: mcpContinuumDaoForumMeOutputSchema
6571
+ }),
6572
+ defineMcpTool({
6573
+ name: "ctm_continuum_dao_forum_unread",
6574
+ actionId: "continuum-dao.forum-unread",
6575
+ protocolId: "continuum-dao",
6576
+ chainCategory: "evm",
6577
+ description: "List unread Forum topics for the logged-in user (NodeBB Unread). Requires a forum ticket. Optional filter all/new/watched/unreplied. Returns tid, title, url, replyCount, lastPostAt \u2014 then forum_fetch_thread and forum_mark_read. Interactive only; never from cron.",
6578
+ prerequisites: ["ticket"],
6579
+ followUp: ["ctm_continuum_dao_forum_fetch_thread", "ctm_continuum_dao_forum_mark_read"],
6580
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumUnread" },
6581
+ inputZod: mcpContinuumDaoForumUnreadInputSchema,
6582
+ outputZod: mcpContinuumDaoForumUnreadOutputSchema
6583
+ }),
6584
+ defineMcpTool({
6585
+ name: "ctm_continuum_dao_forum_mark_read",
6586
+ actionId: "continuum-dao.forum-mark-read",
6587
+ protocolId: "continuum-dao",
6588
+ chainCategory: "evm",
6589
+ description: "Mark Forum topic(s) read for the logged-in user (clears NodeBB Unread and topic notifications). Requires a ticket. Exactly one of tid/url, tids, or all. Confirm before all. Interactive only; never from cron.",
6590
+ prerequisites: ["ticket", "exactly one of tid/url, tids, or all"],
6591
+ followUp: ["ctm_continuum_dao_forum_unread", "ctm_continuum_dao_forum_fetch_thread"],
6592
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumMarkRead" },
6593
+ inputZod: mcpContinuumDaoForumMarkReadInputSchema,
6594
+ outputZod: mcpContinuumDaoForumMarkReadOutputSchema
6595
+ }),
6596
+ defineMcpTool({
6597
+ name: "ctm_continuum_dao_forum_mark_unread",
6598
+ actionId: "continuum-dao.forum-mark-unread",
6599
+ protocolId: "continuum-dao",
6600
+ chainCategory: "evm",
6601
+ description: "Mark one Forum topic unread for the logged-in user. Requires a ticket and tid or url. Interactive only; never from cron.",
6602
+ prerequisites: ["ticket", "tid or url"],
6603
+ followUp: ["ctm_continuum_dao_forum_unread"],
6604
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumMarkUnread" },
6605
+ inputZod: mcpContinuumDaoForumMarkUnreadInputSchema,
6606
+ outputZod: mcpContinuumDaoForumMarkUnreadOutputSchema
6607
+ }),
6608
+ defineMcpTool({
6609
+ name: "ctm_continuum_dao_forum_sign_out",
6610
+ actionId: "continuum-dao.forum-sign-out",
6611
+ protocolId: "continuum-dao",
6612
+ chainCategory: "evm",
6613
+ description: "Revoke the forum ticket and destroy NodeBB sessions for that user. Requires the ticket from EIP-712 sign-in. Does not create a multi-sign request.",
6614
+ prerequisites: ["ticket from forum sign-in"],
6615
+ followUp: ["ctm_continuum_dao_forum_me"],
6616
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumSignOut" },
6617
+ inputZod: mcpContinuumDaoForumSignOutInputSchema,
6618
+ outputZod: mcpContinuumDaoForumSignOutOutputSchema
6619
+ }),
6620
+ defineMcpTool({
6621
+ name: "ctm_continuum_dao_forum_sections",
6622
+ actionId: "continuum-dao.forum-sections",
6623
+ protocolId: "continuum-dao",
6624
+ chainCategory: "evm",
6625
+ description: "Forum category ids: ideas (discussion only) plus Governance proposal sections decision, election, treasury, constitution, admin. Use forum_create_idea for ideas; forum_create_topic for Governance.",
6626
+ prerequisites: [],
6627
+ followUp: [
6628
+ "ctm_continuum_dao_forum_recent",
6629
+ "ctm_continuum_dao_forum_search",
6630
+ "ctm_continuum_dao_forum_create_topic",
6631
+ "ctm_continuum_dao_forum_create_idea"
6632
+ ],
6633
+ handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoForumSections" },
6634
+ inputZod: mcpContinuumDaoForumSectionsInputSchema,
6635
+ outputZod: mcpContinuumDaoForumSectionsOutputSchema
6636
+ }),
6637
+ defineMcpTool({
6638
+ name: "ctm_compound_v3_fetch_markets",
6639
+ actionId: "compound-v3.fetch-markets",
6640
+ protocolId: "compound-v3",
6641
+ chainCategory: "evm",
6642
+ description: "List Compound III Comet markets on a chain. Each market has one borrowable base and a collateral list \u2014 use this (not web search) to answer what you can borrow against an asset or which collaterals a Comet accepts. Copy comet for fetch_market / fetch_account / build_*_multisign.",
6643
+ prerequisites: ["chainId", "get_defi_protocol_supported_chains"],
6644
+ followUp: ["ctm_compound_v3_fetch_market", "ctm_compound_v3_fetch_account"],
6645
+ handler: { importPath: "protocols/evm/compound-v3", exportName: "compoundV3FetchMarketsSummary" },
6646
+ inputZod: mcpCompoundV3FetchMarketsInputSchema,
6647
+ outputZod: mcpCompoundV3FetchMarketsOutputSchema
6648
+ }),
6649
+ defineMcpTool({
6650
+ name: "ctm_compound_v3_fetch_market",
6651
+ actionId: "compound-v3.fetch-market",
6652
+ protocolId: "compound-v3",
6653
+ chainCategory: "evm",
6654
+ description: "One Comet: collateral list (what backs a borrow), collateral factors, prices, utilization, supply/borrow APR. Base is the only borrowable asset. Always uses the Comet proxy + CometInterface.",
6655
+ prerequisites: ["comet from ctm_compound_v3_fetch_markets", "rpcUrl from chain registry"],
6656
+ followUp: ["ctm_compound_v3_fetch_account", "ctm_compound_v3_build_supply_multisign"],
6657
+ handler: { importPath: "protocols/evm/compound-v3", exportName: "compoundV3FetchMarketSummary" },
6658
+ inputZod: mcpCompoundV3FetchMarketInputSchema,
6659
+ outputZod: mcpCompoundV3FetchMarketOutputSchema
6660
+ }),
6661
+ defineMcpTool({
6662
+ name: "ctm_compound_v3_fetch_account",
6663
+ actionId: "compound-v3.fetch-account",
6664
+ protocolId: "compound-v3",
6665
+ chainCategory: "evm",
6666
+ description: "User position on a Comet: base supplied, base borrowed, each collateral, isBorrowCollateralized, isLiquidatable, claimable rewards.",
6667
+ prerequisites: ["comet from ctm_compound_v3_fetch_markets", "account", "rpcUrl from chain registry"],
6668
+ followUp: [
6669
+ "ctm_compound_v3_build_supply_multisign",
6670
+ "ctm_compound_v3_build_withdraw_multisign",
6671
+ "ctm_compound_v3_build_repay_multisign",
6672
+ "ctm_compound_v3_build_claim_rewards_multisign"
6673
+ ],
6674
+ handler: { importPath: "protocols/evm/compound-v3", exportName: "compoundV3FetchAccountSummary" },
6675
+ inputZod: mcpCompoundV3FetchAccountInputSchema,
6676
+ outputZod: mcpCompoundV3FetchAccountOutputSchema
4911
6677
  })
4912
6678
  ];
4913
6679
  var MCP_TOOL_DEFINITIONS = [
@@ -6056,6 +7822,8 @@ var morphoProtocolModule = {
6056
7822
  { id: "morpho.fetch-midnight-quote", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Quote Morpho Midnight lend/borrow fill", commonParams: [], params: {} },
6057
7823
  { id: "morpho.fetch-midnight-positions", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "List Morpho Midnight user positions", commonParams: [], params: {} },
6058
7824
  { id: "morpho.midnight-lend", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight fixed-rate lend (take asks)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
7825
+ { id: "morpho.midnight-lend-offer", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight lend limit offer parked in Blue until filled", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
7826
+ { id: "morpho.midnight-cancel-lend-offer", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Cancel a Morpho Midnight lend offer and withdraw unused Blue park", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
6059
7827
  { id: "morpho.midnight-borrow", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight fixed-rate borrow (supply collateral + take bids)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
6060
7828
  { id: "morpho.midnight-repay", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight repay debt and withdraw collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
6061
7829
  ]
@@ -6331,6 +8099,884 @@ var veniceProtocolModule = {
6331
8099
  ]
6332
8100
  };
6333
8101
  registerProtocolModule(veniceProtocolModule);
8102
+ var AERODROME_PROTOCOL_ID = "aerodrome";
8103
+ var AERODROME_CHAIN_ID = 8453;
8104
+ var AERODROME_WETH_BASE = "0x4200000000000000000000000000000000000006";
8105
+ var AERODROME_USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
8106
+ function isAerodromeChainSupported(chainId) {
8107
+ const n = typeof chainId === "number" ? chainId : Number.parseInt(String(chainId), 10);
8108
+ return n === AERODROME_CHAIN_ID;
8109
+ }
8110
+ var AERODROME_BASE_ADDRESSES_FALLBACK = {
8111
+ aero: "0x940181a94A35A4569E4529A3CDfB74e38FD98631"};
8112
+ var AERODROME_COINBASE_STOCK_TOKENS = [
8113
+ { symbol: "AAPLc", name: "Apple Inc.", address: "0xb200000000000000000000C2e324d24d7eEcd1fb" },
8114
+ { symbol: "NVDAc", name: "NVIDIA Corporation", address: "0xb20000000000000000000078ee7ce2fE4908108C" },
8115
+ { symbol: "METAc", name: "Meta Platforms Inc.", address: "0xb2000000000000000000008bC8786B856E61707C" },
8116
+ { symbol: "GOOGLc", name: "Alphabet Inc.", address: "0xb2000000000000000000002D0BA3164cc74f58B7" },
8117
+ { symbol: "AMZNc", name: "Amazon.com Inc.", address: "0xb200000000000000000000d9192b6B456483C2E8" },
8118
+ { symbol: "TSLAc", name: "Tesla Inc.", address: "0xb2000000000000000000001e800a7f5189430cD0" },
8119
+ { symbol: "MSFTc", name: "Microsoft Corporation", address: "0xB200000000000000000000Ab99cFa739E253872B" },
8120
+ { symbol: "COINc", name: "Coinbase Global Inc.", address: "0xb200000000000000000000c85a31389D71F3ecfb" },
8121
+ { symbol: "MSTRc", name: "Strategy Inc.", address: "0xb2000000000000000000004884b426556b92883d" },
8122
+ { symbol: "CRCLc", name: "Circle Internet Group Inc.", address: "0xB20000000000000000000019f6E7C675b73C2e4D" },
8123
+ { symbol: "INTCc", name: "Intel Corporation", address: "0xB2000000000000000000004AFF16039bA04bdFBc" },
8124
+ { symbol: "SNDKc", name: "Sandisk Corporation", address: "0xb200000000000000000000397293Cb8cda9a10c5" },
8125
+ { symbol: "SPCXc", name: "Space Exploration Technologies Corp.", address: "0xb2000000000000000000007b9fcbd005511aCBd5" }
8126
+ ];
8127
+ var AERODROME_COINBASE_STOCK_DECIMALS = 8;
8128
+
8129
+ // src/protocols/evm/aerodrome/index.ts
8130
+ var aerodromeProtocolModule = {
8131
+ id: AERODROME_PROTOCOL_ID,
8132
+ chainCategory: "evm",
8133
+ isChainSupported(ctx) {
8134
+ if (ctx.chainCategory !== "evm") return false;
8135
+ return isAerodromeChainSupported(ctx.chainId);
8136
+ },
8137
+ isTokenSupported(token) {
8138
+ if (token.category !== "evm") return false;
8139
+ return token.kind === "native" || token.kind === "erc20";
8140
+ },
8141
+ actions: [
8142
+ {
8143
+ id: "aerodrome.quote",
8144
+ protocolId: AERODROME_PROTOCOL_ID,
8145
+ chainCategory: "evm",
8146
+ description: "Quote an Aerodrome swap on Base via factory discovery + MixedRouteQuoterV3 / Router. Tickers (AAPLc, USDC, ETH) accepted.",
8147
+ commonParams: [],
8148
+ params: {
8149
+ chainId: { type: "number", required: true, description: `Must be ${AERODROME_CHAIN_ID}` },
8150
+ tokenIn: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x / 0x0 native" },
8151
+ tokenOut: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x / 0x0 native" },
8152
+ amountHuman: { type: "string", required: true, description: "Human-readable input amount (B20 stocks are 8 decimals)" }
8153
+ }
8154
+ },
8155
+ {
8156
+ id: "aerodrome.swap",
8157
+ protocolId: AERODROME_PROTOCOL_ID,
8158
+ chainCategory: "evm",
8159
+ description: "Swap via Aerodrome Router / Slipstream SwapRouter (optional ERC-20 approve batch)",
8160
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8161
+ params: {
8162
+ tokenIn: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
8163
+ tokenOut: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
8164
+ amountHuman: { type: "string", required: true, description: "Human-readable input amount" },
8165
+ slippagePercent: { type: "number", required: true, description: "Slippage percent (0\u2013100 exclusive)" }
8166
+ }
8167
+ },
8168
+ {
8169
+ id: "aerodrome.add-liquidity",
8170
+ protocolId: AERODROME_PROTOCOL_ID,
8171
+ chainCategory: "evm",
8172
+ description: "Deposit into a basic vAMM/sAMM pool (one-sided amounts; tickers OK)",
8173
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8174
+ params: {
8175
+ tokenA: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
8176
+ tokenB: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
8177
+ stable: { type: "boolean", required: true, description: "true = sAMM, false = vAMM" },
8178
+ amountAHuman: { type: "string", required: false, description: "Amount A; omit to solve from B" },
8179
+ amountBHuman: { type: "string", required: false, description: "Amount B; omit to solve from A" },
8180
+ slippagePercent: { type: "number", required: true, description: "Slippage percent" }
8181
+ }
8182
+ },
8183
+ {
8184
+ id: "aerodrome.remove-liquidity",
8185
+ protocolId: AERODROME_PROTOCOL_ID,
8186
+ chainCategory: "evm",
8187
+ description: "Withdraw from a basic vAMM/sAMM pool",
8188
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8189
+ params: {
8190
+ lpToken: { type: "address", required: true, description: "LP token" },
8191
+ liquidityHuman: { type: "string", required: true, description: "LP amount" }
8192
+ }
8193
+ },
8194
+ {
8195
+ id: "aerodrome.cl-mint",
8196
+ protocolId: AERODROME_PROTOCOL_ID,
8197
+ chainCategory: "evm",
8198
+ description: "Mint a Slipstream concentrated liquidity NFT",
8199
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8200
+ params: {
8201
+ token0: { type: "address", required: true, description: "Token0" },
8202
+ token1: { type: "address", required: true, description: "Token1" },
8203
+ tickSpacing: { type: "number", required: true, description: "Pool tick spacing" },
8204
+ tickLower: { type: "number", required: true, description: "Lower tick" },
8205
+ tickUpper: { type: "number", required: true, description: "Upper tick" }
8206
+ }
8207
+ },
8208
+ {
8209
+ id: "aerodrome.gauge-stake",
8210
+ protocolId: AERODROME_PROTOCOL_ID,
8211
+ chainCategory: "evm",
8212
+ description: "Stake basic LP tokens or a Slipstream NFT in a gauge",
8213
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8214
+ params: {
8215
+ gauge: { type: "address", required: true, description: "Gauge address" }
8216
+ }
8217
+ },
8218
+ {
8219
+ id: "aerodrome.claim-fees",
8220
+ protocolId: AERODROME_PROTOCOL_ID,
8221
+ chainCategory: "evm",
8222
+ description: "Claim unstaked fees from the pool (not the gauge)",
8223
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8224
+ params: { pool: { type: "address", required: true, description: "Pool lp from fetch_positions claimFees.pool" } }
8225
+ },
8226
+ {
8227
+ id: "aerodrome.claim-emissions",
8228
+ protocolId: AERODROME_PROTOCOL_ID,
8229
+ chainCategory: "evm",
8230
+ description: "Claim gauge emissions in AERO (not the pool)",
8231
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8232
+ params: { gauge: { type: "address", required: true, description: "Gauge from fetch_positions claimEmissions" } }
8233
+ }
8234
+ ]
8235
+ };
8236
+ registerProtocolModule(aerodromeProtocolModule);
8237
+ var CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
8238
+ var CONTINUUM_DAO_ETHEREUM_CHAIN_ID = 1;
8239
+ var CONTINUUM_DAO_LINEA_CHAIN_ID = 59144;
8240
+ var CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID = 59141;
8241
+ var CTM_TOKEN_NAME = "Continuum";
8242
+ var CTM_TOKEN_SYMBOL = "CTM";
8243
+ var VECTM_TOKEN_NAME = "Voting Escrow Continuum";
8244
+ var VECTM_TOKEN_SYMBOL = "veCTM";
8245
+ var CTM_TOKEN_DECIMALS = 18;
8246
+ var UNSET = {
8247
+ ctm: zeroAddress,
8248
+ votingEscrow: zeroAddress,
8249
+ nodeProperties: zeroAddress,
8250
+ rewards: zeroAddress,
8251
+ governor: zeroAddress
8252
+ };
8253
+ var CONTINUUM_DAO_DEPLOYMENTS = {
8254
+ [CONTINUUM_DAO_LINEA_CHAIN_ID]: { ...UNSET },
8255
+ [CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID]: { ...UNSET },
8256
+ [CONTINUUM_DAO_ETHEREUM_CHAIN_ID]: {
8257
+ ctm: zeroAddress,
8258
+ votingEscrow: zeroAddress,
8259
+ nodeProperties: zeroAddress,
8260
+ rewards: zeroAddress,
8261
+ governor: zeroAddress
8262
+ }
8263
+ };
8264
+ function isConfiguredAddress(addr) {
8265
+ if (!addr?.trim()) return false;
8266
+ try {
8267
+ return getAddress(addr) !== zeroAddress;
8268
+ } catch {
8269
+ return false;
8270
+ }
8271
+ }
8272
+ function continuumDaoDeployment(chainId) {
8273
+ return CONTINUUM_DAO_DEPLOYMENTS[chainId] ?? null;
8274
+ }
8275
+ function isContinuumDaoLockChain(chainId) {
8276
+ return chainId === CONTINUUM_DAO_LINEA_CHAIN_ID || chainId === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID;
8277
+ }
8278
+ function isContinuumDaoSupportedChainId(chainId) {
8279
+ return continuumDaoDeployment(chainId) != null;
8280
+ }
8281
+ function ctmTokenAddressOnEvmChain(chainId) {
8282
+ const ctm = continuumDaoDeployment(chainId)?.ctm;
8283
+ return ctm && isConfiguredAddress(ctm) ? getAddress(ctm) : null;
8284
+ }
8285
+ function votingEscrowAddressOnEvmChain(chainId) {
8286
+ const ve = continuumDaoDeployment(chainId)?.votingEscrow;
8287
+ return ve && isConfiguredAddress(ve) ? getAddress(ve) : null;
8288
+ }
8289
+ function listContinuumDaoDefaultAssets() {
8290
+ const out = [];
8291
+ for (const chainId of [
8292
+ CONTINUUM_DAO_LINEA_CHAIN_ID,
8293
+ CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID,
8294
+ CONTINUUM_DAO_ETHEREUM_CHAIN_ID
8295
+ ]) {
8296
+ const dep = continuumDaoDeployment(chainId);
8297
+ if (!dep) continue;
8298
+ if (isConfiguredAddress(dep.ctm)) {
8299
+ out.push({
8300
+ chainId,
8301
+ tokenType: "CTMERC20",
8302
+ contractAddress: getAddress(dep.ctm),
8303
+ name: CTM_TOKEN_NAME,
8304
+ symbol: CTM_TOKEN_SYMBOL,
8305
+ decimals: CTM_TOKEN_DECIMALS
8306
+ });
8307
+ }
8308
+ if (isContinuumDaoLockChain(chainId) && isConfiguredAddress(dep.votingEscrow)) {
8309
+ out.push({
8310
+ chainId,
8311
+ tokenType: "ERC721",
8312
+ contractAddress: getAddress(dep.votingEscrow),
8313
+ name: VECTM_TOKEN_NAME,
8314
+ symbol: VECTM_TOKEN_SYMBOL
8315
+ });
8316
+ }
8317
+ }
8318
+ return out;
8319
+ }
8320
+
8321
+ // src/protocols/evm/continuum-dao/index.ts
8322
+ var continuumDaoProtocolModule = {
8323
+ id: CONTINUUM_DAO_PROTOCOL_ID,
8324
+ chainCategory: "evm",
8325
+ isChainSupported(ctx) {
8326
+ if (ctx.chainCategory !== "evm") return false;
8327
+ const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
8328
+ return isContinuumDaoSupportedChainId(n);
8329
+ },
8330
+ isTokenSupported(token) {
8331
+ return token.category === "evm" && (token.kind === "erc20" || token.kind === "erc721");
8332
+ },
8333
+ actions: [
8334
+ { id: "continuum-dao.create-lock", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Approve CTM + create_lock", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { amountHuman: { type: "string", required: true, description: "CTM amount" }, lockDurationSeconds: { type: "string", required: true, description: "Lock duration in seconds" } } },
8335
+ { id: "continuum-dao.increase-amount", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Increase lock amount", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { tokenId: { type: "string", required: true, description: "veCTM token id" }, amountHuman: { type: "string", required: true, description: "CTM amount to add" } } },
8336
+ { id: "continuum-dao.increase-unlock-time", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Increase unlock time", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { tokenId: { type: "string", required: true, description: "veCTM token id" }, lockDurationSeconds: { type: "string", required: true, description: "Duration from week boundary to new unlock" } } },
8337
+ { id: "continuum-dao.split", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Split a veCTM lock", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { tokenId: { type: "string", required: true, description: "Source token id" }, extractedHuman: { type: "string", required: true, description: "CTM extracted into the new lock" } } },
8338
+ { id: "continuum-dao.merge", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Merge two veCTM locks", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { fromTokenId: { type: "string", required: true, description: "Burned token id" }, toTokenId: { type: "string", required: true, description: "Surviving token id" } } },
8339
+ { id: "continuum-dao.withdraw", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw an expired lock", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
8340
+ { id: "continuum-dao.liquidate", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Liquidate a lock", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
8341
+ { id: "continuum-dao.delegate", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Delegate voting power", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { delegatee: { type: "string", required: true, description: "Delegatee address" } } },
8342
+ { id: "continuum-dao.undelegate", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Return voting power to the KeyGen (delegate to self)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
8343
+ { id: "continuum-dao.fetch-delegates", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Read VotingEscrow.delegates(account)", commonParams: [], params: { account: { type: "string", required: true, description: "KeyGen or wallet address" } } },
8344
+ { id: "continuum-dao.transfer", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Transfer a veCTM NFT", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { tokenId: { type: "string", required: true, description: "veCTM token id" }, to: { type: "string", required: true, description: "Recipient" } } },
8345
+ { id: "continuum-dao.attach", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Attach veCTM to the node (authority KeyGen)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { nodeKey: { type: "string", required: true, description: "Node key" }, tokenId: { type: "string", required: true, description: "veCTM token id" }, mpaWallet: { type: "string", required: true, description: "MultiSignAgentWallet address" } } },
8346
+ { id: "continuum-dao.request-detach", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Request governance detach", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { tokenId: { type: "string", required: true, description: "Attached token id" }, nodeProperties: { type: "string", required: true, description: "NodeProperties address" } } },
8347
+ { id: "continuum-dao.propose-bravo", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Propose a Bravo (For/Against/Abstain) proposal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { title: { type: "string", required: true, description: "On-chain description (title)" }, forumKey: { type: "string", required: true, description: "Created forum thread URL from forum_create_topic" } } },
8348
+ { id: "continuum-dao.propose-delta", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Propose a Delta multi-option proposal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { title: { type: "string", required: true, description: "On-chain description (title)" }, nWinners: { type: "number", required: true, description: "Winning options to execute" }, forumKey: { type: "string", required: true, description: "Created forum thread URL from forum_create_topic" } } },
8349
+ { id: "continuum-dao.cast-vote-bravo", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Cast a Bravo vote", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "On-chain proposal id" }, support: { type: "number", required: true, description: "0 against, 1 for, 2 abstain" } } },
8350
+ { id: "continuum-dao.cast-vote-delta", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Cast a Delta vote including NOTA", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "On-chain proposal id" } } },
8351
+ { id: "continuum-dao.execute", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Execute a succeeded proposal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "On-chain proposal id" } } },
8352
+ { id: "continuum-dao.cancel", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Cancel a proposal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { proposalId: { type: "string", required: true, description: "On-chain proposal id" } } },
8353
+ { id: "continuum-dao.fetch-live-proposals", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "List live/pending/succeeded proposals with on-chain state overlay", commonParams: [], params: { chainId: { type: "number", required: false, description: "Linea chain id" }, rpcUrl: { type: "string", required: false, description: "Linea RPC for state overlay" } } },
8354
+ { id: "continuum-dao.explain-proposal", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Deconstruct a proposal into a readable briefing (actions, C3, no-ops, risks)", commonParams: [], params: { id: { type: "string", required: false, description: "Backend proposal id" }, onchainId: { type: "string", required: false, description: "Governor proposal id" } } },
8355
+ { id: "continuum-dao.forum-sign-in", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "EIP-712 forum login (veCTM gate first)", commonParams: ["keyGen", "purposeText"], params: { nodeKey: { type: "string", required: false, description: "Attached node key" }, username: { type: "string", required: false, description: "Username when there is no node key" } } },
8356
+ { id: "continuum-dao.forum-sign-in-eligible", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Check veCTM forum login eligibility", commonParams: [], params: { address: { type: "string", required: true, description: "KeyGen or wallet address" } } },
8357
+ { id: "continuum-dao.forum-sign-out", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Revoke forum ticket and sessions", commonParams: [], params: { ticket: { type: "string", required: true, description: "Forum write ticket" } } },
8358
+ { id: "continuum-dao.forum-create-topic", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Create a Governance proposal thread (not Ideas)", commonParams: [], params: { section: { type: "string", required: false, description: "decision | election | treasury | constitution | admin" }, title: { type: "string", required: true, description: "Thread title" }, content: { type: "string", required: true, description: "Proposal body" } } },
8359
+ { id: "continuum-dao.forum-create-idea", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Post an Idea or Suggestion (not a proposal)", commonParams: [], params: { title: { type: "string", required: true, description: "Thread title" }, content: { type: "string", required: true, description: "Idea body" } } },
8360
+ { id: "continuum-dao.forum-search", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Search forum titles and bodies; optional hours/since", commonParams: [], params: { query: { type: "string", required: false, description: "Case-insensitive title or body substring" }, hours: { type: "number", required: false, description: "Only posts from the last X hours" }, since: { type: "string", required: false, description: "Only posts since this ISO date or unix timestamp" } } },
8361
+ { id: "continuum-dao.forum-recent", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "List recent readable posts (id, title, username, createdAt); requires hours or since", commonParams: [], params: { hours: { type: "number", required: false, description: "Only posts from the last X hours" }, since: { type: "string", required: false, description: "Only posts since this ISO date or unix timestamp" } } },
8362
+ { id: "continuum-dao.forum-delete", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Admin/moderator soft-delete a post, thread, or a user\u2019s posts", commonParams: [], params: { pid: { type: "string", required: false, description: "Post id" }, tid: { type: "string", required: false, description: "Thread id" }, username: { type: "string", required: false, description: "Delete all posts by this user" }, hours: { type: "number", required: false, description: "Only in the last X hours (default all)" }, since: { type: "string", required: false, description: "Only since this date (default all)" } } },
8363
+ { id: "continuum-dao.forum-unread", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "List unread topics for the logged-in user", commonParams: [], params: { filter: { type: "string", required: false, description: "all | new | watched | unreplied" } } },
8364
+ { id: "continuum-dao.forum-mark-read", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Mark topic(s) read (tid/url, tids, or all)", commonParams: [], params: { tid: { type: "string", required: false, description: "Thread id" }, all: { type: "boolean", required: false, description: "Mark every unread topic read" } } },
8365
+ { id: "continuum-dao.forum-mark-unread", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Mark one topic unread", commonParams: [], params: { tid: { type: "string", required: false, description: "Thread id" } } }
8366
+ ]
8367
+ };
8368
+ registerProtocolModule(continuumDaoProtocolModule);
8369
+ var COMPOUND_V3_PROTOCOL_ID = "compound-v3";
8370
+ var COMPOUND_V3_CHAIN_IDS = [1, 8453, 42161, 10, 137, 5e3, 130, 59144];
8371
+ var COMPOUND_V3_WRAPPED_NATIVE = {
8372
+ 1: getAddress("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),
8373
+ 8453: getAddress("0x4200000000000000000000000000000000000006"),
8374
+ 42161: getAddress("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),
8375
+ 10: getAddress("0x4200000000000000000000000000000000000006"),
8376
+ 137: getAddress("0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"),
8377
+ 5e3: getAddress("0x78c1b0C915c4CD0f08633e2ec3d4961Ab0237669"),
8378
+ 130: getAddress("0x4200000000000000000000000000000000000006"),
8379
+ 59144: getAddress("0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f")
8380
+ };
8381
+ function isCompoundV3ChainSupported(chainId) {
8382
+ return COMPOUND_V3_CHAIN_IDS.includes(chainId);
8383
+ }
8384
+ function compoundV3WrappedNative(chainId) {
8385
+ return COMPOUND_V3_WRAPPED_NATIVE[chainId] ?? null;
8386
+ }
8387
+ var COMPOUND_V3_MARKETS = [
8388
+ // Ethereum
8389
+ {
8390
+ chainId: 1,
8391
+ slug: "usdc",
8392
+ symbol: "cUSDCv3",
8393
+ comet: getAddress("0xc3d688B66703497DAA19211EEdff47f25384cdc3"),
8394
+ rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
8395
+ bulker: getAddress("0xa397a8C2086C554B531c02E29f3291c9704B00c7"),
8396
+ baseToken: getAddress("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"),
8397
+ source: "comet-deployments"
8398
+ },
8399
+ {
8400
+ chainId: 1,
8401
+ slug: "usds",
8402
+ symbol: "cUSDSv3",
8403
+ comet: getAddress("0x5D409e56D886231aDAf00c8775665AD0f9897b56"),
8404
+ rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
8405
+ bulker: getAddress("0xa397a8C2086C554B531c02E29f3291c9704B00c7"),
8406
+ baseToken: getAddress("0xdC035D45d973E3EC169d2276DDab16f1e407384F"),
8407
+ source: "comet-deployments"
8408
+ },
8409
+ {
8410
+ chainId: 1,
8411
+ slug: "usdt",
8412
+ symbol: "cUSDTv3",
8413
+ comet: getAddress("0x3Afdc9BCA9213A35503b077a6072F3D0d5AB0840"),
8414
+ rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
8415
+ bulker: getAddress("0xa397a8C2086C554B531c02E29f3291c9704B00c7"),
8416
+ baseToken: getAddress("0xdAC17F958D2ee523a2206206994597C13D831ec7"),
8417
+ source: "comet-deployments"
8418
+ },
8419
+ {
8420
+ chainId: 1,
8421
+ slug: "wbtc",
8422
+ symbol: "cWBTCv3",
8423
+ comet: getAddress("0xe85Dc543813B8c2CFEaAc371517b925a166a9293"),
8424
+ rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
8425
+ bulker: getAddress("0xa397a8C2086C554B531c02E29f3291c9704B00c7"),
8426
+ baseToken: getAddress("0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599"),
8427
+ source: "comet-deployments"
8428
+ },
8429
+ {
8430
+ chainId: 1,
8431
+ slug: "weth",
8432
+ symbol: "cWETHv3",
8433
+ comet: getAddress("0xA17581A9E3356d9A858b789D68B4d866e593aE94"),
8434
+ rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
8435
+ bulker: getAddress("0xa397a8C2086C554B531c02E29f3291c9704B00c7"),
8436
+ baseToken: getAddress("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"),
8437
+ source: "comet-deployments"
8438
+ },
8439
+ {
8440
+ chainId: 1,
8441
+ slug: "wsteth",
8442
+ symbol: "cWstETHv3",
8443
+ comet: getAddress("0x3D0bb1ccaB520A66e607822fC55BC921738fAFE3"),
8444
+ rewards: getAddress("0x1B0e765F6224C21223AeA2af16c1C46E38885a40"),
8445
+ bulker: getAddress("0x2c776041CCFe903071AF44aa147368a9c8EEA518"),
8446
+ baseToken: getAddress("0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0"),
8447
+ source: "comet-deployments"
8448
+ },
8449
+ // Base
8450
+ {
8451
+ chainId: 8453,
8452
+ slug: "usdc",
8453
+ symbol: "cUSDCv3",
8454
+ comet: getAddress("0xb125E6687d4313864e53df431d5425969c15Eb2F"),
8455
+ rewards: getAddress("0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1"),
8456
+ bulker: getAddress("0x78D0677032A35c63D142a48A2037048871212a8C"),
8457
+ baseToken: getAddress("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"),
8458
+ source: "comet-deployments"
8459
+ },
8460
+ {
8461
+ chainId: 8453,
8462
+ slug: "usdbc",
8463
+ symbol: "cUSDbCv3",
8464
+ comet: getAddress("0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf"),
8465
+ rewards: getAddress("0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1"),
8466
+ bulker: getAddress("0x78D0677032A35c63D142a48A2037048871212a8C"),
8467
+ baseToken: getAddress("0xd9aAEc86B65D86f6A7B5B1b0c42FFA531710b6CA"),
8468
+ source: "comet-deployments"
8469
+ },
8470
+ {
8471
+ chainId: 8453,
8472
+ slug: "usds",
8473
+ symbol: "cUSDSv3",
8474
+ comet: getAddress("0x2c776041CCFe903071AF44aa147368a9c8EEA518"),
8475
+ rewards: getAddress("0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1"),
8476
+ bulker: getAddress("0x78D0677032A35c63D142a48A2037048871212a8C"),
8477
+ baseToken: getAddress("0x820C137fa70C8691f0e44Dc420a5e53c168921Dc"),
8478
+ source: "comet-deployments"
8479
+ },
8480
+ {
8481
+ chainId: 8453,
8482
+ slug: "weth",
8483
+ symbol: "cWETHv3",
8484
+ comet: getAddress("0x46e6b214b524310239732D51387075E0e70970bf"),
8485
+ rewards: getAddress("0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1"),
8486
+ bulker: getAddress("0x78D0677032A35c63D142a48A2037048871212a8C"),
8487
+ baseToken: getAddress("0x4200000000000000000000000000000000000006"),
8488
+ source: "comet-deployments"
8489
+ },
8490
+ {
8491
+ chainId: 8453,
8492
+ slug: "aero",
8493
+ symbol: "cAEROv3",
8494
+ comet: getAddress("0x784efeB622244d2348d4F2522f8860B96fbEcE89"),
8495
+ rewards: getAddress("0x123964802e6ABabBE1Bc9547D72Ef1B69B00A6b1"),
8496
+ bulker: getAddress("0x78D0677032A35c63D142a48A2037048871212a8C"),
8497
+ baseToken: getAddress("0x940181a94A35A4569E4529A3CDfB74e38FD98631"),
8498
+ source: "comet-deployments"
8499
+ },
8500
+ // Arbitrum
8501
+ {
8502
+ chainId: 42161,
8503
+ slug: "usdc",
8504
+ symbol: "cUSDCv3",
8505
+ comet: getAddress("0x9c4ec768c28520B50860ea7a15bd7213a9fF58bf"),
8506
+ rewards: getAddress("0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae"),
8507
+ bulker: getAddress("0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d"),
8508
+ baseToken: getAddress("0xaf88d065e77c8cC2239327C5EDb3A432268e5831"),
8509
+ source: "comet-deployments"
8510
+ },
8511
+ {
8512
+ chainId: 42161,
8513
+ slug: "usdc.e",
8514
+ symbol: "cUSDC.ev3",
8515
+ comet: getAddress("0xA5EDBDD9646f8dFF606d7448e414884C7d905dCA"),
8516
+ rewards: getAddress("0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae"),
8517
+ bulker: getAddress("0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d"),
8518
+ baseToken: getAddress("0xFF970A61A04b1cA14834A43f5dE4533eBDDB5CC8"),
8519
+ source: "comet-deployments"
8520
+ },
8521
+ {
8522
+ chainId: 42161,
8523
+ slug: "usdt",
8524
+ symbol: "cUSDTv3",
8525
+ comet: getAddress("0xd98Be00b5D27fc98112BdE293e487f8D4cA57d07"),
8526
+ rewards: getAddress("0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae"),
8527
+ bulker: getAddress("0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d"),
8528
+ baseToken: getAddress("0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9"),
8529
+ source: "comet-deployments"
8530
+ },
8531
+ {
8532
+ chainId: 42161,
8533
+ slug: "weth",
8534
+ symbol: "cWETHv3",
8535
+ comet: getAddress("0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486"),
8536
+ rewards: getAddress("0x88730d254A2f7e6AC8388c3198aFd694bA9f7fae"),
8537
+ bulker: getAddress("0xbdE8F31D2DdDA895264e27DD990faB3DC87b372d"),
8538
+ baseToken: getAddress("0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"),
8539
+ source: "comet-deployments"
8540
+ },
8541
+ // Optimism
8542
+ {
8543
+ chainId: 10,
8544
+ slug: "usdc",
8545
+ symbol: "cUSDCv3",
8546
+ comet: getAddress("0x2e44e174f7D53F0212823acC11C01A11d58c5bCB"),
8547
+ rewards: getAddress("0x443EA0340cb75a160F31A440722dec7b5bc3C2E9"),
8548
+ bulker: getAddress("0xcb3643CC8294B23171272845473dEc49739d4Ba3"),
8549
+ baseToken: getAddress("0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"),
8550
+ source: "comet-deployments"
8551
+ },
8552
+ {
8553
+ chainId: 10,
8554
+ slug: "usdt",
8555
+ symbol: "cUSDTv3",
8556
+ comet: getAddress("0x995E394b8B2437aC8Ce61Ee0bC610D617962B214"),
8557
+ rewards: getAddress("0x443EA0340cb75a160F31A440722dec7b5bc3C2E9"),
8558
+ bulker: getAddress("0xcb3643CC8294B23171272845473dEc49739d4Ba3"),
8559
+ baseToken: getAddress("0x94b008aA00579c1307B0EF2c499aD98a8ce58e58"),
8560
+ source: "comet-deployments"
8561
+ },
8562
+ {
8563
+ chainId: 10,
8564
+ slug: "weth",
8565
+ symbol: "cWETHv3",
8566
+ comet: getAddress("0xE36A30D249f7761327fd973001A32010b521b6Fd"),
8567
+ rewards: getAddress("0x443EA0340cb75a160F31A440722dec7b5bc3C2E9"),
8568
+ bulker: getAddress("0xcb3643CC8294B23171272845473dEc49739d4Ba3"),
8569
+ baseToken: getAddress("0x4200000000000000000000000000000000000006"),
8570
+ source: "comet-deployments"
8571
+ },
8572
+ // Polygon
8573
+ {
8574
+ chainId: 137,
8575
+ slug: "usdc",
8576
+ symbol: "cUSDCv3",
8577
+ comet: getAddress("0xF25212E676D1F7F89Cd72fFEe66158f541246445"),
8578
+ rewards: getAddress("0x45939657d1CA34A8FA39A924B71D28Fe8431e581"),
8579
+ bulker: getAddress("0x59e242D352ae13166B4987aE5c990C232f7f7CD6"),
8580
+ baseToken: getAddress("0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"),
8581
+ source: "comet-deployments"
8582
+ },
8583
+ {
8584
+ chainId: 137,
8585
+ slug: "usdt",
8586
+ symbol: "cUSDTv3",
8587
+ comet: getAddress("0xaeB318360f27748Acb200CE616E389A6C9409a07"),
8588
+ rewards: getAddress("0x45939657d1CA34A8FA39A924B71D28Fe8431e581"),
8589
+ bulker: getAddress("0x59e242D352ae13166B4987aE5c990C232f7f7CD6"),
8590
+ baseToken: getAddress("0xc2132D05D31c914a87C6611C10748AEb04B58e8F"),
8591
+ source: "comet-deployments"
8592
+ },
8593
+ // Mantle
8594
+ {
8595
+ chainId: 5e3,
8596
+ slug: "usde",
8597
+ symbol: "cUSDev3",
8598
+ comet: getAddress("0x606174f62cd968d8e684c645080fa694c1D7786E"),
8599
+ rewards: getAddress("0xCd83CbBFCE149d141A5171C3D6a0F0fCCeE225Ab"),
8600
+ bulker: getAddress("0x67DFCa85CcEEFA2C5B1dB4DEe3BEa716A28B9baa"),
8601
+ source: "comet-deployments"
8602
+ },
8603
+ // Unichain
8604
+ {
8605
+ chainId: 130,
8606
+ slug: "usdc",
8607
+ symbol: "cUSDCv3",
8608
+ comet: getAddress("0x2c7118c4C88B9841FCF839074c26Ae8f035f2921"),
8609
+ rewards: getAddress("0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486"),
8610
+ bulker: getAddress("0x58EbB8Db8b4FdF2dCbbB16E04c2F5b952963B514"),
8611
+ baseToken: getAddress("0x078D782b760474a361dDA0AF3839290b0EF57AD6"),
8612
+ source: "comet-deployments"
8613
+ },
8614
+ {
8615
+ chainId: 130,
8616
+ slug: "weth",
8617
+ symbol: "cWETHv3",
8618
+ comet: getAddress("0x6C987dDE50dB1dcDd32Cd4175778C2a291978E2a"),
8619
+ rewards: getAddress("0x6f7D514bbD4aFf3BcD1140B7344b32f063dEe486"),
8620
+ bulker: getAddress("0x58EbB8Db8b4FdF2dCbbB16E04c2F5b952963B514"),
8621
+ baseToken: getAddress("0x4200000000000000000000000000000000000006"),
8622
+ source: "comet-deployments"
8623
+ },
8624
+ // Linea
8625
+ {
8626
+ chainId: 59144,
8627
+ slug: "usdc",
8628
+ symbol: "cUSDCv3",
8629
+ comet: getAddress("0x8D38A3d6B3c3B7d96D6536DA7Eef94A9d7dbC991"),
8630
+ rewards: getAddress("0x2c7118c4C88B9841FCF839074c26Ae8f035f2921"),
8631
+ bulker: getAddress("0x023ee795361B28cDbB94e302983578486A0A5f1B"),
8632
+ baseToken: getAddress("0x176211869cA2b568f2A7D4EE941E073a821EE1ff"),
8633
+ source: "comet-deployments"
8634
+ },
8635
+ {
8636
+ chainId: 59144,
8637
+ slug: "weth",
8638
+ symbol: "cWETHv3",
8639
+ comet: getAddress("0x60F2058379716A64a7A5d29219397e79bC552194"),
8640
+ rewards: getAddress("0x2c7118c4C88B9841FCF839074c26Ae8f035f2921"),
8641
+ bulker: getAddress("0x023ee795361B28cDbB94e302983578486A0A5f1B"),
8642
+ baseToken: getAddress("0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f"),
8643
+ source: "comet-deployments"
8644
+ }
8645
+ ];
8646
+ function listCompoundV3SupportedChainIds() {
8647
+ return [...COMPOUND_V3_CHAIN_IDS];
8648
+ }
8649
+ function listCompoundV3MarketsForChain(chainId) {
8650
+ if (!isCompoundV3ChainSupported(chainId)) return [];
8651
+ return COMPOUND_V3_MARKETS.filter((m) => m.chainId === chainId);
8652
+ }
8653
+ var cometInterfaceAbi = parseAbi([
8654
+ "function supply(address asset, uint256 amount)",
8655
+ "function supplyTo(address dst, address asset, uint256 amount)",
8656
+ "function withdraw(address asset, uint256 amount)",
8657
+ "function withdrawTo(address to, address asset, uint256 amount)",
8658
+ "function allow(address manager, bool isAllowed)",
8659
+ "function hasPermission(address owner, address manager) view returns (bool)",
8660
+ "function balanceOf(address account) view returns (uint256)",
8661
+ "function borrowBalanceOf(address account) view returns (uint256)",
8662
+ "function collateralBalanceOf(address account, address asset) view returns (uint128)",
8663
+ "function baseToken() view returns (address)",
8664
+ "function baseTokenPriceFeed() view returns (address)",
8665
+ "function decimals() view returns (uint8)",
8666
+ "function numAssets() view returns (uint8)",
8667
+ "function getUtilization() view returns (uint256)",
8668
+ "function getSupplyRate(uint256 utilization) view returns (uint64)",
8669
+ "function getBorrowRate(uint256 utilization) view returns (uint64)",
8670
+ "function getPrice(address priceFeed) view returns (uint256)",
8671
+ "function isBorrowCollateralized(address account) view returns (bool)",
8672
+ "function isLiquidatable(address account) view returns (bool)",
8673
+ "function getAssetInfo(uint8 i) view returns ((uint8 offset, address asset, address priceFeed, uint64 scale, uint64 borrowCollateralFactor, uint64 liquidateCollateralFactor, uint64 liquidationFactor, uint128 supplyCap))",
8674
+ "function getAssetInfoByAddress(address asset) view returns ((uint8 offset, address asset, address priceFeed, uint64 scale, uint64 borrowCollateralFactor, uint64 liquidateCollateralFactor, uint64 liquidationFactor, uint128 supplyCap))"
8675
+ ]);
8676
+ parseAbi([
8677
+ "function getRewardOwed(address comet, address account) view returns ((address token, uint256 owed))",
8678
+ "function claim(address comet, address src, bool shouldAccrue)"
8679
+ ]);
8680
+ parseAbi([
8681
+ "function invoke(bytes32[] actions, bytes[] data) payable"
8682
+ ]);
8683
+ var erc20ReadAbi = parseAbi([
8684
+ "function allowance(address owner, address spender) view returns (uint256)",
8685
+ "function decimals() view returns (uint8)",
8686
+ "function symbol() view returns (string)",
8687
+ "function name() view returns (string)"
8688
+ ]);
8689
+ parseAbi(["function approve(address spender, uint256 amount) returns (bool)"]);
8690
+ parseAbi(["function deposit() payable", "function withdraw(uint256 wad)"]);
8691
+ function bulkerActionId(name) {
8692
+ return stringToHex(name, { size: 32 });
8693
+ }
8694
+ bulkerActionId("ACTION_SUPPLY_ASSET");
8695
+ bulkerActionId("ACTION_SUPPLY_NATIVE_TOKEN");
8696
+ bulkerActionId("ACTION_WITHDRAW_ASSET");
8697
+ bulkerActionId("ACTION_WITHDRAW_NATIVE_TOKEN");
8698
+ bulkerActionId("ACTION_CLAIM_REWARD");
8699
+ bulkerActionId("ACTION_TRANSFER_ASSET");
8700
+
8701
+ // src/protocols/evm/compound-v3/apr.ts
8702
+ var COMPOUND_V3_SECONDS_PER_YEAR = 365 * 24 * 60 * 60;
8703
+ function compoundV3RatePerSecondToAprDecimal(ratePerSecond) {
8704
+ if (ratePerSecond <= 0n) return 0;
8705
+ return Number(ratePerSecond) / 1e18 * COMPOUND_V3_SECONDS_PER_YEAR;
8706
+ }
8707
+ function compoundV3AprToPercentLabel(aprDecimal) {
8708
+ if (!Number.isFinite(aprDecimal)) return "\u2014";
8709
+ const pct = aprDecimal * 100;
8710
+ if (Math.abs(pct) < 1e-3) return "0.00%";
8711
+ return `${pct.toFixed(2)}%`;
8712
+ }
8713
+ function compoundV3UtilizationToDecimal(utilization) {
8714
+ if (utilization <= 0n) return 0;
8715
+ return Number(utilization) / 1e18;
8716
+ }
8717
+ function compoundV3FactorToPercent(factor) {
8718
+ return Number(factor) / 1e16;
8719
+ }
8720
+
8721
+ // src/protocols/evm/compound-v3/subgraph.ts
8722
+ var COMPOUND_V3_SUBGRAPH_BY_CHAIN = {
8723
+ 1: "5nwMCSHaTqG3Kd2gHznbTXEnZ9QNWsssQfbHhDqQSQFp",
8724
+ 137: "AaFtUWKfFdj2x8nnE3RxTSJkHwGHvawH3VWFBykCGzLs",
8725
+ 42161: "Ff7ha9ELmpmg81D6nYxy4t8aGP26dPztqD1LDJNPqjLS",
8726
+ 8453: "2hcXhs36pTBDVUmk5K2Zkr6N4UYGwaHuco2a6jyTsijo",
8727
+ 10: "FhHNkfh5z6Z2WCEBxB6V3s8RPxnJfWZ9zAfM5bVvbvbb"
8728
+ };
8729
+ function compoundV3SubgraphIdForChain(chainId) {
8730
+ return COMPOUND_V3_SUBGRAPH_BY_CHAIN[chainId] ?? null;
8731
+ }
8732
+ async function fetchCompoundV3SubgraphMarkets(args) {
8733
+ const id = compoundV3SubgraphIdForChain(args.chainId);
8734
+ const apiKey = (args.apiKey ?? process.env.THE_GRAPH_API_KEY ?? "").trim();
8735
+ if (!id || !apiKey) return null;
8736
+ const url = `https://gateway.thegraph.com/api/${apiKey}/subgraphs/id/${id}`;
8737
+ try {
8738
+ const res = await fetch(url, {
8739
+ method: "POST",
8740
+ headers: { "content-type": "application/json" },
8741
+ body: JSON.stringify({
8742
+ query: `query CompoundV3Markets { markets(first: 50) { id } }`
8743
+ })
8744
+ });
8745
+ if (!res.ok) return null;
8746
+ const json = await res.json();
8747
+ const markets = json.data?.markets;
8748
+ if (!markets) return null;
8749
+ return markets.map((m) => ({ id: m.id, comet: m.id }));
8750
+ } catch {
8751
+ return null;
8752
+ }
8753
+ }
8754
+ function publicClient(rpcUrl, chainId) {
8755
+ const chain = defineChain({
8756
+ id: chainId,
8757
+ name: "Destination",
8758
+ nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
8759
+ rpcUrls: { default: { http: [rpcUrl] } }
8760
+ });
8761
+ return createPublicClient({ chain, transport: http(rpcUrl) });
8762
+ }
8763
+ async function readTokenMeta(client, asset) {
8764
+ const [symbol, decimals] = await Promise.all([
8765
+ client.readContract({ address: asset, abi: erc20ReadAbi, functionName: "symbol" }).catch(() => "TOKEN"),
8766
+ client.readContract({ address: asset, abi: erc20ReadAbi, functionName: "decimals" }).catch(() => 18)
8767
+ ]);
8768
+ return { symbol: String(symbol), decimals: Number(decimals) };
8769
+ }
8770
+ async function enrichMarketOnChain(client, market) {
8771
+ const comet = market.comet;
8772
+ const [baseToken, utilization, numAssets, decimals] = await Promise.all([
8773
+ client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "baseToken" }),
8774
+ client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "getUtilization" }),
8775
+ client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "numAssets" }),
8776
+ client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "decimals" })
8777
+ ]);
8778
+ const [supplyRate, borrowRate, baseMeta, baseFeed] = await Promise.all([
8779
+ client.readContract({
8780
+ address: comet,
8781
+ abi: cometInterfaceAbi,
8782
+ functionName: "getSupplyRate",
8783
+ args: [utilization]
8784
+ }),
8785
+ client.readContract({
8786
+ address: comet,
8787
+ abi: cometInterfaceAbi,
8788
+ functionName: "getBorrowRate",
8789
+ args: [utilization]
8790
+ }),
8791
+ readTokenMeta(client, getAddress(baseToken)),
8792
+ client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "baseTokenPriceFeed" })
8793
+ ]);
8794
+ const basePrice = await client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "getPrice", args: [baseFeed] }).catch(() => 0n);
8795
+ const assets = [
8796
+ {
8797
+ asset: getAddress(baseToken),
8798
+ symbol: baseMeta.symbol,
8799
+ decimals: Number(decimals) || baseMeta.decimals,
8800
+ borrowCollateralFactorPercent: 0,
8801
+ liquidateCollateralFactorPercent: 0,
8802
+ priceRaw: basePrice.toString(),
8803
+ role: "base"
8804
+ }
8805
+ ];
8806
+ const n = Number(numAssets);
8807
+ for (let i = 0; i < n; i++) {
8808
+ const info = await client.readContract({
8809
+ address: comet,
8810
+ abi: cometInterfaceAbi,
8811
+ functionName: "getAssetInfo",
8812
+ args: [i]
8813
+ });
8814
+ const token = getAddress(info.asset);
8815
+ const meta = await readTokenMeta(client, token);
8816
+ const price = await client.readContract({ address: comet, abi: cometInterfaceAbi, functionName: "getPrice", args: [info.priceFeed] }).catch(() => 0n);
8817
+ assets.push({
8818
+ asset: token,
8819
+ symbol: meta.symbol,
8820
+ decimals: meta.decimals,
8821
+ borrowCollateralFactorPercent: compoundV3FactorToPercent(info.borrowCollateralFactor),
8822
+ liquidateCollateralFactorPercent: compoundV3FactorToPercent(info.liquidateCollateralFactor),
8823
+ priceRaw: price.toString(),
8824
+ role: "collateral"
8825
+ });
8826
+ }
8827
+ return {
8828
+ chainId: market.chainId,
8829
+ slug: market.slug,
8830
+ symbol: market.symbol,
8831
+ comet: market.comet,
8832
+ rewards: market.rewards,
8833
+ bulker: market.bulker,
8834
+ baseToken: getAddress(baseToken),
8835
+ utilization: compoundV3UtilizationToDecimal(utilization),
8836
+ supplyAprPercent: compoundV3AprToPercentLabel(compoundV3RatePerSecondToAprDecimal(supplyRate)),
8837
+ borrowAprPercent: compoundV3AprToPercentLabel(compoundV3RatePerSecondToAprDecimal(borrowRate)),
8838
+ assets
8839
+ };
8840
+ }
8841
+ function registryMarketRow(market) {
8842
+ return {
8843
+ chainId: market.chainId,
8844
+ slug: market.slug,
8845
+ symbol: market.symbol,
8846
+ comet: market.comet,
8847
+ rewards: market.rewards,
8848
+ bulker: market.bulker,
8849
+ baseToken: market.baseToken ?? null,
8850
+ utilization: null,
8851
+ supplyAprPercent: null,
8852
+ borrowAprPercent: null,
8853
+ assets: market.baseToken ? [
8854
+ {
8855
+ asset: market.baseToken,
8856
+ symbol: market.slug.toUpperCase(),
8857
+ decimals: 18,
8858
+ borrowCollateralFactorPercent: 0,
8859
+ liquidateCollateralFactorPercent: 0,
8860
+ priceRaw: "0",
8861
+ role: "base"
8862
+ }
8863
+ ] : []
8864
+ };
8865
+ }
8866
+ async function compoundV3FetchMarketsSummary(args) {
8867
+ if (!isCompoundV3ChainSupported(args.chainId)) {
8868
+ return { markets: [], notes: `Compound III is not deployed on chain ${args.chainId}.` };
8869
+ }
8870
+ const registry = listCompoundV3MarketsForChain(args.chainId);
8871
+ let subgraphNote = "";
8872
+ const subgraph = await fetchCompoundV3SubgraphMarkets({ chainId: args.chainId });
8873
+ if (subgraph) {
8874
+ subgraphNote = ` Subgraph listed ${subgraph.length} market id(s); official comet deployments are the address source.`;
8875
+ }
8876
+ if (!args.rpcUrl?.trim()) {
8877
+ return {
8878
+ markets: registry.map(registryMarketRow),
8879
+ notes: "Registry from official comet deployments. Pass rpcUrl (MCP server injects it) to enrich APRs and collaterals." + subgraphNote
8880
+ };
8881
+ }
8882
+ const client = publicClient(args.rpcUrl, args.chainId);
8883
+ const markets = [];
8884
+ for (const row of registry) {
8885
+ try {
8886
+ markets.push(await enrichMarketOnChain(client, row));
8887
+ } catch {
8888
+ markets.push(registryMarketRow(row));
8889
+ }
8890
+ }
8891
+ return {
8892
+ markets,
8893
+ notes: "Comet proxy addresses from official deployments; rates and collaterals from on-chain CometInterface." + subgraphNote
8894
+ };
8895
+ }
8896
+ var chainAssetCache2 = /* @__PURE__ */ new Map();
8897
+ async function ensureCompoundV3ChainAssetCache(args) {
8898
+ const existing = chainAssetCache2.get(args.chainId);
8899
+ if (existing && existing.size > 0 && !args.rpcUrl) return existing;
8900
+ const map = /* @__PURE__ */ new Map();
8901
+ const add = (address, role) => {
8902
+ const key = getAddress(address).toLowerCase();
8903
+ const cur = map.get(key) ?? { base: false, collateral: false };
8904
+ cur[role] = true;
8905
+ map.set(key, cur);
8906
+ };
8907
+ if (args.rpcUrl?.trim()) {
8908
+ try {
8909
+ const { markets } = await compoundV3FetchMarketsSummary({ chainId: args.chainId, rpcUrl: args.rpcUrl });
8910
+ for (const m of markets) {
8911
+ for (const a of m.assets) add(a.asset, a.role === "base" ? "base" : "collateral");
8912
+ }
8913
+ chainAssetCache2.set(args.chainId, map);
8914
+ return map;
8915
+ } catch {
8916
+ }
8917
+ }
8918
+ for (const m of listCompoundV3MarketsForChain(args.chainId)) {
8919
+ if (m.baseToken) add(m.baseToken, "base");
8920
+ }
8921
+ chainAssetCache2.set(args.chainId, map);
8922
+ return map;
8923
+ }
8924
+
8925
+ // src/protocols/evm/compound-v3/index.ts
8926
+ var compoundV3ProtocolModule = {
8927
+ id: COMPOUND_V3_PROTOCOL_ID,
8928
+ chainCategory: "evm",
8929
+ isChainSupported(ctx) {
8930
+ const id = typeof ctx.chainId === "string" ? Number(ctx.chainId) : ctx.chainId;
8931
+ return ctx.chainCategory === "evm" && isCompoundV3ChainSupported(id);
8932
+ },
8933
+ isTokenSupported(token) {
8934
+ return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
8935
+ },
8936
+ actions: [
8937
+ {
8938
+ id: "compound-v3.supply",
8939
+ protocolId: COMPOUND_V3_PROTOCOL_ID,
8940
+ chainCategory: "evm",
8941
+ description: "Supply base (earn/repay) or collateral to a Comet proxy",
8942
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8943
+ params: {}
8944
+ },
8945
+ {
8946
+ id: "compound-v3.withdraw",
8947
+ protocolId: COMPOUND_V3_PROTOCOL_ID,
8948
+ chainCategory: "evm",
8949
+ description: "Withdraw collateral or base (withdraw of base while undercollateralized = borrow)",
8950
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8951
+ params: {}
8952
+ },
8953
+ {
8954
+ id: "compound-v3.repay",
8955
+ protocolId: COMPOUND_V3_PROTOCOL_ID,
8956
+ chainCategory: "evm",
8957
+ description: "Repay base debt by supplying base",
8958
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8959
+ params: {}
8960
+ },
8961
+ {
8962
+ id: "compound-v3.claim-rewards",
8963
+ protocolId: COMPOUND_V3_PROTOCOL_ID,
8964
+ chainCategory: "evm",
8965
+ description: "Claim COMP / reward token from CometRewards",
8966
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8967
+ params: {}
8968
+ },
8969
+ {
8970
+ id: "compound-v3.bulker",
8971
+ protocolId: COMPOUND_V3_PROTOCOL_ID,
8972
+ chainCategory: "evm",
8973
+ description: "Combined Bulker.invoke (optional)",
8974
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
8975
+ params: {}
8976
+ }
8977
+ ]
8978
+ };
8979
+ registerProtocolModule(compoundV3ProtocolModule);
6334
8980
  var skillsDir = join(dirname(fileURLToPath(import.meta.url)), "skills");
6335
8981
  var SKILL_PROTOCOL_IDS = [
6336
8982
  "aave-v4",
@@ -6345,7 +8991,10 @@ var SKILL_PROTOCOL_IDS = [
6345
8991
  "hyperliquid",
6346
8992
  "arcus",
6347
8993
  "morpho",
6348
- "circle-cctp"
8994
+ "circle-cctp",
8995
+ "aerodrome",
8996
+ "continuum-dao",
8997
+ "compound-v3"
6349
8998
  ];
6350
8999
  function getToolsForProtocol(protocolId) {
6351
9000
  return MCP_TOOL_DEFINITIONS.filter((t) => t.protocolId === protocolId);
@@ -6411,6 +9060,41 @@ var EULER_V2_SUBGRAPH_CHAIN_IDS = [
6411
9060
  function advisor(protocolId, tokenFilter, impl) {
6412
9061
  return { protocolId, tokenFilter, ...impl };
6413
9062
  }
9063
+ function aerodromeAdvisorPriorityTokens() {
9064
+ return [
9065
+ {
9066
+ address: "0x0000000000000000000000000000000000000000",
9067
+ symbol: "ETH",
9068
+ decimals: 18,
9069
+ roles: ["native"]
9070
+ },
9071
+ {
9072
+ address: AERODROME_WETH_BASE,
9073
+ symbol: "WETH",
9074
+ decimals: 18,
9075
+ roles: ["native_wrapped"]
9076
+ },
9077
+ {
9078
+ address: AERODROME_USDC_BASE,
9079
+ symbol: "USDC",
9080
+ decimals: 6,
9081
+ roles: ["swappable", "listed"]
9082
+ },
9083
+ {
9084
+ address: AERODROME_BASE_ADDRESSES_FALLBACK.aero,
9085
+ symbol: "AERO",
9086
+ decimals: 18,
9087
+ roles: ["swappable"]
9088
+ },
9089
+ ...AERODROME_COINBASE_STOCK_TOKENS.map((t) => ({
9090
+ address: t.address,
9091
+ symbol: t.symbol,
9092
+ name: t.name,
9093
+ decimals: AERODROME_COINBASE_STOCK_DECIMALS,
9094
+ roles: ["swappable", "listed", "coinbase_b20"]
9095
+ }))
9096
+ ];
9097
+ }
6414
9098
  var PROTOCOL_SUPPORT_ADVISORS = {
6415
9099
  "aave-v4": advisor("aave-v4", "api_underlyings", {
6416
9100
  async supportedChainIds() {
@@ -6677,6 +9361,21 @@ var PROTOCOL_SUPPORT_ADVISORS = {
6677
9361
  };
6678
9362
  }
6679
9363
  }),
9364
+ [AERODROME_PROTOCOL_ID]: advisor(AERODROME_PROTOCOL_ID, "pool_graph", {
9365
+ async supportedChainIds() {
9366
+ return [AERODROME_CHAIN_ID];
9367
+ },
9368
+ async supportedTokens(chainId) {
9369
+ if (chainId !== AERODROME_CHAIN_ID) {
9370
+ return { tokens: [], notes: "Aerodrome is Base-only (chainId 8453)." };
9371
+ }
9372
+ return {
9373
+ tokens: aerodromeAdvisorPriorityTokens(),
9374
+ nativeWrapped: AERODROME_WETH_BASE,
9375
+ notes: "Slim directory: ETH, WETH, USDC, AERO, and Coinbase B20 stocks (AAPLc, \u2026). For a price call ctm_aerodrome_quote with tickers. To see pools for one token call ctm_aerodrome_discover_pools. Do not dump LpSugar."
9376
+ };
9377
+ }
9378
+ }),
6680
9379
  [VENICE_PROTOCOL_ID]: advisor(VENICE_PROTOCOL_ID, "fixed_addresses", {
6681
9380
  async supportedChainIds() {
6682
9381
  return [VENICE_BASE_CHAIN_ID];
@@ -6699,6 +9398,70 @@ var PROTOCOL_SUPPORT_ADVISORS = {
6699
9398
  }
6700
9399
  }
6701
9400
  }),
9401
+ [CONTINUUM_DAO_PROTOCOL_ID]: advisor(CONTINUUM_DAO_PROTOCOL_ID, "fixed_addresses", {
9402
+ async supportedChainIds() {
9403
+ return [1, 59144, 59141].filter((id) => isContinuumDaoSupportedChainId(id));
9404
+ },
9405
+ async supportedTokens(chainId) {
9406
+ const tokens = [];
9407
+ const ctm = ctmTokenAddressOnEvmChain(chainId);
9408
+ if (ctm) tokens.push({ address: ctm, symbol: "CTM", roles: ["underlying"] });
9409
+ const ve = votingEscrowAddressOnEvmChain(chainId);
9410
+ if (ve) tokens.push({ address: ve, symbol: "veCTM", roles: ["position_nft"] });
9411
+ return {
9412
+ tokens,
9413
+ notes: tokens.length === 0 ? "ContinuumDAO addresses are placeholders until redeploy. Lock/attach/governance stay Linea-only. Prefer live GET /protocol/dao. For \u201Cwhat proposals are live now?\u201D use ctm_continuum_dao_fetch_live_proposals (not fetch_proposals). Propose requires getVotes >= live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). Bravo empty actions insert a KeyGen no-op; Delta votes need nOptions+1 weights (last is NOTA). No billing legs. After propose is mined, ctm_continuum_dao_register_proposal. Queue is not implemented." : `Default ContinuumDAO assets: ${listContinuumDaoDefaultAssets().filter((a) => a.chainId === chainId).map((a) => a.symbol).join(", ")}. Lock/attach/governance stay Linea-only. For \u201Cwhat proposals are live now?\u201D use ctm_continuum_dao_fetch_live_proposals. Propose requires getVotes >= live proposalThreshold() (max of 1000e18 ve power and 1% of total votes). Bravo empty actions insert a KeyGen no-op; Delta votes need nOptions+1 weights (last is NOTA). No billing legs. After propose is mined, ctm_continuum_dao_register_proposal. Queue is not implemented.`
9414
+ };
9415
+ }
9416
+ }),
9417
+ [COMPOUND_V3_PROTOCOL_ID]: advisor(COMPOUND_V3_PROTOCOL_ID, "api_underlyings", {
9418
+ async supportedChainIds() {
9419
+ return listCompoundV3SupportedChainIds();
9420
+ },
9421
+ async supportedTokens(chainId, ctx) {
9422
+ const cache = await ensureCompoundV3ChainAssetCache({ chainId, rpcUrl: ctx?.rpcUrl });
9423
+ const nativeWrapped = compoundV3WrappedNative(chainId);
9424
+ const tokens = [];
9425
+ if (nativeWrapped) {
9426
+ tokens.push({
9427
+ address: "0x0000000000000000000000000000000000000000",
9428
+ symbol: "ETH",
9429
+ decimals: 18,
9430
+ roles: ["native"]
9431
+ });
9432
+ tokens.push({
9433
+ address: nativeWrapped,
9434
+ symbol: "WETH",
9435
+ roles: ["native_wrapped"]
9436
+ });
9437
+ }
9438
+ for (const [address, modes] of cache) {
9439
+ if (nativeWrapped && address === nativeWrapped.toLowerCase()) continue;
9440
+ tokens.push({
9441
+ address,
9442
+ roles: [...modes.base ? ["base"] : [], ...modes.collateral ? ["collateral"] : []]
9443
+ });
9444
+ }
9445
+ return {
9446
+ tokens,
9447
+ nativeWrapped: nativeWrapped ?? void 0,
9448
+ notes: "Compound III Comet base and collateral tokens. Native ETH uses wrapped native (automatic wrap/unwrap). Pass comet from ctm_compound_v3_fetch_markets."
9449
+ };
9450
+ },
9451
+ async isTokenSupported(chainId, address, ctx) {
9452
+ const cache = await ensureCompoundV3ChainAssetCache({ chainId, rpcUrl: ctx?.rpcUrl });
9453
+ let normalized;
9454
+ try {
9455
+ normalized = getAddress(address).toLowerCase();
9456
+ } catch {
9457
+ return false;
9458
+ }
9459
+ if (normalized === "0x0000000000000000000000000000000000000000") return true;
9460
+ const wrapped = compoundV3WrappedNative(chainId);
9461
+ if (wrapped && wrapped.toLowerCase() === normalized) return true;
9462
+ return cache.has(normalized);
9463
+ }
9464
+ }),
6702
9465
  arcus: advisor("arcus", "api_underlyings", {
6703
9466
  async supportedChainIds() {
6704
9467
  return [...ARCUS_SUPPORTED_CHAIN_IDS];
@@ -6733,6 +9496,9 @@ registerProtocolModule(arcusProtocolModule);
6733
9496
  registerProtocolModule(morphoProtocolModule);
6734
9497
  registerProtocolModule(circleCctpProtocolModule);
6735
9498
  registerProtocolModule(veniceProtocolModule);
9499
+ registerProtocolModule(aerodromeProtocolModule);
9500
+ registerProtocolModule(continuumDaoProtocolModule);
9501
+ registerProtocolModule(compoundV3ProtocolModule);
6736
9502
  function getAgentCatalog() {
6737
9503
  return {
6738
9504
  protocols: getProtocolModules(),
@@ -6755,11 +9521,14 @@ function getAgentCatalog() {
6755
9521
  morpho: morphoProtocolModule,
6756
9522
  circleCctp: circleCctpProtocolModule,
6757
9523
  venice: veniceProtocolModule,
9524
+ aerodrome: aerodromeProtocolModule,
9525
+ continuumDao: continuumDaoProtocolModule,
9526
+ compoundV3: compoundV3ProtocolModule,
6758
9527
  /** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
6759
9528
  mcp: getAgentCatalogForMcp()
6760
9529
  };
6761
9530
  }
6762
9531
 
6763
- export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, MULTISIGN_SUBMIT_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpArcusBuildCancelOrderMultisignInputSchema, mcpArcusBuildCloseMultisignInputSchema, mcpArcusBuildCreateApiKeyMultisignInputSchema, mcpArcusBuildDepositMultisignInputSchema, mcpArcusBuildPlaceOrderMultisignInputSchema, mcpArcusBuildSetLeverageMultisignInputSchema, mcpArcusBuildWithdrawMultisignInputSchema, mcpArcusFetchAccountInputSchema, mcpArcusFetchAccountOutputSchema, mcpArcusFetchMarketSnapshotInputSchema, mcpArcusFetchMarketSnapshotOutputSchema, mcpArcusFetchMarketsInputSchema, mcpArcusFetchMarketsOutputSchema, mcpArcusFetchOhlcvInputSchema, mcpArcusFetchOhlcvOutputSchema, mcpArcusFetchOpenContextInputSchema, mcpArcusFetchOpenContextOutputSchema, mcpArcusFetchOpenOrdersInputSchema, mcpArcusFetchOpenOrdersOutputSchema, mcpArcusFetchPositionsInputSchema, mcpArcusFetchPositionsOutputSchema, mcpArcusSearchMarketsInputSchema, mcpArcusSearchMarketsOutputSchema, mcpArcusSpotBuildRfqMultisignInputSchema, mcpArcusSpotFetchBalancesInputSchema, mcpArcusSpotFetchBalancesOutputSchema, mcpArcusSpotFetchMarketsInputSchema, mcpArcusSpotFetchMarketsOutputSchema, mcpArcusSpotFetchOhlcvInputSchema, mcpArcusSpotFetchOhlcvOutputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2FetchLendVaultsInputSchema, mcpEulerV2FetchLendVaultsOutputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGmxCancelInputSchema, mcpGmxDecreaseInputSchema, mcpGmxFetchGmApyInputSchema, mcpGmxFetchGmApyOutputSchema, mcpGmxFetchGmMarketsInputSchema, mcpGmxFetchGmMarketsOutputSchema, mcpGmxFetchMarketPricesInputSchema, mcpGmxFetchMarketPricesOutputSchema, mcpGmxFetchMarketsInputSchema, mcpGmxFetchMarketsOutputSchema, mcpGmxFetchOhlcvInputSchema, mcpGmxFetchOhlcvOutputSchema, mcpGmxFetchOrdersInputSchema, mcpGmxFetchOrdersOutputSchema, mcpGmxFetchPositionsInputSchema, mcpGmxFetchPositionsOutputSchema, mcpGmxFetchStakingPowerInputSchema, mcpGmxFetchStakingPowerOutputSchema, mcpGmxGmDepositInputSchema, mcpGmxGmWithdrawInputSchema, mcpGmxIncreaseInputSchema, mcpServerSubmitOutputSchema as mcpGmxMultisignOutputSchema, mcpGmxStakeGmxInputSchema, mcpGmxUnstakeGmxInputSchema, mcpHyperliquidBridgeDepositInputSchema, mcpHyperliquidBridgeWithdrawInputSchema, mcpHyperliquidCancelInputSchema, mcpHyperliquidCloseInputSchema, mcpHyperliquidDelegateInputSchema, mcpHyperliquidFetchDelegationsInputSchema, mcpHyperliquidFetchDelegationsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOhlcvInputSchema, mcpHyperliquidFetchOhlcvOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidSearchMarketsInputSchema, mcpHyperliquidSearchMarketsOutputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUpdateLeverageInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMorphoBlueBorrowInputSchema, mcpMorphoBlueCollateralDepositInputSchema, mcpMorphoBlueCollateralWithdrawInputSchema, mcpMorphoBlueRepayInputSchema, mcpMorphoFetchBlueMarketsInputSchema, mcpMorphoFetchBlueMarketsOutputSchema, mcpMorphoFetchEarnVaultsInputSchema, mcpMorphoFetchEarnVaultsOutputSchema, mcpMorphoFetchMidnightBooksInputSchema, mcpMorphoFetchMidnightBooksOutputSchema, mcpMorphoFetchMidnightPositionsInputSchema, mcpMorphoFetchMidnightPositionsOutputSchema, mcpMorphoFetchMidnightQuoteInputSchema, mcpMorphoFetchMidnightQuoteOutputSchema, mcpMorphoMerklClaimInputSchema, mcpMorphoMidnightBorrowInputSchema, mcpMorphoMidnightLendInputSchema, mcpMorphoMidnightRepayInputSchema, mcpMorphoVaultDepositInputSchema, mcpMorphoVaultWithdrawInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildAllowlistFinalizeMultisignInputSchema, mcpUniswapV4BuildCollectFeesMultisignInputSchema, mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildLimitOrderMultisignInputSchema, mcpUniswapV4BuildMintLiquidityMultisignInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CheckPermissionsInputSchema, mcpUniswapV4CheckPermissionsOutputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4FetchLimitOrdersInputSchema, mcpUniswapV4FetchLimitOrdersOutputSchema, mcpUniswapV4FetchOhlcvInputSchema, mcpUniswapV4FetchOhlcvOutputSchema, mcpUniswapV4KycApplyLinkInputSchema, mcpUniswapV4KycApplyLinkOutputSchema, mcpUniswapV4LimitOrderQuoteInputSchema, mcpUniswapV4LimitOrderQuoteOutputSchema, mcpUniswapV4LpClaimInputSchema, mcpUniswapV4LpClaimOutputSchema, mcpUniswapV4LpCreatePositionInputSchema, mcpUniswapV4LpCreatePositionOutputSchema, mcpUniswapV4LpDecreaseInputSchema, mcpUniswapV4LpDecreaseOutputSchema, mcpUniswapV4LpIncreaseInputSchema, mcpUniswapV4LpIncreaseOutputSchema, mcpUniswapV4LpListPoolsInputSchema, mcpUniswapV4LpListPoolsOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, mcpVeniceBurnDiemInputSchema, mcpVeniceCompleteUnstakeDiemInputSchema, mcpVeniceCompleteUnstakeSvvvInputSchema, mcpVeniceInitiateUnstakeDiemInputSchema, mcpVeniceInitiateUnstakeSvvvInputSchema, mcpVeniceListModelsInputSchema, mcpVeniceListModelsOutputSchema, mcpVeniceMintDiemInputSchema, mcpVeniceReadMintDiemPreviewInputSchema, mcpVeniceReadMintDiemPreviewOutputSchema, mcpVeniceReadStakingStateInputSchema, mcpVeniceReadStakingStateOutputSchema, mcpVeniceStakeDiemInputSchema, mcpVeniceStakeVvvInputSchema, multisignOutputSchema, parseAgentBoolean, parseAgentEvmChainId, parseMcpToolInput, parseMcpToolOutput, parseMultisignBuilderOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
9532
+ export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, MULTISIGN_SUBMIT_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpAerodromeBuildAddLiquidityMultisignInputSchema, mcpAerodromeBuildClBurnMultisignInputSchema, mcpAerodromeBuildClCollectFeesMultisignInputSchema, mcpAerodromeBuildClDecreaseMultisignInputSchema, mcpAerodromeBuildClIncreaseMultisignInputSchema, mcpAerodromeBuildClMintMultisignInputSchema, mcpAerodromeBuildClaimEmissionsMultisignInputSchema, mcpAerodromeBuildClaimFeesMultisignInputSchema, mcpAerodromeBuildGaugeStakeMultisignInputSchema, mcpAerodromeBuildGaugeUnstakeMultisignInputSchema, mcpAerodromeBuildRemoveLiquidityMultisignInputSchema, mcpAerodromeBuildSwapMultisignInputSchema, mcpAerodromeDiscoverPoolsInputSchema, mcpAerodromeDiscoverPoolsOutputSchema, mcpAerodromeFetchPoolsInputSchema, mcpAerodromeFetchPoolsOutputSchema, mcpAerodromeFetchPositionsInputSchema, mcpAerodromeFetchPositionsOutputSchema, mcpAerodromeQuoteAddLiquidityInputSchema, mcpAerodromeQuoteAddLiquidityOutputSchema, mcpAerodromeQuoteClDepositInputSchema, mcpAerodromeQuoteClDepositOutputSchema, mcpAerodromeQuoteInputSchema, mcpAerodromeQuoteOutputSchema, mcpArcusBuildCancelOrderMultisignInputSchema, mcpArcusBuildCloseMultisignInputSchema, mcpArcusBuildCreateApiKeyMultisignInputSchema, mcpArcusBuildDepositMultisignInputSchema, mcpArcusBuildPlaceOrderMultisignInputSchema, mcpArcusBuildSetLeverageMultisignInputSchema, mcpArcusBuildWithdrawMultisignInputSchema, mcpArcusFetchAccountInputSchema, mcpArcusFetchAccountOutputSchema, mcpArcusFetchMarketSnapshotInputSchema, mcpArcusFetchMarketSnapshotOutputSchema, mcpArcusFetchMarketsInputSchema, mcpArcusFetchMarketsOutputSchema, mcpArcusFetchOhlcvInputSchema, mcpArcusFetchOhlcvOutputSchema, mcpArcusFetchOpenContextInputSchema, mcpArcusFetchOpenContextOutputSchema, mcpArcusFetchOpenOrdersInputSchema, mcpArcusFetchOpenOrdersOutputSchema, mcpArcusFetchPositionsInputSchema, mcpArcusFetchPositionsOutputSchema, mcpArcusSearchMarketsInputSchema, mcpArcusSearchMarketsOutputSchema, mcpArcusSpotBuildRfqMultisignInputSchema, mcpArcusSpotFetchBalancesInputSchema, mcpArcusSpotFetchBalancesOutputSchema, mcpArcusSpotFetchMarketsInputSchema, mcpArcusSpotFetchMarketsOutputSchema, mcpArcusSpotFetchOhlcvInputSchema, mcpArcusSpotFetchOhlcvOutputSchema, mcpCompoundV3BulkerInputSchema, mcpCompoundV3ClaimRewardsInputSchema, mcpCompoundV3FetchAccountInputSchema, mcpCompoundV3FetchAccountOutputSchema, mcpCompoundV3FetchMarketInputSchema, mcpCompoundV3FetchMarketOutputSchema, mcpCompoundV3FetchMarketsInputSchema, mcpCompoundV3FetchMarketsOutputSchema, mcpCompoundV3RepayInputSchema, mcpCompoundV3SupplyInputSchema, mcpCompoundV3WithdrawInputSchema, mcpContinuumDaoAttachInputSchema, mcpContinuumDaoCastVoteBravoInputSchema, mcpContinuumDaoCastVoteDeltaInputSchema, mcpContinuumDaoCreateLockInputSchema, mcpContinuumDaoDelegateInputSchema, mcpContinuumDaoExplainProposalInputSchema, mcpContinuumDaoExplainProposalOutputSchema, mcpContinuumDaoFetchDelegatesInputSchema, mcpContinuumDaoFetchDelegatesOutputSchema, mcpContinuumDaoFetchLiveProposalsInputSchema, mcpContinuumDaoFetchLiveProposalsOutputSchema, mcpContinuumDaoFetchProposalInputSchema, mcpContinuumDaoFetchProposalOutputSchema, mcpContinuumDaoFetchProposalStateInputSchema, mcpContinuumDaoFetchProposalStateOutputSchema, mcpContinuumDaoFetchProposalsInputSchema, mcpContinuumDaoFetchProposalsOutputSchema, mcpContinuumDaoFetchVotingPowerInputSchema, mcpContinuumDaoFetchVotingPowerOutputSchema, mcpContinuumDaoForumCreateIdeaInputSchema, mcpContinuumDaoForumCreateIdeaOutputSchema, mcpContinuumDaoForumCreateTopicInputSchema, mcpContinuumDaoForumCreateTopicOutputSchema, mcpContinuumDaoForumDeleteInputSchema, mcpContinuumDaoForumDeleteOutputSchema, mcpContinuumDaoForumFetchPostInputSchema, mcpContinuumDaoForumFetchPostOutputSchema, mcpContinuumDaoForumFetchThreadInputSchema, mcpContinuumDaoForumFetchThreadOutputSchema, mcpContinuumDaoForumMarkReadInputSchema, mcpContinuumDaoForumMarkReadOutputSchema, mcpContinuumDaoForumMarkUnreadInputSchema, mcpContinuumDaoForumMarkUnreadOutputSchema, mcpContinuumDaoForumMeInputSchema, mcpContinuumDaoForumMeOutputSchema, mcpContinuumDaoForumReactInputSchema, mcpContinuumDaoForumReactOutputSchema, mcpContinuumDaoForumRecentInputSchema, mcpContinuumDaoForumRecentOutputSchema, mcpContinuumDaoForumReplyCountInputSchema, mcpContinuumDaoForumReplyCountOutputSchema, mcpContinuumDaoForumReplyInputSchema, mcpContinuumDaoForumReplyOutputSchema, mcpContinuumDaoForumResolveInputSchema, mcpContinuumDaoForumResolveOutputSchema, mcpContinuumDaoForumSearchInputSchema, mcpContinuumDaoForumSearchOutputSchema, mcpContinuumDaoForumSectionsInputSchema, mcpContinuumDaoForumSectionsOutputSchema, mcpContinuumDaoForumSignInEligibleInputSchema, mcpContinuumDaoForumSignInEligibleOutputSchema, mcpContinuumDaoForumSignInInputSchema, mcpContinuumDaoForumSignOutInputSchema, mcpContinuumDaoForumSignOutOutputSchema, mcpContinuumDaoForumUnreadInputSchema, mcpContinuumDaoForumUnreadOutputSchema, mcpContinuumDaoForumUserPostIdsInputSchema, mcpContinuumDaoForumUserPostIdsOutputSchema, mcpContinuumDaoIncreaseAmountInputSchema, mcpContinuumDaoIncreaseUnlockTimeInputSchema, mcpContinuumDaoMergeInputSchema, mcpContinuumDaoProposalIdInputSchema, mcpContinuumDaoProposeBravoInputSchema, mcpContinuumDaoProposeDeltaInputSchema, mcpContinuumDaoRegisterProposalInputSchema, mcpContinuumDaoRegisterProposalOutputSchema, mcpContinuumDaoRequestDetachInputSchema, mcpContinuumDaoSplitInputSchema, mcpContinuumDaoTokenIdInputSchema, mcpContinuumDaoTransferInputSchema, mcpContinuumDaoUndelegateInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2FetchLendVaultsInputSchema, mcpEulerV2FetchLendVaultsOutputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGmxCancelInputSchema, mcpGmxDecreaseInputSchema, mcpGmxFetchGmApyInputSchema, mcpGmxFetchGmApyOutputSchema, mcpGmxFetchGmMarketsInputSchema, mcpGmxFetchGmMarketsOutputSchema, mcpGmxFetchMarketPricesInputSchema, mcpGmxFetchMarketPricesOutputSchema, mcpGmxFetchMarketsInputSchema, mcpGmxFetchMarketsOutputSchema, mcpGmxFetchOhlcvInputSchema, mcpGmxFetchOhlcvOutputSchema, mcpGmxFetchOrdersInputSchema, mcpGmxFetchOrdersOutputSchema, mcpGmxFetchPositionsInputSchema, mcpGmxFetchPositionsOutputSchema, mcpGmxFetchStakingPowerInputSchema, mcpGmxFetchStakingPowerOutputSchema, mcpGmxGmDepositInputSchema, mcpGmxGmWithdrawInputSchema, mcpGmxIncreaseInputSchema, mcpServerSubmitOutputSchema as mcpGmxMultisignOutputSchema, mcpGmxStakeGmxInputSchema, mcpGmxUnstakeGmxInputSchema, mcpHyperliquidBridgeDepositInputSchema, mcpHyperliquidBridgeWithdrawInputSchema, mcpHyperliquidCancelInputSchema, mcpHyperliquidCloseInputSchema, mcpHyperliquidDelegateInputSchema, mcpHyperliquidFetchDelegationsInputSchema, mcpHyperliquidFetchDelegationsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOhlcvInputSchema, mcpHyperliquidFetchOhlcvOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidSearchMarketsInputSchema, mcpHyperliquidSearchMarketsOutputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUpdateLeverageInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMorphoBlueBorrowInputSchema, mcpMorphoBlueCollateralDepositInputSchema, mcpMorphoBlueCollateralWithdrawInputSchema, mcpMorphoBlueRepayInputSchema, mcpMorphoFetchBlueMarketsInputSchema, mcpMorphoFetchBlueMarketsOutputSchema, mcpMorphoFetchEarnVaultsInputSchema, mcpMorphoFetchEarnVaultsOutputSchema, mcpMorphoFetchMidnightBooksInputSchema, mcpMorphoFetchMidnightBooksOutputSchema, mcpMorphoFetchMidnightOffersInputSchema, mcpMorphoFetchMidnightOffersOutputSchema, mcpMorphoFetchMidnightPositionsInputSchema, mcpMorphoFetchMidnightPositionsOutputSchema, mcpMorphoFetchMidnightQuoteInputSchema, mcpMorphoFetchMidnightQuoteOutputSchema, mcpMorphoMerklClaimInputSchema, mcpMorphoMidnightBorrowInputSchema, mcpMorphoMidnightCancelLendOfferInputSchema, mcpMorphoMidnightLendInputSchema, mcpMorphoMidnightLendOfferInputSchema, mcpMorphoMidnightRepayInputSchema, mcpMorphoVaultDepositInputSchema, mcpMorphoVaultWithdrawInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildAllowlistFinalizeMultisignInputSchema, mcpUniswapV4BuildCollectFeesMultisignInputSchema, mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildLimitOrderMultisignInputSchema, mcpUniswapV4BuildMintLiquidityMultisignInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CheckPermissionsInputSchema, mcpUniswapV4CheckPermissionsOutputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4FetchLimitOrdersInputSchema, mcpUniswapV4FetchLimitOrdersOutputSchema, mcpUniswapV4FetchOhlcvInputSchema, mcpUniswapV4FetchOhlcvOutputSchema, mcpUniswapV4KycApplyLinkInputSchema, mcpUniswapV4KycApplyLinkOutputSchema, mcpUniswapV4LimitOrderQuoteInputSchema, mcpUniswapV4LimitOrderQuoteOutputSchema, mcpUniswapV4LpClaimInputSchema, mcpUniswapV4LpClaimOutputSchema, mcpUniswapV4LpCreatePositionInputSchema, mcpUniswapV4LpCreatePositionOutputSchema, mcpUniswapV4LpDecreaseInputSchema, mcpUniswapV4LpDecreaseOutputSchema, mcpUniswapV4LpIncreaseInputSchema, mcpUniswapV4LpIncreaseOutputSchema, mcpUniswapV4LpListPoolsInputSchema, mcpUniswapV4LpListPoolsOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, mcpVeniceBurnDiemInputSchema, mcpVeniceCompleteUnstakeDiemInputSchema, mcpVeniceCompleteUnstakeSvvvInputSchema, mcpVeniceInitiateUnstakeDiemInputSchema, mcpVeniceInitiateUnstakeSvvvInputSchema, mcpVeniceListModelsInputSchema, mcpVeniceListModelsOutputSchema, mcpVeniceMintDiemInputSchema, mcpVeniceReadMintDiemPreviewInputSchema, mcpVeniceReadMintDiemPreviewOutputSchema, mcpVeniceReadStakingStateInputSchema, mcpVeniceReadStakingStateOutputSchema, mcpVeniceStakeDiemInputSchema, mcpVeniceStakeVvvInputSchema, multisignOutputSchema, parseAgentBoolean, parseAgentEvmChainId, parseMcpToolInput, parseMcpToolOutput, parseMultisignBuilderOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
6764
9533
  //# sourceMappingURL=catalog.js.map
6765
9534
  //# sourceMappingURL=catalog.js.map