@continuumdao/ctm-mpc-defi 0.2.64 → 0.2.66

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 (118) hide show
  1. package/dist/agent/catalog.cjs +1227 -2928
  2. package/dist/agent/catalog.cjs.map +1 -1
  3. package/dist/agent/catalog.d.ts +1620 -1631
  4. package/dist/agent/catalog.js +1226 -2929
  5. package/dist/agent/catalog.js.map +1 -1
  6. package/dist/chains/evm/index.cjs +22 -15
  7. package/dist/chains/evm/index.cjs.map +1 -1
  8. package/dist/chains/evm/index.d.ts +13 -2
  9. package/dist/chains/evm/index.js +12 -6
  10. package/dist/chains/evm/index.js.map +1 -1
  11. package/dist/core/index.cjs +3 -3
  12. package/dist/core/index.cjs.map +1 -1
  13. package/dist/core/index.d.ts +1 -1
  14. package/dist/core/index.js +2 -2
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/index.cjs +25 -17
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.ts +15 -4
  19. package/dist/index.js +14 -7
  20. package/dist/index.js.map +1 -1
  21. package/dist/protocols/evm/aave-v4/index.cjs +22 -16
  22. package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
  23. package/dist/protocols/evm/aave-v4/index.js +11 -5
  24. package/dist/protocols/evm/aave-v4/index.js.map +1 -1
  25. package/dist/protocols/evm/aerodrome/index.cjs +21 -15
  26. package/dist/protocols/evm/aerodrome/index.cjs.map +1 -1
  27. package/dist/protocols/evm/aerodrome/index.d.ts +5 -1
  28. package/dist/protocols/evm/aerodrome/index.js +11 -5
  29. package/dist/protocols/evm/aerodrome/index.js.map +1 -1
  30. package/dist/protocols/evm/arcus/index.cjs +21 -15
  31. package/dist/protocols/evm/arcus/index.cjs.map +1 -1
  32. package/dist/protocols/evm/arcus/index.js +11 -5
  33. package/dist/protocols/evm/arcus/index.js.map +1 -1
  34. package/dist/protocols/evm/circle-cctp/index.cjs +21 -15
  35. package/dist/protocols/evm/circle-cctp/index.cjs.map +1 -1
  36. package/dist/protocols/evm/circle-cctp/index.js +11 -5
  37. package/dist/protocols/evm/circle-cctp/index.js.map +1 -1
  38. package/dist/protocols/evm/compound-v3/index.cjs +21 -15
  39. package/dist/protocols/evm/compound-v3/index.cjs.map +1 -1
  40. package/dist/protocols/evm/compound-v3/index.js +11 -5
  41. package/dist/protocols/evm/compound-v3/index.js.map +1 -1
  42. package/dist/protocols/evm/continuum-dao/index.cjs +37 -18
  43. package/dist/protocols/evm/continuum-dao/index.cjs.map +1 -1
  44. package/dist/protocols/evm/continuum-dao/index.d.ts +3 -1
  45. package/dist/protocols/evm/continuum-dao/index.js +27 -9
  46. package/dist/protocols/evm/continuum-dao/index.js.map +1 -1
  47. package/dist/protocols/evm/curve-dao/index.cjs +21 -15
  48. package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
  49. package/dist/protocols/evm/curve-dao/index.d.ts +1 -1
  50. package/dist/protocols/evm/curve-dao/index.js +11 -5
  51. package/dist/protocols/evm/curve-dao/index.js.map +1 -1
  52. package/dist/protocols/evm/derive/index.cjs +24 -18
  53. package/dist/protocols/evm/derive/index.cjs.map +1 -1
  54. package/dist/protocols/evm/derive/index.js +11 -5
  55. package/dist/protocols/evm/derive/index.js.map +1 -1
  56. package/dist/protocols/evm/ethena/index.cjs +22 -16
  57. package/dist/protocols/evm/ethena/index.cjs.map +1 -1
  58. package/dist/protocols/evm/ethena/index.js +11 -5
  59. package/dist/protocols/evm/ethena/index.js.map +1 -1
  60. package/dist/protocols/evm/euler-v2/index.cjs +21 -15
  61. package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
  62. package/dist/protocols/evm/euler-v2/index.js +11 -5
  63. package/dist/protocols/evm/euler-v2/index.js.map +1 -1
  64. package/dist/protocols/evm/gmx/index.cjs +21 -15
  65. package/dist/protocols/evm/gmx/index.cjs.map +1 -1
  66. package/dist/protocols/evm/gmx/index.js +11 -5
  67. package/dist/protocols/evm/gmx/index.js.map +1 -1
  68. package/dist/protocols/evm/hyperliquid/index.cjs +21 -15
  69. package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
  70. package/dist/protocols/evm/hyperliquid/index.js +11 -5
  71. package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
  72. package/dist/protocols/evm/hyperliquidOutcome/index.cjs +2 -2
  73. package/dist/protocols/evm/hyperliquidOutcome/index.cjs.map +1 -1
  74. package/dist/protocols/evm/hyperliquidOutcome/index.js +1 -1
  75. package/dist/protocols/evm/hyperliquidOutcome/index.js.map +1 -1
  76. package/dist/protocols/evm/lido/index.cjs +21 -15
  77. package/dist/protocols/evm/lido/index.cjs.map +1 -1
  78. package/dist/protocols/evm/lido/index.js +11 -5
  79. package/dist/protocols/evm/lido/index.js.map +1 -1
  80. package/dist/protocols/evm/maple/index.cjs +21 -15
  81. package/dist/protocols/evm/maple/index.cjs.map +1 -1
  82. package/dist/protocols/evm/maple/index.js +11 -5
  83. package/dist/protocols/evm/maple/index.js.map +1 -1
  84. package/dist/protocols/evm/morpho/index.cjs +21 -15
  85. package/dist/protocols/evm/morpho/index.cjs.map +1 -1
  86. package/dist/protocols/evm/morpho/index.js +11 -5
  87. package/dist/protocols/evm/morpho/index.js.map +1 -1
  88. package/dist/protocols/evm/pendle/index.cjs +21 -15
  89. package/dist/protocols/evm/pendle/index.cjs.map +1 -1
  90. package/dist/protocols/evm/pendle/index.d.ts +5 -1
  91. package/dist/protocols/evm/pendle/index.js +11 -5
  92. package/dist/protocols/evm/pendle/index.js.map +1 -1
  93. package/dist/protocols/evm/permit2/index.cjs +2 -2
  94. package/dist/protocols/evm/permit2/index.cjs.map +1 -1
  95. package/dist/protocols/evm/permit2/index.js +1 -1
  96. package/dist/protocols/evm/permit2/index.js.map +1 -1
  97. package/dist/protocols/evm/railgun/index.cjs +21 -15
  98. package/dist/protocols/evm/railgun/index.cjs.map +1 -1
  99. package/dist/protocols/evm/railgun/index.js +11 -5
  100. package/dist/protocols/evm/railgun/index.js.map +1 -1
  101. package/dist/protocols/evm/sky/index.cjs +21 -15
  102. package/dist/protocols/evm/sky/index.cjs.map +1 -1
  103. package/dist/protocols/evm/sky/index.js +11 -5
  104. package/dist/protocols/evm/sky/index.js.map +1 -1
  105. package/dist/protocols/evm/trueo/index.cjs +21 -15
  106. package/dist/protocols/evm/trueo/index.cjs.map +1 -1
  107. package/dist/protocols/evm/trueo/index.js +11 -5
  108. package/dist/protocols/evm/trueo/index.js.map +1 -1
  109. package/dist/protocols/evm/uniswap-v4/index.cjs +23 -16
  110. package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
  111. package/dist/protocols/evm/uniswap-v4/index.d.ts +1 -1
  112. package/dist/protocols/evm/uniswap-v4/index.js +12 -5
  113. package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
  114. package/dist/protocols/evm/venice/index.cjs +22 -16
  115. package/dist/protocols/evm/venice/index.cjs.map +1 -1
  116. package/dist/protocols/evm/venice/index.js +11 -5
  117. package/dist/protocols/evm/venice/index.js.map +1 -1
  118. package/package.json +2 -2
@@ -3,10 +3,10 @@ import { MidnightApi } from '@morpho-org/midnight-sdk/api';
3
3
  import { zodToJsonSchema } from 'zod-to-json-schema';
4
4
  import { z } from 'zod';
5
5
  import '@msgpack/msgpack';
6
- import { createRequire } from 'module';
7
- import { fileURLToPath } from 'url';
8
6
  import { readFileSync } from 'fs';
9
7
  import { join, dirname } from 'path';
8
+ import { fileURLToPath } from 'url';
9
+ import { createRequire } from 'module';
10
10
 
11
11
  var __defProp = Object.defineProperty;
12
12
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -18,147 +18,6 @@ var __export = (target, all) => {
18
18
  __defProp(target, name, { get: all[name], enumerable: true });
19
19
  };
20
20
 
21
- // src/chains/evm/chainIdParse.ts
22
- function parseEvmChainIdToNumber(chainId) {
23
- if (chainId == null) return Number.NaN;
24
- if (typeof chainId === "bigint") {
25
- const n = Number(chainId);
26
- return Number.isSafeInteger(n) && n >= 0 ? n : Number.NaN;
27
- }
28
- if (typeof chainId === "number") {
29
- return Number.isInteger(chainId) && chainId >= 0 ? chainId : Number.NaN;
30
- }
31
- const t = String(chainId).trim();
32
- if (!t) return Number.NaN;
33
- const low = t.toLowerCase();
34
- if (low.startsWith("eip155:")) {
35
- const rest = t.slice("eip155:".length).trim();
36
- const n = Number.parseInt(rest, 10);
37
- return Number.isNaN(n) || n < 0 ? Number.NaN : n;
38
- }
39
- if (low.startsWith("0x")) {
40
- return Number.parseInt(t, 16);
41
- }
42
- return Number.parseInt(t, 10);
43
- }
44
- var init_chainIdParse = __esm({
45
- "src/chains/evm/chainIdParse.ts"() {
46
- }
47
- });
48
- function isCoinbaseB20AssetToken(address) {
49
- try {
50
- return getAddress(address).toLowerCase().startsWith(COINBASE_B20_ASSET_PREFIX);
51
- } catch {
52
- return false;
53
- }
54
- }
55
- function looksLikeCoinbaseStockSymbol(symbol) {
56
- return /^[A-Za-z][A-Za-z0-9]{0,8}(?:\.[A-Za-z][A-Za-z0-9]{0,4})?c$/.test((symbol ?? "").trim());
57
- }
58
- function indexCatalog(rows) {
59
- catalogRows = rows;
60
- catalogAt = Date.now();
61
- catalogBySymbol.clear();
62
- catalogByAddress.clear();
63
- for (const row of rows) {
64
- catalogBySymbol.set(row.symbol.toLowerCase(), row);
65
- catalogByAddress.set(row.address.toLowerCase(), row);
66
- }
67
- }
68
- function parseCoinbaseTokenizedStocksPayload(payload) {
69
- const tokens = Array.isArray(payload) ? payload : payload && typeof payload === "object" && Array.isArray(payload.tokens) ? payload.tokens : [];
70
- const out = [];
71
- const seen = /* @__PURE__ */ new Set();
72
- for (const row of tokens) {
73
- if (!row || typeof row !== "object") continue;
74
- const rec = row;
75
- const symbol = typeof rec.symbol === "string" ? rec.symbol.trim() : "";
76
- const addressRaw = typeof rec.contract_address === "string" ? rec.contract_address.trim() : "";
77
- if (!looksLikeCoinbaseStockSymbol(symbol) || !isCoinbaseB20AssetToken(addressRaw)) continue;
78
- const address = getAddress(addressRaw);
79
- const key = address.toLowerCase();
80
- if (seen.has(key)) continue;
81
- seen.add(key);
82
- const name = typeof rec.name === "string" && rec.name.trim() ? rec.name.trim() : symbol;
83
- const iconUrl = typeof rec.icon_url === "string" && rec.icon_url.trim() ? rec.icon_url.trim() : void 0;
84
- const decimals = typeof rec.decimals === "number" && Number.isInteger(rec.decimals) && rec.decimals >= 0 && rec.decimals <= 18 ? rec.decimals : COINBASE_B20_STOCK_DECIMALS;
85
- out.push({ address, symbol, name, decimals, iconUrl });
86
- if (out.length >= CATALOG_MAX) break;
87
- }
88
- return out;
89
- }
90
- async function fetchCoinbaseB20StockCatalog() {
91
- const merged = [];
92
- const seen = /* @__PURE__ */ new Set();
93
- let pageToken = "";
94
- for (let page = 0; page < 4; page++) {
95
- const url = new URL(COINBASE_TOKENIZED_STOCKS_API_URL);
96
- url.searchParams.set("page_size", "500");
97
- if (pageToken) url.searchParams.set("page_token", pageToken);
98
- const res = await fetch(url, { cache: "no-store", signal: AbortSignal.timeout(8e3) });
99
- if (!res.ok) break;
100
- const json = await res.json();
101
- for (const row of parseCoinbaseTokenizedStocksPayload(json)) {
102
- const key = row.address.toLowerCase();
103
- if (seen.has(key)) continue;
104
- seen.add(key);
105
- merged.push(row);
106
- if (merged.length >= CATALOG_MAX) break;
107
- }
108
- pageToken = typeof json.next_page_token === "string" ? json.next_page_token.trim() : "";
109
- if (!pageToken || merged.length >= CATALOG_MAX) break;
110
- }
111
- if (merged.length > 0) indexCatalog(merged);
112
- return catalogRows ?? [];
113
- }
114
- async function ensureCoinbaseB20StockCatalog() {
115
- if (catalogRows && catalogRows.length > 0 && Date.now() - catalogAt < CATALOG_TTL_MS) return catalogRows;
116
- if (!catalogInflight) {
117
- catalogInflight = fetchCoinbaseB20StockCatalog().finally(() => {
118
- catalogInflight = null;
119
- });
120
- }
121
- try {
122
- return await catalogInflight;
123
- } catch {
124
- return catalogRows ?? [];
125
- }
126
- }
127
- function lookupCoinbaseB20StockToken(token) {
128
- const key = (token ?? "").trim();
129
- if (!key) return null;
130
- const fromCatalog = catalogBySymbol.get(key.toLowerCase());
131
- if (fromCatalog) return fromCatalog;
132
- try {
133
- return catalogByAddress.get(getAddress(key).toLowerCase()) ?? null;
134
- } catch {
135
- return null;
136
- }
137
- }
138
- var COINBASE_B20_STOCK_DECIMALS, COINBASE_B20_ASSET_PREFIX, COINBASE_TOKENIZED_STOCKS_API_URL, CATALOG_TTL_MS, CATALOG_MAX, catalogRows, catalogAt, catalogInflight, catalogBySymbol, catalogByAddress;
139
- var init_coinbaseB20 = __esm({
140
- "src/protocols/evm/shared/coinbaseB20.ts"() {
141
- COINBASE_B20_STOCK_DECIMALS = 8;
142
- COINBASE_B20_ASSET_PREFIX = "0xb200000000000000000000";
143
- COINBASE_TOKENIZED_STOCKS_API_URL = "https://api.coinbase.com/v1/tokenized-stocks";
144
- CATALOG_TTL_MS = 15 * 60 * 1e3;
145
- CATALOG_MAX = 500;
146
- catalogRows = null;
147
- catalogAt = 0;
148
- catalogInflight = null;
149
- catalogBySymbol = /* @__PURE__ */ new Map();
150
- catalogByAddress = /* @__PURE__ */ new Map();
151
- }
152
- });
153
- function defiEvmTransport(rpcUrl, opts) {
154
- const url = rpcUrl.trim();
155
- return http(url, opts);
156
- }
157
- var init_defiEvmClient = __esm({
158
- "src/core/defiEvmClient.ts"() {
159
- }
160
- });
161
-
162
21
  // src/core/defiProxy.ts
163
22
  function getAaveGraphqlProxyUrl() {
164
23
  return aaveGraphqlProxyUrl;
@@ -205,135 +64,6 @@ var init_defiProxy = __esm({
205
64
  "src/core/defiProxy.ts"() {
206
65
  }
207
66
  });
208
- function isConfiguredAddress(addr2) {
209
- if (!addr2?.trim()) return false;
210
- try {
211
- return getAddress(addr2) !== zeroAddress;
212
- } catch {
213
- return false;
214
- }
215
- }
216
- function continuumDaoDeployment(chainId) {
217
- return CONTINUUM_DAO_DEPLOYMENTS[chainId] ?? null;
218
- }
219
- function isContinuumDaoLockChain(chainId) {
220
- return chainId === CONTINUUM_DAO_LINEA_CHAIN_ID || chainId === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID;
221
- }
222
- function isContinuumDaoSupportedChainId(chainId) {
223
- return continuumDaoDeployment(chainId) != null;
224
- }
225
- function ctmTokenAddressOnEvmChain(chainId) {
226
- const ctm = continuumDaoDeployment(chainId)?.ctm;
227
- return ctm && isConfiguredAddress(ctm) ? getAddress(ctm) : null;
228
- }
229
- function votingEscrowAddressOnEvmChain(chainId) {
230
- const ve = continuumDaoDeployment(chainId)?.votingEscrow;
231
- return ve && isConfiguredAddress(ve) ? getAddress(ve) : null;
232
- }
233
- function votingEscrowMarketplaceAddressOnEvmChain(chainId) {
234
- if (chainId !== CONTINUUM_DAO_LINEA_CHAIN_ID) return null;
235
- return VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS;
236
- }
237
- function listContinuumDaoDefaultAssets() {
238
- const out = [];
239
- for (const chainId of [
240
- CONTINUUM_DAO_LINEA_CHAIN_ID,
241
- CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID,
242
- CONTINUUM_DAO_ETHEREUM_CHAIN_ID
243
- ]) {
244
- const dep = continuumDaoDeployment(chainId);
245
- if (!dep) continue;
246
- if (isConfiguredAddress(dep.ctm)) {
247
- out.push({
248
- chainId,
249
- tokenType: "CTMERC20",
250
- contractAddress: getAddress(dep.ctm),
251
- name: CTM_TOKEN_NAME,
252
- symbol: CTM_TOKEN_SYMBOL,
253
- decimals: CTM_TOKEN_DECIMALS
254
- });
255
- }
256
- if (isContinuumDaoLockChain(chainId) && isConfiguredAddress(dep.votingEscrow)) {
257
- out.push({
258
- chainId,
259
- tokenType: "ERC721",
260
- contractAddress: getAddress(dep.votingEscrow),
261
- name: VECTM_TOKEN_NAME,
262
- symbol: VECTM_TOKEN_SYMBOL
263
- });
264
- }
265
- }
266
- return out;
267
- }
268
- var CONTINUUM_DAO_PROTOCOL_ID, CONTINUUM_DAO_ETHEREUM_CHAIN_ID, CONTINUUM_DAO_LINEA_CHAIN_ID, CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID, CTM_TOKEN_NAME, CTM_TOKEN_SYMBOL, VECTM_TOKEN_NAME, VECTM_TOKEN_SYMBOL, CTM_TOKEN_DECIMALS, WEEK_SECONDS, UNSET, CTM_TOKEN_ADDRESS, VOTING_ESCROW_LINEA_ADDRESS, VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS, MARKETPLACE_WETH_LINEA_ADDRESS, MARKETPLACE_USDC_LINEA_ADDRESS, CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS, CONTINUUM_DAO_DEPLOYMENTS;
269
- var init_constants = __esm({
270
- "src/protocols/evm/continuum-dao/constants.ts"() {
271
- CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
272
- CONTINUUM_DAO_ETHEREUM_CHAIN_ID = 1;
273
- CONTINUUM_DAO_LINEA_CHAIN_ID = 59144;
274
- CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID = 59141;
275
- CTM_TOKEN_NAME = "Continuum";
276
- CTM_TOKEN_SYMBOL = "CTM";
277
- VECTM_TOKEN_NAME = "Voting Escrow Continuum";
278
- VECTM_TOKEN_SYMBOL = "veCTM";
279
- CTM_TOKEN_DECIMALS = 18;
280
- WEEK_SECONDS = 7 * 86400;
281
- UNSET = {
282
- ctm: zeroAddress,
283
- votingEscrow: zeroAddress,
284
- nodeProperties: zeroAddress,
285
- rewards: zeroAddress,
286
- governor: zeroAddress
287
- };
288
- CTM_TOKEN_ADDRESS = getAddress("0x7581696b0ED142f6534E5797baaABBb9a1b27086");
289
- VOTING_ESCROW_LINEA_ADDRESS = getAddress("0x221EC90B3B083A8501A37bdeb7035CeaedF3C31f");
290
- getAddress("0x4ebd7cCBe32a51d1638cFE90E8eD1c4BdF42f729");
291
- VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS = getAddress("0x92557d38beAe4658d3c03A02F349FFB60c3bfFA5");
292
- MARKETPLACE_WETH_LINEA_ADDRESS = getAddress("0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f");
293
- MARKETPLACE_USDC_LINEA_ADDRESS = getAddress("0x176211869cA2b568f2A7D4EE941E073a821EE1ff");
294
- CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID = "continuum-dao-marketplace";
295
- CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS = getAddress("0x76FF2CB03175900F1D83328C82D27EA9aeaF2355");
296
- getAddress("0x4800F9f1dC1b6daCA841B71E0531F547D374168E");
297
- CONTINUUM_DAO_DEPLOYMENTS = {
298
- [CONTINUUM_DAO_LINEA_CHAIN_ID]: {
299
- ...UNSET,
300
- ctm: CTM_TOKEN_ADDRESS,
301
- votingEscrow: VOTING_ESCROW_LINEA_ADDRESS,
302
- governor: CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS
303
- },
304
- [CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID]: { ...UNSET },
305
- [CONTINUUM_DAO_ETHEREUM_CHAIN_ID]: {
306
- ...UNSET,
307
- ctm: CTM_TOKEN_ADDRESS
308
- }
309
- };
310
- }
311
- });
312
-
313
- // src/protocols/evm/arcus/support.ts
314
- function isArcusChainSupported(chainId) {
315
- return ARCUS_SUPPORTED_CHAIN_IDS.includes(chainId);
316
- }
317
- var ARCUS_SUPPORTED_CHAIN_IDS;
318
- var init_support = __esm({
319
- "src/protocols/evm/arcus/support.ts"() {
320
- ARCUS_SUPPORTED_CHAIN_IDS = [4663];
321
- }
322
- });
323
-
324
- // src/protocols/evm/arcus/constants.ts
325
- var ARCUS_PROTOCOL_ID;
326
- var init_constants2 = __esm({
327
- "src/protocols/evm/arcus/constants.ts"() {
328
- ARCUS_PROTOCOL_ID = "arcus";
329
- }
330
- });
331
-
332
- // src/protocols/evm/arcus/api.ts
333
- var init_api = __esm({
334
- "src/protocols/evm/arcus/api.ts"() {
335
- }
336
- });
337
67
 
338
68
  // src/protocols/evm/morpho/midnightConstants.ts
339
69
  var midnightConstants_exports = {};
@@ -622,726 +352,136 @@ var init_midnightApi = __esm({
622
352
  init_midnightConstants();
623
353
  }
624
354
  });
625
- function isAerodromeChainSupported(chainId) {
626
- const n = typeof chainId === "number" ? chainId : Number.parseInt(String(chainId), 10);
627
- return AERO_CHAIN_IDS.includes(n);
628
- }
629
- function aerodromeUnsupportedChainMessage(chainId) {
630
- const listed = AERO_CHAIN_IDS.map((id) => `${AERO_CHAIN_LABEL[id]} ${id}`).join(", ");
631
- return `Aero is not deployed on chain ${chainId}. Launch chains: ${listed}.`;
632
- }
633
- var AERODROME_PROTOCOL_ID, AERODROME_CHAIN_ID, AERO_CHAIN_IDS, AERO_CHAIN_LABEL, AERODROME_WETH_BASE, AERODROME_USDC_BASE;
634
- var init_support2 = __esm({
635
- "src/protocols/evm/aerodrome/support.ts"() {
636
- AERODROME_PROTOCOL_ID = "aerodrome";
637
- AERODROME_CHAIN_ID = 8453;
638
- AERO_CHAIN_IDS = [8453, 1, 10, 42161, 4663, 5042, 57073];
639
- AERO_CHAIN_LABEL = {
640
- 1: "Ethereum",
641
- 10: "OP Mainnet",
642
- 42161: "Arbitrum",
643
- 4663: "Robinhood Chain",
644
- 5042: "Arc",
645
- 8453: "Base",
646
- 57073: "Ink"
647
- };
648
- AERODROME_WETH_BASE = "0x4200000000000000000000000000000000000006";
649
- AERODROME_USDC_BASE = "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
355
+
356
+ // src/core/registry.ts
357
+ var modules = [];
358
+ function registerProtocolModule(mod) {
359
+ const existing = modules.findIndex((m) => m.id === mod.id);
360
+ if (existing >= 0) {
361
+ modules[existing] = mod;
362
+ } else {
363
+ modules.push(mod);
650
364
  }
651
- });
652
- function addr(raw) {
653
- return getAddress(raw);
654
365
  }
655
- function aeroUsdcAddress(chainId) {
656
- const raw = AERO_USDC_BY_CHAIN[chainId];
657
- return raw ? addr(raw) : null;
366
+ function getProtocolModules() {
367
+ return modules;
658
368
  }
659
- function aeroWrappedNativeAddress(chainId) {
660
- const raw = AERO_WETH_BY_CHAIN[chainId];
661
- return raw ? addr(raw) : null;
662
- }
663
- function aeroAddressesForChain(chainId) {
664
- const fb = AERODROME_BASE_ADDRESSES_FALLBACK;
665
- const cl = addr(AERO_CL_FACTORY_BY_CHAIN[chainId] ?? AERO_CL_FACTORY_BY_CHAIN[AERODROME_CHAIN_ID]);
666
- const receipt = addr(AERO_RECEIPT_BY_CHAIN[chainId] ?? AERO_RECEIPT_BY_CHAIN[AERODROME_CHAIN_ID]);
667
- const weth = aeroWrappedNativeAddress(chainId) ?? addr("0x0000000000000000000000000000000000000000");
668
- const token = chainId === AERODROME_CHAIN_ID ? addr(AERO_TOKEN_BASE) : receipt;
669
- return {
670
- chainId,
671
- aero: token,
672
- router: chainId === AERODROME_CHAIN_ID ? addr(fb.router) : addr(AERO_METAROUTER),
673
- poolFactory: addr(AERO_VOLATILE_POOL_FACTORY),
674
- factoryRegistry: addr(AERO_FACTORY_REGISTRY_BY_CHAIN[chainId] ?? AERO_FACTORY_REGISTRY_BY_CHAIN[AERODROME_CHAIN_ID]),
675
- voter: addr(AERO_LEAF_VOTER),
676
- votingEscrow: addr("0xBF7977E1521e9a3032bf7243Ee4712f311f13915"),
677
- rewardsDistributor: addr(fb.rewardsDistributor),
678
- mixedQuoter: addr(AERO_METAQUOTER),
679
- mixedQuoterV3: addr(AERO_METAQUOTER),
680
- nfpm: addr(AERO_NFPM),
681
- clFactory: cl,
682
- clFactory2: cl,
683
- clFactory3: cl,
684
- universalRouter: addr(fb.universalRouter),
685
- swapRouter: addr(AERO_SWAP_ROUTER),
686
- swapRouter2: addr(AERO_SWAP_ROUTER),
687
- swapRouter3: addr(AERO_SWAP_ROUTER),
688
- pricesOracle: addr(fb.pricesOracle),
689
- slipstreamHelper: addr(fb.slipstreamHelper),
690
- lpSugar: chainId === AERODROME_CHAIN_ID ? addr(fb.lpSugar) : addr("0x0000000000000000000000000000000000000000"),
691
- sugarSlipstreamHelper: addr(fb.sugarSlipstreamHelper),
692
- swapper: addr(fb.swapper),
693
- weth,
694
- stablePoolFactory: addr(AERO_STABLE_POOL_FACTORY),
695
- volatilePoolFactory: addr(AERO_VOLATILE_POOL_FACTORY),
696
- metarouter: addr(AERO_METAROUTER),
697
- metaquoter: addr(AERO_METAQUOTER),
698
- receiptToken: receipt
699
- };
700
- }
701
- var AERODROME_BASE_ADDRESSES_FALLBACK, AERO_TOKEN_BASE, AERO_METAROUTER, AERO_METAQUOTER, AERO_STABLE_POOL_FACTORY, AERO_VOLATILE_POOL_FACTORY, AERO_NFPM, AERO_SWAP_ROUTER, AERO_LEAF_VOTER, AERO_RECEIPT_BY_CHAIN, AERO_FACTORY_REGISTRY_BY_CHAIN, AERO_CL_FACTORY_BY_CHAIN, OP_STACK_WETH, AERO_WETH_BY_CHAIN, AERO_USDC_BY_CHAIN;
702
- var init_addresses = __esm({
703
- "src/protocols/evm/aerodrome/addresses.ts"() {
704
- init_support2();
705
- AERODROME_BASE_ADDRESSES_FALLBACK = {
706
- chainId: AERODROME_CHAIN_ID,
707
- aero: "0x940181a94A35A4569E4529A3CDfB74e38FD98631",
708
- router: "0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43",
709
- poolFactory: "0x420DD381b31aEf6683db6B902084cB0FFECe40Da",
710
- factoryRegistry: "0x5C3F18F06CC09CA1910767A34a20F771039E37C0",
711
- voter: "0x16613524e02ad97eDfeF371bC883F2F5d6C480A5",
712
- votingEscrow: "0xeBf418Fe2512e7E6bd9b87a8F0f294aCDC67e6B4",
713
- rewardsDistributor: "0x227f65131A261548b057215bB1D5Ab2997964C7d",
714
- mixedQuoter: "0x0A5aA5D3a4d28014f967Bf0f29EAA3FF9807D5c6",
715
- /** MixedRouteQuoterV3 — v2 + all three CL factories (bitmask path encoding). */
716
- mixedQuoterV3: "0xCd2A7D98e82D6107eac1828ce8DeAA6acB65b555",
717
- nfpm: "0x827922686190790b37229fd06084350E74485b72",
718
- /** Oldest Slipstream CL factory (Gauges V1). Path bit 1<<20. */
719
- clFactory: "0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A",
720
- /** Slipstream CL factory 2 (gauge caps). Raw tickSpacing in MixedQuoterV3. */
721
- clFactory2: "0xaDe65c38CD4849aDBA595a4323a8C7DdfE89716a",
722
- /** Newest Slipstream CL factory (Gauges V3) — Coinbase B20 stock pools. Path bit 1<<19. */
723
- clFactory3: "0xf8f2eB4940CFE7d13603DDDD87f123820Fc061Ef",
724
- universalRouter: "0x6Cb442acF35158D5eDa88fe602221b67B400Be3E",
725
- swapRouter: "0xBE6D8f0d05cC4be24d5167a3eF062215bE6D18a5",
726
- swapRouter2: "0xcbBb8035cAc7D4B3Ca7aBb74cF7BdF900215Ce0D",
727
- swapRouter3: "0x698Cb2b6dd822994581fEa6eA4Fc755d1363A92F",
728
- pricesOracle: "0xee717411f6E44F9feE011835C8E6FAaC5dEfF166",
729
- slipstreamHelper: "0x0AD09A66af0154a84e86F761313d02d0abB6edd5",
730
- lpSugar: "0x69dD9db6d8f8E7d83887A704f447b1a584b599A1",
731
- sugarSlipstreamHelper: "0x9c62ab10577fB3C20A22E231b7703Ed6D456CC7a",
732
- swapper: "0x91616a7B9CF6D23f8C17845581051EBdC4BcB916",
733
- weth: AERODROME_WETH_BASE
734
- };
735
- AERO_TOKEN_BASE = "0x3f5bF3EdAc59d650D8fDf9657a71F2f904A3a4Ee";
736
- AERO_METAROUTER = "0x0fEf9e88A7b76BCDBF451780C6774FE32965Ee98";
737
- AERO_METAQUOTER = "0x1dDfeC5058180C207F55BB77D95AcDd0d8227868";
738
- AERO_STABLE_POOL_FACTORY = "0x78589E876edcEbdce72ee3436ab3c9AD3a7cEF2D";
739
- AERO_VOLATILE_POOL_FACTORY = "0x8E6a9FCd1d638CC760Ffba397605Fe3355dE76D2";
740
- AERO_NFPM = "0x4857DB576eE0e45F10525eC59527BfD10beeC60b";
741
- AERO_SWAP_ROUTER = "0x9Ee35Bf1bd69a03c6F0393582030fCe8Bb93D418";
742
- AERO_LEAF_VOTER = "0x382409fad8503FbCdbB27A4211551fa03e884078";
743
- AERO_RECEIPT_BY_CHAIN = {
744
- 8453: "0x6CdDa0E730744DC6fF67654B35350Adad05EceE7",
745
- 10: "0xbdEaeA5205d16f34Cb40038052d91235D87B4C54",
746
- 42161: "0x436a085B2751cB87db270FFa66f8d698F87bEC82",
747
- 1: "0x9e148C5716b5aAdCFD3B71cEAE9EE7a9e22C29E2",
748
- 57073: "0x9e148C5716b5aAdCFD3B71cEAE9EE7a9e22C29E2",
749
- 4663: "0x9e148C5716b5aAdCFD3B71cEAE9EE7a9e22C29E2",
750
- 5042: "0x20077cC0d5E385A0Fe9C91bbC7DC744f51559307"
751
- };
752
- AERO_FACTORY_REGISTRY_BY_CHAIN = {
753
- 8453: "0x7b2A2c12dC5Ea2a31455952a05031C3E4BB28F3E",
754
- 10: "0xb6F9705A631CC1C0E8570FFde48882C95E2Df408",
755
- 42161: "0x9E635b2c689fC52201DF7eF1C9FA607c2F58f666",
756
- 1: "0xdd1705e23762F4D6e44D8C31BD8Ea80c54612239",
757
- 57073: "0xdd1705e23762F4D6e44D8C31BD8Ea80c54612239",
758
- 4663: "0xdd1705e23762F4D6e44D8C31BD8Ea80c54612239",
759
- 5042: "0xCe44907DC45D3BFa3f5f6035B0e6E8B22D780A42"
760
- };
761
- AERO_CL_FACTORY_BY_CHAIN = {
762
- 8453: "0x9CB220581b91b0C83223012FE69688b92aD07a76",
763
- 10: "0xfeaB42D90055db3a0616249f76B6002D72266778",
764
- 42161: "0x88a60ee77392577c355C0acb2A8d476D5a4EC03a",
765
- 1: "0xF4Fd2E6c5B60c5b365cd1B96DD6245E6D60414c2",
766
- 57073: "0x7660BF2aDefC687C22906112ca323d60A00358cF",
767
- 4663: "0xc63d7338c178e805c544B8f897066bD3BBcBE136",
768
- 5042: "0x7F83235643181E440433400a027618Cd50879751"
769
- };
770
- OP_STACK_WETH = "0x4200000000000000000000000000000000000006";
771
- AERO_WETH_BY_CHAIN = {
772
- 1: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
773
- 10: OP_STACK_WETH,
774
- 42161: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
775
- 8453: OP_STACK_WETH,
776
- 57073: OP_STACK_WETH,
777
- 4663: "0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"
778
- };
779
- AERO_USDC_BY_CHAIN = {
780
- 1: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
781
- 10: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
782
- 42161: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
783
- 8453: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
784
- };
785
- }
786
- });
787
- var init_stockTokens = __esm({
788
- "src/protocols/evm/aerodrome/stockTokens.ts"() {
789
- init_coinbaseB20();
790
- }
791
- });
792
- var init_discover = __esm({
793
- "src/protocols/evm/aerodrome/discover.ts"() {
794
- }
795
- });
796
- var init_yields = __esm({
797
- "src/protocols/evm/aerodrome/yields.ts"() {
798
- init_addresses();
799
- init_support2();
800
- new Set(
801
- [
802
- AERODROME_WETH_BASE,
803
- AERODROME_USDC_BASE,
804
- AERODROME_BASE_ADDRESSES_FALLBACK.aero,
805
- "0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb",
806
- "0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2",
807
- "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34",
808
- "0x2Ae3F1Ec7F1F5012CFEab0185bfc7aa3cf0DEc22",
809
- "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452"
810
- ].map((a) => a.toLowerCase())
811
- );
812
- }
813
- });
814
- var init_committeeList = __esm({
815
- "src/protocols/evm/continuum-dao/committeeList.ts"() {
816
- }
817
- });
818
- var init_proposalCatalog = __esm({
819
- "src/protocols/evm/continuum-dao/proposalCatalog.ts"() {
820
- ({
821
- name: "linea",
822
- label: "Linea",
823
- chainId: "59144",
824
- c3governor: getAddress("0x58B610a359c870E0fc941139821a51F5aa23f14E")
825
- });
826
- }
827
- });
828
- var init_forum = __esm({
829
- "src/protocols/evm/continuum-dao/forum.ts"() {
830
- }
831
- });
832
- var init_governance = __esm({
833
- "src/protocols/evm/continuum-dao/governance.ts"() {
834
- parseAbi([
835
- "function propose(address[] targets, uint256[] values, bytes[] calldatas, string description) returns (uint256)",
836
- "function castVote(uint256 proposalId, uint8 support) returns (uint256)",
837
- "function castVoteWithReasonAndParams(uint256 proposalId, uint8 support, string reason, bytes params) returns (uint256)",
838
- "function execute(uint256 proposalId) payable",
839
- "function cancel(uint256 proposalId)"
840
- ]);
841
- parseAbi([
842
- "function hashProposal(address[] targets, uint256[] values, bytes[] calldatas, bytes32 descriptionHash) view returns (uint256)",
843
- "function state(uint256 proposalId) view returns (uint8)",
844
- "function getVotes(address account, uint256 timepoint) view returns (uint256)",
845
- "function proposalThreshold() view returns (uint256)",
846
- "function proposalCount() view returns (uint256)",
847
- "function clock() view returns (uint48)",
848
- "function proposalVotes(uint256 proposalId) view returns (uint256 againstVotes, uint256 forVotes, uint256 abstainVotes)",
849
- "function hasVoted(uint256 proposalId, address account) view returns (bool)",
850
- "function proposalSnapshot(uint256 proposalId) view returns (uint256)"
851
- ]);
852
- }
853
- });
854
-
855
- // src/protocols/evm/continuum-dao/explainProposal.ts
856
- var init_explainProposal = __esm({
857
- "src/protocols/evm/continuum-dao/explainProposal.ts"() {
858
- }
859
- });
860
- var init_foundryProposalScript = __esm({
861
- "src/protocols/evm/continuum-dao/foundryProposalScript.ts"() {
862
- }
863
- });
864
- var init_simulateProposal = __esm({
865
- "src/protocols/evm/continuum-dao/simulateProposal.ts"() {
866
- }
867
- });
868
-
869
- // src/core/registry.ts
870
- var modules = [];
871
- function registerProtocolModule(mod) {
872
- const existing = modules.findIndex((m) => m.id === mod.id);
873
- if (existing >= 0) {
874
- modules[existing] = mod;
875
- } else {
876
- modules.push(mod);
877
- }
878
- }
879
- function getProtocolModules() {
880
- return modules;
369
+ function getProtocolModule(id) {
370
+ return modules.find((m) => m.id === id);
881
371
  }
882
372
  function getActionsByChainCategory(category) {
883
373
  return modules.filter((m) => m.chainCategory === category).flatMap((m) => m.actions);
884
374
  }
885
375
 
886
- // src/protocols/evm/uniswap-v4/constants.ts
887
- init_chainIdParse();
888
- var UNIVERSAL_ROUTER_SPENDER = {
889
- 1: "0x66a9893cc07d91d95644aedd05d03f95e1dba8af",
890
- 5: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
891
- 11155111: "0x3a9d48ab9751398bbfa63ad67599bb04e4bdf98b",
892
- 137: "0x1095692a6237d83c6a72f3f5efedb9a670c49223",
893
- 80001: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
894
- 10: "0x851116d9223fabed8e56c0e6b8ad0c31d98b3507",
895
- 420: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
896
- 42161: "0xa51afafe0263b40edaef0df8781ea9aa03e381a3",
897
- 421613: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
898
- 42220: "0xcb695bc5D3Aa22cAD1E6DF07801b061a05A0233A",
899
- 44787: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
900
- 56: "0x1906c1d672b88cd1b9ac7593301ca990f94eae07",
901
- 43114: "0x94b75331ae8d42c1b61065089b7d48fe14aa73b7",
902
- 84531: "0xd0872d928672ae2ff74bdb2f5130ac12229cafaf",
903
- 8453: "0x6fF5693b99212da76ad316178a184ab56d299b43",
904
- 81457: "0xeabbcb3e8e415306207ef514f660a3f820025be3",
905
- 7777777: "0x3315ef7ca28db74abadc6c44570efdf06b04b020",
906
- 324: "0x28731BCC616B5f51dD52CF2e4dF0E78dD1136C06",
907
- 480: "0x8ac7bee993bb44dab564ea4bc9ea67bf9eb5e743",
908
- 1301: "0xf70536b3bcc1bd1a972dc186a2cf84cc6da6be5d",
909
- 130: "0xef740bf23acae26f6492b10de645d6b98dc8eaf3",
910
- 10143: "0x3ae6d8a282d67893e17aa70ebffb33ee5aa65893",
911
- 84532: "0x492e6456d9528771018deb9e87ef7750ef184104",
912
- 1868: "0x0e2850543f69f678257266e0907ff9a58b3f13de",
913
- 143: "0x0d97dc33264bfc1c226207428a79b26757fb9dc3",
914
- 59144: "0x661e93cca42afacb172121ef892830ca3b70f08d",
915
- 4217: "0x1febb76be10aaf3a1402f04e8e835f2c382f7914",
916
- 196: "0x5507749f2c558bb3e162c6e90c314c092e7372ff",
917
- /** Robinhood Chain mainnet — Universal Router v2.1.1 (Trade API / interface) */
918
- 4663: "0x8876789976decbfcbbbe364623c63652db8c0904",
919
- /** Circle Arc mainnet — official Uniswap v4 deployments */
920
- 5042: "0x4fcA4a51Ab4F23A7447b3284fBd7D73289A89Fb1"
921
- };
922
- function isUniswapV4ChainSupported(chainId) {
923
- if (chainId == null) return false;
924
- const n = parseEvmChainIdToNumber(chainId);
925
- if (Number.isNaN(n) || n < 0) return false;
926
- const a = UNIVERSAL_ROUTER_SPENDER[n];
927
- return typeof a === "string" && a.startsWith("0x");
928
- }
929
-
930
- // src/protocols/evm/uniswap-v4/index.ts
931
- var UNISWAP_V4_PROTOCOL_ID = "uniswap-v4";
932
- var uniswapV4ProtocolModule = {
933
- id: UNISWAP_V4_PROTOCOL_ID,
934
- chainCategory: "evm",
935
- isChainSupported(ctx) {
936
- if (ctx.chainCategory !== "evm") return false;
937
- return isUniswapV4ChainSupported(ctx.chainId);
376
+ // src/agent/commonParamDocs.ts
377
+ var EVM_COMMON_PARAM_DOCS = {
378
+ keyGen: {
379
+ type: "object",
380
+ required: true,
381
+ description: "MPC key slice: { pubkeyhex: string (required), keylist: string[], ClientKeys?: Record<string,string> }. Used for pubKey/keyList on POST /multiSignRequest."
938
382
  },
939
- isTokenSupported(token) {
940
- if (token.category !== "evm") return false;
941
- return token.kind === "native" || token.kind === "erc20";
383
+ purposeText: {
384
+ type: "string",
385
+ required: true,
386
+ description: "Human-readable purpose for the sign request. Stored in bodyForSign.purpose (may be appended with an automatic batch suffix)."
942
387
  },
943
- actions: [
944
- {
945
- id: "uniswap-v4.swap-exact-input",
946
- protocolId: UNISWAP_V4_PROTOCOL_ID,
947
- chainCategory: "evm",
948
- description: "Swap ERC-20 or native token via Uniswap V4 Universal Router (classic allowance path)",
949
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
950
- params: {
951
- tokenIn: { type: "address", required: true, description: "Input token (0x0 for native)" },
952
- tokenOut: { type: "address", required: true, description: "Output token address" },
953
- amount: { type: "string", required: true, description: "Human or wei amount per trade type" },
954
- slippagePercent: { type: "number", required: true, description: "Slippage tolerance percent" },
955
- swapTransactionDeadlineUnix: {
956
- type: "number",
957
- required: false,
958
- description: "On-chain swap deadline (unix seconds)"
959
- },
960
- uniswapApiKey: { type: "string", required: true, description: "Uniswap Trade API key" }
961
- }
962
- },
963
- {
964
- id: "uniswap-v4.quote",
965
- protocolId: UNISWAP_V4_PROTOCOL_ID,
966
- chainCategory: "evm",
967
- description: "Fetch Uniswap Trade API quote",
968
- commonParams: ["keyGen"],
969
- params: {
970
- tokenIn: { type: "address", required: true, description: "Input token" },
971
- tokenOut: { type: "address", required: true, description: "Output token" },
972
- amount: { type: "string", required: true, description: "Amount for quote" },
973
- type: { type: "EXACT_INPUT | EXACT_OUTPUT", required: true, description: "Trade type" }
974
- }
388
+ useCustomGas: {
389
+ type: "boolean",
390
+ required: true,
391
+ description: "When true, apply Custom Gas Config from chainDetail / customGasChainDetails. Omitted baseFee/priorityFee is valid \u2014 live RPC fees are used at proposal; configured values are optional floors/multipliers. When false, use live RPC estimates only."
392
+ },
393
+ chainId: {
394
+ type: "number",
395
+ required: true,
396
+ description: "EVM chain id (decimal). Becomes destinationChainID on the sign request."
397
+ },
398
+ rpcUrl: {
399
+ type: "string",
400
+ required: true,
401
+ description: "HTTPS JSON-RPC URL for gas estimation, nonce, and allowance reads."
402
+ },
403
+ executorAddress: {
404
+ type: "address",
405
+ required: true,
406
+ description: "MPC wallet address (from keyGen ethereumaddress) \u2014 tx sender for estimates and approvals."
407
+ },
408
+ chainDetail: {
409
+ type: "object",
410
+ required: true,
411
+ description: "Optional gas config: { legacy?, gasLimit?, gasMultiplier?, gasPrice?, baseFee?, priorityFee?, baseFeeMultiplier? }."
412
+ },
413
+ customGasChainDetails: {
414
+ type: "object",
415
+ required: false,
416
+ description: "Snapshot written to extraJSON.customGasChainDetails when useCustomGas is true."
417
+ }
418
+ };
419
+ var MULTISIGN_SUBMIT_OUTPUT_DOC = {
420
+ description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result. Do not poll wait_for_sign_request_ready after submit (Join may take days). Do not call the same build tool again if requestId was returned.",
421
+ fields: {
422
+ requestId: {
423
+ type: "string",
424
+ description: "Sign request id from POST /multiSignRequest."
975
425
  },
976
- {
977
- id: "uniswap-v4.limit-order",
978
- protocolId: UNISWAP_V4_PROTOCOL_ID,
979
- chainCategory: "evm",
980
- description: "Place UniswapX limit order via EIP-712 sign + POST /order (Ethereum mainnet only)",
981
- commonParams: ["keyGen", "purposeText"],
982
- params: {
983
- fullLimitQuote: { type: "object", required: true, description: "Full limit order quote from Trade API" },
984
- uniswapApiKey: { type: "string", required: true, description: "Uniswap Trade API key" }
985
- }
426
+ status: {
427
+ type: "string",
428
+ description: "submitted when POST succeeded \u2014 do not call the same build tool again."
986
429
  },
987
- {
988
- id: "uniswap-v4.mint-liquidity",
989
- protocolId: UNISWAP_V4_PROTOCOL_ID,
990
- chainCategory: "evm",
991
- description: "Mint a new Uniswap V4 concentrated liquidity position (Position Manager NFT)",
992
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
993
- params: {
994
- lpResponse: { type: "object", required: true, description: "Full LP API create response" },
995
- nativeWrapped: { type: "address", required: false, description: "WETH when pool uses native ETH" },
996
- poolReference: { type: "string", required: false, description: "V4 pool id" },
997
- uniswapApiKey: { type: "string", required: true, description: "Uniswap API key" }
998
- }
430
+ followUp: {
431
+ type: "string",
432
+ description: "Lifecycle next steps (sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result). No polling after submit."
433
+ }
434
+ }
435
+ };
436
+ var MULTISIGN_OUTPUT_DOC = {
437
+ description: "Unsigned mpc-auth multiSignRequest payload from protocol builders. MCP agents receive { requestId } instead; node-app callers sign messageToSign and POST { ...bodyForSign, clientSig, signedMessage }.",
438
+ fields: {
439
+ bodyForSign: {
440
+ type: "object",
441
+ description: "POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs."
999
442
  },
1000
- {
1001
- id: "uniswap-v4.increase-liquidity",
1002
- protocolId: UNISWAP_V4_PROTOCOL_ID,
1003
- chainCategory: "evm",
1004
- description: "Increase liquidity on an existing Uniswap V4 position NFT",
1005
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
1006
- params: {
1007
- nftTokenId: { type: "string", required: true, description: "Position NFT token id" },
1008
- lpResponse: { type: "object", required: true, description: "Full LP API increase response" }
1009
- }
443
+ messageToSign: {
444
+ type: "string",
445
+ description: "JSON.stringify(bodyForSign) \u2014 exact string to sign before adding clientSig."
446
+ }
447
+ }
448
+ };
449
+ var MANAGEMENT_SIG_DOC = {
450
+ description: "Management POST bodies embed NodeMgtKeySig: { nonce, clientSig, nodeKey }. Sign JSON with clientSig cleared via messageToSignManagementBody; POST with withManagementClientSig(body, sig). Do not put signedMessage in the JSON body for standard management routes. Legacy Nonce/Sig/sig field names are not accepted.",
451
+ exceptions: {
452
+ configUpdateImplement: "POST /configUpdateImplement: include nodeKey + plannedYaml + signedMessage (opaque configUpdateImplement|<sha256> line). Sign the opaque line bytes, not the JSON body.",
453
+ postMSQTTKey: "POST /postMSQTTKey: include nodeKey + caCertPem + clientSig. Sign caCertPem PEM bytes directly (use buildPostMqttKeyBody).",
454
+ addManagementKey: "POST /addManagementKey / removeManagementKey (EIP-191): may still use signedMessage equal to the canonical JSON string for dual-mode Ethereum signing.",
455
+ agentLlmConfig: "POST /agentLlmConfig / agentLlmApiKey: sign canonical JSON with action + clientSig cleared; POST body has nonce, clientSig, nodeKey, endpoint fields \u2014 no signedMessage field.",
456
+ multiSignRequest: "POST /multiSignRequest (client key, not management): POST { ...bodyForSign, clientSig, signedMessage: messageToSign }."
457
+ },
458
+ fields: {
459
+ nonce: {
460
+ type: "number",
461
+ description: "From GET /getPublicMgtKeyNonce (Ed25519) or GET /getNodeMgtKeyNonce (Ethereum NodeMgtKey)."
1010
462
  },
1011
- {
1012
- id: "uniswap-v4.decrease-liquidity",
1013
- protocolId: UNISWAP_V4_PROTOCOL_ID,
1014
- chainCategory: "evm",
1015
- description: "Decrease liquidity on an existing Uniswap V4 position NFT",
1016
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
1017
- params: {
1018
- nftTokenId: { type: "string", required: true, description: "Position NFT token id" },
1019
- lpResponse: { type: "object", required: true, description: "Full LP API decrease response" }
1020
- }
463
+ clientSig: {
464
+ type: "string",
465
+ description: "Management signature; empty string in the message to sign."
1021
466
  },
1022
- {
1023
- id: "uniswap-v4.collect-fees",
1024
- protocolId: UNISWAP_V4_PROTOCOL_ID,
1025
- chainCategory: "evm",
1026
- description: "Collect accrued fees from a Uniswap V4 position NFT",
1027
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
1028
- params: {
1029
- nftTokenId: { type: "string", required: true, description: "Position NFT token id" },
1030
- lpResponse: { type: "object", required: true, description: "Full LP API claim response" }
1031
- }
467
+ nodeKey: {
468
+ type: "string",
469
+ description: "Required. 128-hex MPC node id from GET /getNodeKey (no 0x prefix)."
1032
470
  }
1033
- ]
1034
- };
1035
- registerProtocolModule(uniswapV4ProtocolModule);
1036
-
1037
- // src/protocols/evm/curve-dao/support.ts
1038
- init_chainIdParse();
1039
- var CURVE_FULL_NETWORK_CONSTANTS_CHAIN_IDS = /* @__PURE__ */ new Set([
1040
- 1,
1041
- 10,
1042
- 56,
1043
- 100,
1044
- 137,
1045
- 146,
1046
- 196,
1047
- 250,
1048
- 252,
1049
- 324,
1050
- 999,
1051
- 1284,
1052
- 2222,
1053
- 5e3,
1054
- 8453,
1055
- 42161,
1056
- 42220,
1057
- 43114,
1058
- 1313161554
1059
- ]);
1060
- function isCurveApiChainSupported(chainId) {
1061
- const n = parseEvmChainIdToNumber(chainId);
1062
- if (Number.isNaN(n) || n < 0) return false;
1063
- return CURVE_FULL_NETWORK_CONSTANTS_CHAIN_IDS.has(n);
1064
- }
1065
- var CURVE_NATIVE_PLACEHOLDER = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
1066
- var ETH_PLACEHOLDER = CURVE_NATIVE_PLACEHOLDER;
1067
- function normalizeAddr(a) {
1068
- return a.toLowerCase();
1069
- }
1070
- function addEdge(adj, a, b) {
1071
- if (a === b) return;
1072
- if (!adj.has(a)) adj.set(a, /* @__PURE__ */ new Set());
1073
- if (!adj.has(b)) adj.set(b, /* @__PURE__ */ new Set());
1074
- adj.get(a).add(b);
1075
- adj.get(b).add(a);
1076
- }
1077
- function buildCurveLiquidityGraphFromApi(curve) {
1078
- const adj = /* @__PURE__ */ new Map();
1079
- for (const id of curve.getPoolList()) {
1080
- try {
1081
- const pool = curve.getPool(id);
1082
- const w = (pool.wrappedCoinAddresses ?? []).map(normalizeAddr);
1083
- const u = (pool.underlyingCoinAddresses ?? []).map(normalizeAddr);
1084
- const all = [.../* @__PURE__ */ new Set([...w, ...u])];
1085
- for (let i = 0; i < all.length; i++) {
1086
- for (let j = i + 1; j < all.length; j++) {
1087
- addEdge(adj, all[i], all[j]);
1088
- }
1089
- }
1090
- } catch {
1091
- }
1092
- }
1093
- return adj;
1094
- }
1095
- function addNativeWethBridge(adj, wrappedNative) {
1096
- if (!wrappedNative) return;
1097
- const w = wrappedNative.toLowerCase();
1098
- const a = ETH_PLACEHOLDER;
1099
- const b = w;
1100
- if (a === b) return;
1101
- if (!adj.has(a)) adj.set(a, /* @__PURE__ */ new Set());
1102
- if (!adj.has(b)) adj.set(b, /* @__PURE__ */ new Set());
1103
- adj.get(a).add(b);
1104
- adj.get(b).add(a);
1105
- }
1106
- function swappableCurveGraphNodeKeys(adj) {
1107
- const out = /* @__PURE__ */ new Set();
1108
- for (const [k, neigh] of adj) {
1109
- if (neigh.size > 0) out.add(k);
1110
- }
1111
- return out;
1112
- }
1113
-
1114
- // src/protocols/evm/curve-dao/apiSession.ts
1115
- var CURVE_SESSION_CACHE_TTL_MS = 5 * 60 * 1e3;
1116
- var curveSessionCache = /* @__PURE__ */ new Map();
1117
- async function fetchAllCurvePools(curve) {
1118
- const run = (p) => p.catch(() => void 0);
1119
- const tasks = [];
1120
- for (const key of [
1121
- "factory",
1122
- "crvUSDFactory",
1123
- "EYWAFactory",
1124
- "cryptoFactory",
1125
- "twocryptoFactory",
1126
- "tricryptoFactory",
1127
- "stableNgFactory"
1128
- ]) {
1129
- const f = curve[key];
1130
- if (f?.fetchPools) {
1131
- tasks.push(run(f.fetchPools()));
1132
- }
1133
- }
1134
- await Promise.all(tasks);
1135
- }
1136
- async function loadFullCurveSessionForRpc(rpcUrl) {
1137
- const url = (rpcUrl ?? "").trim();
1138
- if (!url) {
1139
- throw new Error("rpcUrl is required.");
1140
- }
1141
- const cached3 = curveSessionCache.get(url);
1142
- if (cached3 && cached3.expiresAt > Date.now()) {
1143
- return cached3.session;
1144
- }
1145
- try {
1146
- const { default: curve } = await import('@curvefi/api');
1147
- await curve.init("JsonRpc", { url }, {});
1148
- const wrapped = curve.getNetworkConstants().NATIVE_COIN?.wrappedAddress;
1149
- if (!curve.hasRouter || !curve.hasRouter()) {
1150
- const session2 = {
1151
- curve,
1152
- adj: /* @__PURE__ */ new Map(),
1153
- swappableNodeKeys: /* @__PURE__ */ new Set(),
1154
- wrappedNative: wrapped
1155
- };
1156
- curveSessionCache.set(url, { session: session2, expiresAt: Date.now() + CURVE_SESSION_CACHE_TTL_MS });
1157
- return session2;
1158
- }
1159
- await fetchAllCurvePools(curve);
1160
- const adj = buildCurveLiquidityGraphFromApi(curve);
1161
- addNativeWethBridge(adj, wrapped);
1162
- const session = {
1163
- curve,
1164
- adj,
1165
- swappableNodeKeys: swappableCurveGraphNodeKeys(adj),
1166
- wrappedNative: wrapped
1167
- };
1168
- curveSessionCache.set(url, { session, expiresAt: Date.now() + CURVE_SESSION_CACHE_TTL_MS });
1169
- return session;
1170
- } catch (e) {
1171
- const msg = e instanceof Error ? e.message : String(e);
1172
- throw new Error(`Curve session init failed for RPC: ${msg}`);
1173
- }
1174
- }
1175
-
1176
- // src/protocols/evm/curve-dao/index.ts
1177
- var CURVE_DAO_PROTOCOL_ID = "curve-dao";
1178
- var curveDaoProtocolModule = {
1179
- id: CURVE_DAO_PROTOCOL_ID,
1180
- chainCategory: "evm",
1181
- isChainSupported(ctx) {
1182
- if (ctx.chainCategory !== "evm") return false;
1183
- return isCurveApiChainSupported(ctx.chainId);
1184
- },
1185
- isTokenSupported(token) {
1186
- if (token.category !== "evm") return false;
1187
- return token.kind === "native" || token.kind === "erc20";
1188
- },
1189
- actions: [
1190
- {
1191
- id: "curve-dao.quote",
1192
- protocolId: CURVE_DAO_PROTOCOL_ID,
1193
- chainCategory: "evm",
1194
- description: "Quote swap via Curve Router NG (getBestRouteAndOutput)",
1195
- commonParams: [],
1196
- params: {
1197
- chainId: { type: "number", required: true, description: "EVM chain id" },
1198
- tokenIn: { type: "address", required: true, description: "Token in or native placeholder" },
1199
- tokenOut: { type: "address", required: true, description: "Token out or native placeholder" },
1200
- amountHuman: { type: "string", required: true, description: "Human-readable input amount" }
1201
- }
1202
- },
1203
- {
1204
- id: "curve-dao.swap",
1205
- protocolId: CURVE_DAO_PROTOCOL_ID,
1206
- chainCategory: "evm",
1207
- description: "Swap via Curve Router NG (optional ERC-20 approve batch)",
1208
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
1209
- params: {
1210
- tokenIn: { type: "address", required: true, description: "ERC-20 token in (native uses WETH path in UI)" },
1211
- tokenOut: { type: "address", required: true, description: "Output token or 0xeeee\u2026 native placeholder" },
1212
- amountHuman: { type: "string", required: true, description: "Human-readable input amount" },
1213
- slippagePercent: { type: "number", required: true, description: "Slippage percent (0\u2013100 exclusive)" }
1214
- }
1215
- },
1216
- {
1217
- id: "curve-dao.add-liquidity",
1218
- protocolId: CURVE_DAO_PROTOCOL_ID,
1219
- chainCategory: "evm",
1220
- description: "Add liquidity to an important Curve pool (optional gauge stake)",
1221
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
1222
- params: {}
1223
- },
1224
- {
1225
- id: "curve-dao.remove-liquidity",
1226
- protocolId: CURVE_DAO_PROTOCOL_ID,
1227
- chainCategory: "evm",
1228
- description: "Remove liquidity from an important Curve pool",
1229
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
1230
- params: {}
1231
- }
1232
- ]
1233
- };
1234
- registerProtocolModule(curveDaoProtocolModule);
1235
-
1236
- // src/agent/commonParamDocs.ts
1237
- var EVM_COMMON_PARAM_DOCS = {
1238
- keyGen: {
1239
- type: "object",
1240
- required: true,
1241
- description: "MPC key slice: { pubkeyhex: string (required), keylist: string[], ClientKeys?: Record<string,string> }. Used for pubKey/keyList on POST /multiSignRequest."
1242
- },
1243
- purposeText: {
1244
- type: "string",
1245
- required: true,
1246
- description: "Human-readable purpose for the sign request. Stored in bodyForSign.purpose (may be appended with an automatic batch suffix)."
1247
- },
1248
- useCustomGas: {
1249
- type: "boolean",
1250
- required: true,
1251
- description: "When true, apply Custom Gas Config from chainDetail / customGasChainDetails. Omitted baseFee/priorityFee is valid \u2014 live RPC fees are used at proposal; configured values are optional floors/multipliers. When false, use live RPC estimates only."
1252
- },
1253
- chainId: {
1254
- type: "number",
1255
- required: true,
1256
- description: "EVM chain id (decimal). Becomes destinationChainID on the sign request."
1257
- },
1258
- rpcUrl: {
1259
- type: "string",
1260
- required: true,
1261
- description: "HTTPS JSON-RPC URL for gas estimation, nonce, and allowance reads."
1262
- },
1263
- executorAddress: {
1264
- type: "address",
1265
- required: true,
1266
- description: "MPC wallet address (from keyGen ethereumaddress) \u2014 tx sender for estimates and approvals."
1267
- },
1268
- chainDetail: {
1269
- type: "object",
1270
- required: true,
1271
- description: "Optional gas config: { legacy?, gasLimit?, gasMultiplier?, gasPrice?, baseFee?, priorityFee?, baseFeeMultiplier? }."
1272
- },
1273
- customGasChainDetails: {
1274
- type: "object",
1275
- required: false,
1276
- description: "Snapshot written to extraJSON.customGasChainDetails when useCustomGas is true."
1277
- }
1278
- };
1279
- var MULTISIGN_SUBMIT_OUTPUT_DOC = {
1280
- description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result. Do not poll wait_for_sign_request_ready after submit (Join may take days). Do not call the same build tool again if requestId was returned.",
1281
- fields: {
1282
- requestId: {
1283
- type: "string",
1284
- description: "Sign request id from POST /multiSignRequest."
1285
- },
1286
- status: {
1287
- type: "string",
1288
- description: "submitted when POST succeeded \u2014 do not call the same build tool again."
1289
- },
1290
- followUp: {
1291
- type: "string",
1292
- description: "Lifecycle next steps (sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result). No polling after submit."
1293
- }
1294
- }
1295
- };
1296
- var MULTISIGN_OUTPUT_DOC = {
1297
- description: "Unsigned mpc-auth multiSignRequest payload from protocol builders. MCP agents receive { requestId } instead; node-app callers sign messageToSign and POST { ...bodyForSign, clientSig, signedMessage }.",
1298
- fields: {
1299
- bodyForSign: {
1300
- type: "object",
1301
- description: "POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs."
1302
- },
1303
- messageToSign: {
1304
- type: "string",
1305
- description: "JSON.stringify(bodyForSign) \u2014 exact string to sign before adding clientSig."
1306
- }
1307
- }
1308
- };
1309
- var MANAGEMENT_SIG_DOC = {
1310
- description: "Management POST bodies embed NodeMgtKeySig: { nonce, clientSig, nodeKey }. Sign JSON with clientSig cleared via messageToSignManagementBody; POST with withManagementClientSig(body, sig). Do not put signedMessage in the JSON body for standard management routes. Legacy Nonce/Sig/sig field names are not accepted.",
1311
- exceptions: {
1312
- configUpdateImplement: "POST /configUpdateImplement: include nodeKey + plannedYaml + signedMessage (opaque configUpdateImplement|<sha256> line). Sign the opaque line bytes, not the JSON body.",
1313
- postMSQTTKey: "POST /postMSQTTKey: include nodeKey + caCertPem + clientSig. Sign caCertPem PEM bytes directly (use buildPostMqttKeyBody).",
1314
- addManagementKey: "POST /addManagementKey / removeManagementKey (EIP-191): may still use signedMessage equal to the canonical JSON string for dual-mode Ethereum signing.",
1315
- agentLlmConfig: "POST /agentLlmConfig / agentLlmApiKey: sign canonical JSON with action + clientSig cleared; POST body has nonce, clientSig, nodeKey, endpoint fields \u2014 no signedMessage field.",
1316
- multiSignRequest: "POST /multiSignRequest (client key, not management): POST { ...bodyForSign, clientSig, signedMessage: messageToSign }."
1317
- },
1318
- fields: {
1319
- nonce: {
1320
- type: "number",
1321
- description: "From GET /getPublicMgtKeyNonce (Ed25519) or GET /getNodeMgtKeyNonce (Ethereum NodeMgtKey)."
1322
- },
1323
- clientSig: {
1324
- type: "string",
1325
- description: "Management signature; empty string in the message to sign."
1326
- },
1327
- nodeKey: {
1328
- type: "string",
1329
- description: "Required. 128-hex MPC node id from GET /getNodeKey (no 0x prefix)."
1330
- }
1331
- },
1332
- helpers: {
1333
- managementSigFields: "Base envelope with clientSig cleared.",
1334
- buildManagementPostBody: "Spread managementSigFields then endpoint fields.",
1335
- buildPostMqttKeyBody: "POST /postMSQTTKey unsigned body (sign PEM directly).",
1336
- buildPostPreferredKeyGenBody: "POST /postPreferredKeyGen unsigned body.",
1337
- buildConfigUpdateImplementPostBody: "POST /configUpdateImplement with opaque signedMessage line.",
1338
- buildSignRequestAgreeUnsignedBody: "POST /signRequestAgree unsigned body with nodeKey.",
1339
- messageToSignManagementBody: "Canonical JSON string to sign.",
1340
- withManagementClientSig: "Attach signature to POST body.",
1341
- fetchNodeKey: "GET /getNodeKey via nodeFetchWithReadAuth.",
1342
- fetchManagementNonce: "GET nonce for Ed25519 or Ethereum management key.",
1343
- fetchPreferredKeyGen: "GET /getPreferredKeyGen for agent default KeyGen."
1344
- }
471
+ },
472
+ helpers: {
473
+ managementSigFields: "Base envelope with clientSig cleared.",
474
+ buildManagementPostBody: "Spread managementSigFields then endpoint fields.",
475
+ buildPostMqttKeyBody: "POST /postMSQTTKey unsigned body (sign PEM directly).",
476
+ buildPostPreferredKeyGenBody: "POST /postPreferredKeyGen unsigned body.",
477
+ buildConfigUpdateImplementPostBody: "POST /configUpdateImplement with opaque signedMessage line.",
478
+ buildSignRequestAgreeUnsignedBody: "POST /signRequestAgree unsigned body with nodeKey.",
479
+ messageToSignManagementBody: "Canonical JSON string to sign.",
480
+ withManagementClientSig: "Attach signature to POST body.",
481
+ fetchNodeKey: "GET /getNodeKey via nodeFetchWithReadAuth.",
482
+ fetchManagementNonce: "GET nonce for Ed25519 or Ethereum management key.",
483
+ fetchPreferredKeyGen: "GET /getPreferredKeyGen for agent default KeyGen."
484
+ }
1345
485
  };
1346
486
 
1347
487
  // src/agent/mcpMultisignSubmitMeta.ts
@@ -1484,28 +624,129 @@ function withMultisignKeySourceRefine(schema) {
1484
624
  message: "keyGenId is required for MCP agents (or pass keyGen + executorAddress + rpcUrl for manual calls).",
1485
625
  path: ["keyGenId"]
1486
626
  }
1487
- );
627
+ );
628
+ }
629
+ var multisignOutputSchema = z.object({
630
+ bodyForSign: z.record(z.unknown()).describe(
631
+ "POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs."
632
+ ),
633
+ messageToSign: z.string().describe("JSON.stringify(bodyForSign) \u2014 exact string to sign before adding clientSig."),
634
+ proposalCatalog: z.object({
635
+ payload: z.record(z.unknown()),
636
+ canonical: z.string()
637
+ }).optional().describe("Unsigned POST /proposals/create body and the canonical string to sign before the multisign is submitted.")
638
+ }).describe(
639
+ "Unsigned mpc-auth multiSignRequest payload from protocol builders (used internally before management submit)."
640
+ );
641
+ var jsonObjectSchema = z.record(z.unknown());
642
+ function parseMultisignBuilderOutput(data) {
643
+ return multisignOutputSchema.parse(data);
644
+ }
645
+
646
+ // src/protocols/evm/aave-v4/api.ts
647
+ init_defiProxy();
648
+ var COINBASE_B20_STOCK_DECIMALS = 8;
649
+ var COINBASE_B20_ASSET_PREFIX = "0xb200000000000000000000";
650
+ function isCoinbaseB20AssetToken(address) {
651
+ try {
652
+ return getAddress(address).toLowerCase().startsWith(COINBASE_B20_ASSET_PREFIX);
653
+ } catch {
654
+ return false;
655
+ }
656
+ }
657
+ function looksLikeCoinbaseStockSymbol(symbol) {
658
+ return /^[A-Za-z][A-Za-z0-9]{0,8}(?:\.[A-Za-z][A-Za-z0-9]{0,4})?c$/.test((symbol ?? "").trim());
659
+ }
660
+ var COINBASE_TOKENIZED_STOCKS_API_URL = "https://api.coinbase.com/v1/tokenized-stocks";
661
+ var CATALOG_TTL_MS = 15 * 60 * 1e3;
662
+ var CATALOG_MAX = 500;
663
+ var catalogRows = null;
664
+ var catalogAt = 0;
665
+ var catalogInflight = null;
666
+ var catalogBySymbol = /* @__PURE__ */ new Map();
667
+ var catalogByAddress = /* @__PURE__ */ new Map();
668
+ function indexCatalog(rows) {
669
+ catalogRows = rows;
670
+ catalogAt = Date.now();
671
+ catalogBySymbol.clear();
672
+ catalogByAddress.clear();
673
+ for (const row of rows) {
674
+ catalogBySymbol.set(row.symbol.toLowerCase(), row);
675
+ catalogByAddress.set(row.address.toLowerCase(), row);
676
+ }
677
+ }
678
+ function parseCoinbaseTokenizedStocksPayload(payload) {
679
+ const tokens = Array.isArray(payload) ? payload : payload && typeof payload === "object" && Array.isArray(payload.tokens) ? payload.tokens : [];
680
+ const out = [];
681
+ const seen = /* @__PURE__ */ new Set();
682
+ for (const row of tokens) {
683
+ if (!row || typeof row !== "object") continue;
684
+ const rec = row;
685
+ const symbol = typeof rec.symbol === "string" ? rec.symbol.trim() : "";
686
+ const addressRaw = typeof rec.contract_address === "string" ? rec.contract_address.trim() : "";
687
+ if (!looksLikeCoinbaseStockSymbol(symbol) || !isCoinbaseB20AssetToken(addressRaw)) continue;
688
+ const address = getAddress(addressRaw);
689
+ const key = address.toLowerCase();
690
+ if (seen.has(key)) continue;
691
+ seen.add(key);
692
+ const name = typeof rec.name === "string" && rec.name.trim() ? rec.name.trim() : symbol;
693
+ const iconUrl = typeof rec.icon_url === "string" && rec.icon_url.trim() ? rec.icon_url.trim() : void 0;
694
+ const decimals = typeof rec.decimals === "number" && Number.isInteger(rec.decimals) && rec.decimals >= 0 && rec.decimals <= 18 ? rec.decimals : COINBASE_B20_STOCK_DECIMALS;
695
+ out.push({ address, symbol, name, decimals, iconUrl });
696
+ if (out.length >= CATALOG_MAX) break;
697
+ }
698
+ return out;
699
+ }
700
+ async function fetchCoinbaseB20StockCatalog() {
701
+ const merged = [];
702
+ const seen = /* @__PURE__ */ new Set();
703
+ let pageToken = "";
704
+ for (let page = 0; page < 4; page++) {
705
+ const url = new URL(COINBASE_TOKENIZED_STOCKS_API_URL);
706
+ url.searchParams.set("page_size", "500");
707
+ if (pageToken) url.searchParams.set("page_token", pageToken);
708
+ const res = await fetch(url, { cache: "no-store", signal: AbortSignal.timeout(8e3) });
709
+ if (!res.ok) break;
710
+ const json = await res.json();
711
+ for (const row of parseCoinbaseTokenizedStocksPayload(json)) {
712
+ const key = row.address.toLowerCase();
713
+ if (seen.has(key)) continue;
714
+ seen.add(key);
715
+ merged.push(row);
716
+ if (merged.length >= CATALOG_MAX) break;
717
+ }
718
+ pageToken = typeof json.next_page_token === "string" ? json.next_page_token.trim() : "";
719
+ if (!pageToken || merged.length >= CATALOG_MAX) break;
720
+ }
721
+ if (merged.length > 0) indexCatalog(merged);
722
+ return catalogRows ?? [];
1488
723
  }
1489
- var multisignOutputSchema = z.object({
1490
- bodyForSign: z.record(z.unknown()).describe(
1491
- "POST body fields without clientSig: keyList, pubKey, msgHash, msgRaw, destinationChainID, purpose, extraJSON, proposalTxParams (batch), messageHashes/messageRawBatch when N>1 txs."
1492
- ),
1493
- messageToSign: z.string().describe("JSON.stringify(bodyForSign) \u2014 exact string to sign before adding clientSig."),
1494
- proposalCatalog: z.object({
1495
- payload: z.record(z.unknown()),
1496
- canonical: z.string()
1497
- }).optional().describe("Unsigned POST /proposals/create body and the canonical string to sign before the multisign is submitted.")
1498
- }).describe(
1499
- "Unsigned mpc-auth multiSignRequest payload from protocol builders (used internally before management submit)."
1500
- );
1501
- var jsonObjectSchema = z.record(z.unknown());
1502
- function parseMultisignBuilderOutput(data) {
1503
- return multisignOutputSchema.parse(data);
724
+ async function ensureCoinbaseB20StockCatalog() {
725
+ if (catalogRows && catalogRows.length > 0 && Date.now() - catalogAt < CATALOG_TTL_MS) return catalogRows;
726
+ if (!catalogInflight) {
727
+ catalogInflight = fetchCoinbaseB20StockCatalog().finally(() => {
728
+ catalogInflight = null;
729
+ });
730
+ }
731
+ try {
732
+ return await catalogInflight;
733
+ } catch {
734
+ return catalogRows ?? [];
735
+ }
736
+ }
737
+ function lookupCoinbaseB20StockToken(token) {
738
+ const key = (token ?? "").trim();
739
+ if (!key) return null;
740
+ const fromCatalog = catalogBySymbol.get(key.toLowerCase());
741
+ if (fromCatalog) return fromCatalog;
742
+ try {
743
+ return catalogByAddress.get(getAddress(key).toLowerCase()) ?? null;
744
+ } catch {
745
+ return null;
746
+ }
1504
747
  }
1505
748
 
1506
749
  // src/protocols/evm/aave-v4/api.ts
1507
- init_defiProxy();
1508
- init_coinbaseB20();
1509
750
  var AAVE_V4_GRAPHQL_URL = "https://api.v4.aave.com/graphql";
1510
751
  async function aaveV4Gql(query, variables) {
1511
752
  const body = { query, variables: variables ?? {} };
@@ -3056,8 +2297,132 @@ function preprocessMerklClaimInput(kind) {
3056
2297
  };
3057
2298
  }
3058
2299
 
2300
+ // src/chains/evm/chainIdParse.ts
2301
+ function parseEvmChainIdToNumber(chainId) {
2302
+ if (chainId == null) return Number.NaN;
2303
+ if (typeof chainId === "bigint") {
2304
+ const n = Number(chainId);
2305
+ return Number.isSafeInteger(n) && n >= 0 ? n : Number.NaN;
2306
+ }
2307
+ if (typeof chainId === "number") {
2308
+ return Number.isInteger(chainId) && chainId >= 0 ? chainId : Number.NaN;
2309
+ }
2310
+ const t = String(chainId).trim();
2311
+ if (!t) return Number.NaN;
2312
+ const low = t.toLowerCase();
2313
+ if (low.startsWith("eip155:")) {
2314
+ const rest = t.slice("eip155:".length).trim();
2315
+ const n = Number.parseInt(rest, 10);
2316
+ return Number.isNaN(n) || n < 0 ? Number.NaN : n;
2317
+ }
2318
+ if (low.startsWith("0x")) {
2319
+ return Number.parseInt(t, 16);
2320
+ }
2321
+ return Number.parseInt(t, 10);
2322
+ }
2323
+
2324
+ // src/protocols/evm/continuum-dao/constants.ts
2325
+ var CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
2326
+ var CONTINUUM_DAO_ETHEREUM_CHAIN_ID = 1;
2327
+ var CONTINUUM_DAO_LINEA_CHAIN_ID = 59144;
2328
+ var CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID = 59141;
2329
+ var CTM_TOKEN_NAME = "Continuum";
2330
+ var CTM_TOKEN_SYMBOL = "CTM";
2331
+ var VECTM_TOKEN_NAME = "Voting Escrow Continuum";
2332
+ var VECTM_TOKEN_SYMBOL = "veCTM";
2333
+ var CTM_TOKEN_DECIMALS = 18;
2334
+ var WEEK_SECONDS = 7 * 86400;
2335
+ var UNSET = {
2336
+ ctm: zeroAddress,
2337
+ votingEscrow: zeroAddress,
2338
+ nodeProperties: zeroAddress,
2339
+ rewards: zeroAddress,
2340
+ governor: zeroAddress
2341
+ };
2342
+ var CTM_TOKEN_ADDRESS = getAddress("0x7581696b0ED142f6534E5797baaABBb9a1b27086");
2343
+ var VOTING_ESCROW_LINEA_ADDRESS = getAddress("0x221EC90B3B083A8501A37bdeb7035CeaedF3C31f");
2344
+ getAddress("0x4ebd7cCBe32a51d1638cFE90E8eD1c4BdF42f729");
2345
+ var VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS = getAddress("0x92557d38beAe4658d3c03A02F349FFB60c3bfFA5");
2346
+ var MARKETPLACE_WETH_LINEA_ADDRESS = getAddress("0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f");
2347
+ var MARKETPLACE_USDC_LINEA_ADDRESS = getAddress("0x176211869cA2b568f2A7D4EE941E073a821EE1ff");
2348
+ var CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID = "continuum-dao-marketplace";
2349
+ var CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS = getAddress("0x76FF2CB03175900F1D83328C82D27EA9aeaF2355");
2350
+ getAddress("0x4800F9f1dC1b6daCA841B71E0531F547D374168E");
2351
+ var CONTINUUM_DAO_DEPLOYMENTS = {
2352
+ [CONTINUUM_DAO_LINEA_CHAIN_ID]: {
2353
+ ...UNSET,
2354
+ ctm: CTM_TOKEN_ADDRESS,
2355
+ votingEscrow: VOTING_ESCROW_LINEA_ADDRESS,
2356
+ governor: CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS
2357
+ },
2358
+ [CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID]: { ...UNSET },
2359
+ [CONTINUUM_DAO_ETHEREUM_CHAIN_ID]: {
2360
+ ...UNSET,
2361
+ ctm: CTM_TOKEN_ADDRESS
2362
+ }
2363
+ };
2364
+ function isConfiguredAddress(addr2) {
2365
+ if (!addr2?.trim()) return false;
2366
+ try {
2367
+ return getAddress(addr2) !== zeroAddress;
2368
+ } catch {
2369
+ return false;
2370
+ }
2371
+ }
2372
+ function continuumDaoDeployment(chainId) {
2373
+ return CONTINUUM_DAO_DEPLOYMENTS[chainId] ?? null;
2374
+ }
2375
+ function isContinuumDaoLockChain(chainId) {
2376
+ return chainId === CONTINUUM_DAO_LINEA_CHAIN_ID || chainId === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID;
2377
+ }
2378
+ function isContinuumDaoSupportedChainId(chainId) {
2379
+ return continuumDaoDeployment(chainId) != null;
2380
+ }
2381
+ function ctmTokenAddressOnEvmChain(chainId) {
2382
+ const ctm = continuumDaoDeployment(chainId)?.ctm;
2383
+ return ctm && isConfiguredAddress(ctm) ? getAddress(ctm) : null;
2384
+ }
2385
+ function votingEscrowAddressOnEvmChain(chainId) {
2386
+ const ve = continuumDaoDeployment(chainId)?.votingEscrow;
2387
+ return ve && isConfiguredAddress(ve) ? getAddress(ve) : null;
2388
+ }
2389
+ function votingEscrowMarketplaceAddressOnEvmChain(chainId) {
2390
+ if (chainId !== CONTINUUM_DAO_LINEA_CHAIN_ID) return null;
2391
+ return VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS;
2392
+ }
2393
+ function listContinuumDaoDefaultAssets() {
2394
+ const out = [];
2395
+ for (const chainId of [
2396
+ CONTINUUM_DAO_LINEA_CHAIN_ID,
2397
+ CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID,
2398
+ CONTINUUM_DAO_ETHEREUM_CHAIN_ID
2399
+ ]) {
2400
+ const dep = continuumDaoDeployment(chainId);
2401
+ if (!dep) continue;
2402
+ if (isConfiguredAddress(dep.ctm)) {
2403
+ out.push({
2404
+ chainId,
2405
+ tokenType: "CTMERC20",
2406
+ contractAddress: getAddress(dep.ctm),
2407
+ name: CTM_TOKEN_NAME,
2408
+ symbol: CTM_TOKEN_SYMBOL,
2409
+ decimals: CTM_TOKEN_DECIMALS
2410
+ });
2411
+ }
2412
+ if (isContinuumDaoLockChain(chainId) && isConfiguredAddress(dep.votingEscrow)) {
2413
+ out.push({
2414
+ chainId,
2415
+ tokenType: "ERC721",
2416
+ contractAddress: getAddress(dep.votingEscrow),
2417
+ name: VECTM_TOKEN_NAME,
2418
+ symbol: VECTM_TOKEN_SYMBOL
2419
+ });
2420
+ }
2421
+ }
2422
+ return out;
2423
+ }
2424
+
3059
2425
  // src/protocols/evm/continuum-dao/purpose.ts
3060
- init_constants();
3061
2426
  function chainParts(chainId) {
3062
2427
  const n = typeof chainId === "number" ? chainId : Number.parseInt(String(chainId ?? "").trim(), 10);
3063
2428
  const id = Number.isFinite(n) ? n : 0;
@@ -7813,7 +7178,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
7813
7178
  actionId: "continuum-dao.propose-bravo",
7814
7179
  protocolId: "continuum-dao",
7815
7180
  chainCategory: "evm",
7816
- description: "Build ContinuumDAO.propose for a Bravo (For/Against/Abstain) proposal and POST /proposals/create (pendingOnChain) before the multi-sign request is submitted. Requires description and type (0\u20134) matching the forum section. Each action input requires a name. Refuses if getVotes(KeyGen) < live proposalThreshold(), the forum section does not match type, or propose() reverts. forumKey must be a Governance thread from ctm_continuum_dao_forum_create_topic. Ideas threads and the homepage are refused. Empty actions insert a no-op to the KeyGen address. Linea only. No billing legs. register_proposal retries the catalog write and, on 409, updates the existing row instead of creating a second proposal.",
7181
+ description: "Build ContinuumDAO.propose for a Bravo (For/Against/Abstain) proposal and POST /proposals/create (pendingOnChain) before the multi-sign request is submitted. Requires description and type (0\u20134) matching the forum section. Each action input requires a name. Refuses if getVotes(KeyGen) < live proposalThreshold(), the forum section does not match type, or propose() reverts. forumKey must be a Governance thread from ctm_continuum_dao_forum_create_topic. Ideas threads and the homepage are refused. The catalog POST stores forumKey as the path from / with no leading slash (topic/52/slug). Empty actions insert a no-op to the KeyGen address. Linea only. No billing legs. register_proposal retries the catalog write and, on 409, updates the existing row instead of creating a second proposal.",
7817
7182
  prerequisites: [
7818
7183
  "keyGen",
7819
7184
  "Linea RPC",
@@ -7831,7 +7196,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
7831
7196
  actionId: "continuum-dao.propose-delta",
7832
7197
  protocolId: "continuum-dao",
7833
7198
  chainCategory: "evm",
7834
- description: "Build ContinuumDAO.propose for a Delta multi-option proposal and POST /proposals/create (pendingOnChain) before the multi-sign request is submitted. Requires description and type (0\u20134) matching the forum section. Each action input requires a name. Refuses if getVotes(KeyGen) < live proposalThreshold(), the forum section does not match type, or propose() reverts. forumKey must be a Governance thread from ctm_continuum_dao_forum_create_topic. Empty options get a no-op so indices increment. Linea only. No billing legs. register_proposal retries the catalog write and, on 409, updates the existing row instead of creating a second proposal.",
7199
+ description: "Build ContinuumDAO.propose for a Delta multi-option proposal and POST /proposals/create (pendingOnChain) before the multi-sign request is submitted. Requires description and type (0\u20134) matching the forum section. Each action input requires a name. Refuses if getVotes(KeyGen) < live proposalThreshold(), the forum section does not match type, or propose() reverts. forumKey must be a Governance thread from ctm_continuum_dao_forum_create_topic. The catalog POST stores forumKey as the path from / with no leading slash (topic/52/slug). Empty options get a no-op so indices increment. Linea only. No billing legs. register_proposal retries the catalog write and, on 409, updates the existing row instead of creating a second proposal.",
7835
7200
  prerequisites: [
7836
7201
  "keyGen",
7837
7202
  "at least 2 options",
@@ -10139,7 +9504,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
10139
9504
  actionId: "continuum-dao.register-proposal",
10140
9505
  protocolId: "continuum-dao",
10141
9506
  chainCategory: "evm",
10142
- description: "Retry the catalog write when propose did not leave a row. POST /proposals/create, and on 409 POST /proposals/repair to update title, description, forumKey, type, and actions or option labels and actions on the existing onchainId. Each action input requires a name. A Delta repair must use the on-chain nOptions and nWinners. Does not create a second proposal and does not revert a chain tx. The node signs with Ed25519.",
9507
+ description: "Retry the catalog write when propose did not leave a row. POST /proposals/create, and on 409 POST /proposals/repair to update title, description, forumKey, type, and actions or option labels and actions on the existing onchainId. Pass the full topic URL as forumKey; the POST stores the path from / with no leading slash (topic/52/slug). Each action input requires a name. A Delta repair must use the on-chain nOptions and nWinners. Does not create a second proposal and does not revert a chain tx. The node signs with Ed25519.",
10143
9508
  prerequisites: ["onchainId from hashProposal or ProposalCreated", "title", "proposer", "forumKey", "type", "configuration"],
10144
9509
  followUp: [],
10145
9510
  handler: { importPath: "protocols/evm/continuum-dao", exportName: "continuumDaoRegisterProposal" },
@@ -11429,269 +10794,247 @@ function getAgentCatalogForMcp() {
11429
10794
  }
11430
10795
  };
11431
10796
  }
11432
- var LIDO_STETH_CONTRACT_MAINNET = getAddress(
11433
- "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84"
11434
- );
11435
- var LIDO_WSTETH_CONTRACT_MAINNET = getAddress(
11436
- "0x7f39C581F595B853cBbF37C12FfeeA971C5a5bEa"
11437
- );
11438
- getAddress("0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1");
11439
- var LIDO_ETHEREUM_MAINNET_CHAIN_ID = 1;
11440
- var LIDO_ROBINHOOD_CHAIN_ID = 4663;
11441
- var LIDO_WSTETH_ROBINHOOD = getAddress("0x2dC99af320BC317c567f24eE95811dcbd5983DfD");
11442
- function listLidoSupportedChainIds() {
11443
- return [LIDO_ETHEREUM_MAINNET_CHAIN_ID, LIDO_ROBINHOOD_CHAIN_ID];
10797
+
10798
+ // src/agent/protocol-manifest.ts
10799
+ var PROTOCOL_MANIFEST = [
10800
+ { id: "uniswap-v4", chainCategory: "evm", importPath: "protocols/evm/uniswap-v4", catalogKey: "uniswapV4" },
10801
+ { id: "curve-dao", chainCategory: "evm", importPath: "protocols/evm/curve-dao", catalogKey: "curveDao" },
10802
+ { id: "lido", chainCategory: "evm", importPath: "protocols/evm/lido", catalogKey: "lido" },
10803
+ { id: "railgun", chainCategory: "evm", importPath: "protocols/evm/railgun", catalogKey: "railgun" },
10804
+ { id: "ethena", chainCategory: "evm", importPath: "protocols/evm/ethena", catalogKey: "ethena" },
10805
+ { id: "maple-syrup", chainCategory: "evm", importPath: "protocols/evm/maple", catalogKey: "maple" },
10806
+ { id: "sky", chainCategory: "evm", importPath: "protocols/evm/sky", catalogKey: "sky" },
10807
+ { id: "aave-v4", chainCategory: "evm", importPath: "protocols/evm/aave-v4", catalogKey: "aaveV4" },
10808
+ { id: "euler-v2", chainCategory: "evm", importPath: "protocols/evm/euler-v2", catalogKey: "eulerV2" },
10809
+ { id: "gmx", chainCategory: "evm", importPath: "protocols/evm/gmx", catalogKey: "gmx" },
10810
+ { id: "hyperliquid", chainCategory: "evm", importPath: "protocols/evm/hyperliquid", catalogKey: "hyperliquid" },
10811
+ { id: "arcus", chainCategory: "evm", importPath: "protocols/evm/arcus", catalogKey: "arcus" },
10812
+ { id: "morpho", chainCategory: "evm", importPath: "protocols/evm/morpho", catalogKey: "morpho" },
10813
+ { id: "circle-cctp", chainCategory: "evm", importPath: "protocols/evm/circle-cctp", catalogKey: "circleCctp" },
10814
+ { id: "venice", chainCategory: "evm", importPath: "protocols/evm/venice", catalogKey: "venice" },
10815
+ { id: "aerodrome", chainCategory: "evm", importPath: "protocols/evm/aerodrome", catalogKey: "aerodrome" },
10816
+ { id: "continuum-dao", chainCategory: "evm", importPath: "protocols/evm/continuum-dao", catalogKey: "continuumDao" },
10817
+ { id: "continuum-dao-marketplace", chainCategory: "evm", importPath: "protocols/evm/continuum-dao", catalogKey: "continuumDaoMarketplace" },
10818
+ { id: "compound-v3", chainCategory: "evm", importPath: "protocols/evm/compound-v3", catalogKey: "compoundV3" },
10819
+ { id: "pendle", chainCategory: "evm", importPath: "protocols/evm/pendle", catalogKey: "pendle" },
10820
+ { id: "derive", chainCategory: "evm", importPath: "protocols/evm/derive", catalogKey: "derive" },
10821
+ { id: "trueo", chainCategory: "evm", importPath: "protocols/evm/trueo", catalogKey: "trueo" },
10822
+ { id: "hyperliquidOutcome", chainCategory: "evm", importPath: "protocols/evm/hyperliquidOutcome", catalogKey: "hyperliquidOutcome" }
10823
+ ];
10824
+ var byId = new Map(PROTOCOL_MANIFEST.map((entry) => [entry.id, entry]));
10825
+ function protocolManifestEntry(id) {
10826
+ return byId.get(id);
10827
+ }
10828
+ var skillsDir = join(dirname(fileURLToPath(import.meta.url)), "skills");
10829
+ var SKILL_PROTOCOL_IDS = [
10830
+ "aave-v4",
10831
+ "lido",
10832
+ "railgun",
10833
+ "uniswap-v4",
10834
+ "curve-dao",
10835
+ "ethena",
10836
+ "euler-v2",
10837
+ "maple-syrup",
10838
+ "sky",
10839
+ "gmx",
10840
+ "hyperliquid",
10841
+ "arcus",
10842
+ "morpho",
10843
+ "circle-cctp",
10844
+ "aerodrome",
10845
+ "pendle",
10846
+ "continuum-dao",
10847
+ "continuum-dao-marketplace",
10848
+ "compound-v3",
10849
+ "derive",
10850
+ "trueo",
10851
+ "hyperliquidOutcome",
10852
+ "yield-compare"
10853
+ ];
10854
+ function getToolsForProtocol(protocolId) {
10855
+ return MCP_TOOL_DEFINITIONS.filter((t) => t.protocolId === protocolId);
11444
10856
  }
11445
- function isLidoSupportedChainId(chainId) {
11446
- return chainId === LIDO_ETHEREUM_MAINNET_CHAIN_ID || chainId === LIDO_ROBINHOOD_CHAIN_ID;
10857
+ function readSharedMultisignMcpGasSection() {
10858
+ try {
10859
+ return readFileSync(join(skillsDir, "_shared", "multisign-mcp-gas.md"), "utf8").trim();
10860
+ } catch {
10861
+ return "";
10862
+ }
11447
10863
  }
11448
-
11449
- // src/protocols/evm/lido/index.ts
11450
- var LIDO_PROTOCOL_ID = "lido";
11451
- var lidoProtocolModule = {
11452
- id: LIDO_PROTOCOL_ID,
11453
- chainCategory: "evm",
11454
- isChainSupported(ctx) {
11455
- if (ctx.chainCategory !== "evm") return false;
11456
- return isLidoSupportedChainId(Number(ctx.chainId));
11457
- },
11458
- isTokenSupported(token) {
11459
- return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
11460
- },
11461
- actions: [
11462
- { id: "lido.submit", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Stake ETH via Lido submit()", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { valueWei: { type: "string", required: true, description: "ETH to stake (wei string)" } } },
11463
- { id: "lido.request-withdrawals", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Queue stETH withdrawal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11464
- { id: "lido.claim-withdrawal", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Claim finalized withdrawal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11465
- { id: "lido.wrap-steth", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Wrap stETH to wstETH", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11466
- { id: "lido.unwrap-wsteth", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Unwrap wstETH to stETH", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
11467
- ]
11468
- };
11469
- registerProtocolModule(lidoProtocolModule);
11470
-
11471
- // src/protocols/evm/railgun/networks.ts
11472
- function selectRailgunNetworks(config) {
11473
- const rows = [];
11474
- for (const entry of Object.values(config)) {
11475
- if (!entry || entry.deprecated || entry.isDevOnlyNetwork) continue;
11476
- const chainId = Number(entry.chain?.id);
11477
- const proxyContract = String(entry.proxyContract ?? "").trim();
11478
- const wrappedAddress = String(entry.baseToken?.wrappedAddress ?? "").trim();
11479
- if (!Number.isFinite(chainId) || chainId <= 0 || !proxyContract || !wrappedAddress) continue;
11480
- rows.push({
11481
- chainId,
11482
- networkName: String(entry.name ?? ""),
11483
- publicName: String(entry.publicName ?? entry.name ?? ""),
11484
- proxyContract,
11485
- deploymentBlock: Number(entry.deploymentBlock ?? 0),
11486
- wrappedAddress,
11487
- wrappedSymbol: String(entry.baseToken?.wrappedSymbol ?? entry.baseToken?.symbol ?? ""),
11488
- wrappedDecimals: Number(entry.baseToken?.decimals ?? 18),
11489
- isTestnet: Boolean(entry.isTestnet)
11490
- });
10864
+ function getProtocolSkill(protocolId) {
10865
+ if (!SKILL_PROTOCOL_IDS.includes(protocolId)) {
10866
+ return void 0;
10867
+ }
10868
+ try {
10869
+ const skill = readFileSync(join(skillsDir, protocolId, "SKILL.md"), "utf8").trim();
10870
+ const shared = readSharedMultisignMcpGasSection();
10871
+ if (!shared) return skill;
10872
+ if (skill.includes("## Gas and MCP submit")) return skill;
10873
+ return `${skill}
10874
+
10875
+ ${shared}
10876
+ `;
10877
+ } catch {
10878
+ return void 0;
11491
10879
  }
11492
- rows.sort((a, b) => a.chainId - b.chainId);
11493
- return rows;
11494
- }
11495
- var cached = null;
11496
- async function loadRailgunNetworks() {
11497
- if (cached) return cached;
11498
- const mod = await import('@railgun-community/shared-models');
11499
- cached = selectRailgunNetworks(mod.NETWORK_CONFIG);
11500
- return cached;
11501
10880
  }
11502
- async function loadRailgunSupportedChainIds() {
11503
- const rows = await loadRailgunNetworks();
11504
- return new Set(rows.map((row) => row.chainId));
10881
+ function listProtocolsWithSkills() {
10882
+ return [...SKILL_PROTOCOL_IDS];
11505
10883
  }
11506
- async function railgunNetworkByChainId(chainId) {
11507
- const rows = await loadRailgunNetworks();
11508
- return rows.find((row) => row.chainId === chainId);
10884
+ function getProtocolDiscoverySummary(protocolId) {
10885
+ const mod = getProtocolModules().find((p) => p.id === protocolId);
10886
+ if (!mod) return void 0;
10887
+ return {
10888
+ protocolId: mod.id,
10889
+ chainCategory: mod.chainCategory,
10890
+ actions: mod.actions.map((a) => ({ id: a.id, description: a.description })),
10891
+ tools: getToolsForProtocol(protocolId).map((t) => ({
10892
+ name: t.name,
10893
+ actionId: t.actionId,
10894
+ description: t.description,
10895
+ prerequisites: t.prerequisites,
10896
+ followUp: t.followUp
10897
+ }))
10898
+ };
11509
10899
  }
11510
10900
 
11511
- // src/protocols/evm/railgun/popular-assets.ts
11512
- init_constants();
11513
- var RAILGUN_POPULAR_ASSET_LIMIT = 5;
11514
- var POPULAR_ASSET_CACHE_MS = 10 * 60 * 1e3;
11515
- var RECENT_SHIELD_LIMIT = 200;
11516
- var SHIELD_INDEX_BY_NETWORK_NAME = {
11517
- Ethereum: "https://rail-squid.squids.live/squid-railgun-ethereum-v2/graphql",
11518
- BNB_Chain: "https://rail-squid.squids.live/squid-railgun-bsc-v2/graphql",
11519
- Polygon: "https://rail-squid.squids.live/squid-railgun-polygon-v2/graphql",
11520
- Arbitrum: "https://rail-squid.squids.live/squid-railgun-arbitrum-v2/graphql"
11521
- };
11522
- var RECENT_SHIELDS_QUERY = `query RecentShields($limit: Int!) {
11523
- shieldCommitments(orderBy: [blockNumber_DESC], limit: $limit) {
11524
- preimage { token { tokenType tokenAddress } }
11525
- }
11526
- }`;
11527
- var cache = /* @__PURE__ */ new Map();
11528
- function rankPopularShieldTokens(rows, limit = RAILGUN_POPULAR_ASSET_LIMIT) {
11529
- const counts = /* @__PURE__ */ new Map();
11530
- for (const row of rows) {
11531
- if (Number(row.tokenType) !== 0) continue;
11532
- let address;
10901
+ // src/protocols/evm/curve-dao/support.ts
10902
+ var CURVE_FULL_NETWORK_CONSTANTS_CHAIN_IDS = /* @__PURE__ */ new Set([
10903
+ 1,
10904
+ 10,
10905
+ 56,
10906
+ 100,
10907
+ 137,
10908
+ 146,
10909
+ 196,
10910
+ 250,
10911
+ 252,
10912
+ 324,
10913
+ 999,
10914
+ 1284,
10915
+ 2222,
10916
+ 5e3,
10917
+ 8453,
10918
+ 42161,
10919
+ 42220,
10920
+ 43114,
10921
+ 1313161554
10922
+ ]);
10923
+ function isCurveApiChainSupported(chainId) {
10924
+ const n = parseEvmChainIdToNumber(chainId);
10925
+ if (Number.isNaN(n) || n < 0) return false;
10926
+ return CURVE_FULL_NETWORK_CONSTANTS_CHAIN_IDS.has(n);
10927
+ }
10928
+ var CURVE_NATIVE_PLACEHOLDER = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
10929
+ var ETH_PLACEHOLDER = CURVE_NATIVE_PLACEHOLDER;
10930
+ function normalizeAddr(a) {
10931
+ return a.toLowerCase();
10932
+ }
10933
+ function addEdge(adj, a, b) {
10934
+ if (a === b) return;
10935
+ if (!adj.has(a)) adj.set(a, /* @__PURE__ */ new Set());
10936
+ if (!adj.has(b)) adj.set(b, /* @__PURE__ */ new Set());
10937
+ adj.get(a).add(b);
10938
+ adj.get(b).add(a);
10939
+ }
10940
+ function buildCurveLiquidityGraphFromApi(curve) {
10941
+ const adj = /* @__PURE__ */ new Map();
10942
+ for (const id of curve.getPoolList()) {
11533
10943
  try {
11534
- address = getAddress(row.tokenAddress);
10944
+ const pool = curve.getPool(id);
10945
+ const w = (pool.wrappedCoinAddresses ?? []).map(normalizeAddr);
10946
+ const u = (pool.underlyingCoinAddresses ?? []).map(normalizeAddr);
10947
+ const all = [.../* @__PURE__ */ new Set([...w, ...u])];
10948
+ for (let i = 0; i < all.length; i++) {
10949
+ for (let j = i + 1; j < all.length; j++) {
10950
+ addEdge(adj, all[i], all[j]);
10951
+ }
10952
+ }
11535
10953
  } catch {
11536
- continue;
11537
10954
  }
11538
- if (address === zeroAddress) continue;
11539
- const key = address.toLowerCase();
11540
- counts.set(key, (counts.get(key) ?? 0) + 1);
11541
10955
  }
11542
- return [...counts.entries()].sort((a, b) => b[1] - a[1] || (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0)).slice(0, limit).map(([address]) => getAddress(address));
11543
- }
11544
- function shieldIndexEndpoint(networkName) {
11545
- return SHIELD_INDEX_BY_NETWORK_NAME[networkName] ?? null;
11546
- }
11547
- function commitmentsFromShieldIndex(payload) {
11548
- const rows = payload?.data?.shieldCommitments;
11549
- if (!Array.isArray(rows)) return [];
11550
- return rows.map((row) => {
11551
- const token = row?.preimage?.token;
11552
- const tokenType = token?.tokenType === "ERC20" || token?.tokenType === 0 ? 0 : Number(token?.tokenType ?? -1);
11553
- return {
11554
- tokenAddress: String(token?.tokenAddress ?? ""),
11555
- tokenType: Number.isFinite(tokenType) ? tokenType : -1
11556
- };
11557
- });
10956
+ return adj;
11558
10957
  }
11559
- var shieldLogReaderOverride = null;
11560
- async function readShieldCommitments(args) {
11561
- const endpoint = shieldIndexEndpoint(args.networkName);
11562
- if (!endpoint) return [];
11563
- const response = await fetch(endpoint, {
11564
- method: "POST",
11565
- headers: { "content-type": "application/json" },
11566
- body: JSON.stringify({
11567
- query: RECENT_SHIELDS_QUERY,
11568
- variables: { limit: RECENT_SHIELD_LIMIT }
11569
- })
11570
- });
11571
- if (!response.ok) throw new Error(`Railgun shield index returned ${response.status}`);
11572
- return commitmentsFromShieldIndex(await response.json());
10958
+ function addNativeWethBridge(adj, wrappedNative) {
10959
+ if (!wrappedNative) return;
10960
+ const w = wrappedNative.toLowerCase();
10961
+ const a = ETH_PLACEHOLDER;
10962
+ const b = w;
10963
+ if (a === b) return;
10964
+ if (!adj.has(a)) adj.set(a, /* @__PURE__ */ new Set());
10965
+ if (!adj.has(b)) adj.set(b, /* @__PURE__ */ new Set());
10966
+ adj.get(a).add(b);
10967
+ adj.get(b).add(a);
11573
10968
  }
11574
- function applyContinuumToken(chainId, result) {
11575
- const ctm = ctmTokenAddressOnEvmChain(chainId);
11576
- if (!ctm) return result;
11577
- const present = result.tokens.some((token) => token.address.toLowerCase() === ctm.toLowerCase());
11578
- {
11579
- if (!present) return result;
11580
- return {
11581
- ...result,
11582
- tokens: result.tokens.filter((token) => token.address.toLowerCase() !== ctm.toLowerCase())
11583
- };
10969
+ function swappableCurveGraphNodeKeys(adj) {
10970
+ const out = /* @__PURE__ */ new Set();
10971
+ for (const [k, neigh] of adj) {
10972
+ if (neigh.size > 0) out.add(k);
11584
10973
  }
10974
+ return out;
11585
10975
  }
11586
- async function loadRailgunPopularAssets(args) {
11587
- const network = await railgunNetworkByChainId(args.chainId);
11588
- if (!network) {
11589
- return { tokens: [], notes: "Railgun is not deployed on this chain." };
10976
+
10977
+ // src/protocols/evm/curve-dao/apiSession.ts
10978
+ var CURVE_SESSION_CACHE_TTL_MS = 5 * 60 * 1e3;
10979
+ var curveSessionCache = /* @__PURE__ */ new Map();
10980
+ async function fetchAllCurvePools(curve) {
10981
+ const run = (p) => p.catch(() => void 0);
10982
+ const tasks = [];
10983
+ for (const key of [
10984
+ "factory",
10985
+ "crvUSDFactory",
10986
+ "EYWAFactory",
10987
+ "cryptoFactory",
10988
+ "twocryptoFactory",
10989
+ "tricryptoFactory",
10990
+ "stableNgFactory"
10991
+ ]) {
10992
+ const f = curve[key];
10993
+ if (f?.fetchPools) {
10994
+ tasks.push(run(f.fetchPools()));
10995
+ }
11590
10996
  }
11591
- const cached3 = cache.get(args.chainId);
11592
- if (cached3 && Date.now() - cached3.at < POPULAR_ASSET_CACHE_MS) {
11593
- return applyContinuumToken(args.chainId, {
11594
- tokens: cached3.tokens,
11595
- nativeWrapped: cached3.nativeWrapped,
11596
- notes: cached3.notes
11597
- });
10997
+ await Promise.all(tasks);
10998
+ }
10999
+ async function loadFullCurveSessionForRpc(rpcUrl) {
11000
+ const url = (rpcUrl ?? "").trim();
11001
+ if (!url) {
11002
+ throw new Error("rpcUrl is required.");
11598
11003
  }
11599
- const rpcUrl = args.rpcUrl?.trim() ?? "";
11600
- if (!shieldIndexEndpoint(network.networkName) && !shieldLogReaderOverride) {
11601
- return applyContinuumToken(args.chainId, {
11602
- tokens: [],
11603
- nativeWrapped: network.wrappedAddress,
11604
- notes: "This chain has no indexed Railgun shield feed."
11605
- });
11004
+ const cached3 = curveSessionCache.get(url);
11005
+ if (cached3 && cached3.expiresAt > Date.now()) {
11006
+ return cached3.session;
11606
11007
  }
11607
11008
  try {
11608
- const commitments = await (shieldLogReaderOverride ?? readShieldCommitments)({
11609
- rpcUrl,
11610
- chainId: args.chainId,
11611
- proxy: getAddress(network.proxyContract),
11612
- deploymentBlock: network.deploymentBlock,
11613
- networkName: network.networkName
11614
- });
11615
- const tokens = rankPopularShieldTokens(commitments).map((address) => ({ address }));
11616
- const notes = tokens.length === 0 ? "No recent ERC-20 shields were returned for this chain." : `Top ${tokens.length} ERC-20s by recent indexed shield count.`;
11617
- const entry = {
11618
- at: Date.now(),
11619
- tokens,
11620
- nativeWrapped: network.wrappedAddress,
11621
- notes
11009
+ const { default: curve } = await import('@curvefi/api');
11010
+ await curve.init("JsonRpc", { url }, {});
11011
+ const wrapped = curve.getNetworkConstants().NATIVE_COIN?.wrappedAddress;
11012
+ if (!curve.hasRouter || !curve.hasRouter()) {
11013
+ const session2 = {
11014
+ curve,
11015
+ adj: /* @__PURE__ */ new Map(),
11016
+ swappableNodeKeys: /* @__PURE__ */ new Set(),
11017
+ wrappedNative: wrapped
11018
+ };
11019
+ curveSessionCache.set(url, { session: session2, expiresAt: Date.now() + CURVE_SESSION_CACHE_TTL_MS });
11020
+ return session2;
11021
+ }
11022
+ await fetchAllCurvePools(curve);
11023
+ const adj = buildCurveLiquidityGraphFromApi(curve);
11024
+ addNativeWethBridge(adj, wrapped);
11025
+ const session = {
11026
+ curve,
11027
+ adj,
11028
+ swappableNodeKeys: swappableCurveGraphNodeKeys(adj),
11029
+ wrappedNative: wrapped
11622
11030
  };
11623
- cache.set(args.chainId, entry);
11624
- return applyContinuumToken(args.chainId, { tokens, nativeWrapped: network.wrappedAddress, notes });
11625
- } catch {
11626
- return applyContinuumToken(args.chainId, {
11627
- tokens: [],
11628
- nativeWrapped: network.wrappedAddress,
11629
- notes: "The Railgun shield index could not be read."
11630
- });
11031
+ curveSessionCache.set(url, { session, expiresAt: Date.now() + CURVE_SESSION_CACHE_TTL_MS });
11032
+ return session;
11033
+ } catch (e) {
11034
+ const msg = e instanceof Error ? e.message : String(e);
11035
+ throw new Error(`Curve session init failed for RPC: ${msg}`);
11631
11036
  }
11632
11037
  }
11633
-
11634
- // src/protocols/evm/railgun/index.ts
11635
- var RAILGUN_PROTOCOL_ID = "railgun";
11636
- var railgunProtocolModule = {
11637
- id: RAILGUN_PROTOCOL_ID,
11638
- chainCategory: "evm",
11639
- isChainSupported(ctx) {
11640
- if (ctx.chainCategory !== "evm") return false;
11641
- return loadRailgunSupportedChainIds().then((ids) => ids.has(Number(ctx.chainId)));
11642
- },
11643
- isTokenSupported(token) {
11644
- return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
11645
- },
11646
- actions: [
11647
- {
11648
- id: "railgun.shield",
11649
- protocolId: RAILGUN_PROTOCOL_ID,
11650
- chainCategory: "evm",
11651
- description: "Shield an ERC-20 into a Railgun 0zk address",
11652
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
11653
- params: {
11654
- tokenAddress: { type: "string", required: true, description: "ERC-20 to shield" },
11655
- amountWei: { type: "string", required: true, description: "Amount in wei" },
11656
- railgunAddress: { type: "string", required: true, description: "Recipient 0zk address" }
11657
- }
11658
- },
11659
- {
11660
- id: "railgun.private-transfer",
11661
- protocolId: RAILGUN_PROTOCOL_ID,
11662
- chainCategory: "evm",
11663
- description: "Private transfer from the unlocked Railgun wallet",
11664
- commonParams: ["purposeText"],
11665
- params: {
11666
- tokenAddress: { type: "string", required: true, description: "Shielded ERC-20" },
11667
- amountWei: { type: "string", required: true, description: "Amount in wei" },
11668
- recipientAddress: {
11669
- type: "string",
11670
- required: false,
11671
- description: "Recipient 0zk address. Omit when toContactName is set."
11672
- },
11673
- toContactName: {
11674
- type: "string",
11675
- required: false,
11676
- description: "Address-book contact name. Uses that contact\u2019s saved 0zk address, not their Ethereum address."
11677
- }
11678
- }
11679
- },
11680
- {
11681
- id: "railgun.unshield",
11682
- protocolId: RAILGUN_PROTOCOL_ID,
11683
- chainCategory: "evm",
11684
- description: "Unshield from the unlocked Railgun wallet to a public address",
11685
- commonParams: ["purposeText"],
11686
- params: {
11687
- tokenAddress: { type: "string", required: true, description: "Shielded ERC-20" },
11688
- amountWei: { type: "string", required: true, description: "Amount in wei" },
11689
- recipientAddress: { type: "string", required: true, description: "Public recipient" }
11690
- }
11691
- }
11692
- ]
11693
- };
11694
- registerProtocolModule(railgunProtocolModule);
11695
11038
  var USDE_ETHEREUM_MAINNET = "0x4c9edd5852cd905f086c759e8383e09bff1e68b3";
11696
11039
  var SUSDE_ETHEREUM_MAINNET = "0x9d39a5de30e57443bff2a8307a4256c8797a3497";
11697
11040
  var USDE_MOST_L2S = "0x5d3a1Ff2b6BAb83b63cd9AD0787074081a52ef34";
@@ -11800,352 +11143,286 @@ function listEthenaUsdeEvmNetworkRows() {
11800
11143
  function isEvmChainInEthenaUsdeList(chainId) {
11801
11144
  return usdeTokenAddressOnEvmChain(chainId) != null;
11802
11145
  }
11803
-
11804
- // src/protocols/evm/ethena/index.ts
11805
- var ETHENA_PROTOCOL_ID = "ethena";
11806
- var ethenaProtocolModule = {
11807
- id: ETHENA_PROTOCOL_ID,
11808
- chainCategory: "evm",
11809
- isChainSupported(ctx) {
11810
- if (ctx.chainCategory !== "evm") return false;
11811
- const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
11812
- return isEvmChainInEthenaUsdeList(n);
11813
- },
11814
- isTokenSupported(token) {
11815
- return token.category === "evm" && token.kind === "erc20";
11816
- },
11817
- actions: [
11818
- { id: "ethena.stake-usde", protocolId: ETHENA_PROTOCOL_ID, chainCategory: "evm", description: "Stake USDe \u2192 sUSDe", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { amountHuman: { type: "string", required: true, description: "USDe amount" } } },
11819
- { id: "ethena.redeem-susde", protocolId: ETHENA_PROTOCOL_ID, chainCategory: "evm", description: "Redeem sUSDe \u2192 USDe (no cooldown)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11820
- { id: "ethena.cooldown-shares", protocolId: ETHENA_PROTOCOL_ID, chainCategory: "evm", description: "Start sUSDe cooldown", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11821
- { id: "ethena.claim-unstake", protocolId: ETHENA_PROTOCOL_ID, chainCategory: "evm", description: "Claim after cooldown", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
11822
- ]
11823
- };
11824
- registerProtocolModule(ethenaProtocolModule);
11825
-
11826
- // src/protocols/evm/maple/constants.ts
11827
- function isMapleSyrupSupportedChain(chainId) {
11828
- return chainId === 1 || chainId === 11155111;
11829
- }
11830
- function matchesAssetFilter(opts) {
11831
- const f = (opts.filter ?? "").trim();
11832
- if (!f) return true;
11833
- const addr2 = (opts.address ?? "").trim();
11834
- if (isAddress(f) && isAddress(addr2)) {
11835
- return getAddress(addr2) === getAddress(f);
11836
- }
11837
- const sym = (opts.symbol ?? "").trim();
11838
- if (!sym) return false;
11839
- return sym.toLowerCase() === f.toLowerCase();
11146
+ var LIDO_STETH_CONTRACT_MAINNET = getAddress(
11147
+ "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84"
11148
+ );
11149
+ var LIDO_WSTETH_CONTRACT_MAINNET = getAddress(
11150
+ "0x7f39C581F595B853cBbF37C12FfeeA971C5a5bEa"
11151
+ );
11152
+ getAddress("0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1");
11153
+ var LIDO_ETHEREUM_MAINNET_CHAIN_ID = 1;
11154
+ var LIDO_ROBINHOOD_CHAIN_ID = 4663;
11155
+ var LIDO_WSTETH_ROBINHOOD = getAddress("0x2dC99af320BC317c567f24eE95811dcbd5983DfD");
11156
+ function listLidoSupportedChainIds() {
11157
+ return [LIDO_ETHEREUM_MAINNET_CHAIN_ID, LIDO_ROBINHOOD_CHAIN_ID];
11840
11158
  }
11841
11159
 
11842
- // src/protocols/evm/maple/index.ts
11843
- var MAPLE_PROTOCOL_ID = "maple-syrup";
11844
- var mapleProtocolModule = {
11845
- id: MAPLE_PROTOCOL_ID,
11846
- chainCategory: "evm",
11847
- isChainSupported(ctx) {
11848
- if (ctx.chainCategory !== "evm") return false;
11849
- const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
11850
- return isMapleSyrupSupportedChain(n);
11851
- },
11852
- isTokenSupported(token) {
11853
- return token.category === "evm" && token.kind === "erc20";
11854
- },
11855
- actions: [
11856
- { id: "maple-syrup.deposit", protocolId: MAPLE_PROTOCOL_ID, chainCategory: "evm", description: "Deposit into Maple Syrup pool", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11857
- { id: "maple-syrup.request-redeem", protocolId: MAPLE_PROTOCOL_ID, chainCategory: "evm", description: "Request redeem from pool", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
11858
- ]
11859
- };
11860
- registerProtocolModule(mapleProtocolModule);
11861
-
11862
- // src/protocols/evm/sky/mainnet.ts
11863
- var SKY_ETHEREUM_MAINNET_CHAIN_ID = 1;
11864
-
11865
- // src/protocols/evm/sky/index.ts
11866
- var SKY_PROTOCOL_ID = "sky";
11867
- var skyProtocolModule = {
11868
- id: SKY_PROTOCOL_ID,
11869
- chainCategory: "evm",
11870
- isChainSupported(ctx) {
11871
- if (ctx.chainCategory !== "evm") return false;
11872
- return Number(ctx.chainId) === SKY_ETHEREUM_MAINNET_CHAIN_ID;
11873
- },
11874
- isTokenSupported(token) {
11875
- return token.category === "evm" && token.kind === "erc20";
11876
- },
11877
- actions: [
11878
- { id: "sky.lockstake-stake", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Open Lockstake position", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11879
- { id: "sky.lockstake-draw", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Borrow USDS from Lockstake", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11880
- { id: "sky.lockstake-wipe", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Repay Lockstake debt", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11881
- { id: "sky.lockstake-close", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Close Lockstake position", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11882
- { id: "sky.susds-deposit", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Deposit USDS into sUSDS vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11883
- { id: "sky.susds-redeem", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Redeem sUSDS to USDS", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
11884
- ]
11885
- };
11886
- registerProtocolModule(skyProtocolModule);
11887
-
11888
- // src/protocols/evm/aave-v4/index.ts
11889
- var AAVE_V4_PROTOCOL_ID = "aave-v4";
11890
- var aaveV4ProtocolModule = {
11891
- id: AAVE_V4_PROTOCOL_ID,
11892
- chainCategory: "evm",
11893
- isChainSupported(ctx) {
11894
- return ctx.chainCategory === "evm";
11895
- },
11896
- isTokenSupported(token) {
11897
- return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
11898
- },
11899
- actions: [
11900
- { id: "aave-v4.deposit", protocolId: AAVE_V4_PROTOCOL_ID, chainCategory: "evm", description: "Supply to Aave v4 Spoke", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11901
- { id: "aave-v4.withdraw", protocolId: AAVE_V4_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw from Spoke", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11902
- { id: "aave-v4.borrow", protocolId: AAVE_V4_PROTOCOL_ID, chainCategory: "evm", description: "Borrow from Spoke", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11903
- { id: "aave-v4.repay", protocolId: AAVE_V4_PROTOCOL_ID, chainCategory: "evm", description: "Repay Spoke debt", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11904
- { id: "aave-v4.fetch-merkl-rewards", protocolId: AAVE_V4_PROTOCOL_ID, chainCategory: "evm", description: "List wallet-wide Merkl claimables on a chain", commonParams: [], params: {} },
11905
- { id: "aave-v4.merkl-claim", protocolId: AAVE_V4_PROTOCOL_ID, chainCategory: "evm", description: "Claim wallet-wide Merkl rewards", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
11906
- ]
11907
- };
11908
- registerProtocolModule(aaveV4ProtocolModule);
11909
-
11910
- // src/protocols/evm/euler-v2/eulerV3Api.ts
11911
- init_defiProxy();
11912
- var EULER_V3_API_BASE = "https://v3.euler.finance";
11913
- function qs(params) {
11914
- const u = new URLSearchParams();
11915
- for (const [k, v] of Object.entries(params)) {
11916
- if (v == null) continue;
11917
- u.set(k, String(v));
11918
- }
11919
- const s = u.toString();
11920
- return s ? `?${s}` : "";
11921
- }
11922
- async function eulerV3Get(path, params = {}) {
11923
- const rel = path.startsWith("/") ? path : `/${path}`;
11924
- const query = qs(params);
11925
- const directUrl = `${EULER_V3_API_BASE}${rel}${query}`;
11926
- rel.replace(/^\/v3\/?/, "");
11927
- const proxyUrl = void 0;
11928
- return getJsonViaOptionalProxy({ directUrl, proxyUrl });
11929
- }
11930
- async function paginateV3Vaults(path, chainId, extra = {}) {
11931
- const out = [];
11932
- let offset = 0;
11933
- const limit = 100;
11934
- while (true) {
11935
- const page = await eulerV3Get(path, {
11160
+ // src/protocols/evm/railgun/networks.ts
11161
+ function selectRailgunNetworks(config) {
11162
+ const rows = [];
11163
+ for (const entry of Object.values(config)) {
11164
+ if (!entry || entry.deprecated || entry.isDevOnlyNetwork) continue;
11165
+ const chainId = Number(entry.chain?.id);
11166
+ const proxyContract = String(entry.proxyContract ?? "").trim();
11167
+ const wrappedAddress = String(entry.baseToken?.wrappedAddress ?? "").trim();
11168
+ if (!Number.isFinite(chainId) || chainId <= 0 || !proxyContract || !wrappedAddress) continue;
11169
+ rows.push({
11936
11170
  chainId,
11937
- limit,
11938
- offset,
11939
- ...extra
11940
- });
11941
- const rows = page.data ?? [];
11942
- out.push(...rows);
11943
- const total = typeof page.meta?.total === "number" ? page.meta.total : out.length;
11944
- offset += rows.length;
11945
- if (!rows.length || offset >= total) break;
11946
- }
11947
- return out;
11948
- }
11949
- async function fetchEulerV3EvkVaults(args) {
11950
- return paginateV3Vaults("/v3/evk/vaults", args.chainId, args.asset ? { asset: args.asset } : {});
11951
- }
11952
- async function fetchEulerV3EarnVaults(args) {
11953
- return paginateV3Vaults("/v3/earn/vaults", args.chainId, args.asset ? { asset: args.asset } : {});
11954
- }
11955
- async function fetchEulerV3ActiveChainIds() {
11956
- const page = await eulerV3Get("/v3/chains");
11957
- const ids = [];
11958
- for (const row of page.data ?? []) {
11959
- if (typeof row.id !== "number" || !Number.isFinite(row.id)) continue;
11960
- if ((row.status ?? "active") !== "active") continue;
11961
- ids.push(row.id);
11962
- }
11963
- return ids.sort((a, b) => a - b);
11964
- }
11965
-
11966
- // src/protocols/evm/euler-v2/eulerV2Subgraph.ts
11967
- var EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID = {
11968
- 1: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-mainnet/latest/gn",
11969
- 8453: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-base/latest/gn",
11970
- 1923: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-swell/latest/gn",
11971
- 146: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-sonic/latest/gn",
11972
- 60808: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-bob/latest/gn",
11973
- 80094: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-berachain/latest/gn",
11974
- 43114: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-avalanche/latest/gn",
11975
- 42161: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-arbitrum/latest/gn",
11976
- 130: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-unichain/latest/gn",
11977
- 56: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-bsc/latest/gn",
11978
- 999: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-hyperevm/latest/gn",
11979
- 239: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-tac/latest/gn",
11980
- 9745: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-plasma/latest/gn",
11981
- 137: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-polygon/latest/gn",
11982
- 59144: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-linea/latest/gn",
11983
- 143: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-monad/latest/gn"
11984
- };
11985
- var WRAPPED_NATIVE_FALLBACK = {
11986
- 1: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
11987
- 10: "0x4200000000000000000000000000000000000006",
11988
- 56: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
11989
- 100: "0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",
11990
- 130: "0x4200000000000000000000000000000000000006",
11991
- 137: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
11992
- // Polygon: WPOL
11993
- 143: "0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A",
11994
- // Monad: WMON
11995
- 146: "0x03980325872071166574bcd94670450917897468",
11996
- 239: "0xB63B9f0eb4A6E6f191529D71d4D88cc8900Df2C9",
11997
- // TAC: WTAC (https://docs.tac.build/ecosystem/token-list)
11998
- 480: "0x4200000000000000000000000000000000000006",
11999
- 999: "0x5555555555555555555555555555555555555555",
12000
- // HyperEVM: WHYPE (Hyperliquid docs)
12001
- 1923: "0x4200000000000000000000000000000000000006",
12002
- 42161: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
12003
- 43114: "0xB31f66AA3C1e785363F0875A1B74D27b85FE0459",
12004
- 5e3: "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8",
12005
- // Mantle: WMNT
12006
- 59144: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
12007
- // Linea: WETH
12008
- 57073: "0x4200000000000000000000000000000000000006",
12009
- 60808: "0x4200000000000000000000000000000000000006",
12010
- 80094: "0x6969696969696969696969696969696969696969",
12011
- // Berachain: WBERA (https://docs.berachain.com)
12012
- 8453: "0x4200000000000000000000000000000000000006",
12013
- 9745: "0x6100E367285b01F48D07953803A2d8dCA5D19873"
12014
- // Plasma: WXPL
12015
- };
12016
- for (const id of Object.keys(EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID).map(Number)) {
12017
- if (WRAPPED_NATIVE_FALLBACK[id] == null) {
12018
- throw new Error(`eulerV2Subgraph: add WRAPPED_NATIVE_FALLBACK for Euler Goldsky chain ${id}`);
11171
+ networkName: String(entry.name ?? ""),
11172
+ publicName: String(entry.publicName ?? entry.name ?? ""),
11173
+ proxyContract,
11174
+ deploymentBlock: Number(entry.deploymentBlock ?? 0),
11175
+ wrappedAddress,
11176
+ wrappedSymbol: String(entry.baseToken?.wrappedSymbol ?? entry.baseToken?.symbol ?? ""),
11177
+ wrappedDecimals: Number(entry.baseToken?.decimals ?? 18),
11178
+ isTestnet: Boolean(entry.isTestnet)
11179
+ });
12019
11180
  }
11181
+ rows.sort((a, b) => a.chainId - b.chainId);
11182
+ return rows;
12020
11183
  }
12021
- async function resolveEulerWrappedNativeToken(chainId) {
12022
- try {
12023
- const fromAave = await fetchAaveV4NativeWrappedToken(chainId);
12024
- if (fromAave) return fromAave;
12025
- } catch {
11184
+ var cached = null;
11185
+ async function loadRailgunNetworks() {
11186
+ if (cached) return cached;
11187
+ const mod = await import('@railgun-community/shared-models');
11188
+ cached = selectRailgunNetworks(mod.NETWORK_CONFIG);
11189
+ return cached;
11190
+ }
11191
+ async function loadRailgunSupportedChainIds() {
11192
+ const rows = await loadRailgunNetworks();
11193
+ return new Set(rows.map((row) => row.chainId));
11194
+ }
11195
+ async function railgunNetworkByChainId(chainId) {
11196
+ const rows = await loadRailgunNetworks();
11197
+ return rows.find((row) => row.chainId === chainId);
11198
+ }
11199
+ var RAILGUN_POPULAR_ASSET_LIMIT = 5;
11200
+ var POPULAR_ASSET_CACHE_MS = 10 * 60 * 1e3;
11201
+ var RECENT_SHIELD_LIMIT = 200;
11202
+ var SHIELD_INDEX_BY_NETWORK_NAME = {
11203
+ Ethereum: "https://rail-squid.squids.live/squid-railgun-ethereum-v2/graphql",
11204
+ BNB_Chain: "https://rail-squid.squids.live/squid-railgun-bsc-v2/graphql",
11205
+ Polygon: "https://rail-squid.squids.live/squid-railgun-polygon-v2/graphql",
11206
+ Arbitrum: "https://rail-squid.squids.live/squid-railgun-arbitrum-v2/graphql"
11207
+ };
11208
+ var RECENT_SHIELDS_QUERY = `query RecentShields($limit: Int!) {
11209
+ shieldCommitments(orderBy: [blockNumber_DESC], limit: $limit) {
11210
+ preimage { token { tokenType tokenAddress } }
12026
11211
  }
12027
- const fb = WRAPPED_NATIVE_FALLBACK[chainId];
12028
- if (fb && isAddress(fb)) return getAddress(fb);
12029
- return null;
11212
+ }`;
11213
+ var cache = /* @__PURE__ */ new Map();
11214
+ function rankPopularShieldTokens(rows, limit = RAILGUN_POPULAR_ASSET_LIMIT) {
11215
+ const counts = /* @__PURE__ */ new Map();
11216
+ for (const row of rows) {
11217
+ if (Number(row.tokenType) !== 0) continue;
11218
+ let address;
11219
+ try {
11220
+ address = getAddress(row.tokenAddress);
11221
+ } catch {
11222
+ continue;
11223
+ }
11224
+ if (address === zeroAddress) continue;
11225
+ const key = address.toLowerCase();
11226
+ counts.set(key, (counts.get(key) ?? 0) + 1);
11227
+ }
11228
+ return [...counts.entries()].sort((a, b) => b[1] - a[1] || (a[0] < b[0] ? -1 : a[0] > b[0] ? 1 : 0)).slice(0, limit).map(([address]) => getAddress(address));
12030
11229
  }
12031
- function normAssetAddr(raw) {
12032
- const s = (raw ?? "").trim();
12033
- if (!s || !isAddress(s)) return null;
12034
- return getAddress(s).toLowerCase();
11230
+ function shieldIndexEndpoint(networkName) {
11231
+ return SHIELD_INDEX_BY_NETWORK_NAME[networkName] ?? null;
12035
11232
  }
12036
- function v3VaultShowsBorrow(totalBorrows, explorableBorrow) {
12037
- if (explorableBorrow === true) return true;
12038
- try {
12039
- return BigInt((totalBorrows ?? "0").trim() || "0") > 0n;
12040
- } catch {
12041
- return false;
11233
+ function commitmentsFromShieldIndex(payload) {
11234
+ const rows = payload?.data?.shieldCommitments;
11235
+ if (!Array.isArray(rows)) return [];
11236
+ return rows.map((row) => {
11237
+ const token = row?.preimage?.token;
11238
+ const tokenType = token?.tokenType === "ERC20" || token?.tokenType === 0 ? 0 : Number(token?.tokenType ?? -1);
11239
+ return {
11240
+ tokenAddress: String(token?.tokenAddress ?? ""),
11241
+ tokenType: Number.isFinite(tokenType) ? tokenType : -1
11242
+ };
11243
+ });
11244
+ }
11245
+ var shieldLogReaderOverride = null;
11246
+ async function readShieldCommitments(args) {
11247
+ const endpoint = shieldIndexEndpoint(args.networkName);
11248
+ if (!endpoint) return [];
11249
+ const response = await fetch(endpoint, {
11250
+ method: "POST",
11251
+ headers: { "content-type": "application/json" },
11252
+ body: JSON.stringify({
11253
+ query: RECENT_SHIELDS_QUERY,
11254
+ variables: { limit: RECENT_SHIELD_LIMIT }
11255
+ })
11256
+ });
11257
+ if (!response.ok) throw new Error(`Railgun shield index returned ${response.status}`);
11258
+ return commitmentsFromShieldIndex(await response.json());
11259
+ }
11260
+ function applyContinuumToken(chainId, result) {
11261
+ const ctm = ctmTokenAddressOnEvmChain(chainId);
11262
+ if (!ctm) return result;
11263
+ const present = result.tokens.some((token) => token.address.toLowerCase() === ctm.toLowerCase());
11264
+ {
11265
+ if (!present) return result;
11266
+ return {
11267
+ ...result,
11268
+ tokens: result.tokens.filter((token) => token.address.toLowerCase() !== ctm.toLowerCase())
11269
+ };
12042
11270
  }
12043
11271
  }
12044
- var eulerV2ChainAssetCache = /* @__PURE__ */ new Map();
12045
- async function fetchEulerV2ChainAssetCache(chainId) {
12046
- const [nativeWrapped, evkVaults, earnVaults] = await Promise.all([
12047
- resolveEulerWrappedNativeToken(chainId),
12048
- fetchEulerV3EvkVaults({ chainId }),
12049
- fetchEulerV3EarnVaults({ chainId }).catch(() => [])
12050
- ]);
12051
- const modes = /* @__PURE__ */ new Map();
12052
- const symbols = /* @__PURE__ */ new Map();
12053
- const ambiguousSymbols = /* @__PURE__ */ new Set();
12054
- const bump = (addr2, patch) => {
12055
- const cur = modes.get(addr2) ?? { lend: false, borrow: false, earn: false };
12056
- modes.set(addr2, {
12057
- lend: cur.lend || !!patch.lend,
12058
- borrow: cur.borrow || !!patch.borrow,
12059
- earn: cur.earn || !!patch.earn
11272
+ async function loadRailgunPopularAssets(args) {
11273
+ const network = await railgunNetworkByChainId(args.chainId);
11274
+ if (!network) {
11275
+ return { tokens: [], notes: "Railgun is not deployed on this chain." };
11276
+ }
11277
+ const cached3 = cache.get(args.chainId);
11278
+ if (cached3 && Date.now() - cached3.at < POPULAR_ASSET_CACHE_MS) {
11279
+ return applyContinuumToken(args.chainId, {
11280
+ tokens: cached3.tokens,
11281
+ nativeWrapped: cached3.nativeWrapped,
11282
+ notes: cached3.notes
12060
11283
  });
12061
- };
12062
- const noteSymbol = (symbol, addr2) => {
12063
- const sym = (symbol ?? "").trim().toLowerCase();
12064
- if (!sym || ambiguousSymbols.has(sym) || !isAddress(addr2)) return;
12065
- const checksum = getAddress(addr2);
12066
- const prev = symbols.get(sym);
12067
- if (!prev) {
12068
- symbols.set(sym, checksum);
12069
- return;
12070
- }
12071
- if (prev.toLowerCase() !== checksum.toLowerCase()) {
12072
- symbols.delete(sym);
12073
- ambiguousSymbols.add(sym);
12074
- }
12075
- };
12076
- for (const v of earnVaults) {
12077
- const a = normAssetAddr(v.asset?.address ?? void 0);
12078
- if (a) {
12079
- bump(a, { earn: true });
12080
- noteSymbol(v.asset?.symbol, a);
12081
- }
12082
11284
  }
12083
- for (const v of evkVaults) {
12084
- const a = normAssetAddr(v.asset?.address ?? void 0);
12085
- if (!a) continue;
12086
- const vis = v.visibility;
12087
- bump(a, {
12088
- lend: vis?.explorableLend !== false,
12089
- borrow: v3VaultShowsBorrow(v.totalBorrows, vis?.explorableBorrow)
11285
+ const rpcUrl = args.rpcUrl?.trim() ?? "";
11286
+ if (!shieldIndexEndpoint(network.networkName) && !shieldLogReaderOverride) {
11287
+ return applyContinuumToken(args.chainId, {
11288
+ tokens: [],
11289
+ nativeWrapped: network.wrappedAddress,
11290
+ notes: "This chain has no indexed Railgun shield feed."
12090
11291
  });
12091
- noteSymbol(v.asset?.symbol, a);
12092
11292
  }
12093
- const weth = symbols.get("weth");
12094
- if (weth && !symbols.has("eth") && !ambiguousSymbols.has("eth")) {
12095
- symbols.set("eth", weth);
11293
+ try {
11294
+ const commitments = await (shieldLogReaderOverride ?? readShieldCommitments)({
11295
+ rpcUrl,
11296
+ chainId: args.chainId,
11297
+ proxy: getAddress(network.proxyContract),
11298
+ deploymentBlock: network.deploymentBlock,
11299
+ networkName: network.networkName
11300
+ });
11301
+ const tokens = rankPopularShieldTokens(commitments).map((address) => ({ address }));
11302
+ const notes = tokens.length === 0 ? "No recent ERC-20 shields were returned for this chain." : `Top ${tokens.length} ERC-20s by recent indexed shield count.`;
11303
+ const entry = {
11304
+ at: Date.now(),
11305
+ tokens,
11306
+ nativeWrapped: network.wrappedAddress,
11307
+ notes
11308
+ };
11309
+ cache.set(args.chainId, entry);
11310
+ return applyContinuumToken(args.chainId, { tokens, nativeWrapped: network.wrappedAddress, notes });
11311
+ } catch {
11312
+ return applyContinuumToken(args.chainId, {
11313
+ tokens: [],
11314
+ nativeWrapped: network.wrappedAddress,
11315
+ notes: "The Railgun shield index could not be read."
11316
+ });
12096
11317
  }
12097
- return { nativeWrapped, modesByUnderlying: modes, symbolToAddress: symbols };
12098
11318
  }
12099
- function ensureEulerV2ChainAssetCache(chainId) {
12100
- const hit = eulerV2ChainAssetCache.get(chainId);
12101
- if (hit) return hit;
12102
- const p = fetchEulerV2ChainAssetCache(chainId).catch((e) => {
12103
- eulerV2ChainAssetCache.delete(chainId);
12104
- throw e;
12105
- });
12106
- eulerV2ChainAssetCache.set(chainId, p);
12107
- return p;
11319
+ var UNIVERSAL_ROUTER_SPENDER = {
11320
+ 1: "0x66a9893cc07d91d95644aedd05d03f95e1dba8af",
11321
+ 5: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
11322
+ 11155111: "0x3a9d48ab9751398bbfa63ad67599bb04e4bdf98b",
11323
+ 137: "0x1095692a6237d83c6a72f3f5efedb9a670c49223",
11324
+ 80001: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
11325
+ 10: "0x851116d9223fabed8e56c0e6b8ad0c31d98b3507",
11326
+ 420: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
11327
+ 42161: "0xa51afafe0263b40edaef0df8781ea9aa03e381a3",
11328
+ 421613: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
11329
+ 42220: "0xcb695bc5D3Aa22cAD1E6DF07801b061a05A0233A",
11330
+ 44787: "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD",
11331
+ 56: "0x1906c1d672b88cd1b9ac7593301ca990f94eae07",
11332
+ 43114: "0x94b75331ae8d42c1b61065089b7d48fe14aa73b7",
11333
+ 84531: "0xd0872d928672ae2ff74bdb2f5130ac12229cafaf",
11334
+ 8453: "0x6fF5693b99212da76ad316178a184ab56d299b43",
11335
+ 81457: "0xeabbcb3e8e415306207ef514f660a3f820025be3",
11336
+ 7777777: "0x3315ef7ca28db74abadc6c44570efdf06b04b020",
11337
+ 324: "0x28731BCC616B5f51dD52CF2e4dF0E78dD1136C06",
11338
+ 480: "0x8ac7bee993bb44dab564ea4bc9ea67bf9eb5e743",
11339
+ 1301: "0xf70536b3bcc1bd1a972dc186a2cf84cc6da6be5d",
11340
+ 130: "0xef740bf23acae26f6492b10de645d6b98dc8eaf3",
11341
+ 10143: "0x3ae6d8a282d67893e17aa70ebffb33ee5aa65893",
11342
+ 84532: "0x492e6456d9528771018deb9e87ef7750ef184104",
11343
+ 1868: "0x0e2850543f69f678257266e0907ff9a58b3f13de",
11344
+ 143: "0x0d97dc33264bfc1c226207428a79b26757fb9dc3",
11345
+ 59144: "0x661e93cca42afacb172121ef892830ca3b70f08d",
11346
+ 4217: "0x1febb76be10aaf3a1402f04e8e835f2c382f7914",
11347
+ 196: "0x5507749f2c558bb3e162c6e90c314c092e7372ff",
11348
+ /** Robinhood Chain mainnet — Universal Router v2.1.1 (Trade API / interface) */
11349
+ 4663: "0x8876789976decbfcbbbe364623c63652db8c0904",
11350
+ /** Circle Arc mainnet — official Uniswap v4 deployments */
11351
+ 5042: "0x4fcA4a51Ab4F23A7447b3284fBd7D73289A89Fb1"
11352
+ };
11353
+ function isUniswapV4ChainSupported(chainId) {
11354
+ if (chainId == null) return false;
11355
+ const n = parseEvmChainIdToNumber(chainId);
11356
+ if (Number.isNaN(n) || n < 0) return false;
11357
+ const a = UNIVERSAL_ROUTER_SPENDER[n];
11358
+ return typeof a === "string" && a.startsWith("0x");
11359
+ }
11360
+
11361
+ // src/protocols/evm/maple/constants.ts
11362
+ function isMapleSyrupSupportedChain(chainId) {
11363
+ return chainId === 1 || chainId === 11155111;
11364
+ }
11365
+ function defiEvmTransport(rpcUrl, opts) {
11366
+ const url = rpcUrl.trim();
11367
+ return http(url, opts);
12108
11368
  }
12109
-
12110
- // src/protocols/evm/euler-v2/loadEulerV2SupportedChainIds.ts
12111
- var cached2 = null;
12112
- async function loadEulerV2SupportedChainIds() {
12113
- if (cached2) return cached2;
12114
- try {
12115
- const ids = await fetchEulerV3ActiveChainIds();
12116
- if (ids.length) {
12117
- cached2 = new Set(ids);
12118
- return cached2;
12119
- }
12120
- } catch {
11369
+ function matchesAssetFilter(opts) {
11370
+ const f = (opts.filter ?? "").trim();
11371
+ if (!f) return true;
11372
+ const addr2 = (opts.address ?? "").trim();
11373
+ if (isAddress(f) && isAddress(addr2)) {
11374
+ return getAddress(addr2) === getAddress(f);
12121
11375
  }
12122
- cached2 = new Set(Object.keys(EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID).map((k) => Number(k)));
12123
- return cached2;
11376
+ const sym = (opts.symbol ?? "").trim();
11377
+ if (!sym) return false;
11378
+ return sym.toLowerCase() === f.toLowerCase();
12124
11379
  }
12125
11380
 
12126
- // src/protocols/evm/euler-v2/index.ts
12127
- var EULER_V2_PROTOCOL_ID = "euler-v2";
12128
- var eulerV2ProtocolModule = {
12129
- id: EULER_V2_PROTOCOL_ID,
11381
+ // src/protocols/evm/maple/index.ts
11382
+ var MAPLE_PROTOCOL_ID = "maple-syrup";
11383
+ var mapleProtocolModule = {
11384
+ id: MAPLE_PROTOCOL_ID,
11385
+ chainCategory: "evm",
11386
+ isChainSupported(ctx) {
11387
+ if (ctx.chainCategory !== "evm") return false;
11388
+ const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
11389
+ return isMapleSyrupSupportedChain(n);
11390
+ },
11391
+ isTokenSupported(token) {
11392
+ return token.category === "evm" && token.kind === "erc20";
11393
+ },
11394
+ actions: [
11395
+ { id: "maple-syrup.deposit", protocolId: MAPLE_PROTOCOL_ID, chainCategory: "evm", description: "Deposit into Maple Syrup pool", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11396
+ { id: "maple-syrup.request-redeem", protocolId: MAPLE_PROTOCOL_ID, chainCategory: "evm", description: "Request redeem from pool", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
11397
+ ]
11398
+ };
11399
+ registerProtocolModule(mapleProtocolModule);
11400
+
11401
+ // src/protocols/evm/sky/mainnet.ts
11402
+ var SKY_ETHEREUM_MAINNET_CHAIN_ID = 1;
11403
+
11404
+ // src/protocols/evm/sky/index.ts
11405
+ var SKY_PROTOCOL_ID = "sky";
11406
+ var skyProtocolModule = {
11407
+ id: SKY_PROTOCOL_ID,
12130
11408
  chainCategory: "evm",
12131
11409
  isChainSupported(ctx) {
12132
- return ctx.chainCategory === "evm";
11410
+ if (ctx.chainCategory !== "evm") return false;
11411
+ return Number(ctx.chainId) === SKY_ETHEREUM_MAINNET_CHAIN_ID;
12133
11412
  },
12134
11413
  isTokenSupported(token) {
12135
- return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
11414
+ return token.category === "evm" && token.kind === "erc20";
12136
11415
  },
12137
11416
  actions: [
12138
- { id: "euler-v2.isolated-lend", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Deposit into Euler vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12139
- { id: "euler-v2.isolated-borrow", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Borrow from Euler vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12140
- { id: "euler-v2.vault-withdraw", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw from Euler vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12141
- { id: "euler-v2.borrow-repay", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Repay Euler borrow", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12142
- { id: "euler-v2.collateral-deposit", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Deposit borrow collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12143
- { id: "euler-v2.collateral-withdraw", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw borrow collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12144
- { id: "euler-v2.fetch-merkl-rewards", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "List wallet-wide Merkl claimables on a chain", commonParams: [], params: {} },
12145
- { id: "euler-v2.merkl-claim", protocolId: EULER_V2_PROTOCOL_ID, chainCategory: "evm", description: "Claim wallet-wide Merkl rewards", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
11417
+ { id: "sky.lockstake-stake", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Open Lockstake position", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11418
+ { id: "sky.lockstake-draw", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Borrow USDS from Lockstake", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11419
+ { id: "sky.lockstake-wipe", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Repay Lockstake debt", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11420
+ { id: "sky.lockstake-close", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Close Lockstake position", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11421
+ { id: "sky.susds-deposit", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Deposit USDS into sUSDS vault", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
11422
+ { id: "sky.susds-redeem", protocolId: SKY_PROTOCOL_ID, chainCategory: "evm", description: "Redeem sUSDS to USDS", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
12146
11423
  ]
12147
11424
  };
12148
- registerProtocolModule(eulerV2ProtocolModule);
11425
+ registerProtocolModule(skyProtocolModule);
12149
11426
 
12150
11427
  // src/protocols/evm/gmx/support.ts
12151
11428
  var GMX_SUPPORTED_CHAIN_IDS = [42161, 43114];
@@ -12304,420 +11581,81 @@ var gmxProtocolModule = {
12304
11581
  symbol: { type: "string", required: true, description: "GMX market symbol e.g. ETH/USD [WETH-USDC]" },
12305
11582
  direction: { type: "string", required: true, description: "long or short" },
12306
11583
  orderType: { type: "string", required: true, description: "market or limit" },
12307
- sizeUsdHuman: { type: "string", required: true, description: "Position size in USD" },
12308
- collateralToken: { type: "string", required: true, description: "Collateral token symbol e.g. USDC" },
12309
- collateralAmountHuman: { type: "string", required: true, description: "Collateral amount in token units" }
12310
- }
12311
- },
12312
- {
12313
- id: "gmx.decrease",
12314
- protocolId: GMX_PROTOCOL_ID,
12315
- chainCategory: "evm",
12316
- description: "Close or reduce a GMX perp position (classic on-chain order)",
12317
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12318
- params: {
12319
- symbol: { type: "string", required: true, description: "GMX market symbol" },
12320
- direction: { type: "string", required: true, description: "long or short" },
12321
- orderType: { type: "string", required: true, description: "market or limit" },
12322
- sizeUsdHuman: { type: "string", required: true, description: "Size to close in USD" },
12323
- collateralToken: { type: "string", required: true, description: "Position collateral token symbol" }
12324
- }
12325
- },
12326
- {
12327
- id: "gmx.cancel",
12328
- protocolId: GMX_PROTOCOL_ID,
12329
- chainCategory: "evm",
12330
- description: "Cancel a pending GMX order (classic on-chain)",
12331
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12332
- params: {
12333
- orderId: { type: "string", required: true, description: "Order key from fetchOrders" }
12334
- }
12335
- },
12336
- {
12337
- id: "gmx.gmDeposit",
12338
- protocolId: GMX_PROTOCOL_ID,
12339
- chainCategory: "evm",
12340
- description: "Deposit collateral into a GMX v2.2c GM liquidity pool (ExchangeRouter multicall)",
12341
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12342
- params: {
12343
- marketSymbol: { type: "string", required: true, description: "GM market symbol e.g. ETH/USD [WETH-USDC]" },
12344
- collateralToken: { type: "string", required: true, description: "Pool collateral token symbol" },
12345
- collateralAmountHuman: { type: "string", required: true, description: "Amount in token units" }
12346
- }
12347
- },
12348
- {
12349
- id: "gmx.gmWithdraw",
12350
- protocolId: GMX_PROTOCOL_ID,
12351
- chainCategory: "evm",
12352
- description: "Withdraw GM market tokens from a GMX v2.2c liquidity pool",
12353
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12354
- params: {
12355
- marketSymbol: { type: "string", required: true, description: "GM market symbol" },
12356
- gmAmountHuman: { type: "string", required: true, description: "GM token amount to withdraw" }
12357
- }
12358
- },
12359
- {
12360
- id: "gmx.stakeGmx",
12361
- protocolId: GMX_PROTOCOL_ID,
12362
- chainCategory: "evm",
12363
- description: "Stake GMX tokens via RewardRouter",
12364
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12365
- params: {
12366
- amountHuman: { type: "string", required: true, description: "GMX amount to stake" }
12367
- }
12368
- },
12369
- {
12370
- id: "gmx.unstakeGmx",
12371
- protocolId: GMX_PROTOCOL_ID,
12372
- chainCategory: "evm",
12373
- description: "Unstake GMX tokens via RewardRouter",
12374
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12375
- params: {
12376
- amountHuman: { type: "string", required: true, description: "GMX amount to unstake" }
12377
- }
12378
- }
12379
- ]
12380
- };
12381
- registerProtocolModule(gmxProtocolModule);
12382
-
12383
- // src/protocols/evm/hyperliquid/support.ts
12384
- var HYPERLIQUID_SUPPORTED_CHAIN_IDS = [999, 998];
12385
- function isHyperliquidChainSupported(chainId) {
12386
- return HYPERLIQUID_SUPPORTED_CHAIN_IDS.includes(chainId);
12387
- }
12388
-
12389
- // src/protocols/evm/hyperliquid/index.ts
12390
- var HYPERLIQUID_PROTOCOL_ID = "hyperliquid";
12391
- var hyperliquidProtocolModule = {
12392
- id: HYPERLIQUID_PROTOCOL_ID,
12393
- chainCategory: "evm",
12394
- isChainSupported(ctx) {
12395
- if (ctx.chainCategory !== "evm") return false;
12396
- const chainId = typeof ctx.chainId === "number" ? ctx.chainId : Number(ctx.chainId);
12397
- return Number.isFinite(chainId) && isHyperliquidChainSupported(chainId);
12398
- },
12399
- isTokenSupported(token) {
12400
- if (token.category !== "evm") return false;
12401
- return token.kind === "erc20" || token.kind === "native";
12402
- },
12403
- actions: [
12404
- {
12405
- id: "hyperliquid.limitOrder",
12406
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12407
- chainCategory: "evm",
12408
- description: "Place a Hyperliquid limit/IoC order via CoreWriter, or L1 normalTpsl bracket when TP/SL triggers are set",
12409
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12410
- params: {
12411
- coin: { type: "string", required: true, description: "Market coin e.g. BTC" },
12412
- isBuy: { type: "boolean", required: true, description: "true for buy/long, false for sell/short" },
12413
- limitPxHuman: { type: "string", required: true, description: "Limit price" },
12414
- szHuman: { type: "string", required: true, description: "Order size in coin units" },
12415
- marketKind: { type: "string", required: false, description: "perp (default) or spot" },
12416
- tif: { type: "string", required: false, description: "gtc, ioc, or alo" },
12417
- dex: { type: "string", required: false, description: "HIP-3 dex name when applicable" },
12418
- takeProfitTriggerPxHuman: { type: "string", required: false, description: "TP trigger \u2014 enables L1 bracket with SL" },
12419
- stopLossTriggerPxHuman: { type: "string", required: false, description: "SL trigger \u2014 enables L1 bracket with TP" },
12420
- tpslExecMode: { type: "string", required: false, description: "limit_at_trigger (default) or market" },
12421
- trailingOffsetHuman: { type: "string", required: false, description: "Trailing retracement \u2014 EIP-712 trailingStop (cannot combine with SL)" },
12422
- trailingOffsetType: { type: "string", required: false, description: "price or percentage" },
12423
- trailingActivationPxHuman: { type: "string", required: false, description: "Optional activation mark price" }
12424
- }
12425
- },
12426
- {
12427
- id: "hyperliquid.trailingStop",
12428
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12429
- chainCategory: "evm",
12430
- description: "Place a Hyperliquid perp trailing stop via L1 trailingStop action (EIP-712 /exchange)",
12431
- commonParams: ["keyGen", "purposeText"],
12432
- params: {
12433
- coin: { type: "string", required: true, description: "Perp coin" },
12434
- isBuy: { type: "boolean", required: true, description: "false closes a long / opens a short" },
12435
- szHuman: { type: "string", required: true, description: "Size in coin units" },
12436
- trailingOffsetHuman: { type: "string", required: true, description: "Retracement distance or percent" },
12437
- trailingOffsetType: { type: "string", required: false, description: "price or percentage (default)" },
12438
- trailingActivationPxHuman: { type: "string", required: false, description: "Optional activation mark price" },
12439
- reduceOnly: { type: "boolean", required: false, description: "true (default) reduces a position" }
12440
- }
12441
- },
12442
- {
12443
- id: "hyperliquid.close",
12444
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12445
- chainCategory: "evm",
12446
- description: "Close or reduce a perp via IoC reduce-only limit order (CoreWriter)",
12447
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12448
- params: {
12449
- coin: { type: "string", required: true, description: "Market coin" },
12450
- isLong: { type: "boolean", required: true, description: "true if closing a long position" },
12451
- limitPxHuman: { type: "string", required: true, description: "Limit price" },
12452
- szHuman: { type: "string", required: true, description: "Size to close in coin units" }
12453
- }
12454
- },
12455
- {
12456
- id: "hyperliquid.cancel",
12457
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12458
- chainCategory: "evm",
12459
- description: "Cancel a Hyperliquid open order via CoreWriter",
12460
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12461
- params: {
12462
- coin: { type: "string", required: true, description: "Market coin" },
12463
- oid: { type: "number", required: true, description: "Order id from openOrders" }
12464
- }
12465
- },
12466
- {
12467
- id: "hyperliquid.usdTransfer",
12468
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12469
- chainCategory: "evm",
12470
- description: "Move USDC between Hyperliquid spot and perp margin accounts",
12471
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12472
- params: {
12473
- usdHuman: { type: "string", required: true, description: "USD amount" },
12474
- toPerp: { type: "boolean", required: true, description: "true spot\u2192perp, false perp\u2192spot" }
12475
- }
12476
- },
12477
- {
12478
- id: "hyperliquid.vaultDeposit",
12479
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12480
- chainCategory: "evm",
12481
- description: "Deposit USD into a Hyperliquid vault",
12482
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12483
- params: {
12484
- vaultAddress: { type: "string", required: true, description: "Vault address" },
12485
- usdHuman: { type: "string", required: true, description: "USD amount" }
12486
- }
12487
- },
12488
- {
12489
- id: "hyperliquid.vaultWithdraw",
12490
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12491
- chainCategory: "evm",
12492
- description: "Withdraw USD from a Hyperliquid vault (includes accrued PnL)",
12493
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12494
- params: {
12495
- vaultAddress: { type: "string", required: true, description: "Vault address" },
12496
- usdHuman: { type: "string", required: true, description: "USD amount" }
12497
- }
12498
- },
12499
- {
12500
- id: "hyperliquid.stake",
12501
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12502
- chainCategory: "evm",
12503
- description: "Stake HYPE via CoreWriter",
12504
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12505
- params: {
12506
- hypeHuman: { type: "string", required: true, description: "HYPE amount" }
12507
- }
12508
- },
12509
- {
12510
- id: "hyperliquid.unstake",
12511
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12512
- chainCategory: "evm",
12513
- description: "Unstake HYPE via CoreWriter",
12514
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12515
- params: {
12516
- hypeHuman: { type: "string", required: true, description: "HYPE amount" }
12517
- }
12518
- },
12519
- {
12520
- id: "hyperliquid.delegate",
12521
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12522
- chainCategory: "evm",
12523
- description: "Delegate staked HYPE to a validator",
12524
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12525
- params: {
12526
- hypeHuman: { type: "string", required: true, description: "HYPE amount" },
12527
- validator: { type: "string", required: true, description: "Validator address" }
12528
- }
12529
- },
12530
- {
12531
- id: "hyperliquid.bridgeDeposit",
12532
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12533
- chainCategory: "evm",
12534
- description: "Deposit USDC from Arbitrum to Hyperliquid via Bridge2 (ERC20 transfer)",
12535
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12536
- params: {
12537
- usdHuman: { type: "string", required: true, description: "USDC amount (min 5)" }
12538
- }
12539
- },
12540
- {
12541
- id: "hyperliquid.bridgeWithdraw",
12542
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12543
- chainCategory: "evm",
12544
- description: "Withdraw USDC from Hyperliquid to Arbitrum via withdraw3 (EIP-712 /exchange)",
12545
- commonParams: ["keyGen", "purposeText"],
12546
- params: {
12547
- usdHuman: { type: "string", required: true, description: "USDC amount" },
12548
- destination: { type: "string", required: false, description: "Arbitrum recipient (defaults to executor)" }
12549
- }
12550
- },
12551
- {
12552
- id: "hyperliquid.updateLeverage",
12553
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12554
- chainCategory: "evm",
12555
- description: "Update per-market cross/isolated leverage via Hyperliquid L1 /exchange (EIP-712)",
12556
- commonParams: ["keyGen", "purposeText"],
12557
- params: {
12558
- coin: { type: "string", required: true, description: "Market coin e.g. BTC" },
12559
- leverage: { type: "number", required: true, description: "New leverage (1..market max)" },
12560
- isCross: { type: "boolean", required: false, description: "true for cross (default), false for isolated" },
12561
- marketKind: { type: "string", required: false, description: "perp (default) or spot" }
12562
- }
12563
- },
12564
- {
12565
- id: "hyperliquid.lend",
12566
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12567
- chainCategory: "evm",
12568
- description: "Hyperliquid Core borrow/lend via L1 /exchange EIP-712 (supply, withdraw, borrow, repay). Not CoreWriter.",
12569
- commonParams: ["keyGen", "purposeText"],
12570
- params: {
12571
- coin: { type: "string", required: true, description: "Spot token e.g. USDC, USDT, HYPE, BTC/UBTC" },
12572
- operation: { type: "string", required: true, description: "supply | withdraw | borrow | repay" },
12573
- amountHuman: { type: "string", required: false, description: "Amount; omit or max for full withdraw/repay" },
12574
- amountMax: { type: "boolean", required: false, description: "true = full amount (amount null on wire)" }
12575
- }
12576
- },
12577
- {
12578
- id: "hyperliquid.undelegate",
12579
- protocolId: HYPERLIQUID_PROTOCOL_ID,
12580
- chainCategory: "evm",
12581
- description: "Undelegate HYPE from a validator",
12582
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
12583
- params: {
12584
- hypeHuman: { type: "string", required: true, description: "HYPE amount" },
12585
- validator: { type: "string", required: true, description: "Validator address" }
12586
- }
12587
- }
12588
- ]
12589
- };
12590
- registerProtocolModule(hyperliquidProtocolModule);
12591
-
12592
- // src/protocols/evm/arcus/index.ts
12593
- init_support();
12594
- init_support();
12595
- init_constants2();
12596
- init_api();
12597
- init_constants2();
12598
- var arcusProtocolModule = {
12599
- id: ARCUS_PROTOCOL_ID,
12600
- chainCategory: "evm",
12601
- isChainSupported(ctx) {
12602
- if (ctx.chainCategory !== "evm") return false;
12603
- const chainId = typeof ctx.chainId === "number" ? ctx.chainId : Number(ctx.chainId);
12604
- return Number.isFinite(chainId) && isArcusChainSupported(chainId);
12605
- },
12606
- isTokenSupported(token) {
12607
- if (token.category !== "evm") return false;
12608
- return token.kind === "erc20" || token.kind === "native";
12609
- },
12610
- actions: [
12611
- {
12612
- id: "arcus.createApiKey",
12613
- protocolId: ARCUS_PROTOCOL_ID,
12614
- chainCategory: "evm",
12615
- description: "Register Arcus Ed25519 API key (secp256k1 personal_sign + paired ed25519 KeyGen)",
12616
- commonParams: ["keyGen", "purposeText"],
12617
- params: {
12618
- secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
12619
- ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id (same GroupId)" },
12620
- apiWalletName: { type: "string", required: false, description: "Label for the API key" }
12621
- }
12622
- },
12623
- {
12624
- id: "arcus.placeOrder",
12625
- protocolId: ARCUS_PROTOCOL_ID,
12626
- chainCategory: "evm",
12627
- description: "Place Arcus perp order with optional TP/SL (Ed25519 payload sign)",
12628
- commonParams: ["keyGen", "purposeText"],
12629
- params: {
12630
- secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
12631
- ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id" },
12632
- market: { type: "string", required: true, description: "e.g. BTC-USD" },
12633
- isBuy: { type: "boolean", required: true, description: "true for buy/long" },
12634
- limitPxHuman: { type: "string", required: true, description: "Entry limit price" },
12635
- szHuman: { type: "string", required: true, description: "Order size" },
12636
- takeProfitTriggerPxHuman: { type: "string", required: false, description: "Optional TP trigger" },
12637
- stopLossTriggerPxHuman: { type: "string", required: false, description: "Optional SL trigger" }
11584
+ sizeUsdHuman: { type: "string", required: true, description: "Position size in USD" },
11585
+ collateralToken: { type: "string", required: true, description: "Collateral token symbol e.g. USDC" },
11586
+ collateralAmountHuman: { type: "string", required: true, description: "Collateral amount in token units" }
12638
11587
  }
12639
11588
  },
12640
11589
  {
12641
- id: "arcus.spotRfq",
12642
- protocolId: ARCUS_PROTOCOL_ID,
11590
+ id: "gmx.decrease",
11591
+ protocolId: GMX_PROTOCOL_ID,
12643
11592
  chainCategory: "evm",
12644
- description: "Arcus spot Stock Token RFQ buy/sell",
12645
- commonParams: ["keyGen", "purposeText"],
11593
+ description: "Close or reduce a GMX perp position (classic on-chain order)",
11594
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
12646
11595
  params: {
12647
- secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
12648
- ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id" },
12649
- ticker: { type: "string", required: true, description: "Spot ticker e.g. AAPL" },
12650
- isBuy: { type: "boolean", required: true, description: "true for buy" },
12651
- sizeHuman: { type: "string", required: true, description: "Token size" },
12652
- limitPxHuman: { type: "string", required: false, description: "Optional limit price" }
11596
+ symbol: { type: "string", required: true, description: "GMX market symbol" },
11597
+ direction: { type: "string", required: true, description: "long or short" },
11598
+ orderType: { type: "string", required: true, description: "market or limit" },
11599
+ sizeUsdHuman: { type: "string", required: true, description: "Size to close in USD" },
11600
+ collateralToken: { type: "string", required: true, description: "Position collateral token symbol" }
12653
11601
  }
12654
11602
  },
12655
11603
  {
12656
- id: "arcus.close",
12657
- protocolId: ARCUS_PROTOCOL_ID,
11604
+ id: "gmx.cancel",
11605
+ protocolId: GMX_PROTOCOL_ID,
12658
11606
  chainCategory: "evm",
12659
- description: "Close Arcus perp position with IoC reduce-only limit order",
12660
- commonParams: ["keyGen", "purposeText"],
11607
+ description: "Cancel a pending GMX order (classic on-chain)",
11608
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
12661
11609
  params: {
12662
- secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
12663
- ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id" },
12664
- market: { type: "string", required: true, description: "Perp market" },
12665
- isLong: { type: "boolean", required: true, description: "true when closing a long position" },
12666
- limitPxHuman: { type: "string", required: true, description: "Limit price for IoC close" },
12667
- szHuman: { type: "string", required: true, description: "Size to close" }
11610
+ orderId: { type: "string", required: true, description: "Order key from fetchOrders" }
12668
11611
  }
12669
11612
  },
12670
11613
  {
12671
- id: "arcus.cancelOrder",
12672
- protocolId: ARCUS_PROTOCOL_ID,
11614
+ id: "gmx.gmDeposit",
11615
+ protocolId: GMX_PROTOCOL_ID,
12673
11616
  chainCategory: "evm",
12674
- description: "Cancel Arcus perp order",
12675
- commonParams: ["keyGen", "purposeText"],
11617
+ description: "Deposit collateral into a GMX v2.2c GM liquidity pool (ExchangeRouter multicall)",
11618
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
12676
11619
  params: {
12677
- secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
12678
- ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id" },
12679
- market: { type: "string", required: true, description: "Perp market" },
12680
- orderId: { type: "string", required: true, description: "Server order id" }
11620
+ marketSymbol: { type: "string", required: true, description: "GM market symbol e.g. ETH/USD [WETH-USDC]" },
11621
+ collateralToken: { type: "string", required: true, description: "Pool collateral token symbol" },
11622
+ collateralAmountHuman: { type: "string", required: true, description: "Amount in token units" }
12681
11623
  }
12682
11624
  },
12683
11625
  {
12684
- id: "arcus.setLeverage",
12685
- protocolId: ARCUS_PROTOCOL_ID,
11626
+ id: "gmx.gmWithdraw",
11627
+ protocolId: GMX_PROTOCOL_ID,
12686
11628
  chainCategory: "evm",
12687
- description: "Set Arcus perp leverage for a market",
12688
- commonParams: ["keyGen", "purposeText"],
11629
+ description: "Withdraw GM market tokens from a GMX v2.2c liquidity pool",
11630
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
12689
11631
  params: {
12690
- secp256k1KeyGenId: { type: "string", required: true, description: "Custody secp256k1 KeyGen id" },
12691
- ed25519KeyGenId: { type: "string", required: true, description: "Paired ed25519 KeyGen id" },
12692
- market: { type: "string", required: true, description: "Perp market" },
12693
- leverage: { type: "number", required: true, description: "Target leverage" }
11632
+ marketSymbol: { type: "string", required: true, description: "GM market symbol" },
11633
+ gmAmountHuman: { type: "string", required: true, description: "GM token amount to withdraw" }
12694
11634
  }
12695
11635
  },
12696
11636
  {
12697
- id: "arcus.deposit",
12698
- protocolId: ARCUS_PROTOCOL_ID,
11637
+ id: "gmx.stakeGmx",
11638
+ protocolId: GMX_PROTOCOL_ID,
12699
11639
  chainCategory: "evm",
12700
- description: "Deposit USDG on Robinhood Chain into Arcus perp or spot collateral (approve + initiateDeposit). Requires registered API key.",
11640
+ description: "Stake GMX tokens via RewardRouter",
12701
11641
  commonParams: ["keyGen", "purposeText", "useCustomGas"],
12702
11642
  params: {
12703
- usdHuman: { type: "string", required: true, description: "USD amount to deposit" },
12704
- product: { type: "string", required: false, description: "perp (default) or spot" }
11643
+ amountHuman: { type: "string", required: true, description: "GMX amount to stake" }
12705
11644
  }
12706
11645
  },
12707
11646
  {
12708
- id: "arcus.withdraw",
12709
- protocolId: ARCUS_PROTOCOL_ID,
11647
+ id: "gmx.unstakeGmx",
11648
+ protocolId: GMX_PROTOCOL_ID,
12710
11649
  chainCategory: "evm",
12711
- description: "Withdraw USDG collateral from Arcus to wallet (EIP-712 + POST /v1/withdraw)",
12712
- commonParams: ["keyGen", "purposeText"],
11650
+ description: "Unstake GMX tokens via RewardRouter",
11651
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
12713
11652
  params: {
12714
- usdHuman: { type: "string", required: true, description: "USD amount to withdraw" },
12715
- product: { type: "string", required: false, description: "perp (default) or spot" }
11653
+ amountHuman: { type: "string", required: true, description: "GMX amount to unstake" }
12716
11654
  }
12717
11655
  }
12718
11656
  ]
12719
11657
  };
12720
- registerProtocolModule(arcusProtocolModule);
11658
+ registerProtocolModule(gmxProtocolModule);
12721
11659
 
12722
11660
  // src/protocols/evm/morpho/api.ts
12723
11661
  init_defiProxy();
@@ -12906,547 +11844,143 @@ async function ensureMorphoChainAssetCache(chainId) {
12906
11844
  return cache2;
12907
11845
  }
12908
11846
 
12909
- // src/protocols/evm/morpho/index.ts
12910
- init_midnightConstants();
12911
- init_midnightApi();
12912
- var MORPHO_PROTOCOL_ID = "morpho";
12913
- var morphoProtocolModule = {
12914
- id: MORPHO_PROTOCOL_ID,
12915
- chainCategory: "evm",
12916
- isChainSupported(ctx) {
12917
- return ctx.chainCategory === "evm";
12918
- },
12919
- isTokenSupported(token) {
12920
- return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
12921
- },
12922
- actions: [
12923
- { id: "morpho.fetch-earn-vaults", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Search Morpho-listed earn vaults by asset or name", commonParams: [], params: {} },
12924
- { id: "morpho.vault-deposit", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Deposit into Morpho-listed earn vault (V1 or V2)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12925
- { id: "morpho.vault-withdraw", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw from Morpho earn vault (V1 or V2)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12926
- { id: "morpho.blue-collateral-deposit", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Supply collateral to Morpho Blue market", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12927
- { id: "morpho.blue-supply", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Supply loan token to Morpho Blue market", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12928
- { id: "morpho.blue-withdraw", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw supplied loan token from Morpho Blue market", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12929
- { id: "morpho.blue-borrow", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Borrow from Morpho Blue market", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12930
- { id: "morpho.blue-repay", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Repay Morpho Blue borrow", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12931
- { id: "morpho.blue-collateral-withdraw", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw Morpho Blue collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12932
- { id: "morpho.fetch-merkl-rewards", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "List wallet-wide Merkl claimables on a chain", commonParams: [], params: {} },
12933
- { id: "morpho.merkl-claim", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Claim wallet-wide Merkl rewards", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12934
- { id: "morpho.fetch-blue-markets", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Search Morpho Blue variable-rate markets", commonParams: [], params: {} },
12935
- { id: "morpho.fetch-stock-markets", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "List Coinbase B20 stock-backed Morpho Blue and Midnight markets on Base", commonParams: [], params: {} },
12936
- { id: "morpho.fetch-positions", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "List Morpho vault and Blue positions for a user", commonParams: [], params: {} },
12937
- { id: "morpho.fetch-midnight-books", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "List Morpho Midnight fixed-rate books", commonParams: [], params: {} },
12938
- { id: "morpho.fetch-midnight-quote", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Quote Morpho Midnight lend/borrow fill", commonParams: [], params: {} },
12939
- { id: "morpho.fetch-midnight-positions", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "List Morpho Midnight user positions", commonParams: [], params: {} },
12940
- { id: "morpho.midnight-lend", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight fixed-rate lend (take asks)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
12941
- { 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: {} },
12942
- { 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: {} },
12943
- { 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: {} },
12944
- { id: "morpho.midnight-repay", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight repay debt and withdraw collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
12945
- ]
12946
- };
12947
- registerProtocolModule(morphoProtocolModule);
12948
-
12949
- // src/protocols/evm/circle-cctp/constants.ts
12950
- var CIRCLE_CCTP_PROTOCOL_ID = "circle-cctp";
12951
- var TOKEN_MESSENGER_V2_MAINNET = "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
12952
- var TOKEN_MESSENGER_V2_TESTNET = "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
12953
- var CCTP_EVM_CHAINS = [
12954
- {
12955
- chainId: 1,
12956
- domain: 0,
12957
- network: "mainnet",
12958
- usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
12959
- tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
12960
- label: "Ethereum"
12961
- },
12962
- {
12963
- chainId: 43114,
12964
- domain: 1,
12965
- network: "mainnet",
12966
- usdc: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
12967
- tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
12968
- label: "Avalanche"
12969
- },
12970
- {
12971
- chainId: 10,
12972
- domain: 2,
12973
- network: "mainnet",
12974
- usdc: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
12975
- tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
12976
- label: "OP Mainnet"
12977
- },
12978
- {
12979
- chainId: 42161,
12980
- domain: 3,
12981
- network: "mainnet",
12982
- usdc: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
12983
- tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
12984
- label: "Arbitrum"
12985
- },
12986
- {
12987
- chainId: 8453,
12988
- domain: 6,
12989
- network: "mainnet",
12990
- usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
12991
- tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
12992
- label: "Base"
12993
- },
12994
- {
12995
- chainId: 137,
12996
- domain: 7,
12997
- network: "mainnet",
12998
- usdc: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
12999
- tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
13000
- label: "Polygon PoS"
13001
- },
13002
- {
13003
- chainId: 11155111,
13004
- domain: 0,
13005
- network: "testnet",
13006
- usdc: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
13007
- tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
13008
- label: "Ethereum Sepolia"
13009
- },
13010
- {
13011
- chainId: 43113,
13012
- domain: 1,
13013
- network: "testnet",
13014
- usdc: "0x5425890298aed601595a70AB815c96711a31Bc65",
13015
- tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
13016
- label: "Avalanche Fuji"
13017
- },
13018
- {
13019
- chainId: 11155420,
13020
- domain: 2,
13021
- network: "testnet",
13022
- usdc: "0x5fd84259d66Cd46123540766Be93DFE6D43130D7",
13023
- tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
13024
- label: "OP Sepolia"
13025
- },
13026
- {
13027
- chainId: 421614,
13028
- domain: 3,
13029
- network: "testnet",
13030
- usdc: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
13031
- tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
13032
- label: "Arbitrum Sepolia"
13033
- },
13034
- {
13035
- chainId: 84532,
13036
- domain: 6,
13037
- network: "testnet",
13038
- usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
13039
- tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
13040
- label: "Base Sepolia"
13041
- },
13042
- {
13043
- chainId: 80002,
13044
- domain: 7,
13045
- network: "testnet",
13046
- usdc: "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582",
13047
- tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
13048
- label: "Polygon Amoy"
13049
- },
13050
- {
13051
- chainId: 5042,
13052
- domain: 26,
13053
- network: "mainnet",
13054
- usdc: "0x3600000000000000000000000000000000000000",
13055
- tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
13056
- label: "Arc"
13057
- },
13058
- {
13059
- chainId: 5042002,
13060
- domain: 26,
13061
- network: "testnet",
13062
- usdc: "0x3600000000000000000000000000000000000000",
13063
- tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
13064
- label: "Arc Testnet"
13065
- }
13066
- ];
13067
- function cctpChainConfig(chainId) {
13068
- return CCTP_EVM_CHAINS.find((c) => c.chainId === chainId) ?? null;
13069
- }
13070
- function parseCctpEvmChainId(chainId) {
13071
- if (typeof chainId === "number") {
13072
- return Number.isFinite(chainId) ? chainId : Number.NaN;
13073
- }
13074
- const t = String(chainId).trim();
13075
- if (!t) return Number.NaN;
13076
- const low = t.toLowerCase();
13077
- if (low.startsWith("eip155:")) {
13078
- const n2 = Number.parseInt(t.slice("eip155:".length).trim(), 10);
13079
- return Number.isFinite(n2) ? n2 : Number.NaN;
13080
- }
13081
- if (low.startsWith("0x")) {
13082
- const n2 = Number.parseInt(t, 16);
13083
- return Number.isFinite(n2) ? n2 : Number.NaN;
13084
- }
13085
- const n = Number.parseInt(t, 10);
13086
- return Number.isFinite(n) ? n : Number.NaN;
13087
- }
13088
- function isCctpSourceChainSupported(chainId) {
13089
- const n = parseCctpEvmChainId(chainId);
13090
- return Number.isFinite(n) && cctpChainConfig(n) != null;
13091
- }
11847
+ // src/protocols/evm/hyperliquid/support.ts
11848
+ var HYPERLIQUID_SUPPORTED_CHAIN_IDS = [999, 998];
13092
11849
 
13093
- // src/protocols/evm/circle-cctp/index.ts
13094
- var circleCctpProtocolModule = {
13095
- id: CIRCLE_CCTP_PROTOCOL_ID,
13096
- chainCategory: "evm",
13097
- isChainSupported(ctx) {
13098
- if (ctx.chainCategory !== "evm") return false;
13099
- return isCctpSourceChainSupported(ctx.chainId);
13100
- },
13101
- isTokenSupported(token) {
13102
- return token.category === "evm" && token.kind === "erc20";
13103
- },
13104
- actions: [
13105
- {
13106
- id: "circle-cctp.fetch-routes",
13107
- protocolId: CIRCLE_CCTP_PROTOCOL_ID,
13108
- chainCategory: "evm",
13109
- description: "List supported CCTP Forwarding Service routes (EVM)",
13110
- commonParams: [],
13111
- params: {
13112
- network: { type: "string", required: false, description: "mainnet | testnet" }
13113
- }
13114
- },
13115
- {
13116
- id: "circle-cctp.fetch-fees",
13117
- protocolId: CIRCLE_CCTP_PROTOCOL_ID,
13118
- chainCategory: "evm",
13119
- description: "Quote Iris forwarding fee plus fast-transfer protocol fee for a route",
13120
- commonParams: [],
13121
- params: {
13122
- sourceChainId: { type: "number", required: true, description: "Source EIP-155 chain id" },
13123
- destChainId: { type: "number", required: true, description: "Destination EIP-155 chain id" },
13124
- transferAmountHuman: { type: "string", required: true, description: "USDC amount recipient receives" }
13125
- }
13126
- },
13127
- {
13128
- id: "circle-cctp.burn-forward",
13129
- protocolId: CIRCLE_CCTP_PROTOCOL_ID,
13130
- chainCategory: "evm",
13131
- description: "Burn USDC on source chain via CCTP Forwarding Service (approve + depositForBurnWithHook batch)",
13132
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13133
- params: {
13134
- sourceChainId: { type: "number", required: true, description: "Source EIP-155 chain id" },
13135
- destChainId: { type: "number", required: true, description: "Destination EIP-155 chain id" },
13136
- transferAmountHuman: { type: "string", required: true, description: "USDC amount recipient receives" },
13137
- mintRecipient: { type: "address", required: false, description: "Destination mint recipient (default executor)" }
13138
- }
13139
- }
13140
- ]
13141
- };
13142
- registerProtocolModule(circleCctpProtocolModule);
11850
+ // src/protocols/evm/arcus/support.ts
11851
+ var ARCUS_SUPPORTED_CHAIN_IDS = [4663];
13143
11852
  var VENICE_PROTOCOL_ID = "venice";
13144
11853
  var VENICE_BASE_CHAIN_ID = 8453;
13145
11854
  var VVV_BASE = "0xacfE6019Ed1A7Dc6f7B508C02d1b04ec88cC21bf";
13146
11855
  var DIEM_BASE = "0xF4d97F2da56e8c3098f3a8D538DB630A2606a024";
13147
- function isVeniceBaseChain(chainId) {
13148
- return chainId === VENICE_BASE_CHAIN_ID;
13149
- }
13150
-
13151
- // src/protocols/evm/venice/index.ts
13152
- var veniceProtocolModule = {
13153
- id: VENICE_PROTOCOL_ID,
13154
- chainCategory: "evm",
13155
- isChainSupported(ctx) {
13156
- if (ctx.chainCategory !== "evm") return false;
13157
- const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
13158
- return isVeniceBaseChain(n);
13159
- },
13160
- isTokenSupported(token) {
13161
- return token.category === "evm" && token.kind === "erc20";
13162
- },
13163
- actions: [
13164
- {
13165
- id: "venice.stake-vvv",
13166
- protocolId: VENICE_PROTOCOL_ID,
13167
- chainCategory: "evm",
13168
- description: "Stake VVV \u2192 sVVV on Base",
13169
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13170
- params: { amountHuman: { type: "string", required: true, description: "VVV amount" } }
13171
- },
13172
- {
13173
- id: "venice.initiate-unstake-svvv",
13174
- protocolId: VENICE_PROTOCOL_ID,
13175
- chainCategory: "evm",
13176
- description: "Start sVVV unstake (7-day cooldown)",
13177
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13178
- params: { amountHuman: { type: "string", required: true, description: "sVVV amount" } }
13179
- },
13180
- {
13181
- id: "venice.complete-unstake-svvv",
13182
- protocolId: VENICE_PROTOCOL_ID,
13183
- chainCategory: "evm",
13184
- description: "Claim VVV after sVVV unstake cooldown",
13185
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13186
- params: {}
13187
- },
13188
- {
13189
- id: "venice.mint-diem",
13190
- protocolId: VENICE_PROTOCOL_ID,
13191
- chainCategory: "evm",
13192
- description: "Lock sVVV and mint DIEM",
13193
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13194
- params: {
13195
- svvvLockAmountHuman: { type: "string", required: true, description: "sVVV to lock" },
13196
- slippageBps: { type: "number", required: false, description: "Min DIEM slippage bps (default 50)" }
13197
- }
13198
- },
13199
- {
13200
- id: "venice.burn-diem",
13201
- protocolId: VENICE_PROTOCOL_ID,
13202
- chainCategory: "evm",
13203
- description: "Burn DIEM to unlock locked sVVV",
13204
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13205
- params: { amountHuman: { type: "string", required: true, description: "DIEM to burn" } }
13206
- },
13207
- {
13208
- id: "venice.stake-diem",
13209
- protocolId: VENICE_PROTOCOL_ID,
13210
- chainCategory: "evm",
13211
- description: "Stake DIEM for Venice API credits ($1/day per DIEM)",
13212
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13213
- params: { amountHuman: { type: "string", required: true, description: "DIEM amount" } }
13214
- },
13215
- {
13216
- id: "venice.initiate-unstake-diem",
13217
- protocolId: VENICE_PROTOCOL_ID,
13218
- chainCategory: "evm",
13219
- description: "Start DIEM unstake (1-day cooldown)",
13220
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13221
- params: { amountHuman: { type: "string", required: true, description: "Staked DIEM amount" } }
13222
- },
13223
- {
13224
- id: "venice.complete-unstake-diem",
13225
- protocolId: VENICE_PROTOCOL_ID,
13226
- chainCategory: "evm",
13227
- description: "Claim DIEM after unstake cooldown",
13228
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13229
- params: {}
13230
- }
13231
- ]
13232
- };
13233
- registerProtocolModule(veniceProtocolModule);
13234
-
13235
- // src/protocols/evm/aerodrome/index.ts
13236
- init_support2();
13237
- init_support2();
13238
- init_addresses();
13239
- init_stockTokens();
13240
- init_discover();
13241
- init_yields();
13242
- var aerodromeProtocolModule = {
13243
- id: AERODROME_PROTOCOL_ID,
13244
- chainCategory: "evm",
13245
- isChainSupported(ctx) {
13246
- if (ctx.chainCategory !== "evm") return false;
13247
- return isAerodromeChainSupported(ctx.chainId);
13248
- },
13249
- isTokenSupported(token) {
13250
- if (token.category !== "evm") return false;
13251
- return token.kind === "native" || token.kind === "erc20";
13252
- },
13253
- actions: [
13254
- {
13255
- id: "aerodrome.quote",
13256
- protocolId: AERODROME_PROTOCOL_ID,
13257
- chainCategory: "evm",
13258
- description: "Quote an Aero swap (protocol id aerodrome) via factory discovery and pool getAmountOut / Metaquoter. Base 8453 by default; also Ethereum, OP Mainnet, Arbitrum, Robinhood, Arc, and Ink. Tickers (AAPLc, USDC, ETH) accepted. Stock tickers are Base only.",
13259
- commonParams: [],
13260
- params: {
13261
- chainId: { type: "number", required: true, description: "Aero chain: 8453 (Base, default), 1, 10, 42161, 4663, 5042, or 57073." },
13262
- tokenIn: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x / 0x0 native" },
13263
- tokenOut: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH, WETH, AERO) or 0x / 0x0 native" },
13264
- amountHuman: { type: "string", required: true, description: "Human-readable input amount (B20 stocks are 8 decimals)" }
13265
- }
13266
- },
13267
- {
13268
- id: "aerodrome.swap",
13269
- protocolId: AERODROME_PROTOCOL_ID,
13270
- chainCategory: "evm",
13271
- description: "Swap via Aerodrome Router / Slipstream SwapRouter (optional ERC-20 approve batch)",
13272
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13273
- params: {
13274
- tokenIn: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
13275
- tokenOut: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
13276
- amountHuman: { type: "string", required: true, description: "Human-readable input amount" },
13277
- slippagePercent: { type: "number", required: true, description: "Slippage percent (0\u2013100 exclusive)" }
13278
- }
13279
- },
13280
- {
13281
- id: "aerodrome.add-liquidity",
13282
- protocolId: AERODROME_PROTOCOL_ID,
13283
- chainCategory: "evm",
13284
- description: "Deposit into a basic vAMM/sAMM pool (one-sided amounts; tickers OK)",
13285
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13286
- params: {
13287
- tokenA: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
13288
- tokenB: { type: "address", required: true, description: "Ticker (AAPLc, USDC, ETH) or 0x / 0x0 native" },
13289
- stable: { type: "boolean", required: true, description: "true = sAMM, false = vAMM" },
13290
- amountAHuman: { type: "string", required: false, description: "Amount A; omit to solve from B" },
13291
- amountBHuman: { type: "string", required: false, description: "Amount B; omit to solve from A" },
13292
- slippagePercent: { type: "number", required: true, description: "Slippage percent" }
13293
- }
13294
- },
13295
- {
13296
- id: "aerodrome.remove-liquidity",
13297
- protocolId: AERODROME_PROTOCOL_ID,
13298
- chainCategory: "evm",
13299
- description: "Withdraw from a basic vAMM/sAMM pool",
13300
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13301
- params: {
13302
- lpToken: { type: "address", required: true, description: "LP token" },
13303
- liquidityHuman: { type: "string", required: true, description: "LP amount" }
13304
- }
13305
- },
13306
- {
13307
- id: "aerodrome.cl-mint",
13308
- protocolId: AERODROME_PROTOCOL_ID,
13309
- chainCategory: "evm",
13310
- description: "Mint a Slipstream concentrated liquidity NFT",
13311
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13312
- params: {
13313
- token0: { type: "address", required: true, description: "Token0" },
13314
- token1: { type: "address", required: true, description: "Token1" },
13315
- tickSpacing: { type: "number", required: true, description: "Pool tick spacing" },
13316
- tickLower: { type: "number", required: true, description: "Lower tick" },
13317
- tickUpper: { type: "number", required: true, description: "Upper tick" }
13318
- }
13319
- },
13320
- {
13321
- id: "aerodrome.gauge-stake",
13322
- protocolId: AERODROME_PROTOCOL_ID,
13323
- chainCategory: "evm",
13324
- description: "Stake basic LP tokens or a Slipstream NFT in a gauge",
13325
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13326
- params: {
13327
- gauge: { type: "address", required: true, description: "Gauge address" }
13328
- }
13329
- },
13330
- {
13331
- id: "aerodrome.claim-fees",
13332
- protocolId: AERODROME_PROTOCOL_ID,
13333
- chainCategory: "evm",
13334
- description: "Claim unstaked fees from the pool (not the gauge)",
13335
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13336
- params: { pool: { type: "address", required: true, description: "Pool lp from fetch_positions claimFees.pool" } }
13337
- },
13338
- {
13339
- id: "aerodrome.claim-emissions",
13340
- protocolId: AERODROME_PROTOCOL_ID,
13341
- chainCategory: "evm",
13342
- description: "Claim gauge emissions in AERO (not the pool)",
13343
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
13344
- params: { gauge: { type: "address", required: true, description: "Gauge from fetch_positions claimEmissions" } }
13345
- }
13346
- ]
11856
+ var AERODROME_PROTOCOL_ID = "aerodrome";
11857
+ var AERODROME_CHAIN_ID = 8453;
11858
+ var AERO_CHAIN_IDS = [8453, 1, 10, 42161, 4663, 5042, 57073];
11859
+ var AERO_CHAIN_LABEL = {
11860
+ 1: "Ethereum",
11861
+ 10: "OP Mainnet",
11862
+ 42161: "Arbitrum",
11863
+ 4663: "Robinhood Chain",
11864
+ 5042: "Arc",
11865
+ 8453: "Base",
11866
+ 57073: "Ink"
13347
11867
  };
13348
- registerProtocolModule(aerodromeProtocolModule);
13349
-
13350
- // src/protocols/evm/continuum-dao/index.ts
13351
- init_constants();
13352
-
13353
- // src/protocols/evm/continuum-dao/marketplaceModule.ts
13354
- init_constants();
13355
- var common = ["keyGen", "purposeText", "useCustomGas"];
13356
- var continuumDaoMarketplaceProtocolModule = {
13357
- id: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID,
13358
- chainCategory: "evm",
13359
- isChainSupported(ctx) {
13360
- if (ctx.chainCategory !== "evm") return false;
13361
- const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
13362
- return n === CONTINUUM_DAO_LINEA_CHAIN_ID;
13363
- },
13364
- isTokenSupported(token) {
13365
- return token.category === "evm" && (token.kind === "erc20" || token.kind === "erc721");
13366
- },
13367
- actions: [
13368
- { id: "continuum-dao-marketplace.fetch-config", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Marketplace payment tokens, durations, and fees", commonParams: [], params: {} },
13369
- { id: "continuum-dao-marketplace.search", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Rank veCTMs for sale by price, locked CTM, or unlock time", commonParams: [], params: {} },
13370
- { id: "continuum-dao-marketplace.fee-alternative", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "One qualifying direct listing beside 12 times the KeyGen monthly fee", commonParams: [], params: {} },
13371
- { id: "continuum-dao-marketplace.fetch-listings", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Open listings, or past sales when includeInactive is set", commonParams: [], params: {} },
13372
- { id: "continuum-dao-marketplace.fetch-offerings", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Open offerings, or closed offers when includeInactive is set", commonParams: [], params: {} },
13373
- { id: "continuum-dao-marketplace.fetch-auctions", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Live auctions, or settled auctions when includeInactive is set. Each row includes bids.", commonParams: [], params: {} },
13374
- { id: "continuum-dao-marketplace.fetch-token", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "One veCTM: live orders plus history of sales and auctions", commonParams: [], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
13375
- { id: "continuum-dao-marketplace.fetch-activity", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "An address\u2019s sales, buys, and auctions including bids", commonParams: [], params: { address: { type: "string", required: true, description: "KeyGen or wallet" } } },
13376
- { id: "continuum-dao-marketplace.fetch-fee-preview", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Protocol fee for a price and veCTM", commonParams: [], params: {} },
13377
- { id: "continuum-dao-marketplace.create-listing", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Approve veCTM if needed and create a listing", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" }, askWei: { type: "string", required: true, description: "Ask in payment-token wei" } } },
13378
- { id: "continuum-dao-marketplace.delist", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Delist an open listing", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
13379
- { id: "continuum-dao-marketplace.fulfill-listing", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Buy a listed veCTM", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
13380
- { id: "continuum-dao-marketplace.create-offering", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Make an offering on a veCTM", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
13381
- { id: "continuum-dao-marketplace.rescind", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Rescind an open offering", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
13382
- { id: "continuum-dao-marketplace.fulfill-offering", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Accept an offering on a veCTM you own", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
13383
- { id: "continuum-dao-marketplace.create-auction", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Escrow a veCTM into an auction", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
13384
- { id: "continuum-dao-marketplace.cancel-auction", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Cancel a pending auction with no bids", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
13385
- { id: "continuum-dao-marketplace.auction-bid", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Bid on a live auction", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } },
13386
- { id: "continuum-dao-marketplace.settle-auction", protocolId: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, chainCategory: "evm", description: "Settle a completed or expired auction", commonParams: [...common], params: { tokenId: { type: "string", required: true, description: "veCTM token id" } } }
13387
- ]
11868
+ function isAerodromeChainSupported(chainId) {
11869
+ const n = typeof chainId === "number" ? chainId : Number.parseInt(String(chainId), 10);
11870
+ return AERO_CHAIN_IDS.includes(n);
11871
+ }
11872
+ function aerodromeUnsupportedChainMessage(chainId) {
11873
+ const listed = AERO_CHAIN_IDS.map((id) => `${AERO_CHAIN_LABEL[id]} ${id}`).join(", ");
11874
+ return `Aero is not deployed on chain ${chainId}. Launch chains: ${listed}.`;
11875
+ }
11876
+ var AERODROME_BASE_ADDRESSES_FALLBACK = {
11877
+ router: "0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43",
11878
+ rewardsDistributor: "0x227f65131A261548b057215bB1D5Ab2997964C7d",
11879
+ universalRouter: "0x6Cb442acF35158D5eDa88fe602221b67B400Be3E",
11880
+ pricesOracle: "0xee717411f6E44F9feE011835C8E6FAaC5dEfF166",
11881
+ slipstreamHelper: "0x0AD09A66af0154a84e86F761313d02d0abB6edd5",
11882
+ lpSugar: "0x69dD9db6d8f8E7d83887A704f447b1a584b599A1",
11883
+ sugarSlipstreamHelper: "0x9c62ab10577fB3C20A22E231b7703Ed6D456CC7a",
11884
+ swapper: "0x91616a7B9CF6D23f8C17845581051EBdC4BcB916"};
11885
+ var AERO_TOKEN_BASE = "0x3f5bF3EdAc59d650D8fDf9657a71F2f904A3a4Ee";
11886
+ var AERO_METAROUTER = "0x0fEf9e88A7b76BCDBF451780C6774FE32965Ee98";
11887
+ var AERO_METAQUOTER = "0x1dDfeC5058180C207F55BB77D95AcDd0d8227868";
11888
+ var AERO_STABLE_POOL_FACTORY = "0x78589E876edcEbdce72ee3436ab3c9AD3a7cEF2D";
11889
+ var AERO_VOLATILE_POOL_FACTORY = "0x8E6a9FCd1d638CC760Ffba397605Fe3355dE76D2";
11890
+ var AERO_NFPM = "0x4857DB576eE0e45F10525eC59527BfD10beeC60b";
11891
+ var AERO_SWAP_ROUTER = "0x9Ee35Bf1bd69a03c6F0393582030fCe8Bb93D418";
11892
+ var AERO_LEAF_VOTER = "0x382409fad8503FbCdbB27A4211551fa03e884078";
11893
+ var AERO_RECEIPT_BY_CHAIN = {
11894
+ 8453: "0x6CdDa0E730744DC6fF67654B35350Adad05EceE7",
11895
+ 10: "0xbdEaeA5205d16f34Cb40038052d91235D87B4C54",
11896
+ 42161: "0x436a085B2751cB87db270FFa66f8d698F87bEC82",
11897
+ 1: "0x9e148C5716b5aAdCFD3B71cEAE9EE7a9e22C29E2",
11898
+ 57073: "0x9e148C5716b5aAdCFD3B71cEAE9EE7a9e22C29E2",
11899
+ 4663: "0x9e148C5716b5aAdCFD3B71cEAE9EE7a9e22C29E2",
11900
+ 5042: "0x20077cC0d5E385A0Fe9C91bbC7DC744f51559307"
13388
11901
  };
13389
-
13390
- // src/protocols/evm/continuum-dao/index.ts
13391
- init_constants();
13392
- init_committeeList();
13393
- init_proposalCatalog();
13394
- init_governance();
13395
- init_simulateProposal();
13396
- init_foundryProposalScript();
13397
- init_explainProposal();
13398
- init_forum();
13399
- registerProtocolModule(continuumDaoMarketplaceProtocolModule);
13400
- var continuumDaoProtocolModule = {
13401
- id: CONTINUUM_DAO_PROTOCOL_ID,
13402
- chainCategory: "evm",
13403
- isChainSupported(ctx) {
13404
- if (ctx.chainCategory !== "evm") return false;
13405
- const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
13406
- return isContinuumDaoSupportedChainId(n);
13407
- },
13408
- isTokenSupported(token) {
13409
- return token.category === "evm" && (token.kind === "erc20" || token.kind === "erc721");
13410
- },
13411
- actions: [
13412
- { 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" } } },
13413
- { 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" } } },
13414
- { 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" } } },
13415
- { 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" } } },
13416
- { 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" } } },
13417
- { 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" } } },
13418
- { 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" } } },
13419
- { 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" } } },
13420
- { 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: {} },
13421
- { 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" } } },
13422
- { 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" } } },
13423
- { id: "continuum-dao.attach", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Attach veCTM to the node (authority KeyGen). groupId is implicit from that KeyGen and binds the fee waiver. A second group attaches after rotating authority.", 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" } } },
13424
- { 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" } } },
13425
- { 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" } } },
13426
- { 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" } } },
13427
- { id: "continuum-dao.simulate-proposal", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Dry-run a Bravo/Delta proposal; returns sequential Foundry forge scripts (not isolated eth_call)", commonParams: [], params: { account: { type: "string", required: false, description: "Proposer EOA; defaults to KeyGen when keyGenId is set" }, configuration: { type: "string", required: true, description: "bravo or delta" } } },
13428
- { id: "continuum-dao.compose-proposal-action", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Look up a contract function ABI, type-check parameter values, and preview a Bravo/Delta draft table", commonParams: [], params: { target: { type: "string", required: false, description: "Action contract address" }, functionName: { type: "string", required: false, description: "Function name or signature" }, configuration: { type: "string", required: false, description: "bravo or delta for preview" } } },
13429
- { 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: "Catalog id or governor proposal hash" }, support: { type: "number", required: true, description: "0 against, 1 for, 2 abstain" } } },
13430
- { 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: "Catalog id or governor proposal hash" } } },
13431
- { 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: "Catalog id or governor proposal hash" } } },
13432
- { 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: "Catalog id or governor proposal hash" } } },
13433
- { 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" } } },
13434
- { 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" } } },
13435
- { id: "continuum-dao.fetch-proposal-votes", protocolId: CONTINUUM_DAO_PROTOCOL_ID, chainCategory: "evm", description: "Who voted on a proposal and how (VoteCast / VoteCastWithParams)", commonParams: [], params: { proposalId: { type: "string", required: true, description: "Catalog id or governor proposal hash" } } },
13436
- { 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" } } },
13437
- { 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" } } },
13438
- { 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" } } },
13439
- { 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" } } },
13440
- { 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" } } },
13441
- { 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" } } },
13442
- { 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" } } },
13443
- { 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)" } } },
13444
- { 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" } } },
13445
- { 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" } } },
13446
- { 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" } } }
13447
- ]
11902
+ var AERO_FACTORY_REGISTRY_BY_CHAIN = {
11903
+ 8453: "0x7b2A2c12dC5Ea2a31455952a05031C3E4BB28F3E",
11904
+ 10: "0xb6F9705A631CC1C0E8570FFde48882C95E2Df408",
11905
+ 42161: "0x9E635b2c689fC52201DF7eF1C9FA607c2F58f666",
11906
+ 1: "0xdd1705e23762F4D6e44D8C31BD8Ea80c54612239",
11907
+ 57073: "0xdd1705e23762F4D6e44D8C31BD8Ea80c54612239",
11908
+ 4663: "0xdd1705e23762F4D6e44D8C31BD8Ea80c54612239",
11909
+ 5042: "0xCe44907DC45D3BFa3f5f6035B0e6E8B22D780A42"
13448
11910
  };
13449
- registerProtocolModule(continuumDaoProtocolModule);
11911
+ var AERO_CL_FACTORY_BY_CHAIN = {
11912
+ 8453: "0x9CB220581b91b0C83223012FE69688b92aD07a76",
11913
+ 10: "0xfeaB42D90055db3a0616249f76B6002D72266778",
11914
+ 42161: "0x88a60ee77392577c355C0acb2A8d476D5a4EC03a",
11915
+ 1: "0xF4Fd2E6c5B60c5b365cd1B96DD6245E6D60414c2",
11916
+ 57073: "0x7660BF2aDefC687C22906112ca323d60A00358cF",
11917
+ 4663: "0xc63d7338c178e805c544B8f897066bD3BBcBE136",
11918
+ 5042: "0x7F83235643181E440433400a027618Cd50879751"
11919
+ };
11920
+ var OP_STACK_WETH = "0x4200000000000000000000000000000000000006";
11921
+ var AERO_WETH_BY_CHAIN = {
11922
+ 1: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
11923
+ 10: OP_STACK_WETH,
11924
+ 42161: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
11925
+ 8453: OP_STACK_WETH,
11926
+ 57073: OP_STACK_WETH,
11927
+ 4663: "0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73"
11928
+ };
11929
+ var AERO_USDC_BY_CHAIN = {
11930
+ 1: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
11931
+ 10: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
11932
+ 42161: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
11933
+ 8453: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
11934
+ };
11935
+ function addr(raw) {
11936
+ return getAddress(raw);
11937
+ }
11938
+ function aeroUsdcAddress(chainId) {
11939
+ const raw = AERO_USDC_BY_CHAIN[chainId];
11940
+ return raw ? addr(raw) : null;
11941
+ }
11942
+ function aeroWrappedNativeAddress(chainId) {
11943
+ const raw = AERO_WETH_BY_CHAIN[chainId];
11944
+ return raw ? addr(raw) : null;
11945
+ }
11946
+ function aeroAddressesForChain(chainId) {
11947
+ const fb = AERODROME_BASE_ADDRESSES_FALLBACK;
11948
+ const cl = addr(AERO_CL_FACTORY_BY_CHAIN[chainId] ?? AERO_CL_FACTORY_BY_CHAIN[AERODROME_CHAIN_ID]);
11949
+ const receipt = addr(AERO_RECEIPT_BY_CHAIN[chainId] ?? AERO_RECEIPT_BY_CHAIN[AERODROME_CHAIN_ID]);
11950
+ const weth = aeroWrappedNativeAddress(chainId) ?? addr("0x0000000000000000000000000000000000000000");
11951
+ const token = chainId === AERODROME_CHAIN_ID ? addr(AERO_TOKEN_BASE) : receipt;
11952
+ return {
11953
+ chainId,
11954
+ aero: token,
11955
+ router: chainId === AERODROME_CHAIN_ID ? addr(fb.router) : addr(AERO_METAROUTER),
11956
+ poolFactory: addr(AERO_VOLATILE_POOL_FACTORY),
11957
+ factoryRegistry: addr(AERO_FACTORY_REGISTRY_BY_CHAIN[chainId] ?? AERO_FACTORY_REGISTRY_BY_CHAIN[AERODROME_CHAIN_ID]),
11958
+ voter: addr(AERO_LEAF_VOTER),
11959
+ votingEscrow: addr("0xBF7977E1521e9a3032bf7243Ee4712f311f13915"),
11960
+ rewardsDistributor: addr(fb.rewardsDistributor),
11961
+ mixedQuoter: addr(AERO_METAQUOTER),
11962
+ mixedQuoterV3: addr(AERO_METAQUOTER),
11963
+ nfpm: addr(AERO_NFPM),
11964
+ clFactory: cl,
11965
+ clFactory2: cl,
11966
+ clFactory3: cl,
11967
+ universalRouter: addr(fb.universalRouter),
11968
+ swapRouter: addr(AERO_SWAP_ROUTER),
11969
+ swapRouter2: addr(AERO_SWAP_ROUTER),
11970
+ swapRouter3: addr(AERO_SWAP_ROUTER),
11971
+ pricesOracle: addr(fb.pricesOracle),
11972
+ slipstreamHelper: addr(fb.slipstreamHelper),
11973
+ lpSugar: chainId === AERODROME_CHAIN_ID ? addr(fb.lpSugar) : addr("0x0000000000000000000000000000000000000000"),
11974
+ sugarSlipstreamHelper: addr(fb.sugarSlipstreamHelper),
11975
+ swapper: addr(fb.swapper),
11976
+ weth,
11977
+ stablePoolFactory: addr(AERO_STABLE_POOL_FACTORY),
11978
+ volatilePoolFactory: addr(AERO_VOLATILE_POOL_FACTORY),
11979
+ metarouter: addr(AERO_METAROUTER),
11980
+ metaquoter: addr(AERO_METAQUOTER),
11981
+ receiptToken: receipt
11982
+ };
11983
+ }
13450
11984
  var COMPOUND_V3_PROTOCOL_ID = "compound-v3";
13451
11985
  var COMPOUND_V3_CHAIN_IDS = [1, 8453, 42161, 10, 137, 5e3, 130, 59144];
13452
11986
  var COMPOUND_V3_WRAPPED_NATIVE = {
@@ -13855,9 +12389,6 @@ async function fetchCompoundV3SubgraphMarkets(args) {
13855
12389
  return null;
13856
12390
  }
13857
12391
  }
13858
-
13859
- // src/protocols/evm/compound-v3/reads.ts
13860
- init_defiEvmClient();
13861
12392
  function publicClient(rpcUrl, chainId) {
13862
12393
  const chain = defineChain({
13863
12394
  id: chainId,
@@ -14079,61 +12610,221 @@ async function ensureCompoundV3ChainAssetCache(args) {
14079
12610
  return map;
14080
12611
  }
14081
12612
 
14082
- // src/protocols/evm/compound-v3/index.ts
14083
- var compoundV3ProtocolModule = {
14084
- id: COMPOUND_V3_PROTOCOL_ID,
14085
- chainCategory: "evm",
14086
- isChainSupported(ctx) {
14087
- const id = typeof ctx.chainId === "string" ? Number(ctx.chainId) : ctx.chainId;
14088
- return ctx.chainCategory === "evm" && isCompoundV3ChainSupported(id);
14089
- },
14090
- isTokenSupported(token) {
14091
- return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
14092
- },
14093
- actions: [
14094
- {
14095
- id: "compound-v3.supply",
14096
- protocolId: COMPOUND_V3_PROTOCOL_ID,
14097
- chainCategory: "evm",
14098
- description: "Supply base (earn/repay) or collateral to a Comet proxy",
14099
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14100
- params: {}
14101
- },
14102
- {
14103
- id: "compound-v3.withdraw",
14104
- protocolId: COMPOUND_V3_PROTOCOL_ID,
14105
- chainCategory: "evm",
14106
- description: "Withdraw collateral or base (withdraw of base while undercollateralized = borrow)",
14107
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14108
- params: {}
14109
- },
14110
- {
14111
- id: "compound-v3.repay",
14112
- protocolId: COMPOUND_V3_PROTOCOL_ID,
14113
- chainCategory: "evm",
14114
- description: "Repay base debt by supplying base",
14115
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14116
- params: {}
14117
- },
14118
- {
14119
- id: "compound-v3.claim-rewards",
14120
- protocolId: COMPOUND_V3_PROTOCOL_ID,
14121
- chainCategory: "evm",
14122
- description: "Claim COMP / reward token from CometRewards",
14123
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14124
- params: {}
14125
- },
14126
- {
14127
- id: "compound-v3.bulker",
14128
- protocolId: COMPOUND_V3_PROTOCOL_ID,
14129
- chainCategory: "evm",
14130
- description: "Combined Bulker.invoke (optional)",
14131
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14132
- params: {}
12613
+ // src/protocols/evm/euler-v2/eulerV3Api.ts
12614
+ init_defiProxy();
12615
+ var EULER_V3_API_BASE = "https://v3.euler.finance";
12616
+ function qs(params) {
12617
+ const u = new URLSearchParams();
12618
+ for (const [k, v] of Object.entries(params)) {
12619
+ if (v == null) continue;
12620
+ u.set(k, String(v));
12621
+ }
12622
+ const s = u.toString();
12623
+ return s ? `?${s}` : "";
12624
+ }
12625
+ async function eulerV3Get(path, params = {}) {
12626
+ const rel = path.startsWith("/") ? path : `/${path}`;
12627
+ const query = qs(params);
12628
+ const directUrl = `${EULER_V3_API_BASE}${rel}${query}`;
12629
+ rel.replace(/^\/v3\/?/, "");
12630
+ const proxyUrl = void 0;
12631
+ return getJsonViaOptionalProxy({ directUrl, proxyUrl });
12632
+ }
12633
+ async function paginateV3Vaults(path, chainId, extra = {}) {
12634
+ const out = [];
12635
+ let offset = 0;
12636
+ const limit = 100;
12637
+ while (true) {
12638
+ const page = await eulerV3Get(path, {
12639
+ chainId,
12640
+ limit,
12641
+ offset,
12642
+ ...extra
12643
+ });
12644
+ const rows = page.data ?? [];
12645
+ out.push(...rows);
12646
+ const total = typeof page.meta?.total === "number" ? page.meta.total : out.length;
12647
+ offset += rows.length;
12648
+ if (!rows.length || offset >= total) break;
12649
+ }
12650
+ return out;
12651
+ }
12652
+ async function fetchEulerV3EvkVaults(args) {
12653
+ return paginateV3Vaults("/v3/evk/vaults", args.chainId, args.asset ? { asset: args.asset } : {});
12654
+ }
12655
+ async function fetchEulerV3EarnVaults(args) {
12656
+ return paginateV3Vaults("/v3/earn/vaults", args.chainId, args.asset ? { asset: args.asset } : {});
12657
+ }
12658
+ async function fetchEulerV3ActiveChainIds() {
12659
+ const page = await eulerV3Get("/v3/chains");
12660
+ const ids = [];
12661
+ for (const row of page.data ?? []) {
12662
+ if (typeof row.id !== "number" || !Number.isFinite(row.id)) continue;
12663
+ if ((row.status ?? "active") !== "active") continue;
12664
+ ids.push(row.id);
12665
+ }
12666
+ return ids.sort((a, b) => a - b);
12667
+ }
12668
+
12669
+ // src/protocols/evm/euler-v2/eulerV2Subgraph.ts
12670
+ var EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID = {
12671
+ 1: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-mainnet/latest/gn",
12672
+ 8453: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-base/latest/gn",
12673
+ 1923: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-swell/latest/gn",
12674
+ 146: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-sonic/latest/gn",
12675
+ 60808: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-bob/latest/gn",
12676
+ 80094: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-berachain/latest/gn",
12677
+ 43114: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-avalanche/latest/gn",
12678
+ 42161: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-arbitrum/latest/gn",
12679
+ 130: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-unichain/latest/gn",
12680
+ 56: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-bsc/latest/gn",
12681
+ 999: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-hyperevm/latest/gn",
12682
+ 239: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-tac/latest/gn",
12683
+ 9745: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-plasma/latest/gn",
12684
+ 137: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-polygon/latest/gn",
12685
+ 59144: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-linea/latest/gn",
12686
+ 143: "https://api.goldsky.com/api/public/project_cm4iagnemt1wp01xn4gh1agft/subgraphs/euler-simple-monad/latest/gn"
12687
+ };
12688
+ var WRAPPED_NATIVE_FALLBACK = {
12689
+ 1: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
12690
+ 10: "0x4200000000000000000000000000000000000006",
12691
+ 56: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
12692
+ 100: "0xe91d153e0b41518a2ce8dd3d7944fa863463a97d",
12693
+ 130: "0x4200000000000000000000000000000000000006",
12694
+ 137: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
12695
+ // Polygon: WPOL
12696
+ 143: "0x3bd359C1119dA7Da1D913D1C4D2B7c461115433A",
12697
+ // Monad: WMON
12698
+ 146: "0x03980325872071166574bcd94670450917897468",
12699
+ 239: "0xB63B9f0eb4A6E6f191529D71d4D88cc8900Df2C9",
12700
+ // TAC: WTAC (https://docs.tac.build/ecosystem/token-list)
12701
+ 480: "0x4200000000000000000000000000000000000006",
12702
+ 999: "0x5555555555555555555555555555555555555555",
12703
+ // HyperEVM: WHYPE (Hyperliquid docs)
12704
+ 1923: "0x4200000000000000000000000000000000000006",
12705
+ 42161: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
12706
+ 43114: "0xB31f66AA3C1e785363F0875A1B74D27b85FE0459",
12707
+ 5e3: "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8",
12708
+ // Mantle: WMNT
12709
+ 59144: "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",
12710
+ // Linea: WETH
12711
+ 57073: "0x4200000000000000000000000000000000000006",
12712
+ 60808: "0x4200000000000000000000000000000000000006",
12713
+ 80094: "0x6969696969696969696969696969696969696969",
12714
+ // Berachain: WBERA (https://docs.berachain.com)
12715
+ 8453: "0x4200000000000000000000000000000000000006",
12716
+ 9745: "0x6100E367285b01F48D07953803A2d8dCA5D19873"
12717
+ // Plasma: WXPL
12718
+ };
12719
+ for (const id of Object.keys(EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID).map(Number)) {
12720
+ if (WRAPPED_NATIVE_FALLBACK[id] == null) {
12721
+ throw new Error(`eulerV2Subgraph: add WRAPPED_NATIVE_FALLBACK for Euler Goldsky chain ${id}`);
12722
+ }
12723
+ }
12724
+ async function resolveEulerWrappedNativeToken(chainId) {
12725
+ try {
12726
+ const fromAave = await fetchAaveV4NativeWrappedToken(chainId);
12727
+ if (fromAave) return fromAave;
12728
+ } catch {
12729
+ }
12730
+ const fb = WRAPPED_NATIVE_FALLBACK[chainId];
12731
+ if (fb && isAddress(fb)) return getAddress(fb);
12732
+ return null;
12733
+ }
12734
+ function normAssetAddr(raw) {
12735
+ const s = (raw ?? "").trim();
12736
+ if (!s || !isAddress(s)) return null;
12737
+ return getAddress(s).toLowerCase();
12738
+ }
12739
+ function v3VaultShowsBorrow(totalBorrows, explorableBorrow) {
12740
+ if (explorableBorrow === true) return true;
12741
+ try {
12742
+ return BigInt((totalBorrows ?? "0").trim() || "0") > 0n;
12743
+ } catch {
12744
+ return false;
12745
+ }
12746
+ }
12747
+ var eulerV2ChainAssetCache = /* @__PURE__ */ new Map();
12748
+ async function fetchEulerV2ChainAssetCache(chainId) {
12749
+ const [nativeWrapped, evkVaults, earnVaults] = await Promise.all([
12750
+ resolveEulerWrappedNativeToken(chainId),
12751
+ fetchEulerV3EvkVaults({ chainId }),
12752
+ fetchEulerV3EarnVaults({ chainId }).catch(() => [])
12753
+ ]);
12754
+ const modes = /* @__PURE__ */ new Map();
12755
+ const symbols = /* @__PURE__ */ new Map();
12756
+ const ambiguousSymbols = /* @__PURE__ */ new Set();
12757
+ const bump = (addr2, patch) => {
12758
+ const cur = modes.get(addr2) ?? { lend: false, borrow: false, earn: false };
12759
+ modes.set(addr2, {
12760
+ lend: cur.lend || !!patch.lend,
12761
+ borrow: cur.borrow || !!patch.borrow,
12762
+ earn: cur.earn || !!patch.earn
12763
+ });
12764
+ };
12765
+ const noteSymbol = (symbol, addr2) => {
12766
+ const sym = (symbol ?? "").trim().toLowerCase();
12767
+ if (!sym || ambiguousSymbols.has(sym) || !isAddress(addr2)) return;
12768
+ const checksum = getAddress(addr2);
12769
+ const prev = symbols.get(sym);
12770
+ if (!prev) {
12771
+ symbols.set(sym, checksum);
12772
+ return;
12773
+ }
12774
+ if (prev.toLowerCase() !== checksum.toLowerCase()) {
12775
+ symbols.delete(sym);
12776
+ ambiguousSymbols.add(sym);
12777
+ }
12778
+ };
12779
+ for (const v of earnVaults) {
12780
+ const a = normAssetAddr(v.asset?.address ?? void 0);
12781
+ if (a) {
12782
+ bump(a, { earn: true });
12783
+ noteSymbol(v.asset?.symbol, a);
12784
+ }
12785
+ }
12786
+ for (const v of evkVaults) {
12787
+ const a = normAssetAddr(v.asset?.address ?? void 0);
12788
+ if (!a) continue;
12789
+ const vis = v.visibility;
12790
+ bump(a, {
12791
+ lend: vis?.explorableLend !== false,
12792
+ borrow: v3VaultShowsBorrow(v.totalBorrows, vis?.explorableBorrow)
12793
+ });
12794
+ noteSymbol(v.asset?.symbol, a);
12795
+ }
12796
+ const weth = symbols.get("weth");
12797
+ if (weth && !symbols.has("eth") && !ambiguousSymbols.has("eth")) {
12798
+ symbols.set("eth", weth);
12799
+ }
12800
+ return { nativeWrapped, modesByUnderlying: modes, symbolToAddress: symbols };
12801
+ }
12802
+ function ensureEulerV2ChainAssetCache(chainId) {
12803
+ const hit = eulerV2ChainAssetCache.get(chainId);
12804
+ if (hit) return hit;
12805
+ const p = fetchEulerV2ChainAssetCache(chainId).catch((e) => {
12806
+ eulerV2ChainAssetCache.delete(chainId);
12807
+ throw e;
12808
+ });
12809
+ eulerV2ChainAssetCache.set(chainId, p);
12810
+ return p;
12811
+ }
12812
+
12813
+ // src/protocols/evm/euler-v2/loadEulerV2SupportedChainIds.ts
12814
+ var cached2 = null;
12815
+ async function loadEulerV2SupportedChainIds() {
12816
+ if (cached2) return cached2;
12817
+ try {
12818
+ const ids = await fetchEulerV3ActiveChainIds();
12819
+ if (ids.length) {
12820
+ cached2 = new Set(ids);
12821
+ return cached2;
14133
12822
  }
14134
- ]
14135
- };
14136
- registerProtocolModule(compoundV3ProtocolModule);
12823
+ } catch {
12824
+ }
12825
+ cached2 = new Set(Object.keys(EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID).map((k) => Number(k)));
12826
+ return cached2;
12827
+ }
14137
12828
 
14138
12829
  // src/protocols/evm/pendle/support.ts
14139
12830
  var PENDLE_PROTOCOL_ID = "pendle";
@@ -14448,40 +13139,14 @@ async function pendleFetchMarketsSummary(args) {
14448
13139
  };
14449
13140
  }
14450
13141
 
14451
- // src/protocols/evm/pendle/index.ts
14452
- var pendleProtocolModule = {
14453
- id: PENDLE_PROTOCOL_ID,
14454
- chainCategory: "evm",
14455
- isChainSupported(ctx) {
14456
- if (ctx.chainCategory !== "evm") return false;
14457
- const n = typeof ctx.chainId === "number" ? ctx.chainId : Number.parseInt(String(ctx.chainId), 10);
14458
- if (!Number.isFinite(n)) return false;
14459
- return isPendleChainSupported(n);
14460
- },
14461
- isTokenSupported(token) {
14462
- if (token.category !== "evm") return false;
14463
- return token.kind === "native" || token.kind === "erc20";
14464
- },
14465
- actions: [
14466
- { id: "pendle.fetch-markets", protocolId: PENDLE_PROTOCOL_ID, chainCategory: "evm", description: "List live Pendle markets (TVL-ranked, cap 100, matured omitted)", commonParams: [], params: {} },
14467
- { id: "pendle.search-assets", protocolId: PENDLE_PROTOCOL_ID, chainCategory: "evm", description: "Search live PT/YT/SY/underlying (matured only if address-pinned)", commonParams: [], params: {} },
14468
- { id: "pendle.swap", protocolId: PENDLE_PROTOCOL_ID, chainCategory: "evm", description: "Swap token \u2194 PT/YT via Hosted SDK convert", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
14469
- { id: "pendle.mint-py", protocolId: PENDLE_PROTOCOL_ID, chainCategory: "evm", description: "Mint PT + YT", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
14470
- { id: "pendle.redeem-py", protocolId: PENDLE_PROTOCOL_ID, chainCategory: "evm", description: "Redeem PT + YT (PT only after expiry)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
14471
- { id: "pendle.add-liquidity", protocolId: PENDLE_PROTOCOL_ID, chainCategory: "evm", description: "Add Pendle AMM liquidity", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
14472
- { id: "pendle.fetch-positions", protocolId: PENDLE_PROTOCOL_ID, chainCategory: "evm", description: "List this wallet\u2019s Pendle LP (including matured)", commonParams: [], params: {} },
14473
- { id: "pendle.remove-liquidity", protocolId: PENDLE_PROTOCOL_ID, chainCategory: "evm", description: "Remove Pendle AMM liquidity", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
14474
- { id: "pendle.redeem-rewards", protocolId: PENDLE_PROTOCOL_ID, chainCategory: "evm", description: "Redeem on-chain SY/YT/LP interest and incentives (not merkle airdrops)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
14475
- ]
14476
- };
14477
- registerProtocolModule(pendleProtocolModule);
14478
-
14479
13142
  // src/protocols/evm/derive/constants.ts
14480
13143
  var DERIVE_PROTOCOL_ID = "derive";
14481
13144
  var DERIVE_MAINNET_API = "https://api.derive.xyz/v3";
14482
13145
  var DERIVE_TESTNET_API = "https://testnet.api.derive.xyz/v3";
14483
13146
  var DERIVE_MAINNET_API_V2 = "https://api.lyra.finance";
14484
13147
  var DERIVE_TESTNET_API_V2 = "https://api-demo.lyra.finance";
13148
+
13149
+ // src/protocols/evm/derive/support.ts
14485
13150
  function deriveNetworkFromChainId(chainId) {
14486
13151
  return chainId === 11155111 ? "testnet" : "mainnet";
14487
13152
  }
@@ -14651,132 +13316,8 @@ async function deriveFetchCurrenciesRaw(args) {
14651
13316
  }
14652
13317
  return [];
14653
13318
  }
14654
-
14655
- // src/protocols/evm/derive/index.ts
14656
- var deriveProtocolModule = {
14657
- id: DERIVE_PROTOCOL_ID,
14658
- chainCategory: "evm",
14659
- isChainSupported(ctx) {
14660
- if (ctx.chainCategory !== "evm") return false;
14661
- const chainId = typeof ctx.chainId === "number" ? ctx.chainId : Number(ctx.chainId);
14662
- return Number.isFinite(chainId) && isDeriveChainSupported(chainId);
14663
- },
14664
- isTokenSupported(token) {
14665
- if (token.category !== "evm") return false;
14666
- return token.kind === "erc20" || token.kind === "native";
14667
- },
14668
- actions: [
14669
- {
14670
- id: "derive.depositNewSubaccount",
14671
- protocolId: DERIVE_PROTOCOL_ID,
14672
- chainCategory: "evm",
14673
- description: "Ethereum L1 approve + ACTION_MANAGER.depositToNewSubaccount. First credit creates the trading + fallback subaccounts. chainId 1 / 11155111. Arb/OP/Base use derive.socketDeposit; HyperEVM HYPE uses derive.hypeVaultDeposit.",
14674
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14675
- params: {
14676
- protocolAsset: { type: "string", required: true, description: "Risk-universe collateral protocol asset" },
14677
- underlyingErc20: { type: "string", required: true, description: "L1 ERC-20 to approve (usually USDC)" },
14678
- amountHuman: { type: "string", required: true, description: "Deposit amount in underlying decimals" },
14679
- managerId: { type: "number", required: true, description: "Risk-universe manager_id" }
14680
- }
14681
- },
14682
- {
14683
- id: "derive.depositAddressTransfer",
14684
- protocolId: DERIVE_PROTOCOL_ID,
14685
- chainCategory: "evm",
14686
- description: "Ethereum L1 ERC-20 transfer to a registered Derive deposit address (standard / keeper sweep). Call register_deposit_address first.",
14687
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14688
- params: {
14689
- underlyingErc20: { type: "string", required: true, description: "L1 ERC-20 to send (usually USDC)" },
14690
- amountHuman: { type: "string", required: true, description: "Transfer amount in token units" },
14691
- depositAddress: { type: "string", required: true, description: "From register_deposit_address" }
14692
- }
14693
- },
14694
- {
14695
- id: "derive.socketDeposit",
14696
- protocolId: DERIVE_PROTOCOL_ID,
14697
- chainCategory: "evm",
14698
- description: "Socket FAST deposit of USDC/WETH/WBTC on Ethereum, Optimism, Base, or Arbitrum into Derive Chain. Native ETH wraps to WETH first. useCustomGas.",
14699
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14700
- params: {
14701
- token: { type: "string", required: true, description: "Row ERC-20 or native 0x0 (wraps to WETH)" },
14702
- amountHuman: { type: "string", required: true, description: "Deposit amount in token units" }
14703
- }
14704
- },
14705
- {
14706
- id: "derive.hypeVaultDeposit",
14707
- protocolId: DERIVE_PROTOCOL_ID,
14708
- chainCategory: "evm",
14709
- description: "HyperEVM (999): wrap native HYPE to WHYPE if needed, approve Derive vault, deposit.",
14710
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14711
- params: {
14712
- amountHuman: { type: "string", required: true, description: "HYPE amount" },
14713
- token: { type: "string", required: false, description: "Native 0x0 or WHYPE" }
14714
- }
14715
- },
14716
- {
14717
- id: "derive.placeOrder",
14718
- protocolId: DERIVE_PROTOCOL_ID,
14719
- chainCategory: "evm",
14720
- description: "Place a Derive options limit order via EIP-712 Action (delivery derive_exchange). Does not spend the current-chain token.",
14721
- commonParams: ["keyGen", "purposeText"],
14722
- params: {
14723
- instrumentName: { type: "string", required: true, description: "e.g. ETH-20260626-3000-C" },
14724
- direction: { type: "string", required: true, description: "buy or sell" },
14725
- amount: { type: "string", required: true, description: "Contract size" },
14726
- limitPrice: { type: "string", required: true, description: "Limit price" },
14727
- maxFee: { type: "string", required: true, description: "Max fee (e18-scaled, \u226412 decimals)" },
14728
- subaccountId: { type: "number", required: true, description: "From fetch_subaccounts \u2014 never 0" }
14729
- }
14730
- },
14731
- {
14732
- id: "derive.replaceOrder",
14733
- protocolId: DERIVE_PROTOCOL_ID,
14734
- chainCategory: "evm",
14735
- description: "Replace a Derive open order (EIP-712 Action + orderIdToCancel or nonceToCancel).",
14736
- commonParams: ["keyGen", "purposeText"],
14737
- params: {
14738
- instrumentName: { type: "string", required: true, description: "Instrument of the replacement order" },
14739
- direction: { type: "string", required: true, description: "buy or sell" },
14740
- amount: { type: "string", required: true, description: "Contract size" },
14741
- limitPrice: { type: "string", required: true, description: "Limit price" },
14742
- maxFee: { type: "string", required: true, description: "Max fee" },
14743
- subaccountId: { type: "number", required: true, description: "From fetch_subaccounts" },
14744
- orderIdToCancel: { type: "string", required: false, description: "Existing order id (xor nonceToCancel)" },
14745
- nonceToCancel: { type: "string", required: false, description: "Existing order nonce (xor orderIdToCancel)" }
14746
- }
14747
- },
14748
- {
14749
- id: "derive.cancel",
14750
- protocolId: DERIVE_PROTOCOL_ID,
14751
- chainCategory: "evm",
14752
- description: "Cancel a Derive open order. v3 cancel is session-auth; this signs EIP-191 login for private/cancel delivery.",
14753
- commonParams: ["keyGen", "purposeText"],
14754
- params: {
14755
- instrumentName: { type: "string", required: true, description: "Instrument of the open order" },
14756
- orderId: { type: "string", required: true, description: "order_id from fetch_open_orders" },
14757
- subaccountId: { type: "number", required: true, description: "From fetch_subaccounts" }
14758
- }
14759
- },
14760
- {
14761
- id: "derive.transferSpot",
14762
- protocolId: DERIVE_PROTOCOL_ID,
14763
- chainCategory: "evm",
14764
- description: "EIP-712 transfer_spot. Use toSubaccountId 0 + newSubaccountManager to create an extra subaccount after the first funded one.",
14765
- commonParams: ["keyGen", "purposeText"],
14766
- params: {
14767
- fromSubaccountId: { type: "number", required: true, description: "Funded source subaccount" },
14768
- toSubaccountId: { type: "number", required: true, description: "0 to create an extra subaccount" },
14769
- newSubaccountManager: { type: "number", required: true, description: "Required when toSubaccountId is 0" },
14770
- asset: { type: "string", required: true, description: "Protocol asset address" },
14771
- amount: { type: "string", required: true, description: "Transfer amount" }
14772
- }
14773
- }
14774
- ]
14775
- };
14776
- registerProtocolModule(deriveProtocolModule);
14777
13319
  var TRUEO_PROTOCOL_ID = "trueo";
14778
13320
  var TRUEO_BASE_CHAIN_ID = 8453;
14779
- var TRUEO_CHAIN_IDS = [TRUEO_BASE_CHAIN_ID];
14780
13321
  var TRUEO_TYD = getAddress("0xb13CF163d916917d9cD6E836905cA5f12a1dEF4B");
14781
13322
  var TRUEO_TRUE = getAddress("0x21CFCFc3d8F98fC728f48341D10Ad8283F6EB7AB");
14782
13323
  var TRUEO_USDC = getAddress("0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913");
@@ -14786,235 +13327,8 @@ getAddress("0x0A1AFc2121B4441127a02DEF72928F61f564034a");
14786
13327
  getAddress("0x6E08d24AEf78F6d1a97503F64E84fDF65f8125E1");
14787
13328
  getAddress("0x3E83479B2276EcFb7C7181F67b5d092d3511e0C4");
14788
13329
  getAddress("0x000000000022D473030F116dDEE9F6B43aC78BA3");
14789
- function isTrueoChainSupported(chainId) {
14790
- return TRUEO_CHAIN_IDS.includes(chainId);
14791
- }
14792
-
14793
- // src/protocols/evm/hyperliquidOutcome/api.ts
14794
- var HYPERLIQUID_OUTCOME_PROTOCOL_ID = "hyperliquidOutcome";
14795
-
14796
- // src/protocols/evm/trueo/index.ts
14797
- var trueoProtocolModule = {
14798
- id: TRUEO_PROTOCOL_ID,
14799
- chainCategory: "evm",
14800
- isChainSupported(ctx) {
14801
- const id = typeof ctx.chainId === "string" ? Number(ctx.chainId) : ctx.chainId;
14802
- return ctx.chainCategory === "evm" && isTrueoChainSupported(id);
14803
- },
14804
- isTokenSupported(token) {
14805
- return token.category === "evm" && (token.kind === "erc20" || token.kind === "ctmerc20");
14806
- },
14807
- actions: [
14808
- {
14809
- id: "trueo.wrap-tyd",
14810
- protocolId: TRUEO_PROTOCOL_ID,
14811
- chainCategory: "evm",
14812
- description: "Mint TYD by depositing Base USDC into the Yearn ERC-4626 vault",
14813
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14814
- params: {}
14815
- },
14816
- {
14817
- id: "trueo.unwrap-tyd",
14818
- protocolId: TRUEO_PROTOCOL_ID,
14819
- chainCategory: "evm",
14820
- description: "Redeem TYD shares back to Base USDC",
14821
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14822
- params: {}
14823
- },
14824
- {
14825
- id: "trueo.mint",
14826
- protocolId: TRUEO_PROTOCOL_ID,
14827
- chainCategory: "evm",
14828
- description: "Mint YES+NO from TYD (or USDC via adapter)",
14829
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14830
- params: {}
14831
- },
14832
- {
14833
- id: "trueo.burn",
14834
- protocolId: TRUEO_PROTOCOL_ID,
14835
- chainCategory: "evm",
14836
- description: "Burn equal YES+NO back to TYD",
14837
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14838
- params: {}
14839
- },
14840
- {
14841
- id: "trueo.redeem",
14842
- protocolId: TRUEO_PROTOCOL_ID,
14843
- chainCategory: "evm",
14844
- description: "Redeem winning outcome tokens after resolution",
14845
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14846
- params: {}
14847
- },
14848
- {
14849
- id: "trueo.swap",
14850
- protocolId: TRUEO_PROTOCOL_ID,
14851
- chainCategory: "evm",
14852
- description: "Buy Yes or No with TYD via UniversalRouterAdapter V4 swap",
14853
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14854
- params: {}
14855
- },
14856
- {
14857
- id: "trueo.create-order",
14858
- protocolId: TRUEO_PROTOCOL_ID,
14859
- chainCategory: "evm",
14860
- description: "Create an on-chain OrderManager limit order",
14861
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14862
- params: {}
14863
- },
14864
- {
14865
- id: "trueo.cancel-order",
14866
- protocolId: TRUEO_PROTOCOL_ID,
14867
- chainCategory: "evm",
14868
- description: "Cancel an on-chain OrderManager order",
14869
- commonParams: ["keyGen", "purposeText", "useCustomGas"],
14870
- params: {}
14871
- }
14872
- ]
14873
- };
14874
- registerProtocolModule(trueoProtocolModule);
14875
-
14876
- // src/protocols/evm/hyperliquidOutcome/index.ts
14877
- var hyperliquidOutcomeProtocolModule = {
14878
- id: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
14879
- chainCategory: "evm",
14880
- isChainSupported(ctx) {
14881
- if (ctx.chainCategory !== "evm") return false;
14882
- const chainId = typeof ctx.chainId === "number" ? ctx.chainId : Number(ctx.chainId);
14883
- return Number.isFinite(chainId) && isHyperliquidChainSupported(chainId);
14884
- },
14885
- isTokenSupported(token) {
14886
- return token.category === "evm" && token.kind === "native";
14887
- },
14888
- actions: [
14889
- {
14890
- id: "hyperliquidOutcome.order",
14891
- protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
14892
- chainCategory: "evm",
14893
- description: "Limit buy or sell a HIP-4 outcome side via Hyperliquid /exchange",
14894
- commonParams: ["keyGen", "purposeText"],
14895
- params: {}
14896
- },
14897
- {
14898
- id: "hyperliquidOutcome.cancel",
14899
- protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
14900
- chainCategory: "evm",
14901
- description: "Cancel a resting HIP-4 outcome order",
14902
- commonParams: ["keyGen", "purposeText"],
14903
- params: {}
14904
- },
14905
- {
14906
- id: "hyperliquidOutcome.split",
14907
- protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
14908
- chainCategory: "evm",
14909
- description: "Split quote tokens into Yes and No shares",
14910
- commonParams: ["keyGen", "purposeText"],
14911
- params: {}
14912
- },
14913
- {
14914
- id: "hyperliquidOutcome.merge",
14915
- protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
14916
- chainCategory: "evm",
14917
- description: "Merge Yes and No shares back into quote tokens",
14918
- commonParams: ["keyGen", "purposeText"],
14919
- params: {}
14920
- },
14921
- {
14922
- id: "hyperliquidOutcome.merge-question",
14923
- protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
14924
- chainCategory: "evm",
14925
- description: "Merge Yes shares across a question into quote tokens",
14926
- commonParams: ["keyGen", "purposeText"],
14927
- params: {}
14928
- },
14929
- {
14930
- id: "hyperliquidOutcome.negate",
14931
- protocolId: HYPERLIQUID_OUTCOME_PROTOCOL_ID,
14932
- chainCategory: "evm",
14933
- description: "Convert No shares of one outcome into Yes shares of the other outcomes",
14934
- commonParams: ["keyGen", "purposeText"],
14935
- params: {}
14936
- }
14937
- ]
14938
- };
14939
- registerProtocolModule(hyperliquidOutcomeProtocolModule);
14940
- var skillsDir = join(dirname(fileURLToPath(import.meta.url)), "skills");
14941
- var SKILL_PROTOCOL_IDS = [
14942
- "aave-v4",
14943
- "lido",
14944
- "railgun",
14945
- "uniswap-v4",
14946
- "curve-dao",
14947
- "ethena",
14948
- "euler-v2",
14949
- "maple-syrup",
14950
- "sky",
14951
- "gmx",
14952
- "hyperliquid",
14953
- "arcus",
14954
- "morpho",
14955
- "circle-cctp",
14956
- "aerodrome",
14957
- "pendle",
14958
- "continuum-dao",
14959
- "continuum-dao-marketplace",
14960
- "compound-v3",
14961
- "derive",
14962
- "trueo",
14963
- "hyperliquidOutcome",
14964
- "yield-compare"
14965
- ];
14966
- function getToolsForProtocol(protocolId) {
14967
- return MCP_TOOL_DEFINITIONS.filter((t) => t.protocolId === protocolId);
14968
- }
14969
- function readSharedMultisignMcpGasSection() {
14970
- try {
14971
- return readFileSync(join(skillsDir, "_shared", "multisign-mcp-gas.md"), "utf8").trim();
14972
- } catch {
14973
- return "";
14974
- }
14975
- }
14976
- function getProtocolSkill(protocolId) {
14977
- if (!SKILL_PROTOCOL_IDS.includes(protocolId)) {
14978
- return void 0;
14979
- }
14980
- try {
14981
- const skill = readFileSync(join(skillsDir, protocolId, "SKILL.md"), "utf8").trim();
14982
- const shared = readSharedMultisignMcpGasSection();
14983
- if (!shared) return skill;
14984
- if (skill.includes("## Gas and MCP submit")) return skill;
14985
- return `${skill}
14986
13330
 
14987
- ${shared}
14988
- `;
14989
- } catch {
14990
- return void 0;
14991
- }
14992
- }
14993
- function listProtocolsWithSkills() {
14994
- return [...SKILL_PROTOCOL_IDS];
14995
- }
14996
- function getProtocolDiscoverySummary(protocolId) {
14997
- const mod = getProtocolModules().find((p) => p.id === protocolId);
14998
- if (!mod) return void 0;
14999
- return {
15000
- protocolId: mod.id,
15001
- chainCategory: mod.chainCategory,
15002
- actions: mod.actions.map((a) => ({ id: a.id, description: a.description })),
15003
- tools: getToolsForProtocol(protocolId).map((t) => ({
15004
- name: t.name,
15005
- actionId: t.actionId,
15006
- description: t.description,
15007
- prerequisites: t.prerequisites,
15008
- followUp: t.followUp
15009
- }))
15010
- };
15011
- }
15012
- init_coinbaseB20();
15013
- init_support();
15014
- init_support2();
15015
- init_addresses();
15016
- init_stockTokens();
15017
- init_constants();
13331
+ // src/agent/support/advisors.ts
15018
13332
  function advisor(protocolId, tokenFilter, impl) {
15019
13333
  return { protocolId, tokenFilter, ...impl };
15020
13334
  }
@@ -15658,6 +13972,10 @@ function listProtocolSupportAdvisorIds() {
15658
13972
 
15659
13973
  // src/agent/catalog.ts
15660
13974
  function getAgentCatalog() {
13975
+ const named = {};
13976
+ for (const entry of PROTOCOL_MANIFEST) {
13977
+ named[entry.catalogKey] = getProtocolModule(entry.id);
13978
+ }
15661
13979
  return {
15662
13980
  protocols: getProtocolModules(),
15663
13981
  byCategory: {
@@ -15665,33 +13983,12 @@ function getAgentCatalog() {
15665
13983
  solana: getActionsByChainCategory("solana"),
15666
13984
  near: getActionsByChainCategory("near")
15667
13985
  },
15668
- uniswapV4: uniswapV4ProtocolModule,
15669
- curveDao: curveDaoProtocolModule,
15670
- lido: lidoProtocolModule,
15671
- railgun: railgunProtocolModule,
15672
- ethena: ethenaProtocolModule,
15673
- maple: mapleProtocolModule,
15674
- sky: skyProtocolModule,
15675
- aaveV4: aaveV4ProtocolModule,
15676
- eulerV2: eulerV2ProtocolModule,
15677
- gmx: gmxProtocolModule,
15678
- hyperliquid: hyperliquidProtocolModule,
15679
- arcus: arcusProtocolModule,
15680
- morpho: morphoProtocolModule,
15681
- circleCctp: circleCctpProtocolModule,
15682
- venice: veniceProtocolModule,
15683
- aerodrome: aerodromeProtocolModule,
15684
- continuumDao: continuumDaoProtocolModule,
15685
- compoundV3: compoundV3ProtocolModule,
15686
- pendle: pendleProtocolModule,
15687
- derive: deriveProtocolModule,
15688
- trueo: trueoProtocolModule,
15689
- hyperliquidOutcome: hyperliquidOutcomeProtocolModule,
13986
+ ...named,
15690
13987
  /** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
15691
13988
  mcp: getAgentCatalogForMcp()
15692
13989
  };
15693
13990
  }
15694
13991
 
15695
- 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, agentEvmChainIdSchema, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4FetchMarketInputSchema, mcpAaveV4FetchMarketOutputSchema, mcpAaveV4FetchMarketsInputSchema, mcpAaveV4FetchMarketsOutputSchema, mcpAaveV4FetchStockMarketsInputSchema, mcpAaveV4FetchStockMarketsOutputSchema, mcpAaveV4MerklClaimInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpAerodromeBuildAddLiquidityMultisignInputSchema, mcpAerodromeBuildClBurnMultisignInputSchema, mcpAerodromeBuildClCollectFeesMultisignInputSchema, mcpAerodromeBuildClDecreaseMultisignInputSchema, mcpAerodromeBuildClIncreaseMultisignInputSchema, mcpAerodromeBuildClMintMultisignInputSchema, mcpAerodromeBuildClaimEmissionsMultisignInputSchema, mcpAerodromeBuildClaimFeesMultisignInputSchema, mcpAerodromeBuildGaugeStakeMultisignInputSchema, mcpAerodromeBuildGaugeUnstakeMultisignInputSchema, mcpAerodromeBuildRemoveLiquidityMultisignInputSchema, mcpAerodromeBuildSwapMultisignInputSchema, mcpAerodromeDiscoverPoolsInputSchema, mcpAerodromeDiscoverPoolsOutputSchema, mcpAerodromeFetchLpYieldsInputSchema, mcpAerodromeFetchLpYieldsOutputSchema, mcpAerodromeFetchPoolsInputSchema, mcpAerodromeFetchPoolsOutputSchema, mcpAerodromeFetchPositionsInputSchema, mcpAerodromeFetchPositionsOutputSchema, mcpAerodromeFetchStockLpYieldsInputSchema, mcpAerodromeFetchStockLpYieldsOutputSchema, 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, mcpContinuumDaoCancelInputSchema, mcpContinuumDaoCastVoteBravoInputSchema, mcpContinuumDaoCastVoteDeltaInputSchema, mcpContinuumDaoComposeProposalActionInputSchema, mcpContinuumDaoComposeProposalActionOutputSchema, mcpContinuumDaoCreateLockInputSchema, mcpContinuumDaoDelegateInputSchema, mcpContinuumDaoExecuteInputSchema, mcpContinuumDaoExplainProposalInputSchema, mcpContinuumDaoExplainProposalOutputSchema, mcpContinuumDaoFetchDelegatesInputSchema, mcpContinuumDaoFetchDelegatesOutputSchema, mcpContinuumDaoFetchLiveProposalsInputSchema, mcpContinuumDaoFetchLiveProposalsOutputSchema, mcpContinuumDaoFetchProposalInputSchema, mcpContinuumDaoFetchProposalOutputSchema, mcpContinuumDaoFetchProposalStateInputSchema, mcpContinuumDaoFetchProposalStateOutputSchema, mcpContinuumDaoFetchProposalVotesInputSchema, mcpContinuumDaoFetchProposalVotesOutputSchema, 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, mcpContinuumDaoLiquidateInputSchema, mcpContinuumDaoMergeInputSchema, mcpContinuumDaoMpaFlagInputSchema, mcpContinuumDaoMpaFlagOutputSchema, mcpContinuumDaoMpaListingInputSchema, mcpContinuumDaoMpaListingOutputSchema, mcpContinuumDaoMpaMailboxListInputSchema, mcpContinuumDaoMpaMailboxListOutputSchema, mcpContinuumDaoMpaMailboxOpenInputSchema, mcpContinuumDaoMpaMailboxOpenOutputSchema, mcpContinuumDaoMpaMailboxSendInputSchema, mcpContinuumDaoMpaMailboxSendOutputSchema, mcpContinuumDaoMpaRetractInputSchema, mcpContinuumDaoMpaRetractOutputSchema, mcpContinuumDaoProposalIdInputSchema, mcpContinuumDaoProposalVoteRowSchema, mcpContinuumDaoProposeBravoInputSchema, mcpContinuumDaoProposeDeltaInputSchema, mcpContinuumDaoRegisterProposalInputSchema, mcpContinuumDaoRegisterProposalOutputSchema, mcpContinuumDaoRequestDetachInputSchema, mcpContinuumDaoSimulateProposalInputSchema, mcpContinuumDaoSimulateProposalOutputSchema, mcpContinuumDaoSplitInputSchema, mcpContinuumDaoTechnocoreBindInputSchema, mcpContinuumDaoTechnocoreBindOutputSchema, mcpContinuumDaoTokenIdInputSchema, mcpContinuumDaoTransferInputSchema, mcpContinuumDaoUndelegateInputSchema, mcpContinuumDaoWithdrawInputSchema, mcpContinuumDaoWriteInput, mcpCurveDaoBuildAddLiquidityMultisignInputSchema, mcpCurveDaoBuildGaugeDepositMultisignInputSchema, mcpCurveDaoBuildRemoveLiquidityMultisignInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoFetchImportantPoolsInputSchema, mcpCurveDaoFetchImportantPoolsOutputSchema, mcpCurveDaoFetchLpYieldsInputSchema, mcpCurveDaoFetchLpYieldsOutputSchema, mcpCurveDaoQuoteAddLiquidityInputSchema, mcpCurveDaoQuoteAddLiquidityOutputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpCurveDaoQuoteRemoveLiquidityInputSchema, mcpCurveDaoQuoteRemoveLiquidityOutputSchema, mcpDeriveCancelInputSchema, mcpDeriveDepositAddressTransferInputSchema, mcpDeriveDepositNewSubaccountInputSchema, mcpDeriveFetchCurrenciesInputSchema, mcpDeriveFetchCurrenciesOutputSchema, mcpDeriveFetchMarketSnapshotInputSchema, mcpDeriveFetchMarketSnapshotOutputSchema, mcpDeriveFetchOhlcvInputSchema, mcpDeriveFetchOhlcvOutputSchema, mcpDeriveFetchOpenOrdersInputSchema, mcpDeriveFetchOpenOrdersOutputSchema, mcpDeriveFetchOptionChainInputSchema, mcpDeriveFetchOptionChainOutputSchema, mcpDeriveFetchPendingDepositsInputSchema, mcpDeriveFetchPendingDepositsOutputSchema, mcpDeriveFetchPortfolioInputSchema, mcpDeriveFetchPortfolioOutputSchema, mcpDeriveFetchPositionsInputSchema, mcpDeriveFetchPositionsOutputSchema, mcpDeriveFetchRiskUniversesInputSchema, mcpDeriveFetchRiskUniversesOutputSchema, mcpDeriveFetchSubaccountsInputSchema, mcpDeriveFetchSubaccountsOutputSchema, mcpDeriveFetchTickersInputSchema, mcpDeriveFetchTickersOutputSchema, mcpDeriveHypeVaultDepositInputSchema, mcpDeriveOrderQuoteInputSchema, mcpDeriveOrderQuoteOutputSchema, mcpDerivePlaceOrderInputSchema, mcpDeriveRegisterDepositAddressInputSchema, mcpDeriveRegisterDepositAddressOutputSchema, mcpDeriveReplaceOrderInputSchema, mcpDeriveSearchInstrumentsInputSchema, mcpDeriveSearchInstrumentsOutputSchema, mcpDeriveSocketDepositInputSchema, mcpDeriveTransferSpotInputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaFetchSusdeApyInputSchema, mcpEthenaFetchSusdeApyOutputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2FetchEarnVaultsInputSchema, mcpEulerV2FetchEarnVaultsOutputSchema, mcpEulerV2FetchLendVaultsInputSchema, mcpEulerV2FetchLendVaultsOutputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2MerklClaimInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGetPredictionMarketInputSchema, mcpGetPredictionMarketOutputSchema, 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, mcpHyperliquidFetchLendMarketsInputSchema, mcpHyperliquidFetchLendMarketsOutputSchema, mcpHyperliquidFetchLendPositionsInputSchema, mcpHyperliquidFetchLendPositionsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOhlcvInputSchema, mcpHyperliquidFetchOhlcvOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchStockMarketsInputSchema, mcpHyperliquidFetchStockMarketsOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultApysInputSchema, mcpHyperliquidFetchVaultApysOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLendInputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidSearchMarketsInputSchema, mcpHyperliquidSearchMarketsOutputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidTrailingStopInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUpdateLeverageInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoFetchStethAprInputSchema, mcpLidoFetchStethAprOutputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpListMyPredictionMarketsInputSchema, mcpListMyPredictionMarketsOutputSchema, mcpMapleDepositInputSchema, mcpMapleFetchMarketInputSchema, mcpMapleFetchMarketOutputSchema, mcpMapleFetchMarketsInputSchema, mcpMapleFetchMarketsOutputSchema, mcpMapleRequestRedeemInputSchema, mcpMerklRewardsFetchInputSchema, mcpMerklRewardsFetchOutputSchema, mcpMorphoBlueBorrowInputSchema, mcpMorphoBlueCollateralDepositInputSchema, mcpMorphoBlueCollateralWithdrawInputSchema, mcpMorphoBlueRepayInputSchema, mcpMorphoBlueSupplyInputSchema, mcpMorphoBlueWithdrawInputSchema, mcpMorphoFetchBlueMarketsInputSchema, mcpMorphoFetchBlueMarketsOutputSchema, mcpMorphoFetchEarnVaultsInputSchema, mcpMorphoFetchEarnVaultsOutputSchema, mcpMorphoFetchMidnightBooksInputSchema, mcpMorphoFetchMidnightBooksOutputSchema, mcpMorphoFetchMidnightOffersInputSchema, mcpMorphoFetchMidnightOffersOutputSchema, mcpMorphoFetchMidnightPositionsInputSchema, mcpMorphoFetchMidnightPositionsOutputSchema, mcpMorphoFetchMidnightQuoteInputSchema, mcpMorphoFetchMidnightQuoteOutputSchema, mcpMorphoFetchPositionsInputSchema, mcpMorphoFetchPositionsOutputSchema, mcpMorphoFetchStockMarketsInputSchema, mcpMorphoFetchStockMarketsOutputSchema, mcpMorphoMerklClaimInputSchema, mcpMorphoMidnightBorrowInputSchema, mcpMorphoMidnightCancelLendOfferInputSchema, mcpMorphoMidnightLendInputSchema, mcpMorphoMidnightLendOfferInputSchema, mcpMorphoMidnightRepayInputSchema, mcpMorphoVaultDepositInputSchema, mcpMorphoVaultWithdrawInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpPendleBuildAddLiquidityMultisignInputSchema, mcpPendleBuildMintPyMultisignInputSchema, mcpPendleBuildMintSyMultisignInputSchema, mcpPendleBuildRedeemPyMultisignInputSchema, mcpPendleBuildRedeemRewardsMultisignInputSchema, mcpPendleBuildRedeemSyMultisignInputSchema, mcpPendleBuildRemoveLiquidityMultisignInputSchema, mcpPendleBuildSwapMultisignInputSchema, mcpPendleFetchMarketsInputSchema, mcpPendleFetchMarketsOutputSchema, mcpPendleFetchMerkleRewardsInputSchema, mcpPendleFetchMerkleRewardsOutputSchema, mcpPendleFetchPositionsInputSchema, mcpPendleFetchPositionsOutputSchema, mcpPendleFetchPricesInputSchema, mcpPendleFetchPricesOutputSchema, mcpPendleQuoteAddLiquidityInputSchema, mcpPendleQuoteMintPyInputSchema, mcpPendleQuoteMintSyInputSchema, mcpPendleQuoteOutputSchema, mcpPendleQuoteRedeemPyInputSchema, mcpPendleQuoteRedeemSyInputSchema, mcpPendleQuoteRemoveLiquidityInputSchema, mcpPendleQuoteSwapInputSchema, mcpPendleSearchAssetsInputSchema, mcpPendleSearchAssetsOutputSchema, mcpPredictionMarketRowSchema, mcpRailgunAgreeSpendInputSchema, mcpRailgunEnsureWalletInputSchema, mcpRailgunEnsureWalletOutputSchema, mcpRailgunFeeQuoteInputSchema, mcpRailgunFeeQuoteSchema, mcpRailgunFetchPopularAssetsInputSchema, mcpRailgunFetchPopularAssetsOutputSchema, mcpRailgunFetchPrivateBalancesInputSchema, mcpRailgunFetchPrivateBalancesOutputSchema, mcpRailgunListBroadcastersInputSchema, mcpRailgunListBroadcastersOutputSchema, mcpRailgunListSpendsInputSchema, mcpRailgunListSpendsOutputSchema, mcpRailgunPrivateActionOutputSchema, mcpRailgunPrivateTransferInputSchema, mcpRailgunShieldInputSchema, mcpRailgunUnshieldInputSchema, mcpRailgunUnwrapInputSchema, mcpSearchPredictionMarketsInputSchema, mcpSearchPredictionMarketsOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyFetchSusdsRateInputSchema, mcpSkyFetchSusdsRateOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpTrueoBurnInputSchema, mcpTrueoCancelOrderInputSchema, mcpTrueoCreateOrderInputSchema, mcpTrueoFetchCategoriesInputSchema, mcpTrueoFetchCategoriesOutputSchema, mcpTrueoFetchChanceSeriesInputSchema, mcpTrueoFetchChanceSeriesOutputSchema, mcpTrueoFetchMarketInputSchema, mcpTrueoFetchMarketOutputSchema, mcpTrueoFetchOrderbookInputSchema, mcpTrueoFetchOrderbookOutputSchema, mcpTrueoFetchTrendingInputSchema, mcpTrueoFetchTrendingOutputSchema, mcpTrueoMarketRowSchema, mcpTrueoMintInputSchema, mcpTrueoRedeemInputSchema, mcpTrueoSearchMarketsInputSchema, mcpTrueoSearchMarketsOutputSchema, mcpTrueoSwapInputSchema, mcpTrueoUnwrapTydInputSchema, mcpTrueoWrapTydInputSchema, 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 };
13992
+ 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_MANIFEST, PROTOCOL_SUPPORT_ADVISORS, agentEvmChainIdSchema, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4FetchMarketInputSchema, mcpAaveV4FetchMarketOutputSchema, mcpAaveV4FetchMarketsInputSchema, mcpAaveV4FetchMarketsOutputSchema, mcpAaveV4FetchStockMarketsInputSchema, mcpAaveV4FetchStockMarketsOutputSchema, mcpAaveV4MerklClaimInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpAerodromeBuildAddLiquidityMultisignInputSchema, mcpAerodromeBuildClBurnMultisignInputSchema, mcpAerodromeBuildClCollectFeesMultisignInputSchema, mcpAerodromeBuildClDecreaseMultisignInputSchema, mcpAerodromeBuildClIncreaseMultisignInputSchema, mcpAerodromeBuildClMintMultisignInputSchema, mcpAerodromeBuildClaimEmissionsMultisignInputSchema, mcpAerodromeBuildClaimFeesMultisignInputSchema, mcpAerodromeBuildGaugeStakeMultisignInputSchema, mcpAerodromeBuildGaugeUnstakeMultisignInputSchema, mcpAerodromeBuildRemoveLiquidityMultisignInputSchema, mcpAerodromeBuildSwapMultisignInputSchema, mcpAerodromeDiscoverPoolsInputSchema, mcpAerodromeDiscoverPoolsOutputSchema, mcpAerodromeFetchLpYieldsInputSchema, mcpAerodromeFetchLpYieldsOutputSchema, mcpAerodromeFetchPoolsInputSchema, mcpAerodromeFetchPoolsOutputSchema, mcpAerodromeFetchPositionsInputSchema, mcpAerodromeFetchPositionsOutputSchema, mcpAerodromeFetchStockLpYieldsInputSchema, mcpAerodromeFetchStockLpYieldsOutputSchema, 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, mcpContinuumDaoCancelInputSchema, mcpContinuumDaoCastVoteBravoInputSchema, mcpContinuumDaoCastVoteDeltaInputSchema, mcpContinuumDaoComposeProposalActionInputSchema, mcpContinuumDaoComposeProposalActionOutputSchema, mcpContinuumDaoCreateLockInputSchema, mcpContinuumDaoDelegateInputSchema, mcpContinuumDaoExecuteInputSchema, mcpContinuumDaoExplainProposalInputSchema, mcpContinuumDaoExplainProposalOutputSchema, mcpContinuumDaoFetchDelegatesInputSchema, mcpContinuumDaoFetchDelegatesOutputSchema, mcpContinuumDaoFetchLiveProposalsInputSchema, mcpContinuumDaoFetchLiveProposalsOutputSchema, mcpContinuumDaoFetchProposalInputSchema, mcpContinuumDaoFetchProposalOutputSchema, mcpContinuumDaoFetchProposalStateInputSchema, mcpContinuumDaoFetchProposalStateOutputSchema, mcpContinuumDaoFetchProposalVotesInputSchema, mcpContinuumDaoFetchProposalVotesOutputSchema, 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, mcpContinuumDaoLiquidateInputSchema, mcpContinuumDaoMergeInputSchema, mcpContinuumDaoMpaFlagInputSchema, mcpContinuumDaoMpaFlagOutputSchema, mcpContinuumDaoMpaListingInputSchema, mcpContinuumDaoMpaListingOutputSchema, mcpContinuumDaoMpaMailboxListInputSchema, mcpContinuumDaoMpaMailboxListOutputSchema, mcpContinuumDaoMpaMailboxOpenInputSchema, mcpContinuumDaoMpaMailboxOpenOutputSchema, mcpContinuumDaoMpaMailboxSendInputSchema, mcpContinuumDaoMpaMailboxSendOutputSchema, mcpContinuumDaoMpaRetractInputSchema, mcpContinuumDaoMpaRetractOutputSchema, mcpContinuumDaoProposalIdInputSchema, mcpContinuumDaoProposalVoteRowSchema, mcpContinuumDaoProposeBravoInputSchema, mcpContinuumDaoProposeDeltaInputSchema, mcpContinuumDaoRegisterProposalInputSchema, mcpContinuumDaoRegisterProposalOutputSchema, mcpContinuumDaoRequestDetachInputSchema, mcpContinuumDaoSimulateProposalInputSchema, mcpContinuumDaoSimulateProposalOutputSchema, mcpContinuumDaoSplitInputSchema, mcpContinuumDaoTechnocoreBindInputSchema, mcpContinuumDaoTechnocoreBindOutputSchema, mcpContinuumDaoTokenIdInputSchema, mcpContinuumDaoTransferInputSchema, mcpContinuumDaoUndelegateInputSchema, mcpContinuumDaoWithdrawInputSchema, mcpContinuumDaoWriteInput, mcpCurveDaoBuildAddLiquidityMultisignInputSchema, mcpCurveDaoBuildGaugeDepositMultisignInputSchema, mcpCurveDaoBuildRemoveLiquidityMultisignInputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoFetchImportantPoolsInputSchema, mcpCurveDaoFetchImportantPoolsOutputSchema, mcpCurveDaoFetchLpYieldsInputSchema, mcpCurveDaoFetchLpYieldsOutputSchema, mcpCurveDaoQuoteAddLiquidityInputSchema, mcpCurveDaoQuoteAddLiquidityOutputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpCurveDaoQuoteRemoveLiquidityInputSchema, mcpCurveDaoQuoteRemoveLiquidityOutputSchema, mcpDeriveCancelInputSchema, mcpDeriveDepositAddressTransferInputSchema, mcpDeriveDepositNewSubaccountInputSchema, mcpDeriveFetchCurrenciesInputSchema, mcpDeriveFetchCurrenciesOutputSchema, mcpDeriveFetchMarketSnapshotInputSchema, mcpDeriveFetchMarketSnapshotOutputSchema, mcpDeriveFetchOhlcvInputSchema, mcpDeriveFetchOhlcvOutputSchema, mcpDeriveFetchOpenOrdersInputSchema, mcpDeriveFetchOpenOrdersOutputSchema, mcpDeriveFetchOptionChainInputSchema, mcpDeriveFetchOptionChainOutputSchema, mcpDeriveFetchPendingDepositsInputSchema, mcpDeriveFetchPendingDepositsOutputSchema, mcpDeriveFetchPortfolioInputSchema, mcpDeriveFetchPortfolioOutputSchema, mcpDeriveFetchPositionsInputSchema, mcpDeriveFetchPositionsOutputSchema, mcpDeriveFetchRiskUniversesInputSchema, mcpDeriveFetchRiskUniversesOutputSchema, mcpDeriveFetchSubaccountsInputSchema, mcpDeriveFetchSubaccountsOutputSchema, mcpDeriveFetchTickersInputSchema, mcpDeriveFetchTickersOutputSchema, mcpDeriveHypeVaultDepositInputSchema, mcpDeriveOrderQuoteInputSchema, mcpDeriveOrderQuoteOutputSchema, mcpDerivePlaceOrderInputSchema, mcpDeriveRegisterDepositAddressInputSchema, mcpDeriveRegisterDepositAddressOutputSchema, mcpDeriveReplaceOrderInputSchema, mcpDeriveSearchInstrumentsInputSchema, mcpDeriveSearchInstrumentsOutputSchema, mcpDeriveSocketDepositInputSchema, mcpDeriveTransferSpotInputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaFetchSusdeApyInputSchema, mcpEthenaFetchSusdeApyOutputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2FetchEarnVaultsInputSchema, mcpEulerV2FetchEarnVaultsOutputSchema, mcpEulerV2FetchLendVaultsInputSchema, mcpEulerV2FetchLendVaultsOutputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2MerklClaimInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGetPredictionMarketInputSchema, mcpGetPredictionMarketOutputSchema, 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, mcpHyperliquidFetchLendMarketsInputSchema, mcpHyperliquidFetchLendMarketsOutputSchema, mcpHyperliquidFetchLendPositionsInputSchema, mcpHyperliquidFetchLendPositionsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOhlcvInputSchema, mcpHyperliquidFetchOhlcvOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchStockMarketsInputSchema, mcpHyperliquidFetchStockMarketsOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultApysInputSchema, mcpHyperliquidFetchVaultApysOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLendInputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidSearchMarketsInputSchema, mcpHyperliquidSearchMarketsOutputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidTrailingStopInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUpdateLeverageInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoFetchStethAprInputSchema, mcpLidoFetchStethAprOutputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpListMyPredictionMarketsInputSchema, mcpListMyPredictionMarketsOutputSchema, mcpMapleDepositInputSchema, mcpMapleFetchMarketInputSchema, mcpMapleFetchMarketOutputSchema, mcpMapleFetchMarketsInputSchema, mcpMapleFetchMarketsOutputSchema, mcpMapleRequestRedeemInputSchema, mcpMerklRewardsFetchInputSchema, mcpMerklRewardsFetchOutputSchema, mcpMorphoBlueBorrowInputSchema, mcpMorphoBlueCollateralDepositInputSchema, mcpMorphoBlueCollateralWithdrawInputSchema, mcpMorphoBlueRepayInputSchema, mcpMorphoBlueSupplyInputSchema, mcpMorphoBlueWithdrawInputSchema, mcpMorphoFetchBlueMarketsInputSchema, mcpMorphoFetchBlueMarketsOutputSchema, mcpMorphoFetchEarnVaultsInputSchema, mcpMorphoFetchEarnVaultsOutputSchema, mcpMorphoFetchMidnightBooksInputSchema, mcpMorphoFetchMidnightBooksOutputSchema, mcpMorphoFetchMidnightOffersInputSchema, mcpMorphoFetchMidnightOffersOutputSchema, mcpMorphoFetchMidnightPositionsInputSchema, mcpMorphoFetchMidnightPositionsOutputSchema, mcpMorphoFetchMidnightQuoteInputSchema, mcpMorphoFetchMidnightQuoteOutputSchema, mcpMorphoFetchPositionsInputSchema, mcpMorphoFetchPositionsOutputSchema, mcpMorphoFetchStockMarketsInputSchema, mcpMorphoFetchStockMarketsOutputSchema, mcpMorphoMerklClaimInputSchema, mcpMorphoMidnightBorrowInputSchema, mcpMorphoMidnightCancelLendOfferInputSchema, mcpMorphoMidnightLendInputSchema, mcpMorphoMidnightLendOfferInputSchema, mcpMorphoMidnightRepayInputSchema, mcpMorphoVaultDepositInputSchema, mcpMorphoVaultWithdrawInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpPendleBuildAddLiquidityMultisignInputSchema, mcpPendleBuildMintPyMultisignInputSchema, mcpPendleBuildMintSyMultisignInputSchema, mcpPendleBuildRedeemPyMultisignInputSchema, mcpPendleBuildRedeemRewardsMultisignInputSchema, mcpPendleBuildRedeemSyMultisignInputSchema, mcpPendleBuildRemoveLiquidityMultisignInputSchema, mcpPendleBuildSwapMultisignInputSchema, mcpPendleFetchMarketsInputSchema, mcpPendleFetchMarketsOutputSchema, mcpPendleFetchMerkleRewardsInputSchema, mcpPendleFetchMerkleRewardsOutputSchema, mcpPendleFetchPositionsInputSchema, mcpPendleFetchPositionsOutputSchema, mcpPendleFetchPricesInputSchema, mcpPendleFetchPricesOutputSchema, mcpPendleQuoteAddLiquidityInputSchema, mcpPendleQuoteMintPyInputSchema, mcpPendleQuoteMintSyInputSchema, mcpPendleQuoteOutputSchema, mcpPendleQuoteRedeemPyInputSchema, mcpPendleQuoteRedeemSyInputSchema, mcpPendleQuoteRemoveLiquidityInputSchema, mcpPendleQuoteSwapInputSchema, mcpPendleSearchAssetsInputSchema, mcpPendleSearchAssetsOutputSchema, mcpPredictionMarketRowSchema, mcpRailgunAgreeSpendInputSchema, mcpRailgunEnsureWalletInputSchema, mcpRailgunEnsureWalletOutputSchema, mcpRailgunFeeQuoteInputSchema, mcpRailgunFeeQuoteSchema, mcpRailgunFetchPopularAssetsInputSchema, mcpRailgunFetchPopularAssetsOutputSchema, mcpRailgunFetchPrivateBalancesInputSchema, mcpRailgunFetchPrivateBalancesOutputSchema, mcpRailgunListBroadcastersInputSchema, mcpRailgunListBroadcastersOutputSchema, mcpRailgunListSpendsInputSchema, mcpRailgunListSpendsOutputSchema, mcpRailgunPrivateActionOutputSchema, mcpRailgunPrivateTransferInputSchema, mcpRailgunShieldInputSchema, mcpRailgunUnshieldInputSchema, mcpRailgunUnwrapInputSchema, mcpSearchPredictionMarketsInputSchema, mcpSearchPredictionMarketsOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyFetchSusdsRateInputSchema, mcpSkyFetchSusdsRateOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpTrueoBurnInputSchema, mcpTrueoCancelOrderInputSchema, mcpTrueoCreateOrderInputSchema, mcpTrueoFetchCategoriesInputSchema, mcpTrueoFetchCategoriesOutputSchema, mcpTrueoFetchChanceSeriesInputSchema, mcpTrueoFetchChanceSeriesOutputSchema, mcpTrueoFetchMarketInputSchema, mcpTrueoFetchMarketOutputSchema, mcpTrueoFetchOrderbookInputSchema, mcpTrueoFetchOrderbookOutputSchema, mcpTrueoFetchTrendingInputSchema, mcpTrueoFetchTrendingOutputSchema, mcpTrueoMarketRowSchema, mcpTrueoMintInputSchema, mcpTrueoRedeemInputSchema, mcpTrueoSearchMarketsInputSchema, mcpTrueoSearchMarketsOutputSchema, mcpTrueoSwapInputSchema, mcpTrueoUnwrapTydInputSchema, mcpTrueoWrapTydInputSchema, 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, protocolManifestEntry, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
15696
13993
  //# sourceMappingURL=catalog.js.map
15697
13994
  //# sourceMappingURL=catalog.js.map