@continuumdao/ctm-mpc-defi 0.2.16 → 0.2.17
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 +322 -8
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +10 -6
- package/dist/agent/catalog.js +322 -8
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/_shared/multisign-mcp-gas.md +7 -4
- package/dist/agent/skills/circle-cctp/SKILL.md +63 -0
- package/dist/protocols/evm/circle-cctp/index.cjs +1067 -0
- package/dist/protocols/evm/circle-cctp/index.cjs.map +1 -0
- package/dist/protocols/evm/circle-cctp/index.d.ts +281 -0
- package/dist/protocols/evm/circle-cctp/index.js +1026 -0
- package/dist/protocols/evm/circle-cctp/index.js.map +1 -0
- package/package.json +6 -1
package/dist/agent/catalog.cjs
CHANGED
|
@@ -411,7 +411,7 @@ var EVM_COMMON_PARAM_DOCS = {
|
|
|
411
411
|
}
|
|
412
412
|
};
|
|
413
413
|
var MULTISIGN_SUBMIT_OUTPUT_DOC = {
|
|
414
|
-
description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with
|
|
414
|
+
description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result. Do not poll wait_for_sign_request_ready after submit (Join may take days). Do not call the same build tool again if requestId was returned.",
|
|
415
415
|
fields: {
|
|
416
416
|
requestId: {
|
|
417
417
|
type: "string",
|
|
@@ -423,7 +423,7 @@ var MULTISIGN_SUBMIT_OUTPUT_DOC = {
|
|
|
423
423
|
},
|
|
424
424
|
followUp: {
|
|
425
425
|
type: "string",
|
|
426
|
-
description: "Lifecycle next steps (
|
|
426
|
+
description: "Lifecycle next steps (sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result). No polling after submit."
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
};
|
|
@@ -481,7 +481,6 @@ var MANAGEMENT_SIG_DOC = {
|
|
|
481
481
|
// src/agent/mcpMultisignSubmitMeta.ts
|
|
482
482
|
var MCP_MULTISIGN_SUBMIT_DESCRIPTION_SUFFIX = "Builds the unsigned batch, signs the management envelope, and POSTs /multiSignRequest. Returns { requestId } on success \u2014 do not call again; use list_sign_requests to verify duplicates.";
|
|
483
483
|
var MCP_MULTISIGN_SUBMIT_FOLLOW_UP = [
|
|
484
|
-
"wait_for_sign_request_ready",
|
|
485
484
|
"sign_request_agree",
|
|
486
485
|
"trigger_sign_result",
|
|
487
486
|
"broadcast_sign_result"
|
|
@@ -1259,9 +1258,10 @@ var mcpServerSubmitOutputSchema = zod.z.object({
|
|
|
1259
1258
|
status: zod.z.literal("submitted").optional().describe("Present when POST /multiSignRequest succeeded. Confirms the request exists on the node."),
|
|
1260
1259
|
followUp: zod.z.string().optional().describe(
|
|
1261
1260
|
"Next MCP lifecycle steps. Do not call the same build_*_multisign tool again unless the user explicitly wants a duplicate order."
|
|
1262
|
-
)
|
|
1261
|
+
),
|
|
1262
|
+
fees: zod.z.record(zod.z.unknown()).optional().describe("Protocol fee summary when available (e.g. Circle CCTP Forwarding Service quote used at propose).")
|
|
1263
1263
|
}).describe(
|
|
1264
|
-
"Submitted mpc-auth multiSignRequest. Continue with
|
|
1264
|
+
"Submitted mpc-auth multiSignRequest. Continue with sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result. Do not poll wait_for_sign_request_ready \u2014 Join agreement may take days."
|
|
1265
1265
|
);
|
|
1266
1266
|
var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
1267
1267
|
"ctm_uniswap_v4_quote",
|
|
@@ -2034,6 +2034,70 @@ var mcpHyperliquidUndelegateInputSchema = mcpHyperliquidMultisignInput(
|
|
|
2034
2034
|
},
|
|
2035
2035
|
preprocessHyperliquidUndelegateInput
|
|
2036
2036
|
);
|
|
2037
|
+
var mcpCctpFeeFieldsSchema = zod.z.object({
|
|
2038
|
+
feeTierUsed: zod.z.enum(["low", "med", "high"]),
|
|
2039
|
+
maxFee: zod.z.string().describe("Selected tier max fee in USDC base units (6 decimals)"),
|
|
2040
|
+
maxFeeHuman: zod.z.string().describe("Human-readable USDC max forwarding fee for feeTierUsed"),
|
|
2041
|
+
forwardFeeLow: zod.z.string(),
|
|
2042
|
+
forwardFeeLowHuman: zod.z.string(),
|
|
2043
|
+
forwardFeeMed: zod.z.string(),
|
|
2044
|
+
forwardFeeMedHuman: zod.z.string(),
|
|
2045
|
+
forwardFeeHigh: zod.z.string(),
|
|
2046
|
+
forwardFeeHighHuman: zod.z.string(),
|
|
2047
|
+
transferAmount: zod.z.string().optional(),
|
|
2048
|
+
transferAmountHuman: zod.z.string().optional(),
|
|
2049
|
+
totalBurn: zod.z.string().optional().describe("transferAmount + maxFee when transferAmountHuman was provided"),
|
|
2050
|
+
totalBurnHuman: zod.z.string().optional(),
|
|
2051
|
+
feeSummary: zod.z.string().describe("Plain-language fee summary for agents")
|
|
2052
|
+
});
|
|
2053
|
+
var mcpCctpFetchSupportedRoutesInputSchema = zod.z.object({
|
|
2054
|
+
network: zod.z.enum(["mainnet", "testnet"]).optional().describe("Filter routes by network; omit for all")
|
|
2055
|
+
});
|
|
2056
|
+
var mcpCctpFetchSupportedRoutesOutputSchema = jsonObjectSchema.describe(
|
|
2057
|
+
"{ routes: [{ sourceChainId, destChainId, sourceDomain, destDomain, sourceLabel, destLabel, network }] }"
|
|
2058
|
+
);
|
|
2059
|
+
var mcpCctpFetchBurnFeesInputSchema = zod.z.object({
|
|
2060
|
+
sourceChainId: agentEvmChainIdSchema.describe("Source chain EIP-155 id (burn chain)"),
|
|
2061
|
+
destChainId: agentEvmChainIdSchema.describe("Destination chain EIP-155 id (mint chain)"),
|
|
2062
|
+
transferAmountHuman: zod.z.string().min(1).optional().describe("Human USDC amount recipient receives (6 decimals). Omit for tier fees only; include for totalBurn."),
|
|
2063
|
+
feeTier: zod.z.enum(["low", "med", "high"]).optional().describe("Iris forwardFee tier; default med")
|
|
2064
|
+
});
|
|
2065
|
+
var mcpCctpFetchBurnFeesOutputSchema = zod.z.object({
|
|
2066
|
+
sourceChainId: zod.z.number(),
|
|
2067
|
+
destChainId: zod.z.number(),
|
|
2068
|
+
sourceDomain: zod.z.number(),
|
|
2069
|
+
destDomain: zod.z.number(),
|
|
2070
|
+
sourceLabel: zod.z.string(),
|
|
2071
|
+
destLabel: zod.z.string(),
|
|
2072
|
+
network: zod.z.enum(["mainnet", "testnet"]),
|
|
2073
|
+
fees: mcpCctpFeeFieldsSchema
|
|
2074
|
+
}).passthrough().describe("Iris Forwarding Service fee quote with human-readable USDC amounts in fees and top-level fee fields");
|
|
2075
|
+
var mcpCctpFetchUsdcBalanceInputSchema = zod.z.object({
|
|
2076
|
+
chainId: agentEvmChainIdSchema.describe("Source chain to read USDC balance on"),
|
|
2077
|
+
executorAddress: evmAddressSchema.optional().describe("Server-filled from keyGenId when omitted"),
|
|
2078
|
+
rpcUrl: zod.z.string().min(1).optional().describe("Server-filled from chain registry"),
|
|
2079
|
+
transferAmountHuman: zod.z.string().min(1).optional().describe("When set with feeSnapshot, returns requiredTotalBurn* and sufficientForTransfer"),
|
|
2080
|
+
feeSnapshot: jsonObjectSchema.optional().describe("Output from ctm_cctp_fetch_burn_fees (uses maxFee) for balance sufficiency check")
|
|
2081
|
+
});
|
|
2082
|
+
var mcpCctpFetchUsdcBalanceOutputSchema = jsonObjectSchema.describe(
|
|
2083
|
+
"{ balanceUsdcHuman, balanceRaw, usdcAddress, requiredTotalBurnHuman?, sufficientForTransfer?, feeSummary? }"
|
|
2084
|
+
);
|
|
2085
|
+
var mcpCctpFetchTransferStatusInputSchema = zod.z.object({
|
|
2086
|
+
sourceChainId: agentEvmChainIdSchema.describe("Source chain where burn was executed"),
|
|
2087
|
+
sourceDomain: zod.z.number().int().min(0).describe("CCTP domain id of source chain"),
|
|
2088
|
+
burnTxHash: zod.z.string().min(1).describe("Burn transaction hash (0x-prefixed or raw)")
|
|
2089
|
+
});
|
|
2090
|
+
var mcpCctpFetchTransferStatusOutputSchema = jsonObjectSchema.describe(
|
|
2091
|
+
"{ status, attestation?, message?, eventNonce? } from Iris /v2/messages"
|
|
2092
|
+
);
|
|
2093
|
+
var mcpCctpBuildBurnMultisignInputSchema = mcpMultisignInput({
|
|
2094
|
+
destChainId: agentEvmChainIdSchema.describe("Destination chain EIP-155 id (mint chain)"),
|
|
2095
|
+
transferAmountHuman: zod.z.string().min(1).describe("Human USDC amount recipient receives"),
|
|
2096
|
+
mintRecipient: evmAddressSchema.optional().describe("Recipient on destination chain; defaults to MPC executor address"),
|
|
2097
|
+
feeTier: zod.z.enum(["low", "med", "high"]).optional(),
|
|
2098
|
+
minFinalityThreshold: zod.z.number().int().positive().optional(),
|
|
2099
|
+
feeSnapshot: jsonObjectSchema.optional().describe("Optional output from ctm_cctp_fetch_burn_fees")
|
|
2100
|
+
});
|
|
2037
2101
|
|
|
2038
2102
|
// src/agent/mcpProtocolTools.ts
|
|
2039
2103
|
function defineProtocolMcpTool(def) {
|
|
@@ -2588,6 +2652,26 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
2588
2652
|
prerequisites: ["keyGen", "executorAddress", "delegation from fetch_delegations"],
|
|
2589
2653
|
handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidUndelegateBatch" },
|
|
2590
2654
|
inputZod: mcpHyperliquidUndelegateInputSchema
|
|
2655
|
+
}),
|
|
2656
|
+
defineProtocolMcpTool({
|
|
2657
|
+
name: "ctm_cctp_build_burn_multisign",
|
|
2658
|
+
actionId: "circle-cctp.burn-forward",
|
|
2659
|
+
protocolId: "circle-cctp",
|
|
2660
|
+
chainCategory: "evm",
|
|
2661
|
+
description: "Create and submit mpc-auth multiSignRequest for CCTP Forwarding Service USDC transfer (approve + depositForBurnWithHook on source chain).",
|
|
2662
|
+
prerequisites: [
|
|
2663
|
+
"ctm_cctp_fetch_burn_fees (required)",
|
|
2664
|
+
"keyGenId",
|
|
2665
|
+
"chainId = source chain",
|
|
2666
|
+
"destChainId",
|
|
2667
|
+
"transferAmountHuman",
|
|
2668
|
+
"sufficient USDC on source"
|
|
2669
|
+
],
|
|
2670
|
+
handler: {
|
|
2671
|
+
importPath: "protocols/evm/circle-cctp",
|
|
2672
|
+
exportName: "buildEvmMultisignBodyCctpBurnBatchFromMcp"
|
|
2673
|
+
},
|
|
2674
|
+
inputZod: mcpCctpBuildBurnMultisignInputSchema
|
|
2591
2675
|
})
|
|
2592
2676
|
];
|
|
2593
2677
|
|
|
@@ -3122,6 +3206,54 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
3122
3206
|
inputZod: mcpEulerV2FetchLendVaultsInputSchema,
|
|
3123
3207
|
outputZod: mcpEulerV2FetchLendVaultsOutputSchema
|
|
3124
3208
|
}),
|
|
3209
|
+
defineMcpTool({
|
|
3210
|
+
name: "ctm_cctp_fetch_supported_routes",
|
|
3211
|
+
actionId: "circle-cctp.fetch-routes",
|
|
3212
|
+
protocolId: "circle-cctp",
|
|
3213
|
+
chainCategory: "evm",
|
|
3214
|
+
description: "List supported Circle CCTP V2 Forwarding Service routes (EVM source \u2192 destination pairs on mainnet or testnet). Read-only.",
|
|
3215
|
+
prerequisites: ["load_defi_protocol", "get_chain_registry"],
|
|
3216
|
+
followUp: ["ctm_cctp_fetch_burn_fees"],
|
|
3217
|
+
handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchSupportedRoutes" },
|
|
3218
|
+
inputZod: mcpCctpFetchSupportedRoutesInputSchema,
|
|
3219
|
+
outputZod: mcpCctpFetchSupportedRoutesOutputSchema
|
|
3220
|
+
}),
|
|
3221
|
+
defineMcpTool({
|
|
3222
|
+
name: "ctm_cctp_fetch_burn_fees",
|
|
3223
|
+
actionId: "circle-cctp.fetch-fees",
|
|
3224
|
+
protocolId: "circle-cctp",
|
|
3225
|
+
chainCategory: "evm",
|
|
3226
|
+
description: "Quote Circle Iris Forwarding Service burn fees (?forward=true) for a CCTP route. Returns human-readable USDC fee tiers and totalBurn when transferAmountHuman is set. Does NOT create a sign request.",
|
|
3227
|
+
prerequisites: ["supported route (ctm_cctp_fetch_supported_routes)"],
|
|
3228
|
+
followUp: ["ctm_cctp_fetch_usdc_balance", "ctm_cctp_build_burn_multisign"],
|
|
3229
|
+
handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchBurnFeesForRoute" },
|
|
3230
|
+
inputZod: mcpCctpFetchBurnFeesInputSchema,
|
|
3231
|
+
outputZod: mcpCctpFetchBurnFeesOutputSchema
|
|
3232
|
+
}),
|
|
3233
|
+
defineMcpTool({
|
|
3234
|
+
name: "ctm_cctp_fetch_usdc_balance",
|
|
3235
|
+
actionId: "circle-cctp.fetch-usdc-balance",
|
|
3236
|
+
protocolId: "circle-cctp",
|
|
3237
|
+
chainCategory: "evm",
|
|
3238
|
+
description: "Read MPC wallet USDC balance on a CCTP source chain. Read-only.",
|
|
3239
|
+
prerequisites: ["chainId (source)", "executorAddress or keyGenId"],
|
|
3240
|
+
followUp: ["ctm_cctp_build_burn_multisign"],
|
|
3241
|
+
handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchUsdcBalance" },
|
|
3242
|
+
inputZod: mcpCctpFetchUsdcBalanceInputSchema,
|
|
3243
|
+
outputZod: mcpCctpFetchUsdcBalanceOutputSchema
|
|
3244
|
+
}),
|
|
3245
|
+
defineMcpTool({
|
|
3246
|
+
name: "ctm_cctp_fetch_transfer_status",
|
|
3247
|
+
actionId: "circle-cctp.fetch-status",
|
|
3248
|
+
protocolId: "circle-cctp",
|
|
3249
|
+
chainCategory: "evm",
|
|
3250
|
+
description: "Poll Circle Iris for CCTP message/attestation status after source-chain burn Execute. Read-only.",
|
|
3251
|
+
prerequisites: ["sourceChainId", "sourceDomain", "burnTxHash from broadcast"],
|
|
3252
|
+
followUp: [],
|
|
3253
|
+
handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchTransferStatus" },
|
|
3254
|
+
inputZod: mcpCctpFetchTransferStatusInputSchema,
|
|
3255
|
+
outputZod: mcpCctpFetchTransferStatusOutputSchema
|
|
3256
|
+
}),
|
|
3125
3257
|
defineMcpTool({
|
|
3126
3258
|
name: "ctm_morpho_fetch_earn_vaults",
|
|
3127
3259
|
actionId: "morpho.fetch-earn-vaults",
|
|
@@ -3189,7 +3321,7 @@ function getAgentCatalogForMcp() {
|
|
|
3189
3321
|
"1. Quote (protocol-specific API if needed)",
|
|
3190
3322
|
"2. Build protocol calldata (e.g. create_swap)",
|
|
3191
3323
|
"3. build_*_multisign \u2192 { requestId } (MCP auto-submits)",
|
|
3192
|
-
"4.
|
|
3324
|
+
"4. sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result (do not poll wait_for_sign_request_ready \u2014 Join may take days)"
|
|
3193
3325
|
],
|
|
3194
3326
|
evmSwapManualTypical: [
|
|
3195
3327
|
"1. Quote (protocol-specific API if needed)",
|
|
@@ -3208,7 +3340,7 @@ function getAgentCatalogForMcp() {
|
|
|
3208
3340
|
"1. load_defi_protocol for the target protocol",
|
|
3209
3341
|
"2. get_defi_protocol_supported_chains / get_token_registry to pick chainId and tokens",
|
|
3210
3342
|
"3. MCP build_* tool with keyGenId + chainId \u2192 { requestId }",
|
|
3211
|
-
"4. Base MCP:
|
|
3343
|
+
"4. Base MCP: sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result (no wait_for_sign_request_ready polling after submit)"
|
|
3212
3344
|
]
|
|
3213
3345
|
}
|
|
3214
3346
|
};
|
|
@@ -4093,6 +4225,185 @@ var morphoProtocolModule = {
|
|
|
4093
4225
|
]
|
|
4094
4226
|
};
|
|
4095
4227
|
registerProtocolModule(morphoProtocolModule);
|
|
4228
|
+
|
|
4229
|
+
// src/protocols/evm/circle-cctp/constants.ts
|
|
4230
|
+
var CIRCLE_CCTP_PROTOCOL_ID = "circle-cctp";
|
|
4231
|
+
var TOKEN_MESSENGER_V2_MAINNET = "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
|
|
4232
|
+
var TOKEN_MESSENGER_V2_TESTNET = "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
|
|
4233
|
+
var CCTP_EVM_CHAINS = [
|
|
4234
|
+
{
|
|
4235
|
+
chainId: 1,
|
|
4236
|
+
domain: 0,
|
|
4237
|
+
network: "mainnet",
|
|
4238
|
+
usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
4239
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4240
|
+
label: "Ethereum"
|
|
4241
|
+
},
|
|
4242
|
+
{
|
|
4243
|
+
chainId: 43114,
|
|
4244
|
+
domain: 1,
|
|
4245
|
+
network: "mainnet",
|
|
4246
|
+
usdc: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
|
|
4247
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4248
|
+
label: "Avalanche"
|
|
4249
|
+
},
|
|
4250
|
+
{
|
|
4251
|
+
chainId: 10,
|
|
4252
|
+
domain: 2,
|
|
4253
|
+
network: "mainnet",
|
|
4254
|
+
usdc: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
|
|
4255
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4256
|
+
label: "OP Mainnet"
|
|
4257
|
+
},
|
|
4258
|
+
{
|
|
4259
|
+
chainId: 42161,
|
|
4260
|
+
domain: 3,
|
|
4261
|
+
network: "mainnet",
|
|
4262
|
+
usdc: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
|
|
4263
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4264
|
+
label: "Arbitrum"
|
|
4265
|
+
},
|
|
4266
|
+
{
|
|
4267
|
+
chainId: 8453,
|
|
4268
|
+
domain: 6,
|
|
4269
|
+
network: "mainnet",
|
|
4270
|
+
usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
4271
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4272
|
+
label: "Base"
|
|
4273
|
+
},
|
|
4274
|
+
{
|
|
4275
|
+
chainId: 137,
|
|
4276
|
+
domain: 7,
|
|
4277
|
+
network: "mainnet",
|
|
4278
|
+
usdc: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
|
|
4279
|
+
tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
|
|
4280
|
+
label: "Polygon PoS"
|
|
4281
|
+
},
|
|
4282
|
+
{
|
|
4283
|
+
chainId: 11155111,
|
|
4284
|
+
domain: 0,
|
|
4285
|
+
network: "testnet",
|
|
4286
|
+
usdc: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
|
|
4287
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4288
|
+
label: "Ethereum Sepolia"
|
|
4289
|
+
},
|
|
4290
|
+
{
|
|
4291
|
+
chainId: 43113,
|
|
4292
|
+
domain: 1,
|
|
4293
|
+
network: "testnet",
|
|
4294
|
+
usdc: "0x5425890298aed601595a70AB815c96711a31Bc65",
|
|
4295
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4296
|
+
label: "Avalanche Fuji"
|
|
4297
|
+
},
|
|
4298
|
+
{
|
|
4299
|
+
chainId: 11155420,
|
|
4300
|
+
domain: 2,
|
|
4301
|
+
network: "testnet",
|
|
4302
|
+
usdc: "0x5fd84259d66Cd46123540766Be93DFE6D43130D7",
|
|
4303
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4304
|
+
label: "OP Sepolia"
|
|
4305
|
+
},
|
|
4306
|
+
{
|
|
4307
|
+
chainId: 421614,
|
|
4308
|
+
domain: 3,
|
|
4309
|
+
network: "testnet",
|
|
4310
|
+
usdc: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
|
|
4311
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4312
|
+
label: "Arbitrum Sepolia"
|
|
4313
|
+
},
|
|
4314
|
+
{
|
|
4315
|
+
chainId: 84532,
|
|
4316
|
+
domain: 6,
|
|
4317
|
+
network: "testnet",
|
|
4318
|
+
usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
4319
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4320
|
+
label: "Base Sepolia"
|
|
4321
|
+
},
|
|
4322
|
+
{
|
|
4323
|
+
chainId: 80002,
|
|
4324
|
+
domain: 7,
|
|
4325
|
+
network: "testnet",
|
|
4326
|
+
usdc: "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582",
|
|
4327
|
+
tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
|
|
4328
|
+
label: "Polygon Amoy"
|
|
4329
|
+
}
|
|
4330
|
+
];
|
|
4331
|
+
function cctpChainConfig(chainId) {
|
|
4332
|
+
return CCTP_EVM_CHAINS.find((c) => c.chainId === chainId) ?? null;
|
|
4333
|
+
}
|
|
4334
|
+
function parseCctpEvmChainId(chainId) {
|
|
4335
|
+
if (typeof chainId === "number") {
|
|
4336
|
+
return Number.isFinite(chainId) ? chainId : Number.NaN;
|
|
4337
|
+
}
|
|
4338
|
+
const t = String(chainId).trim();
|
|
4339
|
+
if (!t) return Number.NaN;
|
|
4340
|
+
const low = t.toLowerCase();
|
|
4341
|
+
if (low.startsWith("eip155:")) {
|
|
4342
|
+
const n2 = Number.parseInt(t.slice("eip155:".length).trim(), 10);
|
|
4343
|
+
return Number.isFinite(n2) ? n2 : Number.NaN;
|
|
4344
|
+
}
|
|
4345
|
+
if (low.startsWith("0x")) {
|
|
4346
|
+
const n2 = Number.parseInt(t, 16);
|
|
4347
|
+
return Number.isFinite(n2) ? n2 : Number.NaN;
|
|
4348
|
+
}
|
|
4349
|
+
const n = Number.parseInt(t, 10);
|
|
4350
|
+
return Number.isFinite(n) ? n : Number.NaN;
|
|
4351
|
+
}
|
|
4352
|
+
function isCctpSourceChainSupported(chainId) {
|
|
4353
|
+
const n = parseCctpEvmChainId(chainId);
|
|
4354
|
+
return Number.isFinite(n) && cctpChainConfig(n) != null;
|
|
4355
|
+
}
|
|
4356
|
+
|
|
4357
|
+
// src/protocols/evm/circle-cctp/index.ts
|
|
4358
|
+
var circleCctpProtocolModule = {
|
|
4359
|
+
id: CIRCLE_CCTP_PROTOCOL_ID,
|
|
4360
|
+
chainCategory: "evm",
|
|
4361
|
+
isChainSupported(ctx) {
|
|
4362
|
+
if (ctx.chainCategory !== "evm") return false;
|
|
4363
|
+
return isCctpSourceChainSupported(ctx.chainId);
|
|
4364
|
+
},
|
|
4365
|
+
isTokenSupported(token) {
|
|
4366
|
+
return token.category === "evm" && token.kind === "erc20";
|
|
4367
|
+
},
|
|
4368
|
+
actions: [
|
|
4369
|
+
{
|
|
4370
|
+
id: "circle-cctp.fetch-routes",
|
|
4371
|
+
protocolId: CIRCLE_CCTP_PROTOCOL_ID,
|
|
4372
|
+
chainCategory: "evm",
|
|
4373
|
+
description: "List supported CCTP Forwarding Service routes (EVM)",
|
|
4374
|
+
commonParams: [],
|
|
4375
|
+
params: {
|
|
4376
|
+
network: { type: "string", required: false, description: "mainnet | testnet" }
|
|
4377
|
+
}
|
|
4378
|
+
},
|
|
4379
|
+
{
|
|
4380
|
+
id: "circle-cctp.fetch-fees",
|
|
4381
|
+
protocolId: CIRCLE_CCTP_PROTOCOL_ID,
|
|
4382
|
+
chainCategory: "evm",
|
|
4383
|
+
description: "Quote Iris Forwarding Service burn fees for a route",
|
|
4384
|
+
commonParams: [],
|
|
4385
|
+
params: {
|
|
4386
|
+
sourceChainId: { type: "number", required: true, description: "Source EIP-155 chain id" },
|
|
4387
|
+
destChainId: { type: "number", required: true, description: "Destination EIP-155 chain id" },
|
|
4388
|
+
transferAmountHuman: { type: "string", required: true, description: "USDC amount recipient receives" }
|
|
4389
|
+
}
|
|
4390
|
+
},
|
|
4391
|
+
{
|
|
4392
|
+
id: "circle-cctp.burn-forward",
|
|
4393
|
+
protocolId: CIRCLE_CCTP_PROTOCOL_ID,
|
|
4394
|
+
chainCategory: "evm",
|
|
4395
|
+
description: "Burn USDC on source chain via CCTP Forwarding Service (approve + depositForBurnWithHook batch)",
|
|
4396
|
+
commonParams: ["keyGen", "purposeText", "useCustomGas"],
|
|
4397
|
+
params: {
|
|
4398
|
+
sourceChainId: { type: "number", required: true, description: "Source EIP-155 chain id" },
|
|
4399
|
+
destChainId: { type: "number", required: true, description: "Destination EIP-155 chain id" },
|
|
4400
|
+
transferAmountHuman: { type: "string", required: true, description: "USDC amount recipient receives" },
|
|
4401
|
+
mintRecipient: { type: "address", required: false, description: "Destination mint recipient (default executor)" }
|
|
4402
|
+
}
|
|
4403
|
+
}
|
|
4404
|
+
]
|
|
4405
|
+
};
|
|
4406
|
+
registerProtocolModule(circleCctpProtocolModule);
|
|
4096
4407
|
var skillsDir = path.join(path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('catalog.cjs', document.baseURI).href)))), "skills");
|
|
4097
4408
|
var SKILL_PROTOCOL_IDS = [
|
|
4098
4409
|
"aave-v4",
|
|
@@ -4105,7 +4416,8 @@ var SKILL_PROTOCOL_IDS = [
|
|
|
4105
4416
|
"sky",
|
|
4106
4417
|
"gmx",
|
|
4107
4418
|
"hyperliquid",
|
|
4108
|
-
"morpho"
|
|
4419
|
+
"morpho",
|
|
4420
|
+
"circle-cctp"
|
|
4109
4421
|
];
|
|
4110
4422
|
function getToolsForProtocol(protocolId) {
|
|
4111
4423
|
return MCP_TOOL_DEFINITIONS.filter((t) => t.protocolId === protocolId);
|
|
@@ -4432,6 +4744,7 @@ registerProtocolModule(eulerV2ProtocolModule);
|
|
|
4432
4744
|
registerProtocolModule(gmxProtocolModule);
|
|
4433
4745
|
registerProtocolModule(hyperliquidProtocolModule);
|
|
4434
4746
|
registerProtocolModule(morphoProtocolModule);
|
|
4747
|
+
registerProtocolModule(circleCctpProtocolModule);
|
|
4435
4748
|
function getAgentCatalog() {
|
|
4436
4749
|
return {
|
|
4437
4750
|
protocols: getProtocolModules(),
|
|
@@ -4451,6 +4764,7 @@ function getAgentCatalog() {
|
|
|
4451
4764
|
gmx: gmxProtocolModule,
|
|
4452
4765
|
hyperliquid: hyperliquidProtocolModule,
|
|
4453
4766
|
morpho: morphoProtocolModule,
|
|
4767
|
+
circleCctp: circleCctpProtocolModule,
|
|
4454
4768
|
/** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
|
|
4455
4769
|
mcp: getAgentCatalogForMcp()
|
|
4456
4770
|
};
|