@continuumdao/ctm-mpc-defi 0.2.55 → 0.2.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/catalog.cjs +692 -310
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +279 -99
- package/dist/agent/catalog.js +687 -312
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/aave-v4/SKILL.md +26 -3
- package/dist/agent/skills/aerodrome/SKILL.md +3 -1
- package/dist/agent/skills/circle-cctp/SKILL.md +5 -4
- package/dist/agent/skills/continuum-dao-marketplace/SKILL.md +4 -4
- package/dist/agent/skills/curve-dao/SKILL.md +2 -2
- package/dist/agent/skills/uniswap-v4/SKILL.md +2 -2
- package/dist/index.cjs +165 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +166 -20
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/aave-v4/index.cjs +198 -15
- package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/aave-v4/index.d.ts +62 -7
- package/dist/protocols/evm/aave-v4/index.js +189 -16
- package/dist/protocols/evm/aave-v4/index.js.map +1 -1
- package/dist/protocols/evm/aerodrome/index.cjs +152 -63
- package/dist/protocols/evm/aerodrome/index.cjs.map +1 -1
- package/dist/protocols/evm/aerodrome/index.d.ts +30 -58
- package/dist/protocols/evm/aerodrome/index.js +151 -64
- package/dist/protocols/evm/aerodrome/index.js.map +1 -1
- package/dist/protocols/evm/circle-cctp/index.cjs +77 -19
- package/dist/protocols/evm/circle-cctp/index.cjs.map +1 -1
- package/dist/protocols/evm/circle-cctp/index.d.ts +53 -3
- package/dist/protocols/evm/circle-cctp/index.js +76 -20
- package/dist/protocols/evm/circle-cctp/index.js.map +1 -1
- package/dist/protocols/evm/compound-v3/index.cjs +115 -2
- package/dist/protocols/evm/compound-v3/index.cjs.map +1 -1
- package/dist/protocols/evm/compound-v3/index.js +116 -3
- package/dist/protocols/evm/compound-v3/index.js.map +1 -1
- package/dist/protocols/evm/continuum-dao/index.cjs +288 -32
- package/dist/protocols/evm/continuum-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/continuum-dao/index.d.ts +14 -1
- package/dist/protocols/evm/continuum-dao/index.js +287 -33
- package/dist/protocols/evm/continuum-dao/index.js.map +1 -1
- package/dist/protocols/evm/curve-dao/index.cjs +120 -5
- package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/curve-dao/index.js +120 -5
- package/dist/protocols/evm/curve-dao/index.js.map +1 -1
- package/dist/protocols/evm/euler-v2/index.cjs +121 -6
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
- package/dist/protocols/evm/euler-v2/index.js +121 -6
- package/dist/protocols/evm/euler-v2/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs +129 -57
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.d.ts +2 -1
- package/dist/protocols/evm/morpho/index.js +129 -58
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/dist/protocols/evm/pendle/index.cjs +129 -10
- package/dist/protocols/evm/pendle/index.cjs.map +1 -1
- package/dist/protocols/evm/pendle/index.js +129 -10
- package/dist/protocols/evm/pendle/index.js.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.cjs +164 -17
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.js +165 -18
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/package.json +1 -1
package/dist/agent/catalog.cjs
CHANGED
|
@@ -48,6 +48,111 @@ var init_chainIdParse = __esm({
|
|
|
48
48
|
"src/chains/evm/chainIdParse.ts"() {
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
|
+
function isCoinbaseB20AssetToken(address) {
|
|
52
|
+
try {
|
|
53
|
+
return viem.getAddress(address).toLowerCase().startsWith(COINBASE_B20_ASSET_PREFIX);
|
|
54
|
+
} catch {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function looksLikeCoinbaseStockSymbol(symbol) {
|
|
59
|
+
return /^[A-Za-z][A-Za-z0-9]{0,8}(?:\.[A-Za-z][A-Za-z0-9]{0,4})?c$/.test((symbol ?? "").trim());
|
|
60
|
+
}
|
|
61
|
+
function indexCatalog(rows) {
|
|
62
|
+
catalogRows = rows;
|
|
63
|
+
catalogAt = Date.now();
|
|
64
|
+
catalogBySymbol.clear();
|
|
65
|
+
catalogByAddress.clear();
|
|
66
|
+
for (const row of rows) {
|
|
67
|
+
catalogBySymbol.set(row.symbol.toLowerCase(), row);
|
|
68
|
+
catalogByAddress.set(row.address.toLowerCase(), row);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function parseCoinbaseTokenizedStocksPayload(payload) {
|
|
72
|
+
const tokens = Array.isArray(payload) ? payload : payload && typeof payload === "object" && Array.isArray(payload.tokens) ? payload.tokens : [];
|
|
73
|
+
const out = [];
|
|
74
|
+
const seen = /* @__PURE__ */ new Set();
|
|
75
|
+
for (const row of tokens) {
|
|
76
|
+
if (!row || typeof row !== "object") continue;
|
|
77
|
+
const rec = row;
|
|
78
|
+
const symbol = typeof rec.symbol === "string" ? rec.symbol.trim() : "";
|
|
79
|
+
const addressRaw = typeof rec.contract_address === "string" ? rec.contract_address.trim() : "";
|
|
80
|
+
if (!looksLikeCoinbaseStockSymbol(symbol) || !isCoinbaseB20AssetToken(addressRaw)) continue;
|
|
81
|
+
const address = viem.getAddress(addressRaw);
|
|
82
|
+
const key = address.toLowerCase();
|
|
83
|
+
if (seen.has(key)) continue;
|
|
84
|
+
seen.add(key);
|
|
85
|
+
const name = typeof rec.name === "string" && rec.name.trim() ? rec.name.trim() : symbol;
|
|
86
|
+
const iconUrl = typeof rec.icon_url === "string" && rec.icon_url.trim() ? rec.icon_url.trim() : void 0;
|
|
87
|
+
const decimals = typeof rec.decimals === "number" && Number.isInteger(rec.decimals) && rec.decimals >= 0 && rec.decimals <= 18 ? rec.decimals : COINBASE_B20_STOCK_DECIMALS;
|
|
88
|
+
out.push({ address, symbol, name, decimals, iconUrl });
|
|
89
|
+
if (out.length >= CATALOG_MAX) break;
|
|
90
|
+
}
|
|
91
|
+
return out;
|
|
92
|
+
}
|
|
93
|
+
async function fetchCoinbaseB20StockCatalog() {
|
|
94
|
+
const merged = [];
|
|
95
|
+
const seen = /* @__PURE__ */ new Set();
|
|
96
|
+
let pageToken = "";
|
|
97
|
+
for (let page = 0; page < 4; page++) {
|
|
98
|
+
const url = new URL(COINBASE_TOKENIZED_STOCKS_API_URL);
|
|
99
|
+
url.searchParams.set("page_size", "500");
|
|
100
|
+
if (pageToken) url.searchParams.set("page_token", pageToken);
|
|
101
|
+
const res = await fetch(url, { cache: "no-store", signal: AbortSignal.timeout(8e3) });
|
|
102
|
+
if (!res.ok) break;
|
|
103
|
+
const json = await res.json();
|
|
104
|
+
for (const row of parseCoinbaseTokenizedStocksPayload(json)) {
|
|
105
|
+
const key = row.address.toLowerCase();
|
|
106
|
+
if (seen.has(key)) continue;
|
|
107
|
+
seen.add(key);
|
|
108
|
+
merged.push(row);
|
|
109
|
+
if (merged.length >= CATALOG_MAX) break;
|
|
110
|
+
}
|
|
111
|
+
pageToken = typeof json.next_page_token === "string" ? json.next_page_token.trim() : "";
|
|
112
|
+
if (!pageToken || merged.length >= CATALOG_MAX) break;
|
|
113
|
+
}
|
|
114
|
+
if (merged.length > 0) indexCatalog(merged);
|
|
115
|
+
return catalogRows ?? [];
|
|
116
|
+
}
|
|
117
|
+
async function ensureCoinbaseB20StockCatalog() {
|
|
118
|
+
if (catalogRows && catalogRows.length > 0 && Date.now() - catalogAt < CATALOG_TTL_MS) return catalogRows;
|
|
119
|
+
if (!catalogInflight) {
|
|
120
|
+
catalogInflight = fetchCoinbaseB20StockCatalog().finally(() => {
|
|
121
|
+
catalogInflight = null;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
try {
|
|
125
|
+
return await catalogInflight;
|
|
126
|
+
} catch {
|
|
127
|
+
return catalogRows ?? [];
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
function lookupCoinbaseB20StockToken(token) {
|
|
131
|
+
const key = (token ?? "").trim();
|
|
132
|
+
if (!key) return null;
|
|
133
|
+
const fromCatalog = catalogBySymbol.get(key.toLowerCase());
|
|
134
|
+
if (fromCatalog) return fromCatalog;
|
|
135
|
+
try {
|
|
136
|
+
return catalogByAddress.get(viem.getAddress(key).toLowerCase()) ?? null;
|
|
137
|
+
} catch {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
var COINBASE_B20_STOCK_DECIMALS, COINBASE_B20_ASSET_PREFIX, COINBASE_TOKENIZED_STOCKS_API_URL, CATALOG_TTL_MS, CATALOG_MAX, catalogRows, catalogAt, catalogInflight, catalogBySymbol, catalogByAddress;
|
|
142
|
+
var init_coinbaseB20 = __esm({
|
|
143
|
+
"src/protocols/evm/shared/coinbaseB20.ts"() {
|
|
144
|
+
COINBASE_B20_STOCK_DECIMALS = 8;
|
|
145
|
+
COINBASE_B20_ASSET_PREFIX = "0xb200000000000000000000";
|
|
146
|
+
COINBASE_TOKENIZED_STOCKS_API_URL = "https://api.coinbase.com/v1/tokenized-stocks";
|
|
147
|
+
CATALOG_TTL_MS = 15 * 60 * 1e3;
|
|
148
|
+
CATALOG_MAX = 500;
|
|
149
|
+
catalogRows = null;
|
|
150
|
+
catalogAt = 0;
|
|
151
|
+
catalogInflight = null;
|
|
152
|
+
catalogBySymbol = /* @__PURE__ */ new Map();
|
|
153
|
+
catalogByAddress = /* @__PURE__ */ new Map();
|
|
154
|
+
}
|
|
155
|
+
});
|
|
51
156
|
function defiEvmTransport(rpcUrl, opts) {
|
|
52
157
|
const url = rpcUrl.trim();
|
|
53
158
|
return viem.http(url, opts);
|
|
@@ -103,6 +208,110 @@ var init_defiProxy = __esm({
|
|
|
103
208
|
"src/core/defiProxy.ts"() {
|
|
104
209
|
}
|
|
105
210
|
});
|
|
211
|
+
function isConfiguredAddress(addr) {
|
|
212
|
+
if (!addr?.trim()) return false;
|
|
213
|
+
try {
|
|
214
|
+
return viem.getAddress(addr) !== viem.zeroAddress;
|
|
215
|
+
} catch {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function continuumDaoDeployment(chainId) {
|
|
220
|
+
return CONTINUUM_DAO_DEPLOYMENTS[chainId] ?? null;
|
|
221
|
+
}
|
|
222
|
+
function isContinuumDaoLockChain(chainId) {
|
|
223
|
+
return chainId === CONTINUUM_DAO_LINEA_CHAIN_ID || chainId === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID;
|
|
224
|
+
}
|
|
225
|
+
function isContinuumDaoSupportedChainId(chainId) {
|
|
226
|
+
return continuumDaoDeployment(chainId) != null;
|
|
227
|
+
}
|
|
228
|
+
function ctmTokenAddressOnEvmChain(chainId) {
|
|
229
|
+
const ctm = continuumDaoDeployment(chainId)?.ctm;
|
|
230
|
+
return ctm && isConfiguredAddress(ctm) ? viem.getAddress(ctm) : null;
|
|
231
|
+
}
|
|
232
|
+
function votingEscrowAddressOnEvmChain(chainId) {
|
|
233
|
+
const ve = continuumDaoDeployment(chainId)?.votingEscrow;
|
|
234
|
+
return ve && isConfiguredAddress(ve) ? viem.getAddress(ve) : null;
|
|
235
|
+
}
|
|
236
|
+
function votingEscrowMarketplaceAddressOnEvmChain(chainId) {
|
|
237
|
+
if (chainId !== CONTINUUM_DAO_LINEA_CHAIN_ID) return null;
|
|
238
|
+
return VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS;
|
|
239
|
+
}
|
|
240
|
+
function listContinuumDaoDefaultAssets() {
|
|
241
|
+
const out = [];
|
|
242
|
+
for (const chainId of [
|
|
243
|
+
CONTINUUM_DAO_LINEA_CHAIN_ID,
|
|
244
|
+
CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID,
|
|
245
|
+
CONTINUUM_DAO_ETHEREUM_CHAIN_ID
|
|
246
|
+
]) {
|
|
247
|
+
const dep = continuumDaoDeployment(chainId);
|
|
248
|
+
if (!dep) continue;
|
|
249
|
+
if (isConfiguredAddress(dep.ctm)) {
|
|
250
|
+
out.push({
|
|
251
|
+
chainId,
|
|
252
|
+
tokenType: "CTMERC20",
|
|
253
|
+
contractAddress: viem.getAddress(dep.ctm),
|
|
254
|
+
name: CTM_TOKEN_NAME,
|
|
255
|
+
symbol: CTM_TOKEN_SYMBOL,
|
|
256
|
+
decimals: CTM_TOKEN_DECIMALS
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
if (isContinuumDaoLockChain(chainId) && isConfiguredAddress(dep.votingEscrow)) {
|
|
260
|
+
out.push({
|
|
261
|
+
chainId,
|
|
262
|
+
tokenType: "ERC721",
|
|
263
|
+
contractAddress: viem.getAddress(dep.votingEscrow),
|
|
264
|
+
name: VECTM_TOKEN_NAME,
|
|
265
|
+
symbol: VECTM_TOKEN_SYMBOL
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
return out;
|
|
270
|
+
}
|
|
271
|
+
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;
|
|
272
|
+
var init_constants = __esm({
|
|
273
|
+
"src/protocols/evm/continuum-dao/constants.ts"() {
|
|
274
|
+
CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
|
|
275
|
+
CONTINUUM_DAO_ETHEREUM_CHAIN_ID = 1;
|
|
276
|
+
CONTINUUM_DAO_LINEA_CHAIN_ID = 59144;
|
|
277
|
+
CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID = 59141;
|
|
278
|
+
CTM_TOKEN_NAME = "Continuum";
|
|
279
|
+
CTM_TOKEN_SYMBOL = "CTM";
|
|
280
|
+
VECTM_TOKEN_NAME = "Voting Escrow Continuum";
|
|
281
|
+
VECTM_TOKEN_SYMBOL = "veCTM";
|
|
282
|
+
CTM_TOKEN_DECIMALS = 18;
|
|
283
|
+
WEEK_SECONDS = 7 * 86400;
|
|
284
|
+
UNSET = {
|
|
285
|
+
ctm: viem.zeroAddress,
|
|
286
|
+
votingEscrow: viem.zeroAddress,
|
|
287
|
+
nodeProperties: viem.zeroAddress,
|
|
288
|
+
rewards: viem.zeroAddress,
|
|
289
|
+
governor: viem.zeroAddress
|
|
290
|
+
};
|
|
291
|
+
CTM_TOKEN_ADDRESS = viem.getAddress("0x2026027054F5beBCEB650aBD62dC623e327658e7");
|
|
292
|
+
VOTING_ESCROW_LINEA_ADDRESS = viem.getAddress("0x221EC90B3B083A8501A37bdeb7035CeaedF3C31f");
|
|
293
|
+
viem.getAddress("0x4ebd7cCBe32a51d1638cFE90E8eD1c4BdF42f729");
|
|
294
|
+
VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS = viem.getAddress("0x92557d38beAe4658d3c03A02F349FFB60c3bfFA5");
|
|
295
|
+
MARKETPLACE_WETH_LINEA_ADDRESS = viem.getAddress("0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f");
|
|
296
|
+
MARKETPLACE_USDC_LINEA_ADDRESS = viem.getAddress("0x176211869cA2b568f2A7D4EE941E073a821EE1ff");
|
|
297
|
+
CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID = "continuum-dao-marketplace";
|
|
298
|
+
CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS = viem.getAddress("0x76FF2CB03175900F1D83328C82D27EA9aeaF2355");
|
|
299
|
+
viem.getAddress("0x4800F9f1dC1b6daCA841B71E0531F547D374168E");
|
|
300
|
+
CONTINUUM_DAO_DEPLOYMENTS = {
|
|
301
|
+
[CONTINUUM_DAO_LINEA_CHAIN_ID]: {
|
|
302
|
+
...UNSET,
|
|
303
|
+
ctm: CTM_TOKEN_ADDRESS,
|
|
304
|
+
votingEscrow: VOTING_ESCROW_LINEA_ADDRESS,
|
|
305
|
+
governor: CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS
|
|
306
|
+
},
|
|
307
|
+
[CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID]: { ...UNSET },
|
|
308
|
+
[CONTINUUM_DAO_ETHEREUM_CHAIN_ID]: {
|
|
309
|
+
...UNSET,
|
|
310
|
+
ctm: CTM_TOKEN_ADDRESS
|
|
311
|
+
}
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
});
|
|
106
315
|
|
|
107
316
|
// src/protocols/evm/arcus/support.ts
|
|
108
317
|
function isArcusChainSupported(chainId) {
|
|
@@ -117,7 +326,7 @@ var init_support = __esm({
|
|
|
117
326
|
|
|
118
327
|
// src/protocols/evm/arcus/constants.ts
|
|
119
328
|
var ARCUS_PROTOCOL_ID;
|
|
120
|
-
var
|
|
329
|
+
var init_constants2 = __esm({
|
|
121
330
|
"src/protocols/evm/arcus/constants.ts"() {
|
|
122
331
|
ARCUS_PROTOCOL_ID = "arcus";
|
|
123
332
|
}
|
|
@@ -416,27 +625,6 @@ var init_midnightApi = __esm({
|
|
|
416
625
|
init_midnightConstants();
|
|
417
626
|
}
|
|
418
627
|
});
|
|
419
|
-
var COINBASE_B20_STOCK_TOKENS, COINBASE_B20_STOCK_DECIMALS;
|
|
420
|
-
var init_coinbaseB20 = __esm({
|
|
421
|
-
"src/protocols/evm/shared/coinbaseB20.ts"() {
|
|
422
|
-
COINBASE_B20_STOCK_TOKENS = [
|
|
423
|
-
{ symbol: "AAPLc", name: "Apple Inc.", address: "0xb200000000000000000000C2e324d24d7eEcd1fb" },
|
|
424
|
-
{ symbol: "NVDAc", name: "NVIDIA Corporation", address: "0xb20000000000000000000078ee7ce2fE4908108C" },
|
|
425
|
-
{ symbol: "METAc", name: "Meta Platforms Inc.", address: "0xb2000000000000000000008bC8786B856E61707C" },
|
|
426
|
-
{ symbol: "GOOGLc", name: "Alphabet Inc.", address: "0xb2000000000000000000002D0BA3164cc74f58B7" },
|
|
427
|
-
{ symbol: "AMZNc", name: "Amazon.com Inc.", address: "0xb200000000000000000000d9192b6B456483C2E8" },
|
|
428
|
-
{ symbol: "TSLAc", name: "Tesla Inc.", address: "0xb2000000000000000000001e800a7f5189430cD0" },
|
|
429
|
-
{ symbol: "MSFTc", name: "Microsoft Corporation", address: "0xB200000000000000000000Ab99cFa739E253872B" },
|
|
430
|
-
{ symbol: "COINc", name: "Coinbase Global Inc.", address: "0xb200000000000000000000c85a31389D71F3ecfb" },
|
|
431
|
-
{ symbol: "MSTRc", name: "Strategy Inc.", address: "0xb2000000000000000000004884b426556b92883d" },
|
|
432
|
-
{ symbol: "CRCLc", name: "Circle Internet Group Inc.", address: "0xB20000000000000000000019f6E7C675b73C2e4D" },
|
|
433
|
-
{ symbol: "INTCc", name: "Intel Corporation", address: "0xB2000000000000000000004AFF16039bA04bdFBc" },
|
|
434
|
-
{ symbol: "SNDKc", name: "Sandisk Corporation", address: "0xb200000000000000000000397293Cb8cda9a10c5" },
|
|
435
|
-
{ symbol: "SPCXc", name: "Space Exploration Technologies Corp.", address: "0xb2000000000000000000007b9fcbd005511aCBd5" }
|
|
436
|
-
];
|
|
437
|
-
COINBASE_B20_STOCK_DECIMALS = 8;
|
|
438
|
-
}
|
|
439
|
-
});
|
|
440
628
|
function isAerodromeChainSupported(chainId) {
|
|
441
629
|
const n = typeof chainId === "number" ? chainId : Number.parseInt(String(chainId), 10);
|
|
442
630
|
return n === AERODROME_CHAIN_ID;
|
|
@@ -513,109 +701,6 @@ var init_yields = __esm({
|
|
|
513
701
|
);
|
|
514
702
|
}
|
|
515
703
|
});
|
|
516
|
-
function isConfiguredAddress(addr) {
|
|
517
|
-
if (!addr?.trim()) return false;
|
|
518
|
-
try {
|
|
519
|
-
return viem.getAddress(addr) !== viem.zeroAddress;
|
|
520
|
-
} catch {
|
|
521
|
-
return false;
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
function continuumDaoDeployment(chainId) {
|
|
525
|
-
return CONTINUUM_DAO_DEPLOYMENTS[chainId] ?? null;
|
|
526
|
-
}
|
|
527
|
-
function isContinuumDaoLockChain(chainId) {
|
|
528
|
-
return chainId === CONTINUUM_DAO_LINEA_CHAIN_ID || chainId === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID;
|
|
529
|
-
}
|
|
530
|
-
function isContinuumDaoSupportedChainId(chainId) {
|
|
531
|
-
return continuumDaoDeployment(chainId) != null;
|
|
532
|
-
}
|
|
533
|
-
function ctmTokenAddressOnEvmChain(chainId) {
|
|
534
|
-
const ctm = continuumDaoDeployment(chainId)?.ctm;
|
|
535
|
-
return ctm && isConfiguredAddress(ctm) ? viem.getAddress(ctm) : null;
|
|
536
|
-
}
|
|
537
|
-
function votingEscrowAddressOnEvmChain(chainId) {
|
|
538
|
-
const ve = continuumDaoDeployment(chainId)?.votingEscrow;
|
|
539
|
-
return ve && isConfiguredAddress(ve) ? viem.getAddress(ve) : null;
|
|
540
|
-
}
|
|
541
|
-
function votingEscrowMarketplaceAddressOnEvmChain(chainId) {
|
|
542
|
-
if (chainId !== CONTINUUM_DAO_LINEA_CHAIN_ID) return null;
|
|
543
|
-
return VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS;
|
|
544
|
-
}
|
|
545
|
-
function listContinuumDaoDefaultAssets() {
|
|
546
|
-
const out = [];
|
|
547
|
-
for (const chainId of [
|
|
548
|
-
CONTINUUM_DAO_LINEA_CHAIN_ID,
|
|
549
|
-
CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID,
|
|
550
|
-
CONTINUUM_DAO_ETHEREUM_CHAIN_ID
|
|
551
|
-
]) {
|
|
552
|
-
const dep = continuumDaoDeployment(chainId);
|
|
553
|
-
if (!dep) continue;
|
|
554
|
-
if (isConfiguredAddress(dep.ctm)) {
|
|
555
|
-
out.push({
|
|
556
|
-
chainId,
|
|
557
|
-
tokenType: "CTMERC20",
|
|
558
|
-
contractAddress: viem.getAddress(dep.ctm),
|
|
559
|
-
name: CTM_TOKEN_NAME,
|
|
560
|
-
symbol: CTM_TOKEN_SYMBOL,
|
|
561
|
-
decimals: CTM_TOKEN_DECIMALS
|
|
562
|
-
});
|
|
563
|
-
}
|
|
564
|
-
if (isContinuumDaoLockChain(chainId) && isConfiguredAddress(dep.votingEscrow)) {
|
|
565
|
-
out.push({
|
|
566
|
-
chainId,
|
|
567
|
-
tokenType: "ERC721",
|
|
568
|
-
contractAddress: viem.getAddress(dep.votingEscrow),
|
|
569
|
-
name: VECTM_TOKEN_NAME,
|
|
570
|
-
symbol: VECTM_TOKEN_SYMBOL
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
return out;
|
|
575
|
-
}
|
|
576
|
-
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, UNSET, CTM_TOKEN_ADDRESS, VOTING_ESCROW_LINEA_ADDRESS, VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS, CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID, CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS, CONTINUUM_DAO_DEPLOYMENTS;
|
|
577
|
-
var init_constants2 = __esm({
|
|
578
|
-
"src/protocols/evm/continuum-dao/constants.ts"() {
|
|
579
|
-
CONTINUUM_DAO_PROTOCOL_ID = "continuum-dao";
|
|
580
|
-
CONTINUUM_DAO_ETHEREUM_CHAIN_ID = 1;
|
|
581
|
-
CONTINUUM_DAO_LINEA_CHAIN_ID = 59144;
|
|
582
|
-
CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID = 59141;
|
|
583
|
-
CTM_TOKEN_NAME = "Continuum";
|
|
584
|
-
CTM_TOKEN_SYMBOL = "CTM";
|
|
585
|
-
VECTM_TOKEN_NAME = "Voting Escrow Continuum";
|
|
586
|
-
VECTM_TOKEN_SYMBOL = "veCTM";
|
|
587
|
-
CTM_TOKEN_DECIMALS = 18;
|
|
588
|
-
UNSET = {
|
|
589
|
-
ctm: viem.zeroAddress,
|
|
590
|
-
votingEscrow: viem.zeroAddress,
|
|
591
|
-
nodeProperties: viem.zeroAddress,
|
|
592
|
-
rewards: viem.zeroAddress,
|
|
593
|
-
governor: viem.zeroAddress
|
|
594
|
-
};
|
|
595
|
-
CTM_TOKEN_ADDRESS = viem.getAddress("0x2026027054F5beBCEB650aBD62dC623e327658e7");
|
|
596
|
-
VOTING_ESCROW_LINEA_ADDRESS = viem.getAddress("0x221EC90B3B083A8501A37bdeb7035CeaedF3C31f");
|
|
597
|
-
viem.getAddress("0x4ebd7cCBe32a51d1638cFE90E8eD1c4BdF42f729");
|
|
598
|
-
VOTING_ESCROW_MARKETPLACE_LINEA_ADDRESS = viem.getAddress("0x92557d38beAe4658d3c03A02F349FFB60c3bfFA5");
|
|
599
|
-
viem.getAddress("0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f");
|
|
600
|
-
viem.getAddress("0x176211869cA2b568f2A7D4EE941E073a821EE1ff");
|
|
601
|
-
CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID = "continuum-dao-marketplace";
|
|
602
|
-
CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS = viem.getAddress("0x76FF2CB03175900F1D83328C82D27EA9aeaF2355");
|
|
603
|
-
viem.getAddress("0x4800F9f1dC1b6daCA841B71E0531F547D374168E");
|
|
604
|
-
CONTINUUM_DAO_DEPLOYMENTS = {
|
|
605
|
-
[CONTINUUM_DAO_LINEA_CHAIN_ID]: {
|
|
606
|
-
...UNSET,
|
|
607
|
-
ctm: CTM_TOKEN_ADDRESS,
|
|
608
|
-
votingEscrow: VOTING_ESCROW_LINEA_ADDRESS,
|
|
609
|
-
governor: CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS
|
|
610
|
-
},
|
|
611
|
-
[CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID]: { ...UNSET },
|
|
612
|
-
[CONTINUUM_DAO_ETHEREUM_CHAIN_ID]: {
|
|
613
|
-
...UNSET,
|
|
614
|
-
ctm: CTM_TOKEN_ADDRESS
|
|
615
|
-
}
|
|
616
|
-
};
|
|
617
|
-
}
|
|
618
|
-
});
|
|
619
704
|
var init_committeeList = __esm({
|
|
620
705
|
"src/protocols/evm/continuum-dao/committeeList.ts"() {
|
|
621
706
|
}
|
|
@@ -1308,7 +1393,108 @@ function parseMultisignBuilderOutput(data) {
|
|
|
1308
1393
|
return multisignOutputSchema.parse(data);
|
|
1309
1394
|
}
|
|
1310
1395
|
|
|
1396
|
+
// src/protocols/evm/aave-v4/api.ts
|
|
1397
|
+
init_defiProxy();
|
|
1398
|
+
init_coinbaseB20();
|
|
1399
|
+
var AAVE_V4_GRAPHQL_URL = "https://api.v4.aave.com/graphql";
|
|
1400
|
+
async function aaveV4Gql(query, variables) {
|
|
1401
|
+
const body = { query, variables: variables ?? {} };
|
|
1402
|
+
const j = await postJsonViaOptionalProxy({
|
|
1403
|
+
directUrl: AAVE_V4_GRAPHQL_URL,
|
|
1404
|
+
body,
|
|
1405
|
+
proxyUrl: getAaveGraphqlProxyUrl(),
|
|
1406
|
+
proxyEnvelope: body
|
|
1407
|
+
});
|
|
1408
|
+
if (j.errors?.length) {
|
|
1409
|
+
const msg = j.errors.map((e) => e.message ?? "Unknown").join("; ");
|
|
1410
|
+
throw new Error(msg);
|
|
1411
|
+
}
|
|
1412
|
+
if (j.data == null) {
|
|
1413
|
+
throw new Error("Aave V4 API: empty response");
|
|
1414
|
+
}
|
|
1415
|
+
return j.data;
|
|
1416
|
+
}
|
|
1417
|
+
async function fetchAaveV4Chains() {
|
|
1418
|
+
const d = await aaveV4Gql(`
|
|
1419
|
+
query C($c: ChainsRequest!) { chains(request: $c) { chainId name nativeWrappedToken } }
|
|
1420
|
+
`, { c: { query: { filter: "ALL" } } });
|
|
1421
|
+
return d.chains ?? [];
|
|
1422
|
+
}
|
|
1423
|
+
async function loadAaveV4SupportedChainIdsFromV4Api() {
|
|
1424
|
+
const rows = await fetchAaveV4Chains();
|
|
1425
|
+
const s = /* @__PURE__ */ new Set();
|
|
1426
|
+
for (const c of rows) s.add(c.chainId);
|
|
1427
|
+
return s;
|
|
1428
|
+
}
|
|
1429
|
+
var RESERVES_ADDRESS_FRAGMENT = `
|
|
1430
|
+
asset { underlying { address } }
|
|
1431
|
+
`;
|
|
1432
|
+
async function fetchAaveV4NativeWrappedToken(chainId) {
|
|
1433
|
+
const all = await fetchAaveV4Chains();
|
|
1434
|
+
const c = all.find((x) => x.chainId === chainId);
|
|
1435
|
+
const t = (c?.nativeWrappedToken ?? "").trim();
|
|
1436
|
+
if (t && viem.isAddress(t)) return viem.getAddress(t);
|
|
1437
|
+
return null;
|
|
1438
|
+
}
|
|
1439
|
+
async function fetchAaveV4SupportedUnderlyingAddressSet(chainId) {
|
|
1440
|
+
const d = await aaveV4Gql(
|
|
1441
|
+
`
|
|
1442
|
+
query A($r: ReservesRequest!) { reserves(request: $r) { ${RESERVES_ADDRESS_FRAGMENT} } }
|
|
1443
|
+
`,
|
|
1444
|
+
{
|
|
1445
|
+
r: {
|
|
1446
|
+
query: { chainIds: [chainId] },
|
|
1447
|
+
filter: "ALL",
|
|
1448
|
+
orderBy: { supplyApy: "DESC" }
|
|
1449
|
+
}
|
|
1450
|
+
}
|
|
1451
|
+
);
|
|
1452
|
+
const s = /* @__PURE__ */ new Set();
|
|
1453
|
+
for (const r of d.reserves ?? []) {
|
|
1454
|
+
const a = (r.asset?.underlying?.address ?? "").trim();
|
|
1455
|
+
if (a && viem.isAddress(a)) s.add(a.toLowerCase());
|
|
1456
|
+
}
|
|
1457
|
+
return s;
|
|
1458
|
+
}
|
|
1459
|
+
var aaveV4ChainTokenCache = /* @__PURE__ */ new Map();
|
|
1460
|
+
function ensureAaveV4ChainTokenCache(chainId) {
|
|
1461
|
+
const hit = aaveV4ChainTokenCache.get(chainId);
|
|
1462
|
+
if (hit) return hit;
|
|
1463
|
+
const p = (async () => {
|
|
1464
|
+
const [nativeWrapped, supportedUnderlying] = await Promise.all([
|
|
1465
|
+
fetchAaveV4NativeWrappedToken(chainId),
|
|
1466
|
+
fetchAaveV4SupportedUnderlyingAddressSet(chainId)
|
|
1467
|
+
]);
|
|
1468
|
+
return { supportedUnderlying, nativeWrapped };
|
|
1469
|
+
})();
|
|
1470
|
+
aaveV4ChainTokenCache.set(chainId, p);
|
|
1471
|
+
return p;
|
|
1472
|
+
}
|
|
1473
|
+
function parseAaveV4UiMarketId(raw) {
|
|
1474
|
+
const t = (raw ?? "").trim().toLowerCase().replace(/\s+/g, " ");
|
|
1475
|
+
if (!t) return void 0;
|
|
1476
|
+
if (t === "core") return "core";
|
|
1477
|
+
if (t === "bluechip" || t === "prime" || t === "institutional") return "bluechip";
|
|
1478
|
+
if (t === "main" || t === "plus" || t === "default") return "main";
|
|
1479
|
+
if (t === "bstocks" || t === "bstock" || t === "b stocks" || t === "stocks" || t === "stock" || t === "equities" || t === "equity" || t === "coinbase stocks" || t === "tokenized stocks" || t === "tokenised stocks") {
|
|
1480
|
+
return "bstocks";
|
|
1481
|
+
}
|
|
1482
|
+
return void 0;
|
|
1483
|
+
}
|
|
1484
|
+
function resolveAaveV4UnderlyingAddress(token) {
|
|
1485
|
+
const raw = (token ?? "").trim();
|
|
1486
|
+
if (!raw) return null;
|
|
1487
|
+
if (viem.isAddress(raw)) return viem.getAddress(raw);
|
|
1488
|
+
return lookupCoinbaseB20StockToken(raw)?.address ?? null;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1311
1491
|
// src/agent/schemas/chainPreprocess.ts
|
|
1492
|
+
function rewriteAaveV4AssetField(o, key) {
|
|
1493
|
+
const raw = String(o[key] ?? "").trim();
|
|
1494
|
+
if (!raw || viem.isAddress(raw)) return;
|
|
1495
|
+
const resolved = resolveAaveV4UnderlyingAddress(raw);
|
|
1496
|
+
if (resolved) o[key] = resolved;
|
|
1497
|
+
}
|
|
1312
1498
|
function preprocessObject(raw) {
|
|
1313
1499
|
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return null;
|
|
1314
1500
|
return { ...raw };
|
|
@@ -1650,6 +1836,12 @@ function preprocessAaveMultisignInput(action) {
|
|
|
1650
1836
|
return (raw) => {
|
|
1651
1837
|
const o = preprocessObject(raw);
|
|
1652
1838
|
if (!o) return raw;
|
|
1839
|
+
rewriteAaveV4AssetField(o, "underlying");
|
|
1840
|
+
rewriteAaveV4AssetField(o, "collateralUnderlying");
|
|
1841
|
+
if (typeof o.marketId === "string") {
|
|
1842
|
+
const id = parseAaveV4UiMarketId(o.marketId);
|
|
1843
|
+
if (id) o.marketId = id;
|
|
1844
|
+
}
|
|
1653
1845
|
derivePurposeIfMissing(o, (x) => {
|
|
1654
1846
|
const amt = String(x.amountHuman ?? "").trim();
|
|
1655
1847
|
const asset = String(x.underlying ?? "").trim();
|
|
@@ -1666,8 +1858,8 @@ var uniswapQuoteTradeTypeSchema = zod.z.enum(["EXACT_INPUT", "EXACT_OUTPUT"]);
|
|
|
1666
1858
|
var mcpUniswapV4QuoteInputSchema = zod.z.object({
|
|
1667
1859
|
type: uniswapQuoteTradeTypeSchema.describe("EXACT_INPUT or EXACT_OUTPUT"),
|
|
1668
1860
|
amount: zod.z.string().min(1).describe("Amount in token-in base units (wei string for ERC-20)"),
|
|
1669
|
-
tokenIn: zod.z.string().min(1).describe("Input token; 0x0 for native ETH"),
|
|
1670
|
-
tokenOut: zod.z.string().min(1).describe("Output token address"),
|
|
1861
|
+
tokenIn: zod.z.string().min(1).describe("Input token address or Coinbase stock ticker (AAPLc); 0x0 for native ETH"),
|
|
1862
|
+
tokenOut: zod.z.string().min(1).describe("Output token address or Coinbase stock ticker (AAPLc)"),
|
|
1671
1863
|
chainId: agentEvmChainIdSchema.describe("tokenInChainId / same-chain default"),
|
|
1672
1864
|
uniswapApiKey: zod.z.string().min(1).describe("Uniswap Trade API x-api-key"),
|
|
1673
1865
|
swapper: evmAddressSchema.optional().describe("MPC executor; omit if keyGen + managementNodeUrl provided"),
|
|
@@ -1703,7 +1895,9 @@ var mcpUniswapV4BuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
|
|
|
1703
1895
|
zod.z.preprocess(
|
|
1704
1896
|
preprocessUniswapBuildSwapInput,
|
|
1705
1897
|
evmMultisignCommonInputSchema.extend({
|
|
1706
|
-
tokenIn: evmAddressSchema.describe(
|
|
1898
|
+
tokenIn: evmAddressSchema.describe(
|
|
1899
|
+
"Token in address or Coinbase stock ticker (AAPLc); 0x0 for native ETH"
|
|
1900
|
+
),
|
|
1707
1901
|
swap: swapTxRequestSchema,
|
|
1708
1902
|
createSwapResponse: zod.z.object({
|
|
1709
1903
|
swap: swapTxRequestSchema,
|
|
@@ -1720,8 +1914,8 @@ var mcpUniswapV4LimitOrderQuoteInputSchema = zod.z.object({
|
|
|
1720
1914
|
type: uniswapQuoteTradeTypeSchema.describe("EXACT_INPUT or EXACT_OUTPUT"),
|
|
1721
1915
|
amount: zod.z.string().min(1).describe("Amount in token-in base units (wei string for ERC-20)"),
|
|
1722
1916
|
limitPrice: zod.z.string().min(1).describe("Limit price string from Trade API (pair exchange rate)"),
|
|
1723
|
-
tokenIn: zod.z.string().min(1).describe("Input token; 0x0 for native ETH"),
|
|
1724
|
-
tokenOut: zod.z.string().min(1).describe("Output token address"),
|
|
1917
|
+
tokenIn: zod.z.string().min(1).describe("Input token address or Coinbase stock ticker (AAPLc); 0x0 for native ETH"),
|
|
1918
|
+
tokenOut: zod.z.string().min(1).describe("Output token address or Coinbase stock ticker (AAPLc)"),
|
|
1725
1919
|
chainId: agentEvmChainIdSchema.describe("Must be 1 (Ethereum mainnet) for limit orders"),
|
|
1726
1920
|
orderDeadline: agentCoercedIntSchema(zod.z.number().int().positive()).describe("Unix seconds when unfilled order expires"),
|
|
1727
1921
|
uniswapApiKey: zod.z.string().min(1).describe("Uniswap Trade API x-api-key"),
|
|
@@ -2068,8 +2262,8 @@ var mcpUniswapV4BuildAllowlistFinalizeMultisignInputSchema = withMultisignKeySou
|
|
|
2068
2262
|
var mcpCurveDaoQuoteInputSchema = zod.z.object({
|
|
2069
2263
|
chainId: agentEvmChainIdSchema.describe("EVM chain id (rpcUrl resolved from get_chain_registry rpcGateway)"),
|
|
2070
2264
|
rpcUrl: zod.z.string().min(1).optional().describe("JSON-RPC URL; continuum-mcp-server injects from chain registry \u2014 do not pass a public RPC URL"),
|
|
2071
|
-
tokenIn: zod.z.string().min(1).describe("Input token address, or 0xeeee\u2026 / 0x0 / eth for native"),
|
|
2072
|
-
tokenOut: zod.z.string().min(1).describe("Output token address or 0xeeee\u2026 native placeholder"),
|
|
2265
|
+
tokenIn: zod.z.string().min(1).describe("Input token address, Coinbase stock ticker (AAPLc), or 0xeeee\u2026 / 0x0 / eth for native"),
|
|
2266
|
+
tokenOut: zod.z.string().min(1).describe("Output token address, Coinbase stock ticker (AAPLc), or 0xeeee\u2026 native placeholder"),
|
|
2073
2267
|
amountHuman: zod.z.string().min(1).describe("Human-readable amount of tokenIn"),
|
|
2074
2268
|
tokenInDecimals: zod.z.number().int().min(0).max(18).optional().describe("Token-in decimals; omit to read on-chain (native uses 18)")
|
|
2075
2269
|
});
|
|
@@ -2080,8 +2274,10 @@ var mcpCurveDaoBuildSwapMultisignInputSchema = withMultisignKeySourceRefine(
|
|
|
2080
2274
|
zod.z.preprocess(
|
|
2081
2275
|
preprocessCurveBuildSwapInput,
|
|
2082
2276
|
evmMultisignCommonInputSchema.extend({
|
|
2083
|
-
tokenIn: evmAddressSchema.describe(
|
|
2084
|
-
|
|
2277
|
+
tokenIn: evmAddressSchema.describe(
|
|
2278
|
+
"ERC-20 sold, or a Coinbase stock ticker (AAPLc). Native in uses the WETH path in the UI."
|
|
2279
|
+
),
|
|
2280
|
+
tokenOut: zod.z.string().min(1).describe("Output token, Coinbase stock ticker (AAPLc), or 0xeeee\u2026 native placeholder"),
|
|
2085
2281
|
amountHuman: zod.z.string().min(1).describe("Human-readable amount of tokenIn"),
|
|
2086
2282
|
slippagePercent: zod.z.number().gt(0).lt(100).describe("Slippage 0\u2013100 exclusive"),
|
|
2087
2283
|
quoteSnapshot: jsonObjectSchema.optional().describe("Optional quote row from ctm_curve_dao_quote \u2014 aliases tokenIn/tokenOut/amountHuman")
|
|
@@ -2745,6 +2941,172 @@ function preprocessMerklClaimInput(kind) {
|
|
|
2745
2941
|
return o;
|
|
2746
2942
|
};
|
|
2747
2943
|
}
|
|
2944
|
+
|
|
2945
|
+
// src/protocols/evm/continuum-dao/purpose.ts
|
|
2946
|
+
init_constants();
|
|
2947
|
+
function chainParts(chainId) {
|
|
2948
|
+
const n = typeof chainId === "number" ? chainId : Number.parseInt(String(chainId ?? "").trim(), 10);
|
|
2949
|
+
const id = Number.isFinite(n) ? n : 0;
|
|
2950
|
+
if (id === CONTINUUM_DAO_LINEA_CHAIN_ID) return { name: "Linea Mainnet", id };
|
|
2951
|
+
if (id === CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID) return { name: "Linea Sepolia", id };
|
|
2952
|
+
if (id === CONTINUUM_DAO_ETHEREUM_CHAIN_ID) return { name: "Ethereum Mainnet", id };
|
|
2953
|
+
return { name: "chain", id };
|
|
2954
|
+
}
|
|
2955
|
+
function suffix(chainId) {
|
|
2956
|
+
const { name, id } = chainParts(chainId);
|
|
2957
|
+
return `on ${name} (chainId ${id})`;
|
|
2958
|
+
}
|
|
2959
|
+
function text(value) {
|
|
2960
|
+
return String(value ?? "").trim();
|
|
2961
|
+
}
|
|
2962
|
+
function tokenLabel(value) {
|
|
2963
|
+
const id = text(value);
|
|
2964
|
+
return id ? `#${id}` : "#\u2026";
|
|
2965
|
+
}
|
|
2966
|
+
function shortAddr(value) {
|
|
2967
|
+
const trimmed = text(value);
|
|
2968
|
+
if (!trimmed) return "\u2026";
|
|
2969
|
+
try {
|
|
2970
|
+
if (!viem.isAddress(trimmed)) return trimmed;
|
|
2971
|
+
const addr = viem.getAddress(trimmed);
|
|
2972
|
+
return `${addr.slice(0, 6)}\u2026${addr.slice(-4)}`;
|
|
2973
|
+
} catch {
|
|
2974
|
+
return trimmed;
|
|
2975
|
+
}
|
|
2976
|
+
}
|
|
2977
|
+
function weeksLabel(seconds) {
|
|
2978
|
+
const n = Number(text(seconds));
|
|
2979
|
+
if (!Number.isFinite(n) || n <= 0) return "\u2026 weeks";
|
|
2980
|
+
const weeks = Math.max(1, Math.round(n / WEEK_SECONDS));
|
|
2981
|
+
return `${weeks} week${weeks === 1 ? "" : "s"}`;
|
|
2982
|
+
}
|
|
2983
|
+
function paymentMeta(address) {
|
|
2984
|
+
const lower = text(address).toLowerCase();
|
|
2985
|
+
if (lower === MARKETPLACE_USDC_LINEA_ADDRESS.toLowerCase()) return { symbol: "USDC", decimals: 6 };
|
|
2986
|
+
if (lower === MARKETPLACE_WETH_LINEA_ADDRESS.toLowerCase()) return { symbol: "WETH", decimals: 18 };
|
|
2987
|
+
if (lower === CTM_TOKEN_ADDRESS.toLowerCase()) return { symbol: "CTM", decimals: 18 };
|
|
2988
|
+
return { symbol: "token", decimals: 18 };
|
|
2989
|
+
}
|
|
2990
|
+
function moneyFromWei(wei2, paymentToken) {
|
|
2991
|
+
const raw = text(wei2);
|
|
2992
|
+
if (!raw) return "\u2026 token";
|
|
2993
|
+
try {
|
|
2994
|
+
const meta = paymentMeta(paymentToken);
|
|
2995
|
+
const human = viem.formatUnits(BigInt(raw), meta.decimals).replace(/(\.\d*?[1-9])0+$/, "$1").replace(/\.0+$/, "");
|
|
2996
|
+
return `${human} ${meta.symbol}`;
|
|
2997
|
+
} catch {
|
|
2998
|
+
return raw;
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
function deadlineLabel(value) {
|
|
3002
|
+
const n = Number(text(value));
|
|
3003
|
+
if (!Number.isFinite(n) || n <= 0) return "\u2026";
|
|
3004
|
+
const date = new Date(n * 1e3);
|
|
3005
|
+
if (Number.isNaN(date.getTime())) return "\u2026";
|
|
3006
|
+
return `${date.toISOString().slice(0, 16).replace("T", " ")} UTC`;
|
|
3007
|
+
}
|
|
3008
|
+
function bravoLabel(support) {
|
|
3009
|
+
const raw = text(support).toLowerCase();
|
|
3010
|
+
if (raw === "0" || raw === "against") return "Against";
|
|
3011
|
+
if (raw === "1" || raw === "for") return "For";
|
|
3012
|
+
if (raw === "2" || raw === "abstain") return "Abstain";
|
|
3013
|
+
return null;
|
|
3014
|
+
}
|
|
3015
|
+
function proposalLabel(input) {
|
|
3016
|
+
const title = text(input.title || input.proposalTitle);
|
|
3017
|
+
if (title) return title;
|
|
3018
|
+
const id = text(input.proposalId);
|
|
3019
|
+
return id ? `proposal ${id}` : "proposal";
|
|
3020
|
+
}
|
|
3021
|
+
function buildContinuumDaoMcpPurpose(action, input) {
|
|
3022
|
+
const end = suffix(input.chainId);
|
|
3023
|
+
const id = tokenLabel(input.tokenId);
|
|
3024
|
+
switch (action) {
|
|
3025
|
+
case "createLock":
|
|
3026
|
+
return `ContinuumDAO: create lock ${text(input.amountHuman) || "\u2026"} CTM for ${weeksLabel(input.lockDurationSeconds)} ${end}`;
|
|
3027
|
+
case "increaseAmount":
|
|
3028
|
+
return `ContinuumDAO: increase lock ${id} by ${text(input.amountHuman) || "\u2026"} CTM ${end}`;
|
|
3029
|
+
case "increaseUnlockTime":
|
|
3030
|
+
return `ContinuumDAO: extend lock ${id} by ${weeksLabel(input.lockDurationSeconds)} ${end}`;
|
|
3031
|
+
case "split":
|
|
3032
|
+
return `ContinuumDAO: split lock ${id}, extract ${text(input.extractedHuman) || "\u2026"} CTM ${end}`;
|
|
3033
|
+
case "merge": {
|
|
3034
|
+
const from = tokenLabel(input.fromTokenId);
|
|
3035
|
+
const into = text(input.toTokenId);
|
|
3036
|
+
return into ? `ContinuumDAO: merge lock ${from} into #${into} ${end}` : `ContinuumDAO: merge lock ${from} into \u2026 ${end}`;
|
|
3037
|
+
}
|
|
3038
|
+
case "withdraw":
|
|
3039
|
+
return `ContinuumDAO: withdraw expired lock ${id} ${end}`;
|
|
3040
|
+
case "liquidate":
|
|
3041
|
+
return `ContinuumDAO: liquidate lock ${id} ${end}`;
|
|
3042
|
+
case "delegate":
|
|
3043
|
+
return text(input.delegatee) ? `ContinuumDAO: delegate voting power to ${shortAddr(input.delegatee)} ${end}` : `ContinuumDAO: delegate voting power ${end}`;
|
|
3044
|
+
case "undelegate":
|
|
3045
|
+
return `ContinuumDAO: undelegate (return voting power to this KeyGen) ${end}`;
|
|
3046
|
+
case "transfer":
|
|
3047
|
+
return text(input.to) ? `ContinuumDAO: transfer veCTM ${id} to ${shortAddr(input.to)} ${end}` : `ContinuumDAO: transfer veCTM ${id} ${end}`;
|
|
3048
|
+
case "attach":
|
|
3049
|
+
return text(input.tokenId) ? `ContinuumDAO: attach veCTM ${id} to this node ${end}` : `ContinuumDAO: attach veCTM to this node ${end}`;
|
|
3050
|
+
case "requestDetach":
|
|
3051
|
+
return `ContinuumDAO: request detach veCTM ${id} ${end}`;
|
|
3052
|
+
case "proposeBravo": {
|
|
3053
|
+
const title = text(input.title);
|
|
3054
|
+
return title ? `ContinuumDAO: propose "${title}" (Bravo) ${end}` : `ContinuumDAO: propose governance proposal (Bravo) ${end}`;
|
|
3055
|
+
}
|
|
3056
|
+
case "proposeDelta": {
|
|
3057
|
+
const title = text(input.title);
|
|
3058
|
+
return title ? `ContinuumDAO: propose "${title}" (Delta) ${end}` : `ContinuumDAO: propose governance proposal (Delta) ${end}`;
|
|
3059
|
+
}
|
|
3060
|
+
case "castVoteBravo": {
|
|
3061
|
+
const label = proposalLabel(input);
|
|
3062
|
+
const support = bravoLabel(input.support);
|
|
3063
|
+
return support ? `ContinuumDAO: vote ${support} on "${label}" ${end}` : `ContinuumDAO: vote on "${label}" ${end}`;
|
|
3064
|
+
}
|
|
3065
|
+
case "castVoteDelta":
|
|
3066
|
+
return `ContinuumDAO: vote on "${proposalLabel(input)}" (Delta) ${end}`;
|
|
3067
|
+
case "execute":
|
|
3068
|
+
return `ContinuumDAO: execute "${proposalLabel(input)}" ${end}`;
|
|
3069
|
+
case "cancel":
|
|
3070
|
+
return `ContinuumDAO: cancel "${proposalLabel(input)}" ${end}`;
|
|
3071
|
+
case "forumSignIn": {
|
|
3072
|
+
const who = text(input.username);
|
|
3073
|
+
return who ? `ContinuumDAO: sign in to the forum as ${who} ${end}` : `ContinuumDAO: sign in to the forum ${end}`;
|
|
3074
|
+
}
|
|
3075
|
+
case "marketplaceCreateListing":
|
|
3076
|
+
return `ContinuumDAO: list veCTM ${id} for ${moneyFromWei(input.askWei, input.paymentToken)} until ${deadlineLabel(input.deadline)} ${end}`;
|
|
3077
|
+
case "marketplaceDelist":
|
|
3078
|
+
return `ContinuumDAO: delist veCTM ${id} ${end}`;
|
|
3079
|
+
case "marketplaceFulfillListing":
|
|
3080
|
+
return `ContinuumDAO: buy veCTM ${id} for ${moneyFromWei(input.priceWei, input.paymentToken)} ${end}`;
|
|
3081
|
+
case "marketplaceCreateOffering":
|
|
3082
|
+
return `ContinuumDAO: offer ${moneyFromWei(input.bidWei, input.paymentToken)} for veCTM ${id} until ${deadlineLabel(input.deadline)} ${end}`;
|
|
3083
|
+
case "marketplaceRescind":
|
|
3084
|
+
return `ContinuumDAO: rescind offer on veCTM ${id} ${end}`;
|
|
3085
|
+
case "marketplaceFulfillOffering":
|
|
3086
|
+
return `ContinuumDAO: accept offer of ${moneyFromWei(input.priceWei, input.paymentToken)} on veCTM ${id} ${end}`;
|
|
3087
|
+
case "marketplaceCreateAuction":
|
|
3088
|
+
return `ContinuumDAO: auction veCTM ${id} reserve ${moneyFromWei(input.reserveWei, input.paymentToken)}, minimum increment ${moneyFromWei(input.minIncrementWei, input.paymentToken)}, until ${deadlineLabel(input.deadline)} ${end}`;
|
|
3089
|
+
case "marketplaceCancelAuction":
|
|
3090
|
+
return `ContinuumDAO: cancel auction for veCTM ${id} ${end}`;
|
|
3091
|
+
case "marketplaceAuctionBid":
|
|
3092
|
+
return `ContinuumDAO: bid ${moneyFromWei(input.priceWei, input.paymentToken)} on veCTM ${id} ${end}`;
|
|
3093
|
+
case "marketplaceSettleAuction":
|
|
3094
|
+
return `ContinuumDAO: settle auction for veCTM ${id} ${end}`;
|
|
3095
|
+
default:
|
|
3096
|
+
return `ContinuumDAO: ${end}`;
|
|
3097
|
+
}
|
|
3098
|
+
}
|
|
3099
|
+
function preprocessContinuumDaoPurpose(action, raw) {
|
|
3100
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
3101
|
+
const o = { ...raw };
|
|
3102
|
+
const supplied = text(o.purposeText ?? o.purpose);
|
|
3103
|
+
if (supplied) {
|
|
3104
|
+
o.purposeText = supplied;
|
|
3105
|
+
return o;
|
|
3106
|
+
}
|
|
3107
|
+
o.purposeText = buildContinuumDaoMcpPurpose(action, o);
|
|
3108
|
+
return o;
|
|
3109
|
+
}
|
|
2748
3110
|
var mcpServerCommonInputSchema = zod.z.object({
|
|
2749
3111
|
keyGenId: zod.z.string().min(1).describe("KeyGen id from fetch_key_gen_result / node preferred KeyGen"),
|
|
2750
3112
|
chainId: zod.z.number().int().positive().describe("EVM chain id; RPC and gas config resolved from chain registry"),
|
|
@@ -2790,6 +3152,14 @@ var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
2790
3152
|
function mcpMultisignInput(fields) {
|
|
2791
3153
|
return withMultisignKeySourceRefine(evmMultisignCommonInputSchema.extend(fields));
|
|
2792
3154
|
}
|
|
3155
|
+
function mcpContinuumDaoWriteInput(action, fields) {
|
|
3156
|
+
return withMultisignKeySourceRefine(
|
|
3157
|
+
zod.z.preprocess(
|
|
3158
|
+
(raw) => preprocessContinuumDaoPurpose(action, raw),
|
|
3159
|
+
evmMultisignCommonInputSchema.extend(fields)
|
|
3160
|
+
)
|
|
3161
|
+
);
|
|
3162
|
+
}
|
|
2793
3163
|
var mcpLidoSubmitInputSchema = mcpMultisignInput({
|
|
2794
3164
|
valueWei: zod.z.string().min(1).describe("ETH to stake (wei decimal string)"),
|
|
2795
3165
|
referral: evmAddressSchema.optional()
|
|
@@ -2858,7 +3228,9 @@ var mcpSkySusdsDepositInputSchema = mcpMultisignInput({
|
|
|
2858
3228
|
var mcpSkySusdsRedeemInputSchema = mcpMultisignInput({
|
|
2859
3229
|
sharesHuman: zod.z.string().min(1)
|
|
2860
3230
|
});
|
|
2861
|
-
var mcpAaveV4MarketIdSchema = zod.z.string().min(1).optional().describe(
|
|
3231
|
+
var mcpAaveV4MarketIdSchema = zod.z.string().min(1).optional().describe(
|
|
3232
|
+
"UI market segment: main (Plus), core, bluechip (Prime), or bstocks (Base Coinbase tokenized stocks). Aliases: stocks, equities. Default main."
|
|
3233
|
+
);
|
|
2862
3234
|
function mcpAaveV4MultisignInput(fields, action) {
|
|
2863
3235
|
return withMultisignKeySourceRefine(
|
|
2864
3236
|
zod.z.preprocess(preprocessAaveMultisignInput(action), evmMultisignCommonInputSchema.extend(fields))
|
|
@@ -2876,7 +3248,7 @@ var mcpAaveV4DepositInputSchema = mcpAaveV4MultisignInput(
|
|
|
2876
3248
|
{
|
|
2877
3249
|
spoke: evmAddressSchema.optional().describe("Omit \u2014 continuum-mcp-server resolves spoke from Aave v4 API."),
|
|
2878
3250
|
underlying: evmAddressSchema.describe(
|
|
2879
|
-
"Asset to supply. Native ETH: 0x0 or wrapped native with isNativeIn true."
|
|
3251
|
+
"Asset to supply. Address, or a Base bStock ticker (AAPLc). Native ETH: 0x0 or wrapped native with isNativeIn true."
|
|
2880
3252
|
),
|
|
2881
3253
|
amountHuman: zod.z.string().min(1),
|
|
2882
3254
|
marketId: mcpAaveV4MarketIdSchema,
|
|
@@ -2892,7 +3264,7 @@ var mcpAaveV4DepositInputSchema = mcpAaveV4MultisignInput(
|
|
|
2892
3264
|
var mcpAaveV4WithdrawInputSchema = mcpAaveV4MultisignInput(
|
|
2893
3265
|
{
|
|
2894
3266
|
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
2895
|
-
underlying: evmAddressSchema.describe("Supplied asset to withdraw."),
|
|
3267
|
+
underlying: evmAddressSchema.describe("Supplied asset to withdraw. Address or bStock ticker (AAPLc)."),
|
|
2896
3268
|
amountHuman: zod.z.string().min(1),
|
|
2897
3269
|
marketId: mcpAaveV4MarketIdSchema,
|
|
2898
3270
|
...mcpAaveV4HealthPreviewFields
|
|
@@ -2902,10 +3274,14 @@ var mcpAaveV4WithdrawInputSchema = mcpAaveV4MultisignInput(
|
|
|
2902
3274
|
var mcpAaveV4BorrowInputSchema = mcpAaveV4MultisignInput(
|
|
2903
3275
|
{
|
|
2904
3276
|
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
2905
|
-
underlying: evmAddressSchema.describe(
|
|
3277
|
+
underlying: evmAddressSchema.describe(
|
|
3278
|
+
"Debt asset to borrow (e.g. USDC), not collateral. On bstocks the equities are not borrowable."
|
|
3279
|
+
),
|
|
2906
3280
|
amountHuman: zod.z.string().min(1),
|
|
2907
3281
|
marketId: mcpAaveV4MarketIdSchema,
|
|
2908
|
-
collateralUnderlying: evmAddressSchema.optional().describe(
|
|
3282
|
+
collateralUnderlying: evmAddressSchema.optional().describe(
|
|
3283
|
+
"Collateral token already supplied (address or bStock ticker such as AAPLc). Helps pick the hub when debt exists on multiple hubs."
|
|
3284
|
+
),
|
|
2909
3285
|
...mcpAaveV4HealthPreviewFields
|
|
2910
3286
|
},
|
|
2911
3287
|
"borrow"
|
|
@@ -2913,7 +3289,7 @@ var mcpAaveV4BorrowInputSchema = mcpAaveV4MultisignInput(
|
|
|
2913
3289
|
var mcpAaveV4RepayInputSchema = mcpAaveV4MultisignInput(
|
|
2914
3290
|
{
|
|
2915
3291
|
spoke: evmAddressSchema.optional().describe("Omit \u2014 server resolves from Aave v4 API."),
|
|
2916
|
-
underlying: evmAddressSchema.describe("Debt token to repay."),
|
|
3292
|
+
underlying: evmAddressSchema.describe("Debt token to repay. On bstocks this is USDC."),
|
|
2917
3293
|
amountHuman: zod.z.string().min(1),
|
|
2918
3294
|
marketId: mcpAaveV4MarketIdSchema,
|
|
2919
3295
|
...mcpAaveV4HealthPreviewFields
|
|
@@ -3231,42 +3607,45 @@ var mcpMorphoMidnightRepayInputSchema = withMultisignKeySourceRefine(
|
|
|
3231
3607
|
})
|
|
3232
3608
|
)
|
|
3233
3609
|
);
|
|
3234
|
-
var mcpContinuumDaoCreateLockInputSchema =
|
|
3610
|
+
var mcpContinuumDaoCreateLockInputSchema = mcpContinuumDaoWriteInput("createLock", {
|
|
3235
3611
|
amountHuman: zod.z.string().min(1).describe("CTM amount to lock. Must be >= VotingEscrow.minimumLock (default 1 CTM)."),
|
|
3236
3612
|
lockDurationSeconds: zod.z.union([zod.z.string(), zod.z.number()]).describe("Lock duration in seconds. Must be 1\u2013208 weeks (week-aligned on-chain)."),
|
|
3237
3613
|
ctm: evmAddressSchema.optional(),
|
|
3238
3614
|
votingEscrow: evmAddressSchema.optional()
|
|
3239
3615
|
});
|
|
3240
|
-
var mcpContinuumDaoIncreaseAmountInputSchema =
|
|
3616
|
+
var mcpContinuumDaoIncreaseAmountInputSchema = mcpContinuumDaoWriteInput("increaseAmount", {
|
|
3241
3617
|
tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3242
3618
|
amountHuman: zod.z.string().min(1),
|
|
3243
3619
|
ctm: evmAddressSchema.optional(),
|
|
3244
3620
|
votingEscrow: evmAddressSchema.optional()
|
|
3245
3621
|
});
|
|
3246
|
-
var mcpContinuumDaoIncreaseUnlockTimeInputSchema =
|
|
3622
|
+
var mcpContinuumDaoIncreaseUnlockTimeInputSchema = mcpContinuumDaoWriteInput("increaseUnlockTime", {
|
|
3247
3623
|
tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3248
3624
|
lockDurationSeconds: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3249
3625
|
votingEscrow: evmAddressSchema.optional()
|
|
3250
3626
|
});
|
|
3251
|
-
var mcpContinuumDaoSplitInputSchema =
|
|
3627
|
+
var mcpContinuumDaoSplitInputSchema = mcpContinuumDaoWriteInput("split", {
|
|
3252
3628
|
tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3253
3629
|
extractedHuman: zod.z.string().min(1).describe("CTM extracted into the new lock. Minimum 1 CTM; original lock must also keep 1 CTM."),
|
|
3254
3630
|
votingEscrow: evmAddressSchema.optional()
|
|
3255
3631
|
});
|
|
3256
|
-
var mcpContinuumDaoMergeInputSchema =
|
|
3632
|
+
var mcpContinuumDaoMergeInputSchema = mcpContinuumDaoWriteInput("merge", {
|
|
3257
3633
|
fromTokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3258
3634
|
toTokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3259
3635
|
votingEscrow: evmAddressSchema.optional()
|
|
3260
3636
|
});
|
|
3261
|
-
var
|
|
3637
|
+
var continuumDaoTokenIdFields = {
|
|
3262
3638
|
tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3263
3639
|
votingEscrow: evmAddressSchema.optional()
|
|
3264
|
-
}
|
|
3265
|
-
var
|
|
3640
|
+
};
|
|
3641
|
+
var mcpContinuumDaoWithdrawInputSchema = mcpContinuumDaoWriteInput("withdraw", continuumDaoTokenIdFields);
|
|
3642
|
+
var mcpContinuumDaoLiquidateInputSchema = mcpContinuumDaoWriteInput("liquidate", continuumDaoTokenIdFields);
|
|
3643
|
+
var mcpContinuumDaoTokenIdInputSchema = mcpContinuumDaoWithdrawInputSchema;
|
|
3644
|
+
var mcpContinuumDaoDelegateInputSchema = mcpContinuumDaoWriteInput("delegate", {
|
|
3266
3645
|
delegatee: evmAddressSchema,
|
|
3267
3646
|
votingEscrow: evmAddressSchema.optional()
|
|
3268
3647
|
});
|
|
3269
|
-
var mcpContinuumDaoUndelegateInputSchema =
|
|
3648
|
+
var mcpContinuumDaoUndelegateInputSchema = mcpContinuumDaoWriteInput("undelegate", {
|
|
3270
3649
|
votingEscrow: evmAddressSchema.optional()
|
|
3271
3650
|
});
|
|
3272
3651
|
var mcpContinuumDaoFetchDelegatesInputSchema = zod.z.object({
|
|
@@ -3280,12 +3659,12 @@ var mcpContinuumDaoFetchDelegatesOutputSchema = zod.z.object({
|
|
|
3280
3659
|
delegatee: evmAddressSchema,
|
|
3281
3660
|
self: zod.z.boolean()
|
|
3282
3661
|
});
|
|
3283
|
-
var mcpContinuumDaoTransferInputSchema =
|
|
3662
|
+
var mcpContinuumDaoTransferInputSchema = mcpContinuumDaoWriteInput("transfer", {
|
|
3284
3663
|
tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3285
3664
|
to: evmAddressSchema,
|
|
3286
3665
|
votingEscrow: evmAddressSchema.optional()
|
|
3287
3666
|
});
|
|
3288
|
-
var mcpContinuumDaoAttachInputSchema =
|
|
3667
|
+
var mcpContinuumDaoAttachInputSchema = mcpContinuumDaoWriteInput("attach", {
|
|
3289
3668
|
nodeKey: zod.z.string().min(1),
|
|
3290
3669
|
tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3291
3670
|
mpaWallet: evmAddressSchema,
|
|
@@ -3297,7 +3676,7 @@ var mcpContinuumDaoAttachInputSchema = mcpMultisignInput({
|
|
|
3297
3676
|
dIDType: zod.z.string().optional(),
|
|
3298
3677
|
dID: zod.z.string().optional()
|
|
3299
3678
|
});
|
|
3300
|
-
var mcpContinuumDaoRequestDetachInputSchema =
|
|
3679
|
+
var mcpContinuumDaoRequestDetachInputSchema = mcpContinuumDaoWriteInput("requestDetach", {
|
|
3301
3680
|
tokenId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3302
3681
|
nodeProperties: evmAddressSchema
|
|
3303
3682
|
});
|
|
@@ -3321,7 +3700,7 @@ var forumTopicKeyField = zod.z.string().min(1).describe(
|
|
|
3321
3700
|
"URL of the Governance forum thread created first with ctm_continuum_dao_forum_create_topic (decision / election / treasury / constitution / admin). Must be /topic/:tid or /t/:tid. Ideas threads and the homepage are refused."
|
|
3322
3701
|
);
|
|
3323
3702
|
var proposalTypeField = zod.z.number().int().min(0).max(4).describe("0 Admin, 1 Constitution, 2 Decision, 3 Election, 4 Treasury. Must match the forum thread section.");
|
|
3324
|
-
var mcpContinuumDaoProposeBravoInputSchema =
|
|
3703
|
+
var mcpContinuumDaoProposeBravoInputSchema = mcpContinuumDaoWriteInput("proposeBravo", {
|
|
3325
3704
|
title: zod.z.string().min(1).max(128),
|
|
3326
3705
|
description: zod.z.string().describe("Catalog description stored by POST /proposals/create."),
|
|
3327
3706
|
type: proposalTypeField,
|
|
@@ -3331,7 +3710,7 @@ var mcpContinuumDaoProposeBravoInputSchema = mcpMultisignInput({
|
|
|
3331
3710
|
forumKey: forumTopicKeyField,
|
|
3332
3711
|
forumUrl: zod.z.string().optional()
|
|
3333
3712
|
});
|
|
3334
|
-
var mcpContinuumDaoProposeDeltaInputSchema =
|
|
3713
|
+
var mcpContinuumDaoProposeDeltaInputSchema = mcpContinuumDaoWriteInput("proposeDelta", {
|
|
3335
3714
|
title: zod.z.string().min(1).max(128),
|
|
3336
3715
|
description: zod.z.string().describe("Catalog description stored by POST /proposals/create."),
|
|
3337
3716
|
type: proposalTypeField,
|
|
@@ -3541,20 +3920,23 @@ var mcpContinuumDaoSimulateProposalOutputSchema = zod.z.object({
|
|
|
3541
3920
|
}),
|
|
3542
3921
|
note: zod.z.string()
|
|
3543
3922
|
});
|
|
3544
|
-
var mcpContinuumDaoCastVoteBravoInputSchema =
|
|
3923
|
+
var mcpContinuumDaoCastVoteBravoInputSchema = mcpContinuumDaoWriteInput("castVoteBravo", {
|
|
3545
3924
|
proposalId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3546
3925
|
support: zod.z.union([zod.z.literal(0), zod.z.literal(1), zod.z.literal(2), zod.z.string()]),
|
|
3547
3926
|
governor: evmAddressSchema.optional()
|
|
3548
3927
|
});
|
|
3549
|
-
var mcpContinuumDaoCastVoteDeltaInputSchema =
|
|
3928
|
+
var mcpContinuumDaoCastVoteDeltaInputSchema = mcpContinuumDaoWriteInput("castVoteDelta", {
|
|
3550
3929
|
proposalId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3551
3930
|
weights: zod.z.array(zod.z.union([zod.z.string(), zod.z.number()])),
|
|
3552
3931
|
governor: evmAddressSchema.optional()
|
|
3553
3932
|
});
|
|
3554
|
-
var
|
|
3933
|
+
var continuumDaoProposalIdFields = {
|
|
3555
3934
|
proposalId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3556
3935
|
governor: evmAddressSchema.optional()
|
|
3557
|
-
}
|
|
3936
|
+
};
|
|
3937
|
+
var mcpContinuumDaoExecuteInputSchema = mcpContinuumDaoWriteInput("execute", continuumDaoProposalIdFields);
|
|
3938
|
+
var mcpContinuumDaoCancelInputSchema = mcpContinuumDaoWriteInput("cancel", continuumDaoProposalIdFields);
|
|
3939
|
+
var mcpContinuumDaoProposalIdInputSchema = mcpContinuumDaoExecuteInputSchema;
|
|
3558
3940
|
var mcpContinuumDaoFetchVotingPowerInputSchema = zod.z.object({
|
|
3559
3941
|
chainId: zod.z.union([zod.z.string(), zod.z.number()]),
|
|
3560
3942
|
rpcUrl: zod.z.string().min(1),
|
|
@@ -4046,7 +4428,7 @@ var mcpContinuumDaoForumSignInEligibleOutputSchema = zod.z.object({
|
|
|
4046
4428
|
threshold: zod.z.string().optional().describe("MultiSignAgentWallet.veCtmThresholdPower wei"),
|
|
4047
4429
|
tokenId: zod.z.string().optional()
|
|
4048
4430
|
});
|
|
4049
|
-
var mcpContinuumDaoForumSignInInputSchema =
|
|
4431
|
+
var mcpContinuumDaoForumSignInInputSchema = mcpContinuumDaoWriteInput("forumSignIn", {
|
|
4050
4432
|
nodeKey: zod.z.string().optional().describe(
|
|
4051
4433
|
"Node key bound to this KeyGen. Always required on KeyGen forum sign-in, including when username is a custom name. The server fills it from this node when omitted. useNodeKeyUsername does not replace it."
|
|
4052
4434
|
),
|
|
@@ -4085,11 +4467,18 @@ var mcpMapleFetchMarketInputSchema = zod.z.object({
|
|
|
4085
4467
|
underlying: zod.z.string().trim().min(1).optional().describe("Deposit asset address or ticker (USDC, USDT, USDG).")
|
|
4086
4468
|
});
|
|
4087
4469
|
var mcpMapleFetchMarketOutputSchema = mcpMapleFetchMarketsOutputSchema;
|
|
4088
|
-
var
|
|
4470
|
+
var aaveV4UiMarketIdEnum = zod.z.enum(["main", "core", "bluechip", "bstocks"]);
|
|
4471
|
+
function preprocessAaveV4MarketId(value) {
|
|
4472
|
+
if (typeof value !== "string") return value;
|
|
4473
|
+
return parseAaveV4UiMarketId(value) ?? value;
|
|
4474
|
+
}
|
|
4475
|
+
var mcpAaveV4UiMarketIdSchema = zod.z.preprocess(preprocessAaveV4MarketId, aaveV4UiMarketIdEnum.optional()).describe(
|
|
4476
|
+
"UI market segment: main (Plus), core, bluechip (Prime), or bstocks (Base Coinbase tokenized stocks). Aliases: stocks, equities. Omit to list all hubs."
|
|
4477
|
+
);
|
|
4089
4478
|
var mcpAaveV4MarketSummarySchema = zod.z.object({
|
|
4090
4479
|
chainId: zod.z.number(),
|
|
4091
4480
|
hubName: zod.z.string(),
|
|
4092
|
-
marketId:
|
|
4481
|
+
marketId: aaveV4UiMarketIdEnum,
|
|
4093
4482
|
hubAddress: zod.z.string(),
|
|
4094
4483
|
symbol: zod.z.string(),
|
|
4095
4484
|
name: zod.z.string(),
|
|
@@ -4109,7 +4498,9 @@ var mcpAaveV4MarketSummarySchema = zod.z.object({
|
|
|
4109
4498
|
var mcpAaveV4FetchMarketsInputSchema = zod.z.object({
|
|
4110
4499
|
chainId: agentEvmChainIdSchema,
|
|
4111
4500
|
marketId: mcpAaveV4UiMarketIdSchema,
|
|
4112
|
-
underlying: zod.z.string().trim().min(1).optional().describe(
|
|
4501
|
+
underlying: zod.z.string().trim().min(1).optional().describe(
|
|
4502
|
+
'Optional filter: ERC-20 address or ticker (USDT, USDC, AAPLc). "stock" lists bStock collateral. Omit to list all reserves.'
|
|
4503
|
+
)
|
|
4113
4504
|
});
|
|
4114
4505
|
var mcpAaveV4FetchMarketsOutputSchema = zod.z.object({
|
|
4115
4506
|
chainId: zod.z.number(),
|
|
@@ -4118,14 +4509,21 @@ var mcpAaveV4FetchMarketsOutputSchema = zod.z.object({
|
|
|
4118
4509
|
});
|
|
4119
4510
|
var mcpAaveV4FetchMarketInputSchema = zod.z.object({
|
|
4120
4511
|
chainId: agentEvmChainIdSchema,
|
|
4121
|
-
underlying: zod.z.string().trim().min(1).describe(
|
|
4512
|
+
underlying: zod.z.string().trim().min(1).describe(
|
|
4513
|
+
"Reserve underlying address or ticker (USDT, AAPLc). Prefer fetch_markets or fetch_stock_markets when listing rates."
|
|
4514
|
+
),
|
|
4122
4515
|
marketId: mcpAaveV4UiMarketIdSchema
|
|
4123
4516
|
});
|
|
4124
4517
|
var mcpAaveV4FetchMarketOutputSchema = mcpAaveV4FetchMarketsOutputSchema;
|
|
4518
|
+
var mcpAaveV4FetchStockMarketsInputSchema = zod.z.object({
|
|
4519
|
+
chainId: agentEvmChainIdSchema.optional().describe("Defaults to Base 8453 (Coinbase Stocks hub)."),
|
|
4520
|
+
underlying: zod.z.string().trim().min(1).optional().describe("B20 ticker or address (AAPLc), or USDC. Omit to list the whole Coinbase Stocks hub.")
|
|
4521
|
+
});
|
|
4522
|
+
var mcpAaveV4FetchStockMarketsOutputSchema = mcpAaveV4FetchMarketsOutputSchema;
|
|
4125
4523
|
var mcpEulerV2FetchLendVaultsInputSchema = zod.z.object({
|
|
4126
4524
|
chainId: agentEvmChainIdSchema,
|
|
4127
4525
|
underlyingAddress: evmAddressSchema.describe(
|
|
4128
|
-
"Underlying asset address from
|
|
4526
|
+
"Underlying asset address, or a Coinbase stock ticker (AAPLc) from the live catalog."
|
|
4129
4527
|
),
|
|
4130
4528
|
limit: agentCoercedOptionalIntSchema(zod.z.number().int().min(1).max(100)).describe("Max vault rows (default 30).")
|
|
4131
4529
|
});
|
|
@@ -4147,7 +4545,7 @@ var mcpEulerV2FetchLendVaultsOutputSchema = zod.z.object({
|
|
|
4147
4545
|
var mcpEulerV2FetchEarnVaultsInputSchema = zod.z.object({
|
|
4148
4546
|
chainId: agentEvmChainIdSchema,
|
|
4149
4547
|
underlyingAddress: evmAddressSchema.describe(
|
|
4150
|
-
"Underlying asset address from
|
|
4548
|
+
"Underlying asset address, or a Coinbase stock ticker (AAPLc) from the live catalog."
|
|
4151
4549
|
),
|
|
4152
4550
|
limit: agentCoercedOptionalIntSchema(zod.z.number().int().min(1).max(100)).describe("Max vault rows (default 30).")
|
|
4153
4551
|
});
|
|
@@ -4242,7 +4640,7 @@ var mcpPendleFetchMerkleRewardsOutputSchema = jsonObjectSchema.describe(
|
|
|
4242
4640
|
var mcpPendleQuoteSwapInputSchema = zod.z.object({
|
|
4243
4641
|
chainId: agentEvmChainIdSchema,
|
|
4244
4642
|
rpcUrl: zod.z.string().min(1).optional(),
|
|
4245
|
-
tokenIn: zod.z.string().min(1).describe("Underlying, PT, or
|
|
4643
|
+
tokenIn: zod.z.string().min(1).describe("Underlying, PT, YT, or Coinbase stock ticker (AAPLc). 0xeeee / 0x0 = native."),
|
|
4246
4644
|
tokenOut: zod.z.string().min(1),
|
|
4247
4645
|
amountHuman: zod.z.string().min(1),
|
|
4248
4646
|
slippagePercent: zod.z.number().gt(0).lt(100),
|
|
@@ -5878,14 +6276,26 @@ var mcpDeriveTransferSpotInputSchema = mcpDeriveMultisignInput({
|
|
|
5878
6276
|
});
|
|
5879
6277
|
var mcpCctpFeeFieldsSchema = zod.z.object({
|
|
5880
6278
|
feeTierUsed: zod.z.enum(["low", "med", "high"]),
|
|
5881
|
-
maxFee: zod.z.string().describe(
|
|
5882
|
-
|
|
5883
|
-
|
|
6279
|
+
maxFee: zod.z.string().describe(
|
|
6280
|
+
"depositForBurnWithHook maxFee in USDC base units: selected forwardFee tier plus the fast-transfer protocol fee when transferAmountHuman is set"
|
|
6281
|
+
),
|
|
6282
|
+
maxFeeHuman: zod.z.string().describe("Human-readable maxFee (forwarding fee + protocol fee)"),
|
|
6283
|
+
forwardFeeLow: zod.z.string().describe("Iris forwarding fee only, low tier, USDC base units"),
|
|
5884
6284
|
forwardFeeLowHuman: zod.z.string(),
|
|
5885
|
-
forwardFeeMed: zod.z.string(),
|
|
6285
|
+
forwardFeeMed: zod.z.string().describe("Iris forwarding fee only, med tier, USDC base units"),
|
|
5886
6286
|
forwardFeeMedHuman: zod.z.string(),
|
|
5887
|
-
forwardFeeHigh: zod.z.string(),
|
|
6287
|
+
forwardFeeHigh: zod.z.string().describe("Iris forwarding fee only, high tier, USDC base units"),
|
|
5888
6288
|
forwardFeeHighHuman: zod.z.string(),
|
|
6289
|
+
maxFeeLow: zod.z.string().optional().describe("forwardFee low + protocol fee"),
|
|
6290
|
+
maxFeeLowHuman: zod.z.string().optional(),
|
|
6291
|
+
maxFeeMed: zod.z.string().optional().describe("forwardFee med + protocol fee"),
|
|
6292
|
+
maxFeeMedHuman: zod.z.string().optional(),
|
|
6293
|
+
maxFeeHigh: zod.z.string().optional().describe("forwardFee high + protocol fee"),
|
|
6294
|
+
maxFeeHighHuman: zod.z.string().optional(),
|
|
6295
|
+
minimumFeeBps: zod.z.number().optional().describe("Iris protocol fee rate in basis points for the selected finality row"),
|
|
6296
|
+
protocolFee: zod.z.string().optional().describe("Protocol fee in USDC base units for transferAmountHuman"),
|
|
6297
|
+
protocolFeeHuman: zod.z.string().optional(),
|
|
6298
|
+
finalityThreshold: zod.z.number().int().optional().describe("Iris fee row used. 1000 = fast transfer"),
|
|
5889
6299
|
transferAmount: zod.z.string().optional(),
|
|
5890
6300
|
transferAmountHuman: zod.z.string().optional(),
|
|
5891
6301
|
totalBurn: zod.z.string().optional().describe("transferAmount + maxFee when transferAmountHuman was provided"),
|
|
@@ -5901,8 +6311,13 @@ var mcpCctpFetchSupportedRoutesOutputSchema = jsonObjectSchema.describe(
|
|
|
5901
6311
|
var mcpCctpFetchBurnFeesInputSchema = zod.z.object({
|
|
5902
6312
|
sourceChainId: agentEvmChainIdSchema.describe("Source chain EIP-155 id (burn chain)"),
|
|
5903
6313
|
destChainId: agentEvmChainIdSchema.describe("Destination chain EIP-155 id (mint chain)"),
|
|
5904
|
-
transferAmountHuman: zod.z.string().min(1).optional().describe(
|
|
5905
|
-
|
|
6314
|
+
transferAmountHuman: zod.z.string().min(1).optional().describe(
|
|
6315
|
+
"Human USDC amount the recipient receives (6 decimals). Required for a maxFee that includes the fast-transfer protocol fee and for totalBurn. Omit only to inspect raw forwarding tiers."
|
|
6316
|
+
),
|
|
6317
|
+
feeTier: zod.z.enum(["low", "med", "high"]).optional().describe("Iris forwardFee tier; default med"),
|
|
6318
|
+
minFinalityThreshold: agentCoercedOptionalIntSchema(zod.z.number().int().positive()).describe(
|
|
6319
|
+
"Iris fee row. 1000 (default) is fast transfer and includes minimumFee bps. 2000 is standard transfer."
|
|
6320
|
+
)
|
|
5906
6321
|
});
|
|
5907
6322
|
var mcpCctpFetchBurnFeesOutputSchema = zod.z.object({
|
|
5908
6323
|
sourceChainId: zod.z.number(),
|
|
@@ -5938,7 +6353,9 @@ var mcpCctpBuildBurnMultisignInputSchema = mcpMultisignInput({
|
|
|
5938
6353
|
mintRecipient: evmAddressSchema.optional().describe("Recipient on destination chain; defaults to MPC executor address"),
|
|
5939
6354
|
feeTier: zod.z.enum(["low", "med", "high"]).optional(),
|
|
5940
6355
|
minFinalityThreshold: agentCoercedOptionalIntSchema(zod.z.number().int().positive()),
|
|
5941
|
-
feeSnapshot: jsonObjectSchema.optional().describe(
|
|
6356
|
+
feeSnapshot: jsonObjectSchema.optional().describe(
|
|
6357
|
+
"Optional output from ctm_cctp_fetch_burn_fees. Build re-quotes Iris. A snapshot maxFee below the live forward+protocol total is ignored; a higher snapshot is kept as a cap."
|
|
6358
|
+
)
|
|
5942
6359
|
});
|
|
5943
6360
|
var outcomeIdSchema = zod.z.number().int().nonnegative();
|
|
5944
6361
|
var sideSchema = zod.z.enum(["yes", "no"]);
|
|
@@ -6358,7 +6775,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
6358
6775
|
actionId: "aave-v4.deposit",
|
|
6359
6776
|
protocolId: "aave-v4",
|
|
6360
6777
|
chainCategory: "evm",
|
|
6361
|
-
description: "Build Aave v4 Spoke supply/deposit batch (wrap native, approve, supply).",
|
|
6778
|
+
description: "Build Aave v4 Spoke supply/deposit batch (wrap native, approve, supply). Base bStocks: marketId bstocks and underlying ticker (AAPLc) or address.",
|
|
6362
6779
|
prerequisites: ["keyGenId", "chainId", "underlying", "amountHuman", "get_defi_protocol_skill for hubs/spokes"],
|
|
6363
6780
|
handler: { importPath: "protocols/evm/aave-v4", exportName: "buildEvmMultisignBodyAaveV4DepositBatch" },
|
|
6364
6781
|
inputZod: mcpAaveV4DepositInputSchema
|
|
@@ -6378,7 +6795,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
6378
6795
|
actionId: "aave-v4.borrow",
|
|
6379
6796
|
protocolId: "aave-v4",
|
|
6380
6797
|
chainCategory: "evm",
|
|
6381
|
-
description: "Build Aave v4 Spoke borrow; underlying is debt asset
|
|
6798
|
+
description: "Build Aave v4 Spoke borrow; underlying is the debt asset (USDC on bstocks). Equities are collateral-only. collateralUnderlying may be a bStock ticker (AAPLc).",
|
|
6382
6799
|
prerequisites: [
|
|
6383
6800
|
"keyGenId",
|
|
6384
6801
|
"chainId",
|
|
@@ -6984,7 +7401,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
6984
7401
|
actionId: "circle-cctp.burn-forward",
|
|
6985
7402
|
protocolId: "circle-cctp",
|
|
6986
7403
|
chainCategory: "evm",
|
|
6987
|
-
description: "Create and submit mpc-auth multiSignRequest for CCTP Forwarding Service USDC transfer (approve + depositForBurnWithHook on source chain).",
|
|
7404
|
+
description: "Create and submit mpc-auth multiSignRequest for CCTP Forwarding Service USDC transfer (approve + depositForBurnWithHook on source chain). Re-quotes Iris and sets maxFee to the forwarding tier plus the fast-transfer protocol fee. A feeSnapshot cannot set a lower maxFee.",
|
|
6988
7405
|
prerequisites: [
|
|
6989
7406
|
"ctm_cctp_fetch_burn_fees (required)",
|
|
6990
7407
|
"keyGenId",
|
|
@@ -7063,7 +7480,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
7063
7480
|
description: "Build VotingEscrow.withdraw for an expired, unattached lock. Refuses if still locked or node-attached.",
|
|
7064
7481
|
prerequisites: ["keyGen", "tokenId", "lock expired", "unattached"],
|
|
7065
7482
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoWithdraw" },
|
|
7066
|
-
inputZod:
|
|
7483
|
+
inputZod: mcpContinuumDaoWithdrawInputSchema
|
|
7067
7484
|
}),
|
|
7068
7485
|
defineProtocolMcpTool({
|
|
7069
7486
|
name: "ctm_continuum_dao_build_liquidate_multisign",
|
|
@@ -7073,7 +7490,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
7073
7490
|
description: "Build VotingEscrow.liquidate. Refuses if attached, liquidations disabled, locked amount <= 100 gwei, or penalty would be zero. Expired locks withdraw instead on-chain.",
|
|
7074
7491
|
prerequisites: ["keyGen", "tokenId", "liquidationsEnabled", "unattached"],
|
|
7075
7492
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoLiquidate" },
|
|
7076
|
-
inputZod:
|
|
7493
|
+
inputZod: mcpContinuumDaoLiquidateInputSchema
|
|
7077
7494
|
}),
|
|
7078
7495
|
defineProtocolMcpTool({
|
|
7079
7496
|
name: "ctm_continuum_dao_build_delegate_multisign",
|
|
@@ -7191,7 +7608,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
7191
7608
|
description: "Build ContinuumDAO.execute(proposalId). proposalId may be a catalog id (including 0) or the governor hash. Call after Succeeded. Queue is not implemented.",
|
|
7192
7609
|
prerequisites: ["keyGen", "proposalId", "Succeeded state"],
|
|
7193
7610
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoExecute" },
|
|
7194
|
-
inputZod:
|
|
7611
|
+
inputZod: mcpContinuumDaoExecuteInputSchema
|
|
7195
7612
|
}),
|
|
7196
7613
|
defineProtocolMcpTool({
|
|
7197
7614
|
name: "ctm_continuum_dao_build_cancel_multisign",
|
|
@@ -7201,7 +7618,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
7201
7618
|
description: "Build ContinuumDAO.cancel(proposalId). Proposer while Pending, or the proposal guardian.",
|
|
7202
7619
|
prerequisites: ["keyGen", "proposalId"],
|
|
7203
7620
|
handler: { importPath: "protocols/evm/continuum-dao", exportName: "buildEvmMultisignBodyContinuumDaoCancel" },
|
|
7204
|
-
inputZod:
|
|
7621
|
+
inputZod: mcpContinuumDaoCancelInputSchema
|
|
7205
7622
|
}),
|
|
7206
7623
|
defineProtocolMcpTool({
|
|
7207
7624
|
name: "ctm_continuum_dao_build_forum_sign_in_multisign",
|
|
@@ -7541,7 +7958,7 @@ var mcpContinuumDaoMarketplaceSearchInputSchema = zod.z.object({
|
|
|
7541
7958
|
sort: zod.z.enum(["pricePerLockedCtm", "price", "locked", "unlock", "deadline"]).optional().describe("Default pricePerLockedCtm, cheapest first. locked defaults to most CTM. unlock and deadline default to soonest."),
|
|
7542
7959
|
sortDirection: zod.z.enum(["asc", "desc"]).optional(),
|
|
7543
7960
|
limit: zod.z.number().int().min(1).max(25).optional().describe("Ranked rows to return, default 10"),
|
|
7544
|
-
executor: evmAddressSchema.optional().describe("KeyGen address.
|
|
7961
|
+
executor: evmAddressSchema.optional().describe("KeyGen address. Listings this address sells are returned with action delist and fillable false."),
|
|
7545
7962
|
excludeOwned: zod.z.boolean().optional()
|
|
7546
7963
|
});
|
|
7547
7964
|
var mcpContinuumDaoMarketplaceFeeAlternativeInputSchema = zod.z.object({
|
|
@@ -7618,46 +8035,46 @@ var mcpContinuumDaoMarketplaceActivityOutputSchema = zod.z.object({
|
|
|
7618
8035
|
var mcpContinuumDaoMarketplaceFeeOutputSchema = zod.z.object({ source }).passthrough();
|
|
7619
8036
|
var wei = zod.z.union([zod.z.string(), zod.z.number()]);
|
|
7620
8037
|
var deadline = zod.z.union([zod.z.string(), zod.z.number()]).describe("Unix seconds");
|
|
7621
|
-
var mcpContinuumDaoMarketplaceCreateListingInputSchema =
|
|
8038
|
+
var mcpContinuumDaoMarketplaceCreateListingInputSchema = mcpContinuumDaoWriteInput("marketplaceCreateListing", {
|
|
7622
8039
|
tokenId: wei,
|
|
7623
8040
|
paymentToken: evmAddressSchema,
|
|
7624
8041
|
askWei: wei,
|
|
7625
8042
|
deadline
|
|
7626
8043
|
});
|
|
7627
|
-
var mcpContinuumDaoMarketplaceDelistInputSchema =
|
|
7628
|
-
var mcpContinuumDaoMarketplaceFulfillListingInputSchema =
|
|
8044
|
+
var mcpContinuumDaoMarketplaceDelistInputSchema = mcpContinuumDaoWriteInput("marketplaceDelist", { tokenId: wei });
|
|
8045
|
+
var mcpContinuumDaoMarketplaceFulfillListingInputSchema = mcpContinuumDaoWriteInput("marketplaceFulfillListing", {
|
|
7629
8046
|
tokenId: wei,
|
|
7630
8047
|
seller: evmAddressSchema,
|
|
7631
8048
|
paymentToken: evmAddressSchema,
|
|
7632
8049
|
priceWei: wei
|
|
7633
8050
|
});
|
|
7634
|
-
var mcpContinuumDaoMarketplaceCreateOfferingInputSchema =
|
|
8051
|
+
var mcpContinuumDaoMarketplaceCreateOfferingInputSchema = mcpContinuumDaoWriteInput("marketplaceCreateOffering", {
|
|
7635
8052
|
tokenId: wei,
|
|
7636
8053
|
paymentToken: evmAddressSchema,
|
|
7637
8054
|
bidWei: wei,
|
|
7638
8055
|
deadline
|
|
7639
8056
|
});
|
|
7640
|
-
var mcpContinuumDaoMarketplaceRescindInputSchema =
|
|
7641
|
-
var mcpContinuumDaoMarketplaceFulfillOfferingInputSchema =
|
|
8057
|
+
var mcpContinuumDaoMarketplaceRescindInputSchema = mcpContinuumDaoWriteInput("marketplaceRescind", { tokenId: wei });
|
|
8058
|
+
var mcpContinuumDaoMarketplaceFulfillOfferingInputSchema = mcpContinuumDaoWriteInput("marketplaceFulfillOffering", {
|
|
7642
8059
|
tokenId: wei,
|
|
7643
8060
|
buyer: evmAddressSchema,
|
|
7644
8061
|
paymentToken: evmAddressSchema,
|
|
7645
8062
|
priceWei: wei
|
|
7646
8063
|
});
|
|
7647
|
-
var mcpContinuumDaoMarketplaceCreateAuctionInputSchema =
|
|
8064
|
+
var mcpContinuumDaoMarketplaceCreateAuctionInputSchema = mcpContinuumDaoWriteInput("marketplaceCreateAuction", {
|
|
7648
8065
|
tokenId: wei,
|
|
7649
8066
|
paymentToken: evmAddressSchema,
|
|
7650
8067
|
deadline,
|
|
7651
8068
|
reserveWei: wei,
|
|
7652
8069
|
minIncrementWei: wei
|
|
7653
8070
|
});
|
|
7654
|
-
var mcpContinuumDaoMarketplaceCancelAuctionInputSchema =
|
|
7655
|
-
var mcpContinuumDaoMarketplaceAuctionBidInputSchema =
|
|
8071
|
+
var mcpContinuumDaoMarketplaceCancelAuctionInputSchema = mcpContinuumDaoWriteInput("marketplaceCancelAuction", { tokenId: wei });
|
|
8072
|
+
var mcpContinuumDaoMarketplaceAuctionBidInputSchema = mcpContinuumDaoWriteInput("marketplaceAuctionBid", {
|
|
7656
8073
|
tokenId: wei,
|
|
7657
8074
|
seller: evmAddressSchema,
|
|
7658
8075
|
priceWei: wei
|
|
7659
8076
|
});
|
|
7660
|
-
var mcpContinuumDaoMarketplaceSettleAuctionInputSchema =
|
|
8077
|
+
var mcpContinuumDaoMarketplaceSettleAuctionInputSchema = mcpContinuumDaoWriteInput("marketplaceSettleAuction", {
|
|
7661
8078
|
tokenId: wei,
|
|
7662
8079
|
seller: evmAddressSchema
|
|
7663
8080
|
});
|
|
@@ -7727,9 +8144,13 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
|
|
|
7727
8144
|
defineRead({
|
|
7728
8145
|
name: "ctm_continuum_dao_marketplace_search",
|
|
7729
8146
|
actionId: "continuum-dao-marketplace.search",
|
|
7730
|
-
description:
|
|
8147
|
+
description: 'Rank veCTMs for sale. Returns a short list already sorted by price per locked CTM, price, locked CTM, unlock, or deadline. Filters: min/max locked CTM, unlock window, maxUnlockMonths. Pass paymentToken to compare prices. Pass executor so this KeyGen\u2019s own listings come back with action "delist" and fillable false. Call the delist builder for those. Do not buy them. Use this to choose a buy. Do not fetch the raw listing page and then offer to sort it.',
|
|
7731
8148
|
prerequisites: ["chainId 59144", "rpcUrl when lock snapshots are missing"],
|
|
7732
|
-
followUp: [
|
|
8149
|
+
followUp: [
|
|
8150
|
+
"ctm_continuum_dao_marketplace_build_delist_multisign",
|
|
8151
|
+
"ctm_continuum_dao_marketplace_build_fulfill_listing_multisign",
|
|
8152
|
+
"ctm_continuum_dao_marketplace_build_auction_bid_multisign"
|
|
8153
|
+
],
|
|
7733
8154
|
inputZod: mcpContinuumDaoMarketplaceSearchInputSchema,
|
|
7734
8155
|
outputZod: mcpContinuumDaoMarketplaceSearchOutputSchema,
|
|
7735
8156
|
exportName: "searchContinuumDaoMarketplace"
|
|
@@ -7737,9 +8158,12 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
|
|
|
7737
8158
|
defineRead({
|
|
7738
8159
|
name: "ctm_continuum_dao_marketplace_fetch_listings",
|
|
7739
8160
|
actionId: "continuum-dao-marketplace.fetch-listings",
|
|
7740
|
-
description:
|
|
8161
|
+
description: 'Unfiltered page of open veCTM listings, created order, up to 100, with nextCursor. includeInactive adds past sales. Pass viewer as the KeyGen. viewerAction "delist" means that KeyGen already sells the veCTM: build a delist, not a buy. To choose a buy by price, locked CTM, or unlock time, use search instead.',
|
|
7741
8162
|
prerequisites: ["chainId 59144"],
|
|
7742
|
-
followUp: [
|
|
8163
|
+
followUp: [
|
|
8164
|
+
"ctm_continuum_dao_marketplace_build_delist_multisign",
|
|
8165
|
+
"ctm_continuum_dao_marketplace_build_fulfill_listing_multisign"
|
|
8166
|
+
],
|
|
7743
8167
|
inputZod: mcpContinuumDaoMarketplaceFetchListingsInputSchema,
|
|
7744
8168
|
outputZod: mcpContinuumDaoMarketplaceListOutputSchema,
|
|
7745
8169
|
exportName: "fetchContinuumDaoMarketplaceListings"
|
|
@@ -7757,7 +8181,7 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
|
|
|
7757
8181
|
defineRead({
|
|
7758
8182
|
name: "ctm_continuum_dao_marketplace_fetch_auctions",
|
|
7759
8183
|
actionId: "continuum-dao-marketplace.fetch-auctions",
|
|
7760
|
-
description: "Live veCTM auctions
|
|
8184
|
+
description: "Live veCTM auctions. derivedStatus is Active while the auction is open, including before any bid meets the reserve. storedStatus stays Pending until a qualifying bid, then Active. Complete still needs settle. includeInactive adds sold, canceled, and expired. Each auction includes bids.",
|
|
7761
8185
|
prerequisites: ["chainId 59144"],
|
|
7762
8186
|
followUp: ["ctm_continuum_dao_marketplace_build_auction_bid_multisign", "ctm_continuum_dao_marketplace_build_settle_auction_multisign"],
|
|
7763
8187
|
inputZod: mcpContinuumDaoMarketplaceFetchAuctionsInputSchema,
|
|
@@ -7797,15 +8221,15 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
|
|
|
7797
8221
|
defineWrite({
|
|
7798
8222
|
name: "ctm_continuum_dao_marketplace_build_create_listing_multisign",
|
|
7799
8223
|
actionId: "continuum-dao-marketplace.create-listing",
|
|
7800
|
-
description: "List a veCTM. Approves the marketplace for the token id when needed. Linea only.",
|
|
7801
|
-
prerequisites: ["keyGen", "tokenId owned by the KeyGen", "askWei", "deadline"],
|
|
8224
|
+
description: "List a veCTM. Approves the marketplace for the token id when needed. Refuses an attached KeyGen. Linea only.",
|
|
8225
|
+
prerequisites: ["keyGen", "tokenId owned by the KeyGen", "unattached", "askWei", "deadline"],
|
|
7802
8226
|
inputZod: mcpContinuumDaoMarketplaceCreateListingInputSchema,
|
|
7803
8227
|
exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceCreateListing"
|
|
7804
8228
|
}),
|
|
7805
8229
|
defineWrite({
|
|
7806
8230
|
name: "ctm_continuum_dao_marketplace_build_delist_multisign",
|
|
7807
8231
|
actionId: "continuum-dao-marketplace.delist",
|
|
7808
|
-
description: "Delist this KeyGen\u2019s open veCTM listing.",
|
|
8232
|
+
description: "Delist this KeyGen\u2019s open veCTM listing. Use this when the KeyGen is the seller. Do not buy that listing.",
|
|
7809
8233
|
prerequisites: ["keyGen", "tokenId"],
|
|
7810
8234
|
inputZod: mcpContinuumDaoMarketplaceDelistInputSchema,
|
|
7811
8235
|
exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceDelist"
|
|
@@ -7813,7 +8237,7 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
|
|
|
7813
8237
|
defineWrite({
|
|
7814
8238
|
name: "ctm_continuum_dao_marketplace_build_fulfill_listing_multisign",
|
|
7815
8239
|
actionId: "continuum-dao-marketplace.fulfill-listing",
|
|
7816
|
-
description: "Buy a listed veCTM. Refuses when this KeyGen already owns it or is the seller. WETH sends msg.value.",
|
|
8240
|
+
description: "Buy a listed veCTM. Refuses when this KeyGen already owns it or is the seller, and tells you to delist instead. WETH sends msg.value.",
|
|
7817
8241
|
prerequisites: ["keyGen", "tokenId", "seller", "priceWei"],
|
|
7818
8242
|
inputZod: mcpContinuumDaoMarketplaceFulfillListingInputSchema,
|
|
7819
8243
|
exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceFulfillListing"
|
|
@@ -7821,8 +8245,8 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
|
|
|
7821
8245
|
defineWrite({
|
|
7822
8246
|
name: "ctm_continuum_dao_marketplace_build_create_offering_multisign",
|
|
7823
8247
|
actionId: "continuum-dao-marketplace.create-offering",
|
|
7824
|
-
description: "Offer on a veCTM this KeyGen does not own. WETH sends msg.value and still approves WETH for later fulfillment.",
|
|
7825
|
-
prerequisites: ["keyGen", "tokenId", "bidWei", "deadline"],
|
|
8248
|
+
description: "Offer on a veCTM this KeyGen does not own. Refuses an attached KeyGen. WETH sends msg.value and still approves WETH for later fulfillment.",
|
|
8249
|
+
prerequisites: ["keyGen", "tokenId", "unattached", "bidWei", "deadline"],
|
|
7826
8250
|
inputZod: mcpContinuumDaoMarketplaceCreateOfferingInputSchema,
|
|
7827
8251
|
exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceCreateOffering"
|
|
7828
8252
|
}),
|
|
@@ -7846,7 +8270,7 @@ var MCP_MARKETPLACE_TOOL_DEFINITIONS = [
|
|
|
7846
8270
|
name: "ctm_continuum_dao_marketplace_build_create_auction_multisign",
|
|
7847
8271
|
actionId: "continuum-dao-marketplace.create-auction",
|
|
7848
8272
|
description: "Start an auction and escrow the veCTM. Refuses an attached KeyGen.",
|
|
7849
|
-
prerequisites: ["keyGen", "tokenId", "reserveWei", "minIncrementWei", "deadline"],
|
|
8273
|
+
prerequisites: ["keyGen", "tokenId", "unattached", "reserveWei", "minIncrementWei", "deadline"],
|
|
7850
8274
|
inputZod: mcpContinuumDaoMarketplaceCreateAuctionInputSchema,
|
|
7851
8275
|
exportName: "buildEvmMultisignBodyContinuumDaoMarketplaceCreateAuction"
|
|
7852
8276
|
}),
|
|
@@ -9171,7 +9595,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
9171
9595
|
actionId: "circle-cctp.fetch-fees",
|
|
9172
9596
|
protocolId: "circle-cctp",
|
|
9173
9597
|
chainCategory: "evm",
|
|
9174
|
-
description: "Quote Circle Iris
|
|
9598
|
+
description: "Quote Circle Iris CCTP fees (?forward=true). maxFee = forwardFee[tier] + protocol fee (minimumFee bps of transferAmountHuman). Pass transferAmountHuman before building a burn. forwardFee* fields are the forwarding component only. Does NOT create a sign request.",
|
|
9175
9599
|
prerequisites: ["supported route (ctm_cctp_fetch_supported_routes)"],
|
|
9176
9600
|
followUp: ["ctm_cctp_fetch_usdc_balance", "ctm_cctp_build_burn_multisign"],
|
|
9177
9601
|
handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchBurnFeesForRoute" },
|
|
@@ -9805,10 +10229,11 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
9805
10229
|
actionId: "aave-v4.fetch-markets",
|
|
9806
10230
|
protocolId: "aave-v4",
|
|
9807
10231
|
chainCategory: "evm",
|
|
9808
|
-
description: "List Aave v4 hub reserves on a chain with live supply/borrow APY, liquidity, and collateral factor. Use this (not web search) to compare lending rates or pick an underlying + marketId for build_*_multisign. Optional marketId (main/core/bluechip) or underlying filter.",
|
|
10232
|
+
description: "List Aave v4 hub reserves on a chain with live supply/borrow APY, liquidity, and collateral factor. Use this (not web search) to compare lending rates or pick an underlying + marketId for build_*_multisign. Optional marketId (main/core/bluechip/bstocks) or underlying filter. Base tokenized stocks: marketId bstocks or ctm_aave_v4_fetch_stock_markets. Tickers (AAPLc) OK.",
|
|
9809
10233
|
prerequisites: ["chainId", "get_defi_protocol_supported_chains"],
|
|
9810
10234
|
followUp: [
|
|
9811
10235
|
"ctm_aave_v4_fetch_market",
|
|
10236
|
+
"ctm_aave_v4_fetch_stock_markets",
|
|
9812
10237
|
"ctm_aave_v4_build_deposit_multisign",
|
|
9813
10238
|
"ctm_aave_v4_build_borrow_multisign"
|
|
9814
10239
|
],
|
|
@@ -9821,7 +10246,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
9821
10246
|
actionId: "aave-v4.fetch-market",
|
|
9822
10247
|
protocolId: "aave-v4",
|
|
9823
10248
|
chainCategory: "evm",
|
|
9824
|
-
description: "One Aave v4 reserve (or the same underlying across hubs) with supply/borrow APY and liquidity. Copy underlying + marketId for deposit/borrow/repay. Do not web-search Aave rates.",
|
|
10249
|
+
description: "One Aave v4 reserve (or the same underlying across hubs) with supply/borrow APY and liquidity. Copy underlying + marketId for deposit/borrow/repay. Tickers OK (USDT, AAPLc). Do not web-search Aave rates.",
|
|
9825
10250
|
prerequisites: ["chainId", "underlying from ctm_aave_v4_fetch_markets or get_defi_protocol_supported_tokens"],
|
|
9826
10251
|
followUp: [
|
|
9827
10252
|
"ctm_aave_v4_build_deposit_multisign",
|
|
@@ -9833,6 +10258,23 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
9833
10258
|
inputZod: mcpAaveV4FetchMarketInputSchema,
|
|
9834
10259
|
outputZod: mcpAaveV4FetchMarketOutputSchema
|
|
9835
10260
|
}),
|
|
10261
|
+
defineMcpTool({
|
|
10262
|
+
name: "ctm_aave_v4_fetch_stock_markets",
|
|
10263
|
+
actionId: "aave-v4.fetch-stock-markets",
|
|
10264
|
+
protocolId: "aave-v4",
|
|
10265
|
+
chainCategory: "evm",
|
|
10266
|
+
description: "Coinbase tokenized stocks (bStocks) on the Aave v4 Coinbase Stocks hub, Base chainId 8453 by default. Equities (AAPLc, NVDAc, \u2026) are collateral-only; USDC is the borrow asset. Tickers OK. Same rows as ctm_aave_v4_fetch_markets with marketId bstocks. Chainlink feeds are 24/5. Not for U.S. persons.",
|
|
10267
|
+
prerequisites: ["chainId 8453 or omit"],
|
|
10268
|
+
followUp: [
|
|
10269
|
+
"ctm_aave_v4_build_deposit_multisign",
|
|
10270
|
+
"ctm_aave_v4_build_borrow_multisign",
|
|
10271
|
+
"ctm_aave_v4_build_repay_multisign",
|
|
10272
|
+
"ctm_aave_v4_build_withdraw_multisign"
|
|
10273
|
+
],
|
|
10274
|
+
handler: { importPath: "protocols/evm/aave-v4", exportName: "aaveV4FetchStockMarketsSummary" },
|
|
10275
|
+
inputZod: mcpAaveV4FetchStockMarketsInputSchema,
|
|
10276
|
+
outputZod: mcpAaveV4FetchStockMarketsOutputSchema
|
|
10277
|
+
}),
|
|
9836
10278
|
defineMcpTool({
|
|
9837
10279
|
name: "ctm_aave_v4_fetch_merkl_rewards",
|
|
9838
10280
|
actionId: "aave-v4.fetch-merkl-rewards",
|
|
@@ -10826,83 +11268,6 @@ var skyProtocolModule = {
|
|
|
10826
11268
|
};
|
|
10827
11269
|
registerProtocolModule(skyProtocolModule);
|
|
10828
11270
|
|
|
10829
|
-
// src/protocols/evm/aave-v4/api.ts
|
|
10830
|
-
init_defiProxy();
|
|
10831
|
-
var AAVE_V4_GRAPHQL_URL = "https://api.v4.aave.com/graphql";
|
|
10832
|
-
async function aaveV4Gql(query, variables) {
|
|
10833
|
-
const body = { query, variables: variables ?? {} };
|
|
10834
|
-
const j = await postJsonViaOptionalProxy({
|
|
10835
|
-
directUrl: AAVE_V4_GRAPHQL_URL,
|
|
10836
|
-
body,
|
|
10837
|
-
proxyUrl: getAaveGraphqlProxyUrl(),
|
|
10838
|
-
proxyEnvelope: body
|
|
10839
|
-
});
|
|
10840
|
-
if (j.errors?.length) {
|
|
10841
|
-
const msg = j.errors.map((e) => e.message ?? "Unknown").join("; ");
|
|
10842
|
-
throw new Error(msg);
|
|
10843
|
-
}
|
|
10844
|
-
if (j.data == null) {
|
|
10845
|
-
throw new Error("Aave V4 API: empty response");
|
|
10846
|
-
}
|
|
10847
|
-
return j.data;
|
|
10848
|
-
}
|
|
10849
|
-
async function fetchAaveV4Chains() {
|
|
10850
|
-
const d = await aaveV4Gql(`
|
|
10851
|
-
query C($c: ChainsRequest!) { chains(request: $c) { chainId name nativeWrappedToken } }
|
|
10852
|
-
`, { c: { query: { filter: "ALL" } } });
|
|
10853
|
-
return d.chains ?? [];
|
|
10854
|
-
}
|
|
10855
|
-
async function loadAaveV4SupportedChainIdsFromV4Api() {
|
|
10856
|
-
const rows = await fetchAaveV4Chains();
|
|
10857
|
-
const s = /* @__PURE__ */ new Set();
|
|
10858
|
-
for (const c of rows) s.add(c.chainId);
|
|
10859
|
-
return s;
|
|
10860
|
-
}
|
|
10861
|
-
var RESERVES_ADDRESS_FRAGMENT = `
|
|
10862
|
-
asset { underlying { address } }
|
|
10863
|
-
`;
|
|
10864
|
-
async function fetchAaveV4NativeWrappedToken(chainId) {
|
|
10865
|
-
const all = await fetchAaveV4Chains();
|
|
10866
|
-
const c = all.find((x) => x.chainId === chainId);
|
|
10867
|
-
const t = (c?.nativeWrappedToken ?? "").trim();
|
|
10868
|
-
if (t && viem.isAddress(t)) return viem.getAddress(t);
|
|
10869
|
-
return null;
|
|
10870
|
-
}
|
|
10871
|
-
async function fetchAaveV4SupportedUnderlyingAddressSet(chainId) {
|
|
10872
|
-
const d = await aaveV4Gql(
|
|
10873
|
-
`
|
|
10874
|
-
query A($r: ReservesRequest!) { reserves(request: $r) { ${RESERVES_ADDRESS_FRAGMENT} } }
|
|
10875
|
-
`,
|
|
10876
|
-
{
|
|
10877
|
-
r: {
|
|
10878
|
-
query: { chainIds: [chainId] },
|
|
10879
|
-
filter: "ALL",
|
|
10880
|
-
orderBy: { supplyApy: "DESC" }
|
|
10881
|
-
}
|
|
10882
|
-
}
|
|
10883
|
-
);
|
|
10884
|
-
const s = /* @__PURE__ */ new Set();
|
|
10885
|
-
for (const r of d.reserves ?? []) {
|
|
10886
|
-
const a = (r.asset?.underlying?.address ?? "").trim();
|
|
10887
|
-
if (a && viem.isAddress(a)) s.add(a.toLowerCase());
|
|
10888
|
-
}
|
|
10889
|
-
return s;
|
|
10890
|
-
}
|
|
10891
|
-
var aaveV4ChainTokenCache = /* @__PURE__ */ new Map();
|
|
10892
|
-
function ensureAaveV4ChainTokenCache(chainId) {
|
|
10893
|
-
const hit = aaveV4ChainTokenCache.get(chainId);
|
|
10894
|
-
if (hit) return hit;
|
|
10895
|
-
const p = (async () => {
|
|
10896
|
-
const [nativeWrapped, supportedUnderlying] = await Promise.all([
|
|
10897
|
-
fetchAaveV4NativeWrappedToken(chainId),
|
|
10898
|
-
fetchAaveV4SupportedUnderlyingAddressSet(chainId)
|
|
10899
|
-
]);
|
|
10900
|
-
return { supportedUnderlying, nativeWrapped };
|
|
10901
|
-
})();
|
|
10902
|
-
aaveV4ChainTokenCache.set(chainId, p);
|
|
10903
|
-
return p;
|
|
10904
|
-
}
|
|
10905
|
-
|
|
10906
11271
|
// src/protocols/evm/aave-v4/index.ts
|
|
10907
11272
|
var AAVE_V4_PROTOCOL_ID = "aave-v4";
|
|
10908
11273
|
var aaveV4ProtocolModule = {
|
|
@@ -11586,9 +11951,9 @@ registerProtocolModule(hyperliquidProtocolModule);
|
|
|
11586
11951
|
// src/protocols/evm/arcus/index.ts
|
|
11587
11952
|
init_support();
|
|
11588
11953
|
init_support();
|
|
11589
|
-
|
|
11954
|
+
init_constants2();
|
|
11590
11955
|
init_api();
|
|
11591
|
-
|
|
11956
|
+
init_constants2();
|
|
11592
11957
|
var arcusProtocolModule = {
|
|
11593
11958
|
id: ARCUS_PROTOCOL_ID,
|
|
11594
11959
|
chainCategory: "evm",
|
|
@@ -12110,7 +12475,7 @@ var circleCctpProtocolModule = {
|
|
|
12110
12475
|
id: "circle-cctp.fetch-fees",
|
|
12111
12476
|
protocolId: CIRCLE_CCTP_PROTOCOL_ID,
|
|
12112
12477
|
chainCategory: "evm",
|
|
12113
|
-
description: "Quote Iris
|
|
12478
|
+
description: "Quote Iris forwarding fee plus fast-transfer protocol fee for a route",
|
|
12114
12479
|
commonParams: [],
|
|
12115
12480
|
params: {
|
|
12116
12481
|
sourceChainId: { type: "number", required: true, description: "Source EIP-155 chain id" },
|
|
@@ -12342,10 +12707,10 @@ var aerodromeProtocolModule = {
|
|
|
12342
12707
|
registerProtocolModule(aerodromeProtocolModule);
|
|
12343
12708
|
|
|
12344
12709
|
// src/protocols/evm/continuum-dao/index.ts
|
|
12345
|
-
|
|
12710
|
+
init_constants();
|
|
12346
12711
|
|
|
12347
12712
|
// src/protocols/evm/continuum-dao/marketplaceModule.ts
|
|
12348
|
-
|
|
12713
|
+
init_constants();
|
|
12349
12714
|
var common = ["keyGen", "purposeText", "useCustomGas"];
|
|
12350
12715
|
var continuumDaoMarketplaceProtocolModule = {
|
|
12351
12716
|
id: CONTINUUM_DAO_MARKETPLACE_PROTOCOL_ID,
|
|
@@ -12382,7 +12747,7 @@ var continuumDaoMarketplaceProtocolModule = {
|
|
|
12382
12747
|
};
|
|
12383
12748
|
|
|
12384
12749
|
// src/protocols/evm/continuum-dao/index.ts
|
|
12385
|
-
|
|
12750
|
+
init_constants();
|
|
12386
12751
|
init_committeeList();
|
|
12387
12752
|
init_proposalCatalog();
|
|
12388
12753
|
init_governance();
|
|
@@ -13193,16 +13558,16 @@ async function pendleCoreFetch(args) {
|
|
|
13193
13558
|
lastError = new PendleApiError(`Pendle API rate limited (429) on ${path}`, 429, path);
|
|
13194
13559
|
continue;
|
|
13195
13560
|
}
|
|
13196
|
-
const
|
|
13561
|
+
const text2 = await res.text();
|
|
13197
13562
|
if (!res.ok) {
|
|
13198
13563
|
throw new PendleApiError(
|
|
13199
|
-
`Pendle API ${res.status} ${path}: ${
|
|
13564
|
+
`Pendle API ${res.status} ${path}: ${text2.slice(0, 400)}`,
|
|
13200
13565
|
res.status,
|
|
13201
13566
|
path
|
|
13202
13567
|
);
|
|
13203
13568
|
}
|
|
13204
|
-
if (!
|
|
13205
|
-
return JSON.parse(
|
|
13569
|
+
if (!text2.trim()) return {};
|
|
13570
|
+
return JSON.parse(text2);
|
|
13206
13571
|
} catch (err) {
|
|
13207
13572
|
lastError = err;
|
|
13208
13573
|
if (err instanceof PendleApiError && err.status !== 429) throw err;
|
|
@@ -13592,15 +13957,15 @@ async function deriveRpcPost(args) {
|
|
|
13592
13957
|
cache: "no-store",
|
|
13593
13958
|
signal: AbortSignal.timeout(15e3)
|
|
13594
13959
|
});
|
|
13595
|
-
const
|
|
13596
|
-
if (!res.ok || !
|
|
13597
|
-
throw new Error(`Derive ${method} HTTP ${res.status}: ${
|
|
13960
|
+
const text2 = await res.text().catch(() => "");
|
|
13961
|
+
if (!res.ok || !text2.trim() || text2.trim() === "Not Found") {
|
|
13962
|
+
throw new Error(`Derive ${method} HTTP ${res.status}: ${text2.slice(0, 240) || "empty body"}`);
|
|
13598
13963
|
}
|
|
13599
13964
|
let json;
|
|
13600
13965
|
try {
|
|
13601
|
-
json = JSON.parse(
|
|
13966
|
+
json = JSON.parse(text2);
|
|
13602
13967
|
} catch {
|
|
13603
|
-
throw new Error(`Derive ${method} returned non-JSON: ${
|
|
13968
|
+
throw new Error(`Derive ${method} returned non-JSON: ${text2.slice(0, 160)}`);
|
|
13604
13969
|
}
|
|
13605
13970
|
const result = unwrapResult(json, method);
|
|
13606
13971
|
if (isEmptyDerivePublicResult(method, result)) {
|
|
@@ -14002,15 +14367,17 @@ function getProtocolDiscoverySummary(protocolId) {
|
|
|
14002
14367
|
}))
|
|
14003
14368
|
};
|
|
14004
14369
|
}
|
|
14370
|
+
init_coinbaseB20();
|
|
14005
14371
|
init_support();
|
|
14006
14372
|
init_support2();
|
|
14007
14373
|
init_addresses();
|
|
14008
14374
|
init_stockTokens();
|
|
14009
|
-
|
|
14375
|
+
init_constants();
|
|
14010
14376
|
function advisor(protocolId, tokenFilter, impl) {
|
|
14011
14377
|
return { protocolId, tokenFilter, ...impl };
|
|
14012
14378
|
}
|
|
14013
|
-
function aerodromeAdvisorPriorityTokens() {
|
|
14379
|
+
async function aerodromeAdvisorPriorityTokens() {
|
|
14380
|
+
const stocks = await ensureCoinbaseB20StockCatalog().catch(() => []);
|
|
14014
14381
|
return [
|
|
14015
14382
|
{
|
|
14016
14383
|
address: "0x0000000000000000000000000000000000000000",
|
|
@@ -14036,11 +14403,11 @@ function aerodromeAdvisorPriorityTokens() {
|
|
|
14036
14403
|
decimals: 18,
|
|
14037
14404
|
roles: ["swappable"]
|
|
14038
14405
|
},
|
|
14039
|
-
...
|
|
14406
|
+
...stocks.map((t) => ({
|
|
14040
14407
|
address: t.address,
|
|
14041
14408
|
symbol: t.symbol,
|
|
14042
14409
|
name: t.name,
|
|
14043
|
-
decimals: COINBASE_B20_STOCK_DECIMALS,
|
|
14410
|
+
decimals: t.decimals || COINBASE_B20_STOCK_DECIMALS,
|
|
14044
14411
|
roles: ["swappable", "listed", "coinbase_b20"]
|
|
14045
14412
|
}))
|
|
14046
14413
|
];
|
|
@@ -14053,10 +14420,18 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
14053
14420
|
},
|
|
14054
14421
|
async supportedTokens(chainId) {
|
|
14055
14422
|
const cache = await ensureAaveV4ChainTokenCache(chainId);
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14059
|
-
|
|
14423
|
+
await ensureCoinbaseB20StockCatalog().catch(() => []);
|
|
14424
|
+
const tokens = [...cache.supportedUnderlying].map((address) => {
|
|
14425
|
+
const known = lookupCoinbaseB20StockToken(address);
|
|
14426
|
+
if (!known) return { address, roles: ["underlying"] };
|
|
14427
|
+
return {
|
|
14428
|
+
address,
|
|
14429
|
+
symbol: known.symbol,
|
|
14430
|
+
name: "name" in known ? known.name : void 0,
|
|
14431
|
+
decimals: COINBASE_B20_STOCK_DECIMALS,
|
|
14432
|
+
roles: ["underlying", "coinbase_b20", "collateral"]
|
|
14433
|
+
};
|
|
14434
|
+
});
|
|
14060
14435
|
if (cache.nativeWrapped) {
|
|
14061
14436
|
tokens.unshift({
|
|
14062
14437
|
address: cache.nativeWrapped,
|
|
@@ -14067,7 +14442,7 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
14067
14442
|
return {
|
|
14068
14443
|
tokens,
|
|
14069
14444
|
nativeWrapped: cache.nativeWrapped ?? void 0,
|
|
14070
|
-
notes: "Native ETH deposits use wrapped native token address from Aave v4 API."
|
|
14445
|
+
notes: "Native ETH deposits use wrapped native token address from Aave v4 API. Base chainId 8453 Coinbase Stocks hub is marketId bstocks. Listed equities come from the Aave v4 API; tickers resolve from the live Coinbase catalog. Equities are collateral-only; USDC is the borrow asset."
|
|
14071
14446
|
};
|
|
14072
14447
|
},
|
|
14073
14448
|
async isTokenSupported(chainId, address) {
|
|
@@ -14353,9 +14728,9 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
14353
14728
|
return { tokens: [], notes: "Aerodrome is Base-only (chainId 8453)." };
|
|
14354
14729
|
}
|
|
14355
14730
|
return {
|
|
14356
|
-
tokens: aerodromeAdvisorPriorityTokens(),
|
|
14731
|
+
tokens: await aerodromeAdvisorPriorityTokens(),
|
|
14357
14732
|
nativeWrapped: AERODROME_WETH_BASE,
|
|
14358
|
-
notes: "
|
|
14733
|
+
notes: "ETH, WETH, USDC, AERO, plus the live Coinbase B20 catalog. For a price call ctm_aerodrome_quote with a ticker. To see pools for one token call ctm_aerodrome_discover_pools. Do not dump LpSugar."
|
|
14359
14734
|
};
|
|
14360
14735
|
}
|
|
14361
14736
|
}),
|
|
@@ -14665,6 +15040,8 @@ exports.mcpAaveV4FetchMarketInputSchema = mcpAaveV4FetchMarketInputSchema;
|
|
|
14665
15040
|
exports.mcpAaveV4FetchMarketOutputSchema = mcpAaveV4FetchMarketOutputSchema;
|
|
14666
15041
|
exports.mcpAaveV4FetchMarketsInputSchema = mcpAaveV4FetchMarketsInputSchema;
|
|
14667
15042
|
exports.mcpAaveV4FetchMarketsOutputSchema = mcpAaveV4FetchMarketsOutputSchema;
|
|
15043
|
+
exports.mcpAaveV4FetchStockMarketsInputSchema = mcpAaveV4FetchStockMarketsInputSchema;
|
|
15044
|
+
exports.mcpAaveV4FetchStockMarketsOutputSchema = mcpAaveV4FetchStockMarketsOutputSchema;
|
|
14668
15045
|
exports.mcpAaveV4MerklClaimInputSchema = mcpAaveV4MerklClaimInputSchema;
|
|
14669
15046
|
exports.mcpAaveV4RepayInputSchema = mcpAaveV4RepayInputSchema;
|
|
14670
15047
|
exports.mcpAaveV4WithdrawInputSchema = mcpAaveV4WithdrawInputSchema;
|
|
@@ -14738,12 +15115,14 @@ exports.mcpCompoundV3RepayInputSchema = mcpCompoundV3RepayInputSchema;
|
|
|
14738
15115
|
exports.mcpCompoundV3SupplyInputSchema = mcpCompoundV3SupplyInputSchema;
|
|
14739
15116
|
exports.mcpCompoundV3WithdrawInputSchema = mcpCompoundV3WithdrawInputSchema;
|
|
14740
15117
|
exports.mcpContinuumDaoAttachInputSchema = mcpContinuumDaoAttachInputSchema;
|
|
15118
|
+
exports.mcpContinuumDaoCancelInputSchema = mcpContinuumDaoCancelInputSchema;
|
|
14741
15119
|
exports.mcpContinuumDaoCastVoteBravoInputSchema = mcpContinuumDaoCastVoteBravoInputSchema;
|
|
14742
15120
|
exports.mcpContinuumDaoCastVoteDeltaInputSchema = mcpContinuumDaoCastVoteDeltaInputSchema;
|
|
14743
15121
|
exports.mcpContinuumDaoComposeProposalActionInputSchema = mcpContinuumDaoComposeProposalActionInputSchema;
|
|
14744
15122
|
exports.mcpContinuumDaoComposeProposalActionOutputSchema = mcpContinuumDaoComposeProposalActionOutputSchema;
|
|
14745
15123
|
exports.mcpContinuumDaoCreateLockInputSchema = mcpContinuumDaoCreateLockInputSchema;
|
|
14746
15124
|
exports.mcpContinuumDaoDelegateInputSchema = mcpContinuumDaoDelegateInputSchema;
|
|
15125
|
+
exports.mcpContinuumDaoExecuteInputSchema = mcpContinuumDaoExecuteInputSchema;
|
|
14747
15126
|
exports.mcpContinuumDaoExplainProposalInputSchema = mcpContinuumDaoExplainProposalInputSchema;
|
|
14748
15127
|
exports.mcpContinuumDaoExplainProposalOutputSchema = mcpContinuumDaoExplainProposalOutputSchema;
|
|
14749
15128
|
exports.mcpContinuumDaoFetchDelegatesInputSchema = mcpContinuumDaoFetchDelegatesInputSchema;
|
|
@@ -14801,6 +15180,7 @@ exports.mcpContinuumDaoForumUserPostIdsInputSchema = mcpContinuumDaoForumUserPos
|
|
|
14801
15180
|
exports.mcpContinuumDaoForumUserPostIdsOutputSchema = mcpContinuumDaoForumUserPostIdsOutputSchema;
|
|
14802
15181
|
exports.mcpContinuumDaoIncreaseAmountInputSchema = mcpContinuumDaoIncreaseAmountInputSchema;
|
|
14803
15182
|
exports.mcpContinuumDaoIncreaseUnlockTimeInputSchema = mcpContinuumDaoIncreaseUnlockTimeInputSchema;
|
|
15183
|
+
exports.mcpContinuumDaoLiquidateInputSchema = mcpContinuumDaoLiquidateInputSchema;
|
|
14804
15184
|
exports.mcpContinuumDaoMergeInputSchema = mcpContinuumDaoMergeInputSchema;
|
|
14805
15185
|
exports.mcpContinuumDaoMpaFlagInputSchema = mcpContinuumDaoMpaFlagInputSchema;
|
|
14806
15186
|
exports.mcpContinuumDaoMpaFlagOutputSchema = mcpContinuumDaoMpaFlagOutputSchema;
|
|
@@ -14829,6 +15209,8 @@ exports.mcpContinuumDaoTechnocoreBindOutputSchema = mcpContinuumDaoTechnocoreBin
|
|
|
14829
15209
|
exports.mcpContinuumDaoTokenIdInputSchema = mcpContinuumDaoTokenIdInputSchema;
|
|
14830
15210
|
exports.mcpContinuumDaoTransferInputSchema = mcpContinuumDaoTransferInputSchema;
|
|
14831
15211
|
exports.mcpContinuumDaoUndelegateInputSchema = mcpContinuumDaoUndelegateInputSchema;
|
|
15212
|
+
exports.mcpContinuumDaoWithdrawInputSchema = mcpContinuumDaoWithdrawInputSchema;
|
|
15213
|
+
exports.mcpContinuumDaoWriteInput = mcpContinuumDaoWriteInput;
|
|
14832
15214
|
exports.mcpCurveDaoBuildAddLiquidityMultisignInputSchema = mcpCurveDaoBuildAddLiquidityMultisignInputSchema;
|
|
14833
15215
|
exports.mcpCurveDaoBuildGaugeDepositMultisignInputSchema = mcpCurveDaoBuildGaugeDepositMultisignInputSchema;
|
|
14834
15216
|
exports.mcpCurveDaoBuildRemoveLiquidityMultisignInputSchema = mcpCurveDaoBuildRemoveLiquidityMultisignInputSchema;
|