@continuumdao/ctm-mpc-defi 0.2.26 → 0.2.28
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 +681 -46
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +1209 -21
- package/dist/agent/catalog.js +668 -47
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/morpho/SKILL.md +38 -6
- package/dist/agent/skills/uniswap-v4/SKILL.md +15 -0
- package/dist/core/index.cjs +19 -0
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +8 -1
- package/dist/core/index.js +17 -1
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +363 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +361 -23
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/aave-v4/index.js.map +1 -1
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
- package/dist/protocols/evm/euler-v2/index.js.map +1 -1
- package/dist/protocols/evm/maple/index.cjs.map +1 -1
- package/dist/protocols/evm/maple/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs +1153 -142
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.d.ts +314 -8
- package/dist/protocols/evm/morpho/index.js +1131 -144
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/dist/protocols/evm/permit2/index.cjs.map +1 -1
- package/dist/protocols/evm/permit2/index.js.map +1 -1
- package/dist/protocols/evm/sky/index.cjs.map +1 -1
- package/dist/protocols/evm/sky/index.js.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.cjs +863 -25
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.d.ts +266 -9
- package/dist/protocols/evm/uniswap-v4/index.js +834 -27
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/package.json +2 -1
package/dist/agent/catalog.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { getAddress, isAddress } from 'viem';
|
|
2
|
+
import { MidnightApi } from '@morpho-org/midnight-sdk/api';
|
|
2
3
|
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
3
4
|
import { z } from 'zod';
|
|
4
5
|
import { createRequire } from 'module';
|
|
@@ -6,10 +7,62 @@ import { fileURLToPath } from 'url';
|
|
|
6
7
|
import { readFileSync } from 'fs';
|
|
7
8
|
import { join, dirname } from 'path';
|
|
8
9
|
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
9
11
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
12
|
var __esm = (fn, res) => function __init() {
|
|
11
13
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
12
14
|
};
|
|
15
|
+
var __export = (target, all) => {
|
|
16
|
+
for (var name in all)
|
|
17
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// src/core/defiProxy.ts
|
|
21
|
+
function getAaveGraphqlProxyUrl() {
|
|
22
|
+
return aaveGraphqlProxyUrl;
|
|
23
|
+
}
|
|
24
|
+
function getMorphoGraphqlProxyUrl() {
|
|
25
|
+
return morphoGraphqlProxyUrl;
|
|
26
|
+
}
|
|
27
|
+
async function postJsonViaOptionalProxy(args) {
|
|
28
|
+
const proxy = args.proxyUrl?.trim();
|
|
29
|
+
if (proxy) {
|
|
30
|
+
const r2 = await fetch(proxy, {
|
|
31
|
+
method: "POST",
|
|
32
|
+
headers: { "content-type": "application/json" },
|
|
33
|
+
body: JSON.stringify(args.proxyEnvelope ?? args.body)
|
|
34
|
+
});
|
|
35
|
+
if (!r2.ok) {
|
|
36
|
+
const t = await r2.text().catch(() => "");
|
|
37
|
+
throw new Error(t ? `Proxy HTTP ${r2.status}: ${t.slice(0, 200)}` : `Proxy HTTP ${r2.status}`);
|
|
38
|
+
}
|
|
39
|
+
return await r2.json();
|
|
40
|
+
}
|
|
41
|
+
const r = await fetch(args.directUrl, {
|
|
42
|
+
method: "POST",
|
|
43
|
+
headers: { "content-type": "application/json" },
|
|
44
|
+
body: JSON.stringify(args.body)
|
|
45
|
+
});
|
|
46
|
+
if (!r.ok) {
|
|
47
|
+
const t = await r.text().catch(() => "");
|
|
48
|
+
throw new Error(t ? `HTTP ${r.status}: ${t.slice(0, 200)}` : `HTTP ${r.status}`);
|
|
49
|
+
}
|
|
50
|
+
return await r.json();
|
|
51
|
+
}
|
|
52
|
+
async function getJsonViaOptionalProxy(args) {
|
|
53
|
+
const url = args.directUrl;
|
|
54
|
+
const r = await fetch(url, { method: "GET", headers: { accept: "application/json" } });
|
|
55
|
+
if (!r.ok) {
|
|
56
|
+
const t = await r.text().catch(() => "");
|
|
57
|
+
throw new Error(t ? `HTTP ${r.status}: ${t.slice(0, 200)}` : `HTTP ${r.status}`);
|
|
58
|
+
}
|
|
59
|
+
return await r.json();
|
|
60
|
+
}
|
|
61
|
+
var aaveGraphqlProxyUrl, morphoGraphqlProxyUrl;
|
|
62
|
+
var init_defiProxy = __esm({
|
|
63
|
+
"src/core/defiProxy.ts"() {
|
|
64
|
+
}
|
|
65
|
+
});
|
|
13
66
|
|
|
14
67
|
// src/protocols/evm/arcus/support.ts
|
|
15
68
|
function isArcusChainSupported(chainId) {
|
|
@@ -36,6 +89,225 @@ var init_api = __esm({
|
|
|
36
89
|
}
|
|
37
90
|
});
|
|
38
91
|
|
|
92
|
+
// src/protocols/evm/morpho/midnightConstants.ts
|
|
93
|
+
var midnightConstants_exports = {};
|
|
94
|
+
__export(midnightConstants_exports, {
|
|
95
|
+
MORPHO_MIDNIGHT_ADDRESSES: () => MORPHO_MIDNIGHT_ADDRESSES,
|
|
96
|
+
MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS: () => MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS,
|
|
97
|
+
MORPHO_MIDNIGHT_BASE_CHAIN_ID: () => MORPHO_MIDNIGHT_BASE_CHAIN_ID,
|
|
98
|
+
MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT: () => MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT,
|
|
99
|
+
MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS: () => MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS,
|
|
100
|
+
MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS: () => MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS,
|
|
101
|
+
MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT: () => MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT,
|
|
102
|
+
MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK: () => MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK,
|
|
103
|
+
MORPHO_MIDNIGHT_LEND_FALLBACK_GAS: () => MORPHO_MIDNIGHT_LEND_FALLBACK_GAS,
|
|
104
|
+
MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS: () => MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS,
|
|
105
|
+
MORPHO_MIDNIGHT_REST_BASE: () => MORPHO_MIDNIGHT_REST_BASE,
|
|
106
|
+
MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK: () => MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK,
|
|
107
|
+
TOKEN_PERMIT_NONE: () => TOKEN_PERMIT_NONE,
|
|
108
|
+
morphoMidnightAddressesForChain: () => morphoMidnightAddressesForChain
|
|
109
|
+
});
|
|
110
|
+
function morphoMidnightAddressesForChain(chainId) {
|
|
111
|
+
return MORPHO_MIDNIGHT_ADDRESSES[chainId] ?? null;
|
|
112
|
+
}
|
|
113
|
+
var MORPHO_MIDNIGHT_REST_BASE, MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT, MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT, MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS, MORPHO_MIDNIGHT_BASE_CHAIN_ID, MORPHO_MIDNIGHT_ADDRESSES, TOKEN_PERMIT_NONE, MORPHO_MIDNIGHT_LEND_FALLBACK_GAS, MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS, MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS, MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS, MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK, MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK;
|
|
114
|
+
var init_midnightConstants = __esm({
|
|
115
|
+
"src/protocols/evm/morpho/midnightConstants.ts"() {
|
|
116
|
+
MORPHO_MIDNIGHT_REST_BASE = "https://api.morpho.org/v0/midnight";
|
|
117
|
+
MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT = 20;
|
|
118
|
+
MORPHO_MIDNIGHT_DEFAULT_SLIPPAGE_PCT = "0.5";
|
|
119
|
+
MORPHO_MIDNIGHT_DEFAULT_DEADLINE_SECONDS = 3600;
|
|
120
|
+
MORPHO_MIDNIGHT_BASE_CHAIN_ID = 8453;
|
|
121
|
+
MORPHO_MIDNIGHT_ADDRESSES = {
|
|
122
|
+
[MORPHO_MIDNIGHT_BASE_CHAIN_ID]: {
|
|
123
|
+
midnight: "0xadedd8ab6de832766fedf0fac4992e5c4d3ea18a",
|
|
124
|
+
bundles: "0x6688dEc8878f43905e11B3C6Bc025E098133144f"
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
TOKEN_PERMIT_NONE = { kind: 0, data: "0x" };
|
|
128
|
+
MORPHO_MIDNIGHT_LEND_FALLBACK_GAS = 2500000n;
|
|
129
|
+
MORPHO_MIDNIGHT_BORROW_FALLBACK_GAS = 3000000n;
|
|
130
|
+
MORPHO_MIDNIGHT_REPAY_FALLBACK_GAS = 2200000n;
|
|
131
|
+
MORPHO_MIDNIGHT_AUTHORIZE_FALLBACK_GAS = 80000n;
|
|
132
|
+
MORPHO_MIDNIGHT_ERC20_APPROVE_FALLBACK = 100000n;
|
|
133
|
+
MORPHO_MIDNIGHT_WETH_DEPOSIT_FALLBACK = 120000n;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// src/protocols/evm/morpho/midnightApi.ts
|
|
138
|
+
var midnightApi_exports = {};
|
|
139
|
+
__export(midnightApi_exports, {
|
|
140
|
+
fetchMorphoMidnightBook: () => fetchMorphoMidnightBook,
|
|
141
|
+
fetchMorphoMidnightBookQuote: () => fetchMorphoMidnightBookQuote,
|
|
142
|
+
fetchMorphoMidnightBooks: () => fetchMorphoMidnightBooks,
|
|
143
|
+
fetchMorphoMidnightMarketById: () => fetchMorphoMidnightMarketById,
|
|
144
|
+
fetchMorphoMidnightUserMarketPosition: () => fetchMorphoMidnightUserMarketPosition,
|
|
145
|
+
fetchMorphoMidnightUserPositions: () => fetchMorphoMidnightUserPositions,
|
|
146
|
+
morphoMidnightApiBaseUrl: () => morphoMidnightApiBaseUrl,
|
|
147
|
+
morphoMidnightBookToMarketParams: () => morphoMidnightBookToMarketParams,
|
|
148
|
+
morphoMidnightMarketToParams: () => morphoMidnightMarketToParams
|
|
149
|
+
});
|
|
150
|
+
function morphoMidnightApiBaseUrl() {
|
|
151
|
+
return MORPHO_MIDNIGHT_REST_BASE;
|
|
152
|
+
}
|
|
153
|
+
function midnightApiConfig() {
|
|
154
|
+
return { baseUrl: morphoMidnightApiBaseUrl() };
|
|
155
|
+
}
|
|
156
|
+
async function midnightGetJson(pathAndQuery) {
|
|
157
|
+
const path = pathAndQuery.startsWith("/") ? pathAndQuery : `/${pathAndQuery}`;
|
|
158
|
+
const directUrl = `${MORPHO_MIDNIGHT_REST_BASE}${path}`;
|
|
159
|
+
return getJsonViaOptionalProxy({ directUrl});
|
|
160
|
+
}
|
|
161
|
+
async function fetchMorphoMidnightBooks(args) {
|
|
162
|
+
const limit = args.limit == null ? void 0 : Math.min(Math.max(Math.floor(args.limit), 1), MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT);
|
|
163
|
+
const result = await MidnightApi.fetchBooks({
|
|
164
|
+
...midnightApiConfig(),
|
|
165
|
+
chainIds: [args.chainId],
|
|
166
|
+
loanTokens: args.loanTokens?.filter((a) => isAddress(a)).map((a) => getAddress(a)),
|
|
167
|
+
collateralTokens: args.collateralTokens?.filter((a) => isAddress(a)).map((a) => getAddress(a)),
|
|
168
|
+
sort: args.sort ? [args.sort] : ["maturity"],
|
|
169
|
+
limit,
|
|
170
|
+
cursor: args.cursor
|
|
171
|
+
});
|
|
172
|
+
return { data: [...result.data], cursor: result.cursor ?? null };
|
|
173
|
+
}
|
|
174
|
+
async function fetchMorphoMidnightBook(marketId) {
|
|
175
|
+
const id = marketId.trim();
|
|
176
|
+
if (!id) return null;
|
|
177
|
+
try {
|
|
178
|
+
const result = await MidnightApi.fetchBook({
|
|
179
|
+
...midnightApiConfig(),
|
|
180
|
+
marketId: id
|
|
181
|
+
});
|
|
182
|
+
return result.data;
|
|
183
|
+
} catch {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
async function fetchMorphoMidnightBookQuote(args) {
|
|
188
|
+
const quote = await MidnightApi.fetchBookQuote({
|
|
189
|
+
...midnightApiConfig(),
|
|
190
|
+
marketId: args.marketId.trim(),
|
|
191
|
+
side: args.side,
|
|
192
|
+
assets: args.assets,
|
|
193
|
+
slippage: args.slippage?.trim() || "0.5"
|
|
194
|
+
});
|
|
195
|
+
return quote.data;
|
|
196
|
+
}
|
|
197
|
+
async function fetchMorphoMidnightMarketById(marketId) {
|
|
198
|
+
const id = marketId.trim();
|
|
199
|
+
if (!id) return null;
|
|
200
|
+
const j = await midnightGetJson(`/markets/${encodeURIComponent(id)}`);
|
|
201
|
+
const d = j.data;
|
|
202
|
+
if (!d?.market_id || !d.loan_token || !isAddress(d.loan_token)) return null;
|
|
203
|
+
const midnight = d.midnight && isAddress(d.midnight) ? getAddress(d.midnight) : "0x0000000000000000000000000000000000000000";
|
|
204
|
+
const collaterals = (d.collaterals ?? []).filter((c) => c.token && isAddress(c.token) && c.oracle && isAddress(c.oracle)).map((c) => ({
|
|
205
|
+
token: getAddress(c.token),
|
|
206
|
+
lltv: String(c.lltv ?? "0"),
|
|
207
|
+
liquidationCursor: String(c.liquidation_cursor ?? "0"),
|
|
208
|
+
oracle: getAddress(c.oracle)
|
|
209
|
+
}));
|
|
210
|
+
return {
|
|
211
|
+
chainId: Number(d.chain_id ?? 0),
|
|
212
|
+
marketId: d.market_id,
|
|
213
|
+
midnight,
|
|
214
|
+
loanToken: getAddress(d.loan_token),
|
|
215
|
+
maturity: Number(d.maturity ?? 0),
|
|
216
|
+
rcfThreshold: String(d.rcf_threshold ?? "0"),
|
|
217
|
+
enterGate: d.enter_gate && isAddress(d.enter_gate) ? getAddress(d.enter_gate) : getAddress("0x0000000000000000000000000000000000000000"),
|
|
218
|
+
liquidatorGate: d.liquidator_gate && isAddress(d.liquidator_gate) ? getAddress(d.liquidator_gate) : getAddress("0x0000000000000000000000000000000000000000"),
|
|
219
|
+
collaterals
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
function morphoMidnightMarketToParams(row) {
|
|
223
|
+
return {
|
|
224
|
+
chainId: BigInt(row.chainId),
|
|
225
|
+
midnight: row.midnight,
|
|
226
|
+
loanToken: row.loanToken,
|
|
227
|
+
collateralParams: row.collaterals.map((c) => ({
|
|
228
|
+
token: c.token,
|
|
229
|
+
lltv: BigInt(c.lltv),
|
|
230
|
+
liquidationCursor: BigInt(c.liquidationCursor),
|
|
231
|
+
oracle: c.oracle
|
|
232
|
+
})),
|
|
233
|
+
maturity: BigInt(row.maturity),
|
|
234
|
+
rcfThreshold: BigInt(row.rcfThreshold),
|
|
235
|
+
enterGate: row.enterGate,
|
|
236
|
+
liquidatorGate: row.liquidatorGate
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
function morphoMidnightBookToMarketParams(book) {
|
|
240
|
+
return {
|
|
241
|
+
chainId: BigInt(book.chainId),
|
|
242
|
+
midnight: getAddress(book.midnight),
|
|
243
|
+
loanToken: getAddress(book.loanToken),
|
|
244
|
+
collateralParams: book.collaterals.map((c) => ({
|
|
245
|
+
token: getAddress(c.token),
|
|
246
|
+
lltv: BigInt(c.lltv),
|
|
247
|
+
liquidationCursor: BigInt(c.liquidationCursor),
|
|
248
|
+
oracle: getAddress(c.oracle)
|
|
249
|
+
})),
|
|
250
|
+
maturity: BigInt(book.maturity),
|
|
251
|
+
rcfThreshold: BigInt(book.rcfThreshold),
|
|
252
|
+
enterGate: getAddress(book.enterGate),
|
|
253
|
+
liquidatorGate: getAddress(book.liquidatorGate)
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
async function fetchMorphoMidnightUserPositions(args) {
|
|
257
|
+
const user = args.user.trim();
|
|
258
|
+
if (!isAddress(user)) return [];
|
|
259
|
+
const qs = new URLSearchParams();
|
|
260
|
+
if (args.types) qs.set("types", args.types);
|
|
261
|
+
if (args.activeOnly) qs.set("active_only", "true");
|
|
262
|
+
const q = qs.toString();
|
|
263
|
+
const path = `/users/${encodeURIComponent(getAddress(user))}/positions${q ? `?${q}` : ""}`;
|
|
264
|
+
const j = await midnightGetJson(path);
|
|
265
|
+
const rows = [];
|
|
266
|
+
for (const p of j.data ?? []) {
|
|
267
|
+
if (!p.market_id) continue;
|
|
268
|
+
rows.push({
|
|
269
|
+
marketId: p.market_id,
|
|
270
|
+
type: p.type ?? "lend",
|
|
271
|
+
credit: String(p.credit ?? "0"),
|
|
272
|
+
debt: String(p.debt ?? "0"),
|
|
273
|
+
pendingFee: String(p.pending_fee ?? "0"),
|
|
274
|
+
lossFactor: String(p.loss_factor ?? "0"),
|
|
275
|
+
costBasis: p.cost_basis ?? null,
|
|
276
|
+
effectiveRateWad: p.effective_rate_wad ?? null,
|
|
277
|
+
maturity: p.maturity != null ? Number(p.maturity) : null,
|
|
278
|
+
loanToken: p.loan_token && isAddress(p.loan_token) ? getAddress(p.loan_token) : null,
|
|
279
|
+
collaterals: (p.collaterals ?? []).filter((c) => c.token && isAddress(c.token)).map((c) => ({ token: getAddress(c.token), amount: String(c.amount ?? "0") }))
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
return rows;
|
|
283
|
+
}
|
|
284
|
+
async function fetchMorphoMidnightUserMarketPosition(args) {
|
|
285
|
+
const marketId = args.marketId.trim();
|
|
286
|
+
const user = args.user.trim();
|
|
287
|
+
if (!marketId || !isAddress(user)) return null;
|
|
288
|
+
const path = `/markets/${encodeURIComponent(marketId)}/users/${encodeURIComponent(getAddress(user))}/position`;
|
|
289
|
+
const j = await midnightGetJson(path);
|
|
290
|
+
const p = j.data;
|
|
291
|
+
if (!p) return null;
|
|
292
|
+
return {
|
|
293
|
+
marketId,
|
|
294
|
+
type: p.type ?? "borrow",
|
|
295
|
+
credit: String(p.credit ?? "0"),
|
|
296
|
+
debt: String(p.debt ?? "0"),
|
|
297
|
+
pendingFee: String(p.pending_fee ?? "0"),
|
|
298
|
+
lossFactor: String(p.loss_factor ?? "0"),
|
|
299
|
+
maturity: p.maturity != null ? Number(p.maturity) : null,
|
|
300
|
+
loanToken: p.loan_token && isAddress(p.loan_token) ? getAddress(p.loan_token) : null,
|
|
301
|
+
collaterals: (p.collaterals ?? []).filter((c) => c.token && isAddress(c.token)).map((c) => ({ token: getAddress(c.token), amount: String(c.amount ?? "0") }))
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
var init_midnightApi = __esm({
|
|
305
|
+
"src/protocols/evm/morpho/midnightApi.ts"() {
|
|
306
|
+
init_defiProxy();
|
|
307
|
+
init_midnightConstants();
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
|
|
39
311
|
// src/core/registry.ts
|
|
40
312
|
var modules = [];
|
|
41
313
|
function registerProtocolModule(mod) {
|
|
@@ -118,41 +390,6 @@ function isUniswapV4ChainSupported(chainId) {
|
|
|
118
390
|
return typeof a === "string" && a.startsWith("0x");
|
|
119
391
|
}
|
|
120
392
|
|
|
121
|
-
// src/core/defiProxy.ts
|
|
122
|
-
var aaveGraphqlProxyUrl;
|
|
123
|
-
var morphoGraphqlProxyUrl;
|
|
124
|
-
function getAaveGraphqlProxyUrl() {
|
|
125
|
-
return aaveGraphqlProxyUrl;
|
|
126
|
-
}
|
|
127
|
-
function getMorphoGraphqlProxyUrl() {
|
|
128
|
-
return morphoGraphqlProxyUrl;
|
|
129
|
-
}
|
|
130
|
-
async function postJsonViaOptionalProxy(args) {
|
|
131
|
-
const proxy = args.proxyUrl?.trim();
|
|
132
|
-
if (proxy) {
|
|
133
|
-
const r2 = await fetch(proxy, {
|
|
134
|
-
method: "POST",
|
|
135
|
-
headers: { "content-type": "application/json" },
|
|
136
|
-
body: JSON.stringify(args.proxyEnvelope ?? args.body)
|
|
137
|
-
});
|
|
138
|
-
if (!r2.ok) {
|
|
139
|
-
const t = await r2.text().catch(() => "");
|
|
140
|
-
throw new Error(t ? `Proxy HTTP ${r2.status}: ${t.slice(0, 200)}` : `Proxy HTTP ${r2.status}`);
|
|
141
|
-
}
|
|
142
|
-
return await r2.json();
|
|
143
|
-
}
|
|
144
|
-
const r = await fetch(args.directUrl, {
|
|
145
|
-
method: "POST",
|
|
146
|
-
headers: { "content-type": "application/json" },
|
|
147
|
-
body: JSON.stringify(args.body)
|
|
148
|
-
});
|
|
149
|
-
if (!r.ok) {
|
|
150
|
-
const t = await r.text().catch(() => "");
|
|
151
|
-
throw new Error(t ? `HTTP ${r.status}: ${t.slice(0, 200)}` : `HTTP ${r.status}`);
|
|
152
|
-
}
|
|
153
|
-
return await r.json();
|
|
154
|
-
}
|
|
155
|
-
|
|
156
393
|
// src/protocols/evm/uniswap-v4/index.ts
|
|
157
394
|
var UNISWAP_V4_PROTOCOL_ID = "uniswap-v4";
|
|
158
395
|
var uniswapV4ProtocolModule = {
|
|
@@ -1132,11 +1369,15 @@ var mcpUniswapV4LpCreatePositionInputSchema = z.preprocess(
|
|
|
1132
1369
|
);
|
|
1133
1370
|
var mcpUniswapV4LpListPoolsInputSchema = z.object({
|
|
1134
1371
|
chainId: agentEvmChainIdSchema,
|
|
1135
|
-
pair: z.string().optional().describe("Optional filter, e.g. eth-usdc or ETH/USDC")
|
|
1372
|
+
pair: z.string().optional().describe("Optional filter, e.g. eth-usdc or ETH/USDC"),
|
|
1373
|
+
permissioned: agentOptionalBooleanSchema().describe(
|
|
1374
|
+
"When true, list Permissioned Position Manager pools (adapter currency + PermissionedHooks)"
|
|
1375
|
+
)
|
|
1136
1376
|
});
|
|
1137
1377
|
var mcpUniswapV4LpListPoolsOutputSchema = z.object({
|
|
1138
1378
|
chainId: z.number().int().positive(),
|
|
1139
1379
|
chainLabel: z.string(),
|
|
1380
|
+
positionManagerKind: z.enum(["standard", "permissioned"]).optional(),
|
|
1140
1381
|
pools: z.array(
|
|
1141
1382
|
z.object({
|
|
1142
1383
|
presetId: z.string(),
|
|
@@ -1152,7 +1393,12 @@ var mcpUniswapV4LpListPoolsOutputSchema = z.object({
|
|
|
1152
1393
|
poolReference: z.string(),
|
|
1153
1394
|
hooks: evmAddressSchema,
|
|
1154
1395
|
nativeWrapped: evmAddressSchema.optional(),
|
|
1155
|
-
usesNativeEth: z.boolean()
|
|
1396
|
+
usesNativeEth: z.boolean(),
|
|
1397
|
+
positionManagerKind: z.enum(["standard", "permissioned"]).optional(),
|
|
1398
|
+
positionManager: evmAddressSchema.optional(),
|
|
1399
|
+
adapterAddress: evmAddressSchema.optional(),
|
|
1400
|
+
underlyingPermissionedToken: evmAddressSchema.optional(),
|
|
1401
|
+
issuer: z.string().optional()
|
|
1156
1402
|
})
|
|
1157
1403
|
),
|
|
1158
1404
|
notes: z.string()
|
|
@@ -1234,7 +1480,9 @@ var mcpUniswapV4RegisterPositionFromMintTxOutputSchema = z.object({
|
|
|
1234
1480
|
var lpBuildCommonSchema = {
|
|
1235
1481
|
lpResponse: jsonObjectSchema.describe("Full LP API response (create/increase/decrease/claim)"),
|
|
1236
1482
|
nativeWrapped: evmAddressSchema.optional(),
|
|
1237
|
-
poolReference: z.string().optional()
|
|
1483
|
+
poolReference: z.string().optional(),
|
|
1484
|
+
positionManagerKind: z.enum(["standard", "permissioned"]).optional().describe("permissioned \u2192 Permit2 approve path + Permissioned Position Manager"),
|
|
1485
|
+
usePermit2Approvals: agentOptionalBooleanSchema()
|
|
1238
1486
|
};
|
|
1239
1487
|
var mcpUniswapV4BuildMintLiquidityMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1240
1488
|
z.preprocess(preprocessUniswapBuildLpInput, evmMultisignCommonInputSchema.extend(lpBuildCommonSchema))
|
|
@@ -1328,6 +1576,61 @@ var mcpUniswapV4FetchOhlcvOutputSchema = z.object({
|
|
|
1328
1576
|
fetchedAtMs: z.number(),
|
|
1329
1577
|
warnings: z.array(z.string()).optional()
|
|
1330
1578
|
}).strict();
|
|
1579
|
+
var mcpUniswapV4CheckPermissionsInputSchema = z.object({
|
|
1580
|
+
walletAddress: evmAddressSchema.optional(),
|
|
1581
|
+
keyGen: z.string().optional().describe("Resolves wallet via GET /getKeyGenResultById when walletAddress omitted"),
|
|
1582
|
+
managementNodeUrl: z.string().optional(),
|
|
1583
|
+
tokens: z.array(z.string().min(1)).min(1).max(2).describe("Up to two token addresses"),
|
|
1584
|
+
chainId: agentEvmChainIdSchema,
|
|
1585
|
+
uniswapApiKey: z.string().min(1),
|
|
1586
|
+
baseUrl: z.string().optional()
|
|
1587
|
+
});
|
|
1588
|
+
var mcpUniswapV4CheckPermissionsOutputSchema = z.object({
|
|
1589
|
+
requestId: z.string().optional(),
|
|
1590
|
+
results: z.array(
|
|
1591
|
+
z.object({
|
|
1592
|
+
token: evmAddressSchema,
|
|
1593
|
+
isPermissioned: z.boolean(),
|
|
1594
|
+
isAllowlisted: z.boolean(),
|
|
1595
|
+
adapterTokenAddress: evmAddressSchema.optional(),
|
|
1596
|
+
kycUrl: z.string().optional(),
|
|
1597
|
+
issuer: z.string().optional()
|
|
1598
|
+
})
|
|
1599
|
+
),
|
|
1600
|
+
anyPermissioned: z.boolean(),
|
|
1601
|
+
allAllowlisted: z.boolean(),
|
|
1602
|
+
requiresUniversalRouterV22: z.boolean()
|
|
1603
|
+
});
|
|
1604
|
+
var mcpUniswapV4KycApplyLinkInputSchema = z.object({
|
|
1605
|
+
walletAddress: evmAddressSchema,
|
|
1606
|
+
chainId: agentEvmChainIdSchema,
|
|
1607
|
+
kycUrl: z.string().min(1),
|
|
1608
|
+
issuer: z.string().optional(),
|
|
1609
|
+
token: evmAddressSchema.optional(),
|
|
1610
|
+
adapterTokenAddress: evmAddressSchema.optional()
|
|
1611
|
+
});
|
|
1612
|
+
var mcpUniswapV4KycApplyLinkOutputSchema = z.object({
|
|
1613
|
+
walletAddress: evmAddressSchema,
|
|
1614
|
+
chainId: z.number().int(),
|
|
1615
|
+
issuer: z.string().optional(),
|
|
1616
|
+
kycUrl: z.string(),
|
|
1617
|
+
applyUrl: z.string(),
|
|
1618
|
+
token: evmAddressSchema.optional(),
|
|
1619
|
+
adapterTokenAddress: evmAddressSchema.optional()
|
|
1620
|
+
});
|
|
1621
|
+
var mcpUniswapV4BuildAllowlistFinalizeMultisignInputSchema = withMultisignKeySourceRefine(
|
|
1622
|
+
z.preprocess(
|
|
1623
|
+
preprocessUniswapBuildSwapInput,
|
|
1624
|
+
evmMultisignCommonInputSchema.extend({
|
|
1625
|
+
to: evmAddressSchema.describe("Allowlist contract from issuer onboard API"),
|
|
1626
|
+
data: z.string().min(1).describe("ABI-encoded calldata (encodedTransaction)"),
|
|
1627
|
+
valueWei: z.union([z.string(), z.number()]).optional(),
|
|
1628
|
+
issuer: z.string().optional(),
|
|
1629
|
+
entityId: z.union([z.string(), z.number()]).optional(),
|
|
1630
|
+
tokenAddress: evmAddressSchema.optional()
|
|
1631
|
+
})
|
|
1632
|
+
)
|
|
1633
|
+
);
|
|
1331
1634
|
var mcpCurveDaoQuoteInputSchema = z.object({
|
|
1332
1635
|
chainId: agentEvmChainIdSchema.describe("EVM chain id (rpcUrl resolved from get_chain_registry rpcGateway)"),
|
|
1333
1636
|
rpcUrl: z.string().min(1).optional().describe("JSON-RPC URL; continuum-mcp-server injects from chain registry \u2014 do not pass a public RPC URL"),
|
|
@@ -1498,6 +1801,116 @@ var mcpMorphoFetchBlueMarketsOutputSchema = z.object({
|
|
|
1498
1801
|
})
|
|
1499
1802
|
)
|
|
1500
1803
|
});
|
|
1804
|
+
function preprocessMorphoMidnightLendInput(raw) {
|
|
1805
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
1806
|
+
const o = { ...raw };
|
|
1807
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
1808
|
+
if (!purposeText) {
|
|
1809
|
+
const amt = String(o.amountHuman ?? "").trim();
|
|
1810
|
+
if (amt) o.purposeText = `Morpho Midnight lend ${amt}`;
|
|
1811
|
+
}
|
|
1812
|
+
return o;
|
|
1813
|
+
}
|
|
1814
|
+
function preprocessMorphoMidnightBorrowInput(raw) {
|
|
1815
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
1816
|
+
const o = { ...raw };
|
|
1817
|
+
if (o.collateralTokenAddress != null && o.collateralToken == null) {
|
|
1818
|
+
o.collateralToken = o.collateralTokenAddress;
|
|
1819
|
+
}
|
|
1820
|
+
if (o.loanTokenAddress != null && o.loanToken == null) {
|
|
1821
|
+
o.loanToken = o.loanTokenAddress;
|
|
1822
|
+
}
|
|
1823
|
+
if (o.borrowAmountHuman == null && o.amountHuman != null) {
|
|
1824
|
+
o.borrowAmountHuman = o.amountHuman;
|
|
1825
|
+
}
|
|
1826
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
1827
|
+
if (!purposeText) {
|
|
1828
|
+
const amt = String(o.borrowAmountHuman ?? o.amountHuman ?? "").trim();
|
|
1829
|
+
if (amt) o.purposeText = `Morpho Midnight borrow ${amt}`;
|
|
1830
|
+
}
|
|
1831
|
+
return o;
|
|
1832
|
+
}
|
|
1833
|
+
function preprocessMorphoMidnightRepayInput(raw) {
|
|
1834
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return raw;
|
|
1835
|
+
const o = { ...raw };
|
|
1836
|
+
const purposeText = String(o.purposeText ?? o.purpose ?? "").trim();
|
|
1837
|
+
if (!purposeText) o.purposeText = "Morpho Midnight repay";
|
|
1838
|
+
return o;
|
|
1839
|
+
}
|
|
1840
|
+
var mcpMorphoFetchMidnightBooksInputSchema = z.object({
|
|
1841
|
+
chainId: agentEvmChainIdSchema,
|
|
1842
|
+
loan: z.string().trim().min(1).optional().describe("Loan token address filter."),
|
|
1843
|
+
collateral: z.string().trim().min(1).optional().describe("Collateral token address filter."),
|
|
1844
|
+
query: z.string().trim().min(1).optional().describe("Filter on marketId or addresses."),
|
|
1845
|
+
side: z.enum(["bids", "asks", "either"]).optional().describe("Require bid depth (borrow) or ask depth (lend)."),
|
|
1846
|
+
limit: agentCoercedOptionalIntSchema(z.number().int().min(1).max(200))
|
|
1847
|
+
});
|
|
1848
|
+
var mcpMorphoFetchMidnightBooksOutputSchema = z.object({
|
|
1849
|
+
books: z.array(
|
|
1850
|
+
z.object({
|
|
1851
|
+
marketId: z.string().describe("Pass to Midnight quote / lend / borrow / repay tools"),
|
|
1852
|
+
chainId: z.number().int(),
|
|
1853
|
+
midnightAddress: z.string(),
|
|
1854
|
+
loanTokenAddress: z.string(),
|
|
1855
|
+
maturity: z.number(),
|
|
1856
|
+
maturityIso: z.string(),
|
|
1857
|
+
collateralTokenAddresses: z.array(z.string()),
|
|
1858
|
+
primaryCollateralTokenAddress: z.string().nullable(),
|
|
1859
|
+
primaryCollateralLltv: z.string().nullable(),
|
|
1860
|
+
bestAskPriceWad: z.string().nullable(),
|
|
1861
|
+
bestBidPriceWad: z.string().nullable(),
|
|
1862
|
+
bestAskAssets: z.string().nullable(),
|
|
1863
|
+
bestBidAssets: z.string().nullable(),
|
|
1864
|
+
lendApr: z.string(),
|
|
1865
|
+
borrowApr: z.string(),
|
|
1866
|
+
lendAprNumeric: z.number().nullable(),
|
|
1867
|
+
borrowAprNumeric: z.number().nullable(),
|
|
1868
|
+
marketLabel: z.string()
|
|
1869
|
+
})
|
|
1870
|
+
)
|
|
1871
|
+
});
|
|
1872
|
+
var mcpMorphoFetchMidnightQuoteInputSchema = z.object({
|
|
1873
|
+
marketId: z.string().min(1).describe("marketId from ctm_morpho_fetch_midnight_books"),
|
|
1874
|
+
side: z.enum(["asks", "bids"]).describe("asks = lend; bids = borrow"),
|
|
1875
|
+
assets: z.string().min(1).describe("Target loan-token amount in raw units (wei/base units), e.g. 10000000 for 10 USDC."),
|
|
1876
|
+
slippagePct: z.string().optional().describe('Slippage percent string, default "0.5".')
|
|
1877
|
+
});
|
|
1878
|
+
var mcpMorphoFetchMidnightQuoteOutputSchema = z.object({
|
|
1879
|
+
marketId: z.string(),
|
|
1880
|
+
side: z.enum(["asks", "bids"]),
|
|
1881
|
+
averageBestPriceWad: z.string(),
|
|
1882
|
+
averageWorstPriceWad: z.string(),
|
|
1883
|
+
availableAssets: z.string(),
|
|
1884
|
+
availableUnits: z.string(),
|
|
1885
|
+
impliedApr: z.string(),
|
|
1886
|
+
impliedAprNumeric: z.number().nullable(),
|
|
1887
|
+
maturity: z.number().nullable(),
|
|
1888
|
+
takeableOfferCount: z.number().int()
|
|
1889
|
+
});
|
|
1890
|
+
var mcpMorphoFetchMidnightPositionsInputSchema = z.object({
|
|
1891
|
+
user: z.string().min(1).describe("User EVM address"),
|
|
1892
|
+
types: z.enum(["lend", "borrow", "collateral_only"]).optional(),
|
|
1893
|
+
activeOnly: z.boolean().optional()
|
|
1894
|
+
});
|
|
1895
|
+
var mcpMorphoFetchMidnightPositionsOutputSchema = z.object({
|
|
1896
|
+
positions: z.array(
|
|
1897
|
+
z.object({
|
|
1898
|
+
marketId: z.string(),
|
|
1899
|
+
type: z.string(),
|
|
1900
|
+
credit: z.string(),
|
|
1901
|
+
debt: z.string(),
|
|
1902
|
+
pendingFee: z.string(),
|
|
1903
|
+
repayAssets: z.string(),
|
|
1904
|
+
maturity: z.number().nullable(),
|
|
1905
|
+
maturityIso: z.string(),
|
|
1906
|
+
loanTokenAddress: z.string().nullable(),
|
|
1907
|
+
collateralTokenAddresses: z.array(z.string()),
|
|
1908
|
+
collateralAmounts: z.array(z.object({ token: z.string(), amount: z.string() })),
|
|
1909
|
+
effectiveRate: z.string(),
|
|
1910
|
+
costBasis: z.string().nullable()
|
|
1911
|
+
})
|
|
1912
|
+
)
|
|
1913
|
+
});
|
|
1501
1914
|
var mcpServerCommonInputSchema = z.object({
|
|
1502
1915
|
keyGenId: z.string().min(1).describe("KeyGen id from fetch_key_gen_result / node preferred KeyGen"),
|
|
1503
1916
|
chainId: z.number().int().positive().describe("EVM chain id; RPC and gas config resolved from chain registry"),
|
|
@@ -1521,7 +1934,9 @@ var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
|
1521
1934
|
"ctm_uniswap_v4_quote",
|
|
1522
1935
|
"ctm_uniswap_v4_create_swap",
|
|
1523
1936
|
"ctm_uniswap_v4_limit_order_quote",
|
|
1524
|
-
"ctm_uniswap_v4_fetch_limit_orders"
|
|
1937
|
+
"ctm_uniswap_v4_fetch_limit_orders",
|
|
1938
|
+
"ctm_uniswap_v4_check_permissions",
|
|
1939
|
+
"ctm_uniswap_v4_kyc_apply_link"
|
|
1525
1940
|
]);
|
|
1526
1941
|
|
|
1527
1942
|
// src/agent/schemas/protocols.ts
|
|
@@ -1846,6 +2261,47 @@ var mcpMorphoMerklClaimInputSchema = mcpMultisignInput({
|
|
|
1846
2261
|
distributor: evmAddressSchema.optional(),
|
|
1847
2262
|
valueWei: z.string().optional()
|
|
1848
2263
|
});
|
|
2264
|
+
var mcpMorphoMidnightLendInputSchema = withMultisignKeySourceRefine(
|
|
2265
|
+
z.preprocess(
|
|
2266
|
+
preprocessMorphoMidnightLendInput,
|
|
2267
|
+
evmMultisignCommonInputSchema.extend({
|
|
2268
|
+
marketId: z.string().min(1).describe("marketId from ctm_morpho_fetch_midnight_books"),
|
|
2269
|
+
amountHuman: z.string().min(1).describe("Loan-token amount to lend (human units)"),
|
|
2270
|
+
loanToken: evmAddressSchema.optional().describe("loanTokenAddress from fetch row"),
|
|
2271
|
+
slippagePct: z.string().optional().describe("Default 0.5"),
|
|
2272
|
+
marketLabel: z.string().optional(),
|
|
2273
|
+
isNativeIn: agentOptionalBooleanSchema()
|
|
2274
|
+
})
|
|
2275
|
+
)
|
|
2276
|
+
);
|
|
2277
|
+
var mcpMorphoMidnightBorrowInputSchema = withMultisignKeySourceRefine(
|
|
2278
|
+
z.preprocess(
|
|
2279
|
+
preprocessMorphoMidnightBorrowInput,
|
|
2280
|
+
evmMultisignCommonInputSchema.extend({
|
|
2281
|
+
marketId: z.string().min(1).describe("marketId from ctm_morpho_fetch_midnight_books"),
|
|
2282
|
+
borrowAmountHuman: z.string().min(1).describe("Loan-token amount to borrow"),
|
|
2283
|
+
collateralAmountHuman: z.string().min(1).describe("Collateral to supply in the same tx"),
|
|
2284
|
+
collateralToken: evmAddressSchema.describe("primaryCollateralTokenAddress from fetch row"),
|
|
2285
|
+
loanToken: evmAddressSchema.optional(),
|
|
2286
|
+
collateralIndex: agentCoercedOptionalIntSchema(z.number().int().min(0).max(127)),
|
|
2287
|
+
slippagePct: z.string().optional(),
|
|
2288
|
+
marketLabel: z.string().optional(),
|
|
2289
|
+
isNativeIn: agentOptionalBooleanSchema()
|
|
2290
|
+
})
|
|
2291
|
+
)
|
|
2292
|
+
);
|
|
2293
|
+
var mcpMorphoMidnightRepayInputSchema = withMultisignKeySourceRefine(
|
|
2294
|
+
z.preprocess(
|
|
2295
|
+
preprocessMorphoMidnightRepayInput,
|
|
2296
|
+
evmMultisignCommonInputSchema.extend({
|
|
2297
|
+
marketId: z.string().min(1).describe("marketId from ctm_morpho_fetch_midnight_positions"),
|
|
2298
|
+
repayAmountHuman: z.string().optional().describe("Optional; default debt+fee+buffer"),
|
|
2299
|
+
loanToken: evmAddressSchema.optional(),
|
|
2300
|
+
withdrawAllCollateral: agentOptionalBooleanSchema(),
|
|
2301
|
+
marketLabel: z.string().optional()
|
|
2302
|
+
})
|
|
2303
|
+
)
|
|
2304
|
+
);
|
|
1849
2305
|
var mcpEulerV2FetchLendVaultsInputSchema = z.object({
|
|
1850
2306
|
chainId: agentEvmChainIdSchema,
|
|
1851
2307
|
underlyingAddress: evmAddressSchema.describe(
|
|
@@ -3142,6 +3598,43 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
3142
3598
|
handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoMerklDistributorClaim" },
|
|
3143
3599
|
inputZod: mcpMorphoMerklClaimInputSchema
|
|
3144
3600
|
}),
|
|
3601
|
+
defineProtocolMcpTool({
|
|
3602
|
+
name: "ctm_morpho_build_midnight_lend_multisign",
|
|
3603
|
+
actionId: "morpho.midnight-lend",
|
|
3604
|
+
protocolId: "morpho",
|
|
3605
|
+
chainCategory: "evm",
|
|
3606
|
+
description: "Build Morpho Midnight fixed-rate lend batch (approve + authorize bundles + take asks via MidnightBundles).",
|
|
3607
|
+
prerequisites: ["keyGenId", "chainId", "marketId from ctm_morpho_fetch_midnight_books", "amountHuman"],
|
|
3608
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoMidnightLendBatch" },
|
|
3609
|
+
inputZod: mcpMorphoMidnightLendInputSchema
|
|
3610
|
+
}),
|
|
3611
|
+
defineProtocolMcpTool({
|
|
3612
|
+
name: "ctm_morpho_build_midnight_borrow_multisign",
|
|
3613
|
+
actionId: "morpho.midnight-borrow",
|
|
3614
|
+
protocolId: "morpho",
|
|
3615
|
+
chainCategory: "evm",
|
|
3616
|
+
description: "Build Morpho Midnight fixed-rate borrow batch (approve collateral + authorize + supply collateral and take bids).",
|
|
3617
|
+
prerequisites: [
|
|
3618
|
+
"keyGenId",
|
|
3619
|
+
"chainId",
|
|
3620
|
+
"marketId",
|
|
3621
|
+
"borrowAmountHuman",
|
|
3622
|
+
"collateralAmountHuman",
|
|
3623
|
+
"collateralToken"
|
|
3624
|
+
],
|
|
3625
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoMidnightBorrowBatch" },
|
|
3626
|
+
inputZod: mcpMorphoMidnightBorrowInputSchema
|
|
3627
|
+
}),
|
|
3628
|
+
defineProtocolMcpTool({
|
|
3629
|
+
name: "ctm_morpho_build_midnight_repay_multisign",
|
|
3630
|
+
actionId: "morpho.midnight-repay",
|
|
3631
|
+
protocolId: "morpho",
|
|
3632
|
+
chainCategory: "evm",
|
|
3633
|
+
description: "Build Morpho Midnight repay + withdraw collateral batch (full exit at/after maturity).",
|
|
3634
|
+
prerequisites: ["keyGenId", "chainId", "marketId from ctm_morpho_fetch_midnight_positions"],
|
|
3635
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "buildEvmMultisignBodyMorphoMidnightRepayBatch" },
|
|
3636
|
+
inputZod: mcpMorphoMidnightRepayInputSchema
|
|
3637
|
+
}),
|
|
3145
3638
|
defineProtocolMcpTool({
|
|
3146
3639
|
name: "ctm_gmx_build_increase_multisign",
|
|
3147
3640
|
actionId: "gmx.increase",
|
|
@@ -3593,15 +4086,60 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
3593
4086
|
inputZod: mcpUniswapV4FetchLimitOrdersInputSchema,
|
|
3594
4087
|
outputZod: mcpUniswapV4FetchLimitOrdersOutputSchema
|
|
3595
4088
|
}),
|
|
4089
|
+
defineMcpTool({
|
|
4090
|
+
name: "ctm_uniswap_v4_check_permissions",
|
|
4091
|
+
actionId: "uniswap-v4.check-permissions",
|
|
4092
|
+
protocolId: "uniswap-v4",
|
|
4093
|
+
chainCategory: "evm",
|
|
4094
|
+
description: "Check Uniswap Trade API POST /v1/permissions for up to two tokens. Returns isPermissioned, isAllowlisted, kycUrl, issuer, and whether UR 2.2.0 is required. Call before swap/LP submit on tokenized pools.",
|
|
4095
|
+
prerequisites: ["UNISWAP_API_KEY", "walletAddress or keyGenId", "tokens[]", "chainId"],
|
|
4096
|
+
followUp: [
|
|
4097
|
+
"ctm_uniswap_v4_kyc_apply_link",
|
|
4098
|
+
"ctm_uniswap_v4_quote",
|
|
4099
|
+
"ctm_uniswap_v4_build_allowlist_finalize_multisign"
|
|
4100
|
+
],
|
|
4101
|
+
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapV4CheckPermissionsMcp" },
|
|
4102
|
+
inputZod: mcpUniswapV4CheckPermissionsInputSchema,
|
|
4103
|
+
outputZod: mcpUniswapV4CheckPermissionsOutputSchema
|
|
4104
|
+
}),
|
|
4105
|
+
defineMcpTool({
|
|
4106
|
+
name: "ctm_uniswap_v4_kyc_apply_link",
|
|
4107
|
+
actionId: "uniswap-v4.kyc-apply-link",
|
|
4108
|
+
protocolId: "uniswap-v4",
|
|
4109
|
+
chainCategory: "evm",
|
|
4110
|
+
description: "Build an issuer KYC apply URL with KeyGen wallet / chain / token query params (no sign request). Use when check_permissions returns isAllowlisted=false and kycUrl.",
|
|
4111
|
+
prerequisites: ["walletAddress", "chainId", "kycUrl from check_permissions"],
|
|
4112
|
+
followUp: ["ctm_uniswap_v4_check_permissions"],
|
|
4113
|
+
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapV4KycApplyLinkMcp" },
|
|
4114
|
+
inputZod: mcpUniswapV4KycApplyLinkInputSchema,
|
|
4115
|
+
outputZod: mcpUniswapV4KycApplyLinkOutputSchema
|
|
4116
|
+
}),
|
|
4117
|
+
defineMultisignSubmitMcpTool({
|
|
4118
|
+
name: "ctm_uniswap_v4_build_allowlist_finalize_multisign",
|
|
4119
|
+
actionId: "uniswap-v4.allowlist-finalize",
|
|
4120
|
+
protocolId: "uniswap-v4",
|
|
4121
|
+
chainCategory: "evm",
|
|
4122
|
+
description: "Create and submit mpc-auth multiSignRequest to broadcast issuer-prepared allowlist calldata (e.g. Superstate setUserPermissionForInstrument). Requires partner onboard API {to, data}. No PII \u2014 KYC stays at issuer kycUrl.",
|
|
4123
|
+
prerequisites: [
|
|
4124
|
+
"Issuer onboard/add-allowlist response with to + encodedTransaction",
|
|
4125
|
+
"keyGenId + chainId + purposeText"
|
|
4126
|
+
],
|
|
4127
|
+
followUp: ["ctm_uniswap_v4_check_permissions", ...MCP_MULTISIGN_SUBMIT_FOLLOW_UP],
|
|
4128
|
+
handler: {
|
|
4129
|
+
importPath: "protocols/evm/uniswap-v4",
|
|
4130
|
+
exportName: "buildEvmMultisignBodyUniswapV4PermissionedAllowlistFinalize"
|
|
4131
|
+
},
|
|
4132
|
+
inputZod: mcpUniswapV4BuildAllowlistFinalizeMultisignInputSchema
|
|
4133
|
+
}),
|
|
3596
4134
|
defineMcpTool({
|
|
3597
4135
|
name: "ctm_uniswap_v4_list_lp_pools",
|
|
3598
4136
|
actionId: "uniswap-v4.lp-list-pools",
|
|
3599
4137
|
protocolId: "uniswap-v4",
|
|
3600
4138
|
chainCategory: "evm",
|
|
3601
|
-
description: "List
|
|
4139
|
+
description: "List Uniswap V4 LP pools for a chain. Default: standard no-hook ETH/USDC presets. Set permissioned=true for Permissioned Position Manager catalog (adapter currency + PermissionedHooks). Returns presetId, poolReference, hooks.",
|
|
3602
4140
|
prerequisites: ["chainId"],
|
|
3603
|
-
followUp: ["ctm_uniswap_v4_lp_create_position", "ctm_uniswap_v4_fetch_ohlcv"],
|
|
3604
|
-
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "
|
|
4141
|
+
followUp: ["ctm_uniswap_v4_lp_create_position", "ctm_uniswap_v4_fetch_ohlcv", "ctm_uniswap_v4_check_permissions"],
|
|
4142
|
+
handler: { importPath: "protocols/evm/uniswap-v4", exportName: "uniswapV4ListLpPools" },
|
|
3605
4143
|
inputZod: mcpUniswapV4LpListPoolsInputSchema,
|
|
3606
4144
|
outputZod: mcpUniswapV4LpListPoolsOutputSchema
|
|
3607
4145
|
}),
|
|
@@ -3642,8 +4180,12 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
3642
4180
|
actionId: "uniswap-v4.mint-liquidity",
|
|
3643
4181
|
protocolId: "uniswap-v4",
|
|
3644
4182
|
chainCategory: "evm",
|
|
3645
|
-
description: "Create and submit mpc-auth multiSignRequest for minting a Uniswap V4 LP position.
|
|
3646
|
-
prerequisites: [
|
|
4183
|
+
description: "Create and submit mpc-auth multiSignRequest for minting a Uniswap V4 LP position. Standard: ERC-20 approve + Position Manager. Permissioned (positionManagerKind=permissioned): ERC-20\u2192Permit2 + Permit2\u2192PermPosM + mint. Requires LIQUIDITY_ALLOWED.",
|
|
4184
|
+
prerequisites: [
|
|
4185
|
+
"ctm_uniswap_v4_lp_create_position output",
|
|
4186
|
+
"keyGenId + chainId + purposeText",
|
|
4187
|
+
"For permissioned: check_permissions with LIQUIDITY allowlist"
|
|
4188
|
+
],
|
|
3647
4189
|
followUp: [
|
|
3648
4190
|
...MCP_MULTISIGN_SUBMIT_FOLLOW_UP,
|
|
3649
4191
|
"After broadcast: ctm_uniswap_v4_register_position_from_mint_tx (mint tx hash)"
|
|
@@ -4212,6 +4754,46 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
4212
4754
|
inputZod: mcpMorphoFetchBlueMarketsInputSchema,
|
|
4213
4755
|
outputZod: mcpMorphoFetchBlueMarketsOutputSchema
|
|
4214
4756
|
}),
|
|
4757
|
+
defineMcpTool({
|
|
4758
|
+
name: "ctm_morpho_fetch_midnight_books",
|
|
4759
|
+
actionId: "morpho.fetch-midnight-books",
|
|
4760
|
+
protocolId: "morpho",
|
|
4761
|
+
chainCategory: "evm",
|
|
4762
|
+
description: "Morpho Midnight fixed-rate books (order books). Filter by loan/collateral; returns marketId, maturity, and implied lend/borrow APR for Midnight multisign tools.",
|
|
4763
|
+
prerequisites: ["chainId"],
|
|
4764
|
+
followUp: [
|
|
4765
|
+
"ctm_morpho_fetch_midnight_quote",
|
|
4766
|
+
"ctm_morpho_build_midnight_lend_multisign",
|
|
4767
|
+
"ctm_morpho_build_midnight_borrow_multisign"
|
|
4768
|
+
],
|
|
4769
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchMidnightBooksSummary" },
|
|
4770
|
+
inputZod: mcpMorphoFetchMidnightBooksInputSchema,
|
|
4771
|
+
outputZod: mcpMorphoFetchMidnightBooksOutputSchema
|
|
4772
|
+
}),
|
|
4773
|
+
defineMcpTool({
|
|
4774
|
+
name: "ctm_morpho_fetch_midnight_quote",
|
|
4775
|
+
actionId: "morpho.fetch-midnight-quote",
|
|
4776
|
+
protocolId: "morpho",
|
|
4777
|
+
chainCategory: "evm",
|
|
4778
|
+
description: "Quote a Morpho Midnight book fill. side asks = lend, bids = borrow. assets is raw loan-token units.",
|
|
4779
|
+
prerequisites: ["marketId from ctm_morpho_fetch_midnight_books", "assets raw amount"],
|
|
4780
|
+
followUp: ["ctm_morpho_build_midnight_lend_multisign", "ctm_morpho_build_midnight_borrow_multisign"],
|
|
4781
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchMidnightQuoteSummary" },
|
|
4782
|
+
inputZod: mcpMorphoFetchMidnightQuoteInputSchema,
|
|
4783
|
+
outputZod: mcpMorphoFetchMidnightQuoteOutputSchema
|
|
4784
|
+
}),
|
|
4785
|
+
defineMcpTool({
|
|
4786
|
+
name: "ctm_morpho_fetch_midnight_positions",
|
|
4787
|
+
actionId: "morpho.fetch-midnight-positions",
|
|
4788
|
+
protocolId: "morpho",
|
|
4789
|
+
chainCategory: "evm",
|
|
4790
|
+
description: "Morpho Midnight positions for a user (lend/borrow). Use marketId for repay.",
|
|
4791
|
+
prerequisites: ["user address"],
|
|
4792
|
+
followUp: ["ctm_morpho_build_midnight_repay_multisign"],
|
|
4793
|
+
handler: { importPath: "protocols/evm/morpho", exportName: "morphoFetchMidnightPositionsSummary" },
|
|
4794
|
+
inputZod: mcpMorphoFetchMidnightPositionsInputSchema,
|
|
4795
|
+
outputZod: mcpMorphoFetchMidnightPositionsOutputSchema
|
|
4796
|
+
}),
|
|
4215
4797
|
defineMcpTool({
|
|
4216
4798
|
name: "ctm_euler_v2_fetch_lend_vaults",
|
|
4217
4799
|
actionId: "euler-v2.fetch-lend-vaults",
|
|
@@ -4598,6 +5180,9 @@ var skyProtocolModule = {
|
|
|
4598
5180
|
]
|
|
4599
5181
|
};
|
|
4600
5182
|
registerProtocolModule(skyProtocolModule);
|
|
5183
|
+
|
|
5184
|
+
// src/protocols/evm/aave-v4/api.ts
|
|
5185
|
+
init_defiProxy();
|
|
4601
5186
|
var AAVE_V4_GRAPHQL_URL = "https://api.v4.aave.com/graphql";
|
|
4602
5187
|
async function aaveV4Gql(query, variables) {
|
|
4603
5188
|
const body = { query, variables: variables ?? {} };
|
|
@@ -5247,6 +5832,9 @@ var arcusProtocolModule = {
|
|
|
5247
5832
|
]
|
|
5248
5833
|
};
|
|
5249
5834
|
registerProtocolModule(arcusProtocolModule);
|
|
5835
|
+
|
|
5836
|
+
// src/protocols/evm/morpho/api.ts
|
|
5837
|
+
init_defiProxy();
|
|
5250
5838
|
var MORPHO_GRAPHQL_URL = "https://api.morpho.org/graphql";
|
|
5251
5839
|
async function morphoGql(query, variables) {
|
|
5252
5840
|
const body = { query, variables: variables ?? {} };
|
|
@@ -5387,12 +5975,40 @@ async function ensureMorphoChainAssetCache(chainId) {
|
|
|
5387
5975
|
modes.set(k, prev);
|
|
5388
5976
|
}
|
|
5389
5977
|
}
|
|
5978
|
+
try {
|
|
5979
|
+
const { fetchMorphoMidnightBooks: fetchMorphoMidnightBooks2 } = await Promise.resolve().then(() => (init_midnightApi(), midnightApi_exports));
|
|
5980
|
+
const { MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT: MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT2 } = await Promise.resolve().then(() => (init_midnightConstants(), midnightConstants_exports));
|
|
5981
|
+
const { data: books } = await fetchMorphoMidnightBooks2({
|
|
5982
|
+
chainId,
|
|
5983
|
+
limit: MORPHO_MIDNIGHT_BOOKS_MAX_LIMIT2
|
|
5984
|
+
});
|
|
5985
|
+
for (const book of books) {
|
|
5986
|
+
const loanAddr = (book.loanToken ?? "").toString().trim();
|
|
5987
|
+
if (isAddress(loanAddr)) {
|
|
5988
|
+
const k = getAddress(loanAddr).toLowerCase();
|
|
5989
|
+
const prev = modes.get(k) ?? { earn: false, borrow: false, collateral: false };
|
|
5990
|
+
prev.borrow = true;
|
|
5991
|
+
modes.set(k, prev);
|
|
5992
|
+
}
|
|
5993
|
+
for (const c of book.collaterals ?? []) {
|
|
5994
|
+
const colAddr = (c.token ?? "").toString().trim();
|
|
5995
|
+
if (!isAddress(colAddr)) continue;
|
|
5996
|
+
const k = getAddress(colAddr).toLowerCase();
|
|
5997
|
+
const prev = modes.get(k) ?? { earn: false, borrow: false, collateral: false };
|
|
5998
|
+
prev.collateral = true;
|
|
5999
|
+
modes.set(k, prev);
|
|
6000
|
+
}
|
|
6001
|
+
}
|
|
6002
|
+
} catch {
|
|
6003
|
+
}
|
|
5390
6004
|
const cache = { modesByUnderlying: modes, nativeWrapped: null };
|
|
5391
6005
|
chainAssetCache.set(chainId, cache);
|
|
5392
6006
|
return cache;
|
|
5393
6007
|
}
|
|
5394
6008
|
|
|
5395
6009
|
// src/protocols/evm/morpho/index.ts
|
|
6010
|
+
init_midnightConstants();
|
|
6011
|
+
init_midnightApi();
|
|
5396
6012
|
var MORPHO_PROTOCOL_ID = "morpho";
|
|
5397
6013
|
var morphoProtocolModule = {
|
|
5398
6014
|
id: MORPHO_PROTOCOL_ID,
|
|
@@ -5412,7 +6028,12 @@ var morphoProtocolModule = {
|
|
|
5412
6028
|
{ id: "morpho.blue-repay", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Repay Morpho Blue borrow", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
5413
6029
|
{ id: "morpho.blue-collateral-withdraw", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Withdraw Morpho Blue collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
5414
6030
|
{ id: "morpho.merkl-claim", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Claim Morpho Merkl rewards", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
5415
|
-
{ id: "morpho.midnight-
|
|
6031
|
+
{ id: "morpho.fetch-midnight-books", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "List Morpho Midnight fixed-rate books", commonParams: [], params: {} },
|
|
6032
|
+
{ id: "morpho.fetch-midnight-quote", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Quote Morpho Midnight lend/borrow fill", commonParams: [], params: {} },
|
|
6033
|
+
{ id: "morpho.fetch-midnight-positions", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "List Morpho Midnight user positions", commonParams: [], params: {} },
|
|
6034
|
+
{ id: "morpho.midnight-lend", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight fixed-rate lend (take asks)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
6035
|
+
{ id: "morpho.midnight-borrow", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight fixed-rate borrow (supply collateral + take bids)", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
|
|
6036
|
+
{ id: "morpho.midnight-repay", protocolId: MORPHO_PROTOCOL_ID, chainCategory: "evm", description: "Morpho Midnight repay debt and withdraw collateral", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
|
|
5416
6037
|
]
|
|
5417
6038
|
};
|
|
5418
6039
|
registerProtocolModule(morphoProtocolModule);
|
|
@@ -5933,7 +6554,7 @@ var PROTOCOL_SUPPORT_ADVISORS = {
|
|
|
5933
6554
|
}));
|
|
5934
6555
|
return {
|
|
5935
6556
|
tokens,
|
|
5936
|
-
notes: chainId === ROBINHOOD_CHAIN_ID ? 'Morpho vault assets on Robinhood Chain. Robinhood Earn USDG yield uses Steakhouse USDG (steakUSDG) \u2014 query "robinhood earn" or robinhoodEarn: true on deposit multisign; not Arcus collateral.' : "Morpho vault assets
|
|
6557
|
+
notes: chainId === ROBINHOOD_CHAIN_ID ? 'Morpho vault assets on Robinhood Chain. Robinhood Earn USDG yield uses Steakhouse USDG (steakUSDG) \u2014 query "robinhood earn" or robinhoodEarn: true on deposit multisign; not Arcus collateral.' : "Morpho vault assets, Blue market loan/collateral tokens, and Midnight book loan/collateral tokens from api.morpho.org."
|
|
5937
6558
|
};
|
|
5938
6559
|
},
|
|
5939
6560
|
async isTokenSupported(chainId, address) {
|
|
@@ -6103,6 +6724,6 @@ function getAgentCatalog() {
|
|
|
6103
6724
|
};
|
|
6104
6725
|
}
|
|
6105
6726
|
|
|
6106
|
-
export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, MULTISIGN_SUBMIT_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpArcusBuildCancelOrderMultisignInputSchema, mcpArcusBuildCloseMultisignInputSchema, mcpArcusBuildCreateApiKeyMultisignInputSchema, mcpArcusBuildDepositMultisignInputSchema, mcpArcusBuildPlaceOrderMultisignInputSchema, mcpArcusBuildSetLeverageMultisignInputSchema, mcpArcusBuildWithdrawMultisignInputSchema, mcpArcusFetchAccountInputSchema, mcpArcusFetchAccountOutputSchema, mcpArcusFetchMarketSnapshotInputSchema, mcpArcusFetchMarketSnapshotOutputSchema, mcpArcusFetchMarketsInputSchema, mcpArcusFetchMarketsOutputSchema, mcpArcusFetchOhlcvInputSchema, mcpArcusFetchOhlcvOutputSchema, mcpArcusFetchOpenContextInputSchema, mcpArcusFetchOpenContextOutputSchema, mcpArcusFetchOpenOrdersInputSchema, mcpArcusFetchOpenOrdersOutputSchema, mcpArcusFetchPositionsInputSchema, mcpArcusFetchPositionsOutputSchema, mcpArcusSearchMarketsInputSchema, mcpArcusSearchMarketsOutputSchema, mcpArcusSpotBuildRfqMultisignInputSchema, mcpArcusSpotFetchBalancesInputSchema, mcpArcusSpotFetchBalancesOutputSchema, mcpArcusSpotFetchMarketsInputSchema, mcpArcusSpotFetchMarketsOutputSchema, mcpArcusSpotFetchOhlcvInputSchema, mcpArcusSpotFetchOhlcvOutputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2FetchLendVaultsInputSchema, mcpEulerV2FetchLendVaultsOutputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGmxCancelInputSchema, mcpGmxDecreaseInputSchema, mcpGmxFetchGmApyInputSchema, mcpGmxFetchGmApyOutputSchema, mcpGmxFetchGmMarketsInputSchema, mcpGmxFetchGmMarketsOutputSchema, mcpGmxFetchMarketPricesInputSchema, mcpGmxFetchMarketPricesOutputSchema, mcpGmxFetchMarketsInputSchema, mcpGmxFetchMarketsOutputSchema, mcpGmxFetchOhlcvInputSchema, mcpGmxFetchOhlcvOutputSchema, mcpGmxFetchOrdersInputSchema, mcpGmxFetchOrdersOutputSchema, mcpGmxFetchPositionsInputSchema, mcpGmxFetchPositionsOutputSchema, mcpGmxFetchStakingPowerInputSchema, mcpGmxFetchStakingPowerOutputSchema, mcpGmxGmDepositInputSchema, mcpGmxGmWithdrawInputSchema, mcpGmxIncreaseInputSchema, mcpServerSubmitOutputSchema as mcpGmxMultisignOutputSchema, mcpGmxStakeGmxInputSchema, mcpGmxUnstakeGmxInputSchema, mcpHyperliquidBridgeDepositInputSchema, mcpHyperliquidBridgeWithdrawInputSchema, mcpHyperliquidCancelInputSchema, mcpHyperliquidCloseInputSchema, mcpHyperliquidDelegateInputSchema, mcpHyperliquidFetchDelegationsInputSchema, mcpHyperliquidFetchDelegationsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOhlcvInputSchema, mcpHyperliquidFetchOhlcvOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidSearchMarketsInputSchema, mcpHyperliquidSearchMarketsOutputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUpdateLeverageInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMorphoBlueBorrowInputSchema, mcpMorphoBlueCollateralDepositInputSchema, mcpMorphoBlueCollateralWithdrawInputSchema, mcpMorphoBlueRepayInputSchema, mcpMorphoFetchBlueMarketsInputSchema, mcpMorphoFetchBlueMarketsOutputSchema, mcpMorphoFetchEarnVaultsInputSchema, mcpMorphoFetchEarnVaultsOutputSchema, mcpMorphoMerklClaimInputSchema, mcpMorphoVaultDepositInputSchema, mcpMorphoVaultWithdrawInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildCollectFeesMultisignInputSchema, mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildLimitOrderMultisignInputSchema, mcpUniswapV4BuildMintLiquidityMultisignInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4FetchLimitOrdersInputSchema, mcpUniswapV4FetchLimitOrdersOutputSchema, mcpUniswapV4FetchOhlcvInputSchema, mcpUniswapV4FetchOhlcvOutputSchema, mcpUniswapV4LimitOrderQuoteInputSchema, mcpUniswapV4LimitOrderQuoteOutputSchema, mcpUniswapV4LpClaimInputSchema, mcpUniswapV4LpClaimOutputSchema, mcpUniswapV4LpCreatePositionInputSchema, mcpUniswapV4LpCreatePositionOutputSchema, mcpUniswapV4LpDecreaseInputSchema, mcpUniswapV4LpDecreaseOutputSchema, mcpUniswapV4LpIncreaseInputSchema, mcpUniswapV4LpIncreaseOutputSchema, mcpUniswapV4LpListPoolsInputSchema, mcpUniswapV4LpListPoolsOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, mcpVeniceBurnDiemInputSchema, mcpVeniceCompleteUnstakeDiemInputSchema, mcpVeniceCompleteUnstakeSvvvInputSchema, mcpVeniceInitiateUnstakeDiemInputSchema, mcpVeniceInitiateUnstakeSvvvInputSchema, mcpVeniceListModelsInputSchema, mcpVeniceListModelsOutputSchema, mcpVeniceMintDiemInputSchema, mcpVeniceReadMintDiemPreviewInputSchema, mcpVeniceReadMintDiemPreviewOutputSchema, mcpVeniceReadStakingStateInputSchema, mcpVeniceReadStakingStateOutputSchema, mcpVeniceStakeDiemInputSchema, mcpVeniceStakeVvvInputSchema, multisignOutputSchema, parseAgentBoolean, parseAgentEvmChainId, parseMcpToolInput, parseMcpToolOutput, parseMultisignBuilderOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
|
|
6727
|
+
export { EVM_COMMON_PARAM_DOCS, MANAGEMENT_SIG_DOC, MCP_NON_SUBMIT_TOOL_NAMES, MCP_TOOL_DEFINITIONS, MCP_TOOL_INPUT_SCHEMAS, MCP_TOOL_OUTPUT_SCHEMAS, MULTISIGN_OUTPUT_DOC, MULTISIGN_SUBMIT_OUTPUT_DOC, PROTOCOL_SUPPORT_ADVISORS, chainDetailSchema, evmAddressSchema, evmMultisignCommonInputSchema, getActionsByChainCategory, getAgentCatalog, getAgentCatalogForMcp, getMcpToolByName, getMcpToolDefinitions, getMcpToolInputSchema, getMcpToolOutputSchema, getProtocolDiscoverySummary, getProtocolModules, getProtocolSkill, getProtocolSupportAdvisor, getToolsForProtocol, jsonObjectSchema, keyGenSchema, listProtocolSupportAdvisorIds, listProtocolsWithSkills, mcpAaveV4BorrowInputSchema, mcpAaveV4DepositInputSchema, mcpAaveV4RepayInputSchema, mcpAaveV4WithdrawInputSchema, mcpArcusBuildCancelOrderMultisignInputSchema, mcpArcusBuildCloseMultisignInputSchema, mcpArcusBuildCreateApiKeyMultisignInputSchema, mcpArcusBuildDepositMultisignInputSchema, mcpArcusBuildPlaceOrderMultisignInputSchema, mcpArcusBuildSetLeverageMultisignInputSchema, mcpArcusBuildWithdrawMultisignInputSchema, mcpArcusFetchAccountInputSchema, mcpArcusFetchAccountOutputSchema, mcpArcusFetchMarketSnapshotInputSchema, mcpArcusFetchMarketSnapshotOutputSchema, mcpArcusFetchMarketsInputSchema, mcpArcusFetchMarketsOutputSchema, mcpArcusFetchOhlcvInputSchema, mcpArcusFetchOhlcvOutputSchema, mcpArcusFetchOpenContextInputSchema, mcpArcusFetchOpenContextOutputSchema, mcpArcusFetchOpenOrdersInputSchema, mcpArcusFetchOpenOrdersOutputSchema, mcpArcusFetchPositionsInputSchema, mcpArcusFetchPositionsOutputSchema, mcpArcusSearchMarketsInputSchema, mcpArcusSearchMarketsOutputSchema, mcpArcusSpotBuildRfqMultisignInputSchema, mcpArcusSpotFetchBalancesInputSchema, mcpArcusSpotFetchBalancesOutputSchema, mcpArcusSpotFetchMarketsInputSchema, mcpArcusSpotFetchMarketsOutputSchema, mcpArcusSpotFetchOhlcvInputSchema, mcpArcusSpotFetchOhlcvOutputSchema, mcpCurveDaoBuildSwapMultisignInputSchema, mcpCurveDaoQuoteInputSchema, mcpCurveDaoQuoteOutputSchema, mcpEthenaClaimInputSchema, mcpEthenaCooldownInputSchema, mcpEthenaRedeemInputSchema, mcpEthenaStakeInputSchema, mcpEulerV2BorrowRepayInputSchema, mcpEulerV2CollateralDepositInputSchema, mcpEulerV2CollateralWithdrawInputSchema, mcpEulerV2FetchLendVaultsInputSchema, mcpEulerV2FetchLendVaultsOutputSchema, mcpEulerV2IsolatedBorrowInputSchema, mcpEulerV2IsolatedLendInputSchema, mcpEulerV2VaultWithdrawInputSchema, mcpGmxCancelInputSchema, mcpGmxDecreaseInputSchema, mcpGmxFetchGmApyInputSchema, mcpGmxFetchGmApyOutputSchema, mcpGmxFetchGmMarketsInputSchema, mcpGmxFetchGmMarketsOutputSchema, mcpGmxFetchMarketPricesInputSchema, mcpGmxFetchMarketPricesOutputSchema, mcpGmxFetchMarketsInputSchema, mcpGmxFetchMarketsOutputSchema, mcpGmxFetchOhlcvInputSchema, mcpGmxFetchOhlcvOutputSchema, mcpGmxFetchOrdersInputSchema, mcpGmxFetchOrdersOutputSchema, mcpGmxFetchPositionsInputSchema, mcpGmxFetchPositionsOutputSchema, mcpGmxFetchStakingPowerInputSchema, mcpGmxFetchStakingPowerOutputSchema, mcpGmxGmDepositInputSchema, mcpGmxGmWithdrawInputSchema, mcpGmxIncreaseInputSchema, mcpServerSubmitOutputSchema as mcpGmxMultisignOutputSchema, mcpGmxStakeGmxInputSchema, mcpGmxUnstakeGmxInputSchema, mcpHyperliquidBridgeDepositInputSchema, mcpHyperliquidBridgeWithdrawInputSchema, mcpHyperliquidCancelInputSchema, mcpHyperliquidCloseInputSchema, mcpHyperliquidDelegateInputSchema, mcpHyperliquidFetchDelegationsInputSchema, mcpHyperliquidFetchDelegationsOutputSchema, mcpHyperliquidFetchMarketSnapshotInputSchema, mcpHyperliquidFetchMarketSnapshotOutputSchema, mcpHyperliquidFetchMarketsInputSchema, mcpHyperliquidFetchMarketsOutputSchema, mcpHyperliquidFetchOhlcvInputSchema, mcpHyperliquidFetchOhlcvOutputSchema, mcpHyperliquidFetchOpenContextInputSchema, mcpHyperliquidFetchOpenContextOutputSchema, mcpHyperliquidFetchOpenOrdersInputSchema, mcpHyperliquidFetchOpenOrdersOutputSchema, mcpHyperliquidFetchPositionsInputSchema, mcpHyperliquidFetchPositionsOutputSchema, mcpHyperliquidFetchStakingSummaryInputSchema, mcpHyperliquidFetchStakingSummaryOutputSchema, mcpHyperliquidFetchUsdClassBalancesInputSchema, mcpHyperliquidFetchUsdClassBalancesOutputSchema, mcpHyperliquidFetchUserVaultEquitiesInputSchema, mcpHyperliquidFetchUserVaultEquitiesOutputSchema, mcpHyperliquidFetchVaultsInputSchema, mcpHyperliquidFetchVaultsOutputSchema, mcpHyperliquidLimitOrderInputSchema, mcpHyperliquidSearchMarketsInputSchema, mcpHyperliquidSearchMarketsOutputSchema, mcpHyperliquidStakeInputSchema, mcpHyperliquidUndelegateInputSchema, mcpHyperliquidUnstakeInputSchema, mcpHyperliquidUpdateLeverageInputSchema, mcpHyperliquidUsdTransferInputSchema, mcpHyperliquidVaultDepositInputSchema, mcpHyperliquidVaultWithdrawInputSchema, mcpLidoClaimWithdrawalInputSchema, mcpLidoRequestWithdrawalsInputSchema, mcpLidoSubmitInputSchema, mcpLidoUnwrapWstEthInputSchema, mcpLidoWrapStEthInputSchema, mcpMapleDepositInputSchema, mcpMapleRequestRedeemInputSchema, mcpMorphoBlueBorrowInputSchema, mcpMorphoBlueCollateralDepositInputSchema, mcpMorphoBlueCollateralWithdrawInputSchema, mcpMorphoBlueRepayInputSchema, mcpMorphoFetchBlueMarketsInputSchema, mcpMorphoFetchBlueMarketsOutputSchema, mcpMorphoFetchEarnVaultsInputSchema, mcpMorphoFetchEarnVaultsOutputSchema, mcpMorphoFetchMidnightBooksInputSchema, mcpMorphoFetchMidnightBooksOutputSchema, mcpMorphoFetchMidnightPositionsInputSchema, mcpMorphoFetchMidnightPositionsOutputSchema, mcpMorphoFetchMidnightQuoteInputSchema, mcpMorphoFetchMidnightQuoteOutputSchema, mcpMorphoMerklClaimInputSchema, mcpMorphoMidnightBorrowInputSchema, mcpMorphoMidnightLendInputSchema, mcpMorphoMidnightRepayInputSchema, mcpMorphoVaultDepositInputSchema, mcpMorphoVaultWithdrawInputSchema, mcpMultisignInput, multisignOutputSchema as mcpMultisignOutputSchema, mcpServerSubmitOutputSchema as mcpMultisignSubmitOutputSchema, mcpServerCommonInputSchema, mcpServerMultisignInput, mcpServerSubmitOutputSchema, mcpSkyLockstakeCloseInputSchema, mcpSkyLockstakeDrawInputSchema, mcpSkyLockstakeGetRewardInputSchema, mcpSkyLockstakeStakeInputSchema, mcpSkyLockstakeWipeInputSchema, mcpSkySusdsDepositInputSchema, mcpSkySusdsRedeemInputSchema, mcpUniswapV4BuildAllowlistFinalizeMultisignInputSchema, mcpUniswapV4BuildCollectFeesMultisignInputSchema, mcpUniswapV4BuildDecreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildIncreaseLiquidityMultisignInputSchema, mcpUniswapV4BuildLimitOrderMultisignInputSchema, mcpUniswapV4BuildMintLiquidityMultisignInputSchema, mcpUniswapV4BuildSwapMultisignInputSchema, mcpUniswapV4CheckPermissionsInputSchema, mcpUniswapV4CheckPermissionsOutputSchema, mcpUniswapV4CreateSwapInputSchema, mcpUniswapV4CreateSwapOutputSchema, mcpUniswapV4FetchLimitOrdersInputSchema, mcpUniswapV4FetchLimitOrdersOutputSchema, mcpUniswapV4FetchOhlcvInputSchema, mcpUniswapV4FetchOhlcvOutputSchema, mcpUniswapV4KycApplyLinkInputSchema, mcpUniswapV4KycApplyLinkOutputSchema, mcpUniswapV4LimitOrderQuoteInputSchema, mcpUniswapV4LimitOrderQuoteOutputSchema, mcpUniswapV4LpClaimInputSchema, mcpUniswapV4LpClaimOutputSchema, mcpUniswapV4LpCreatePositionInputSchema, mcpUniswapV4LpCreatePositionOutputSchema, mcpUniswapV4LpDecreaseInputSchema, mcpUniswapV4LpDecreaseOutputSchema, mcpUniswapV4LpIncreaseInputSchema, mcpUniswapV4LpIncreaseOutputSchema, mcpUniswapV4LpListPoolsInputSchema, mcpUniswapV4LpListPoolsOutputSchema, mcpUniswapV4LpListPositionsInputSchema, mcpUniswapV4LpListPositionsOutputSchema, mcpUniswapV4QuoteInputSchema, mcpUniswapV4QuoteOutputSchema, mcpUniswapV4RegisterPositionFromMintTxInputSchema, mcpUniswapV4RegisterPositionFromMintTxOutputSchema, mcpUniswapV4RegisterPositionNftInputSchema, mcpUniswapV4RegisterPositionNftOutputSchema, mcpVeniceBurnDiemInputSchema, mcpVeniceCompleteUnstakeDiemInputSchema, mcpVeniceCompleteUnstakeSvvvInputSchema, mcpVeniceInitiateUnstakeDiemInputSchema, mcpVeniceInitiateUnstakeSvvvInputSchema, mcpVeniceListModelsInputSchema, mcpVeniceListModelsOutputSchema, mcpVeniceMintDiemInputSchema, mcpVeniceReadMintDiemPreviewInputSchema, mcpVeniceReadMintDiemPreviewOutputSchema, mcpVeniceReadStakingStateInputSchema, mcpVeniceReadStakingStateOutputSchema, mcpVeniceStakeDiemInputSchema, mcpVeniceStakeVvvInputSchema, multisignOutputSchema, parseAgentBoolean, parseAgentEvmChainId, parseMcpToolInput, parseMcpToolOutput, parseMultisignBuilderOutput, uniswapQuoteTradeTypeSchema, zodSchemaToMcpJsonSchema };
|
|
6107
6728
|
//# sourceMappingURL=catalog.js.map
|
|
6108
6729
|
//# sourceMappingURL=catalog.js.map
|