@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.
@@ -83,7 +83,7 @@ declare function getAgentCatalogForMcp(): {
83
83
  };
84
84
  };
85
85
  multisignSubmitOutput: {
86
- readonly description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with wait_for_sign_request_ready → sign_request_agree → trigger_sign_result → broadcast_sign_result. Do not call the same build tool again if requestId was returned.";
86
+ readonly description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with sign_request_agree → trigger_sign_result → 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.";
87
87
  readonly fields: {
88
88
  readonly requestId: {
89
89
  readonly type: "string";
@@ -95,7 +95,7 @@ declare function getAgentCatalogForMcp(): {
95
95
  };
96
96
  readonly followUp: {
97
97
  readonly type: "string";
98
- readonly description: "Lifecycle next steps (wait_for_sign_request_readyagreetrigger broadcast).";
98
+ readonly description: "Lifecycle next steps (sign_request_agreetrigger_sign_resultbroadcast_sign_result). No polling after submit.";
99
99
  };
100
100
  };
101
101
  };
@@ -223,12 +223,15 @@ declare const mcpServerSubmitOutputSchema: z.ZodObject<{
223
223
  requestId: z.ZodString;
224
224
  status: z.ZodOptional<z.ZodLiteral<"submitted">>;
225
225
  followUp: z.ZodOptional<z.ZodString>;
226
+ fees: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
226
227
  }, "strip", z.ZodTypeAny, {
227
228
  requestId: string;
229
+ fees?: Record<string, unknown> | undefined;
228
230
  status?: "submitted" | undefined;
229
231
  followUp?: string | undefined;
230
232
  }, {
231
233
  requestId: string;
234
+ fees?: Record<string, unknown> | undefined;
232
235
  status?: "submitted" | undefined;
233
236
  followUp?: string | undefined;
234
237
  }>;
@@ -239,7 +242,7 @@ declare const MCP_NON_SUBMIT_TOOL_NAMES: Set<string>;
239
242
  declare const EVM_COMMON_PARAM_DOCS: Record<string, ParamDoc>;
240
243
  /** MCP agent path: build_* tools auto-submit and return requestId. */
241
244
  declare const MULTISIGN_SUBMIT_OUTPUT_DOC: {
242
- readonly description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with wait_for_sign_request_ready → sign_request_agree → trigger_sign_result → broadcast_sign_result. Do not call the same build tool again if requestId was returned.";
245
+ readonly description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with sign_request_agree → trigger_sign_result → 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.";
243
246
  readonly fields: {
244
247
  readonly requestId: {
245
248
  readonly type: "string";
@@ -251,7 +254,7 @@ declare const MULTISIGN_SUBMIT_OUTPUT_DOC: {
251
254
  };
252
255
  readonly followUp: {
253
256
  readonly type: "string";
254
- readonly description: "Lifecycle next steps (wait_for_sign_request_readyagreetrigger broadcast).";
257
+ readonly description: "Lifecycle next steps (sign_request_agreetrigger_sign_resultbroadcast_sign_result). No polling after submit.";
255
258
  };
256
259
  };
257
260
  };
@@ -5484,6 +5487,7 @@ declare function getAgentCatalog(): {
5484
5487
  gmx: ProtocolModule;
5485
5488
  hyperliquid: ProtocolModule;
5486
5489
  morpho: ProtocolModule;
5490
+ circleCctp: ProtocolModule;
5487
5491
  /** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
5488
5492
  mcp: {
5489
5493
  tools: readonly McpToolDefinition[];
@@ -5503,7 +5507,7 @@ declare function getAgentCatalog(): {
5503
5507
  };
5504
5508
  };
5505
5509
  multisignSubmitOutput: {
5506
- readonly description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with wait_for_sign_request_ready → sign_request_agree → trigger_sign_result → broadcast_sign_result. Do not call the same build tool again if requestId was returned.";
5510
+ readonly description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with sign_request_agree → trigger_sign_result → 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.";
5507
5511
  readonly fields: {
5508
5512
  readonly requestId: {
5509
5513
  readonly type: "string";
@@ -5515,7 +5519,7 @@ declare function getAgentCatalog(): {
5515
5519
  };
5516
5520
  readonly followUp: {
5517
5521
  readonly type: "string";
5518
- readonly description: "Lifecycle next steps (wait_for_sign_request_readyagreetrigger broadcast).";
5522
+ readonly description: "Lifecycle next steps (sign_request_agreetrigger_sign_resultbroadcast_sign_result). No polling after submit.";
5519
5523
  };
5520
5524
  };
5521
5525
  };
@@ -408,7 +408,7 @@ var EVM_COMMON_PARAM_DOCS = {
408
408
  }
409
409
  };
410
410
  var MULTISIGN_SUBMIT_OUTPUT_DOC = {
411
- description: "Submitted mpc-auth multiSignRequest id. continuum-mcp-server builds, signs the management envelope, and POSTs /multiSignRequest. Continue with wait_for_sign_request_ready \u2192 sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result. Do not call the same build tool again if requestId was returned.",
411
+ 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.",
412
412
  fields: {
413
413
  requestId: {
414
414
  type: "string",
@@ -420,7 +420,7 @@ var MULTISIGN_SUBMIT_OUTPUT_DOC = {
420
420
  },
421
421
  followUp: {
422
422
  type: "string",
423
- description: "Lifecycle next steps (wait_for_sign_request_ready \u2192 agree \u2192 trigger \u2192 broadcast)."
423
+ description: "Lifecycle next steps (sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result). No polling after submit."
424
424
  }
425
425
  }
426
426
  };
@@ -478,7 +478,6 @@ var MANAGEMENT_SIG_DOC = {
478
478
  // src/agent/mcpMultisignSubmitMeta.ts
479
479
  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.";
480
480
  var MCP_MULTISIGN_SUBMIT_FOLLOW_UP = [
481
- "wait_for_sign_request_ready",
482
481
  "sign_request_agree",
483
482
  "trigger_sign_result",
484
483
  "broadcast_sign_result"
@@ -1256,9 +1255,10 @@ var mcpServerSubmitOutputSchema = z.object({
1256
1255
  status: z.literal("submitted").optional().describe("Present when POST /multiSignRequest succeeded. Confirms the request exists on the node."),
1257
1256
  followUp: z.string().optional().describe(
1258
1257
  "Next MCP lifecycle steps. Do not call the same build_*_multisign tool again unless the user explicitly wants a duplicate order."
1259
- )
1258
+ ),
1259
+ fees: z.record(z.unknown()).optional().describe("Protocol fee summary when available (e.g. Circle CCTP Forwarding Service quote used at propose).")
1260
1260
  }).describe(
1261
- "Submitted mpc-auth multiSignRequest. Continue with wait_for_sign_request_ready \u2192 sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result."
1261
+ "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."
1262
1262
  );
1263
1263
  var MCP_NON_SUBMIT_TOOL_NAMES = /* @__PURE__ */ new Set([
1264
1264
  "ctm_uniswap_v4_quote",
@@ -2031,6 +2031,70 @@ var mcpHyperliquidUndelegateInputSchema = mcpHyperliquidMultisignInput(
2031
2031
  },
2032
2032
  preprocessHyperliquidUndelegateInput
2033
2033
  );
2034
+ var mcpCctpFeeFieldsSchema = z.object({
2035
+ feeTierUsed: z.enum(["low", "med", "high"]),
2036
+ maxFee: z.string().describe("Selected tier max fee in USDC base units (6 decimals)"),
2037
+ maxFeeHuman: z.string().describe("Human-readable USDC max forwarding fee for feeTierUsed"),
2038
+ forwardFeeLow: z.string(),
2039
+ forwardFeeLowHuman: z.string(),
2040
+ forwardFeeMed: z.string(),
2041
+ forwardFeeMedHuman: z.string(),
2042
+ forwardFeeHigh: z.string(),
2043
+ forwardFeeHighHuman: z.string(),
2044
+ transferAmount: z.string().optional(),
2045
+ transferAmountHuman: z.string().optional(),
2046
+ totalBurn: z.string().optional().describe("transferAmount + maxFee when transferAmountHuman was provided"),
2047
+ totalBurnHuman: z.string().optional(),
2048
+ feeSummary: z.string().describe("Plain-language fee summary for agents")
2049
+ });
2050
+ var mcpCctpFetchSupportedRoutesInputSchema = z.object({
2051
+ network: z.enum(["mainnet", "testnet"]).optional().describe("Filter routes by network; omit for all")
2052
+ });
2053
+ var mcpCctpFetchSupportedRoutesOutputSchema = jsonObjectSchema.describe(
2054
+ "{ routes: [{ sourceChainId, destChainId, sourceDomain, destDomain, sourceLabel, destLabel, network }] }"
2055
+ );
2056
+ var mcpCctpFetchBurnFeesInputSchema = z.object({
2057
+ sourceChainId: agentEvmChainIdSchema.describe("Source chain EIP-155 id (burn chain)"),
2058
+ destChainId: agentEvmChainIdSchema.describe("Destination chain EIP-155 id (mint chain)"),
2059
+ transferAmountHuman: z.string().min(1).optional().describe("Human USDC amount recipient receives (6 decimals). Omit for tier fees only; include for totalBurn."),
2060
+ feeTier: z.enum(["low", "med", "high"]).optional().describe("Iris forwardFee tier; default med")
2061
+ });
2062
+ var mcpCctpFetchBurnFeesOutputSchema = z.object({
2063
+ sourceChainId: z.number(),
2064
+ destChainId: z.number(),
2065
+ sourceDomain: z.number(),
2066
+ destDomain: z.number(),
2067
+ sourceLabel: z.string(),
2068
+ destLabel: z.string(),
2069
+ network: z.enum(["mainnet", "testnet"]),
2070
+ fees: mcpCctpFeeFieldsSchema
2071
+ }).passthrough().describe("Iris Forwarding Service fee quote with human-readable USDC amounts in fees and top-level fee fields");
2072
+ var mcpCctpFetchUsdcBalanceInputSchema = z.object({
2073
+ chainId: agentEvmChainIdSchema.describe("Source chain to read USDC balance on"),
2074
+ executorAddress: evmAddressSchema.optional().describe("Server-filled from keyGenId when omitted"),
2075
+ rpcUrl: z.string().min(1).optional().describe("Server-filled from chain registry"),
2076
+ transferAmountHuman: z.string().min(1).optional().describe("When set with feeSnapshot, returns requiredTotalBurn* and sufficientForTransfer"),
2077
+ feeSnapshot: jsonObjectSchema.optional().describe("Output from ctm_cctp_fetch_burn_fees (uses maxFee) for balance sufficiency check")
2078
+ });
2079
+ var mcpCctpFetchUsdcBalanceOutputSchema = jsonObjectSchema.describe(
2080
+ "{ balanceUsdcHuman, balanceRaw, usdcAddress, requiredTotalBurnHuman?, sufficientForTransfer?, feeSummary? }"
2081
+ );
2082
+ var mcpCctpFetchTransferStatusInputSchema = z.object({
2083
+ sourceChainId: agentEvmChainIdSchema.describe("Source chain where burn was executed"),
2084
+ sourceDomain: z.number().int().min(0).describe("CCTP domain id of source chain"),
2085
+ burnTxHash: z.string().min(1).describe("Burn transaction hash (0x-prefixed or raw)")
2086
+ });
2087
+ var mcpCctpFetchTransferStatusOutputSchema = jsonObjectSchema.describe(
2088
+ "{ status, attestation?, message?, eventNonce? } from Iris /v2/messages"
2089
+ );
2090
+ var mcpCctpBuildBurnMultisignInputSchema = mcpMultisignInput({
2091
+ destChainId: agentEvmChainIdSchema.describe("Destination chain EIP-155 id (mint chain)"),
2092
+ transferAmountHuman: z.string().min(1).describe("Human USDC amount recipient receives"),
2093
+ mintRecipient: evmAddressSchema.optional().describe("Recipient on destination chain; defaults to MPC executor address"),
2094
+ feeTier: z.enum(["low", "med", "high"]).optional(),
2095
+ minFinalityThreshold: z.number().int().positive().optional(),
2096
+ feeSnapshot: jsonObjectSchema.optional().describe("Optional output from ctm_cctp_fetch_burn_fees")
2097
+ });
2034
2098
 
2035
2099
  // src/agent/mcpProtocolTools.ts
2036
2100
  function defineProtocolMcpTool(def) {
@@ -2585,6 +2649,26 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
2585
2649
  prerequisites: ["keyGen", "executorAddress", "delegation from fetch_delegations"],
2586
2650
  handler: { importPath: "protocols/evm/hyperliquid", exportName: "buildEvmMultisignBodyHyperliquidUndelegateBatch" },
2587
2651
  inputZod: mcpHyperliquidUndelegateInputSchema
2652
+ }),
2653
+ defineProtocolMcpTool({
2654
+ name: "ctm_cctp_build_burn_multisign",
2655
+ actionId: "circle-cctp.burn-forward",
2656
+ protocolId: "circle-cctp",
2657
+ chainCategory: "evm",
2658
+ description: "Create and submit mpc-auth multiSignRequest for CCTP Forwarding Service USDC transfer (approve + depositForBurnWithHook on source chain).",
2659
+ prerequisites: [
2660
+ "ctm_cctp_fetch_burn_fees (required)",
2661
+ "keyGenId",
2662
+ "chainId = source chain",
2663
+ "destChainId",
2664
+ "transferAmountHuman",
2665
+ "sufficient USDC on source"
2666
+ ],
2667
+ handler: {
2668
+ importPath: "protocols/evm/circle-cctp",
2669
+ exportName: "buildEvmMultisignBodyCctpBurnBatchFromMcp"
2670
+ },
2671
+ inputZod: mcpCctpBuildBurnMultisignInputSchema
2588
2672
  })
2589
2673
  ];
2590
2674
 
@@ -3119,6 +3203,54 @@ var CORE_MCP_TOOL_DEFINITIONS = [
3119
3203
  inputZod: mcpEulerV2FetchLendVaultsInputSchema,
3120
3204
  outputZod: mcpEulerV2FetchLendVaultsOutputSchema
3121
3205
  }),
3206
+ defineMcpTool({
3207
+ name: "ctm_cctp_fetch_supported_routes",
3208
+ actionId: "circle-cctp.fetch-routes",
3209
+ protocolId: "circle-cctp",
3210
+ chainCategory: "evm",
3211
+ description: "List supported Circle CCTP V2 Forwarding Service routes (EVM source \u2192 destination pairs on mainnet or testnet). Read-only.",
3212
+ prerequisites: ["load_defi_protocol", "get_chain_registry"],
3213
+ followUp: ["ctm_cctp_fetch_burn_fees"],
3214
+ handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchSupportedRoutes" },
3215
+ inputZod: mcpCctpFetchSupportedRoutesInputSchema,
3216
+ outputZod: mcpCctpFetchSupportedRoutesOutputSchema
3217
+ }),
3218
+ defineMcpTool({
3219
+ name: "ctm_cctp_fetch_burn_fees",
3220
+ actionId: "circle-cctp.fetch-fees",
3221
+ protocolId: "circle-cctp",
3222
+ chainCategory: "evm",
3223
+ 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.",
3224
+ prerequisites: ["supported route (ctm_cctp_fetch_supported_routes)"],
3225
+ followUp: ["ctm_cctp_fetch_usdc_balance", "ctm_cctp_build_burn_multisign"],
3226
+ handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchBurnFeesForRoute" },
3227
+ inputZod: mcpCctpFetchBurnFeesInputSchema,
3228
+ outputZod: mcpCctpFetchBurnFeesOutputSchema
3229
+ }),
3230
+ defineMcpTool({
3231
+ name: "ctm_cctp_fetch_usdc_balance",
3232
+ actionId: "circle-cctp.fetch-usdc-balance",
3233
+ protocolId: "circle-cctp",
3234
+ chainCategory: "evm",
3235
+ description: "Read MPC wallet USDC balance on a CCTP source chain. Read-only.",
3236
+ prerequisites: ["chainId (source)", "executorAddress or keyGenId"],
3237
+ followUp: ["ctm_cctp_build_burn_multisign"],
3238
+ handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchUsdcBalance" },
3239
+ inputZod: mcpCctpFetchUsdcBalanceInputSchema,
3240
+ outputZod: mcpCctpFetchUsdcBalanceOutputSchema
3241
+ }),
3242
+ defineMcpTool({
3243
+ name: "ctm_cctp_fetch_transfer_status",
3244
+ actionId: "circle-cctp.fetch-status",
3245
+ protocolId: "circle-cctp",
3246
+ chainCategory: "evm",
3247
+ description: "Poll Circle Iris for CCTP message/attestation status after source-chain burn Execute. Read-only.",
3248
+ prerequisites: ["sourceChainId", "sourceDomain", "burnTxHash from broadcast"],
3249
+ followUp: [],
3250
+ handler: { importPath: "protocols/evm/circle-cctp", exportName: "cctpFetchTransferStatus" },
3251
+ inputZod: mcpCctpFetchTransferStatusInputSchema,
3252
+ outputZod: mcpCctpFetchTransferStatusOutputSchema
3253
+ }),
3122
3254
  defineMcpTool({
3123
3255
  name: "ctm_morpho_fetch_earn_vaults",
3124
3256
  actionId: "morpho.fetch-earn-vaults",
@@ -3186,7 +3318,7 @@ function getAgentCatalogForMcp() {
3186
3318
  "1. Quote (protocol-specific API if needed)",
3187
3319
  "2. Build protocol calldata (e.g. create_swap)",
3188
3320
  "3. build_*_multisign \u2192 { requestId } (MCP auto-submits)",
3189
- "4. wait_for_sign_request_ready \u2192 sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result"
3321
+ "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)"
3190
3322
  ],
3191
3323
  evmSwapManualTypical: [
3192
3324
  "1. Quote (protocol-specific API if needed)",
@@ -3205,7 +3337,7 @@ function getAgentCatalogForMcp() {
3205
3337
  "1. load_defi_protocol for the target protocol",
3206
3338
  "2. get_defi_protocol_supported_chains / get_token_registry to pick chainId and tokens",
3207
3339
  "3. MCP build_* tool with keyGenId + chainId \u2192 { requestId }",
3208
- "4. Base MCP: wait_for_sign_request_ready \u2192 sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result"
3340
+ "4. Base MCP: sign_request_agree \u2192 trigger_sign_result \u2192 broadcast_sign_result (no wait_for_sign_request_ready polling after submit)"
3209
3341
  ]
3210
3342
  }
3211
3343
  };
@@ -4090,6 +4222,185 @@ var morphoProtocolModule = {
4090
4222
  ]
4091
4223
  };
4092
4224
  registerProtocolModule(morphoProtocolModule);
4225
+
4226
+ // src/protocols/evm/circle-cctp/constants.ts
4227
+ var CIRCLE_CCTP_PROTOCOL_ID = "circle-cctp";
4228
+ var TOKEN_MESSENGER_V2_MAINNET = "0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d";
4229
+ var TOKEN_MESSENGER_V2_TESTNET = "0x8FE6B999Dc680CcFDD5Bf7EB0974218be2542DAA";
4230
+ var CCTP_EVM_CHAINS = [
4231
+ {
4232
+ chainId: 1,
4233
+ domain: 0,
4234
+ network: "mainnet",
4235
+ usdc: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
4236
+ tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
4237
+ label: "Ethereum"
4238
+ },
4239
+ {
4240
+ chainId: 43114,
4241
+ domain: 1,
4242
+ network: "mainnet",
4243
+ usdc: "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
4244
+ tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
4245
+ label: "Avalanche"
4246
+ },
4247
+ {
4248
+ chainId: 10,
4249
+ domain: 2,
4250
+ network: "mainnet",
4251
+ usdc: "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
4252
+ tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
4253
+ label: "OP Mainnet"
4254
+ },
4255
+ {
4256
+ chainId: 42161,
4257
+ domain: 3,
4258
+ network: "mainnet",
4259
+ usdc: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
4260
+ tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
4261
+ label: "Arbitrum"
4262
+ },
4263
+ {
4264
+ chainId: 8453,
4265
+ domain: 6,
4266
+ network: "mainnet",
4267
+ usdc: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
4268
+ tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
4269
+ label: "Base"
4270
+ },
4271
+ {
4272
+ chainId: 137,
4273
+ domain: 7,
4274
+ network: "mainnet",
4275
+ usdc: "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
4276
+ tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
4277
+ label: "Polygon PoS"
4278
+ },
4279
+ {
4280
+ chainId: 11155111,
4281
+ domain: 0,
4282
+ network: "testnet",
4283
+ usdc: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
4284
+ tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
4285
+ label: "Ethereum Sepolia"
4286
+ },
4287
+ {
4288
+ chainId: 43113,
4289
+ domain: 1,
4290
+ network: "testnet",
4291
+ usdc: "0x5425890298aed601595a70AB815c96711a31Bc65",
4292
+ tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
4293
+ label: "Avalanche Fuji"
4294
+ },
4295
+ {
4296
+ chainId: 11155420,
4297
+ domain: 2,
4298
+ network: "testnet",
4299
+ usdc: "0x5fd84259d66Cd46123540766Be93DFE6D43130D7",
4300
+ tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
4301
+ label: "OP Sepolia"
4302
+ },
4303
+ {
4304
+ chainId: 421614,
4305
+ domain: 3,
4306
+ network: "testnet",
4307
+ usdc: "0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d",
4308
+ tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
4309
+ label: "Arbitrum Sepolia"
4310
+ },
4311
+ {
4312
+ chainId: 84532,
4313
+ domain: 6,
4314
+ network: "testnet",
4315
+ usdc: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
4316
+ tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
4317
+ label: "Base Sepolia"
4318
+ },
4319
+ {
4320
+ chainId: 80002,
4321
+ domain: 7,
4322
+ network: "testnet",
4323
+ usdc: "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582",
4324
+ tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
4325
+ label: "Polygon Amoy"
4326
+ }
4327
+ ];
4328
+ function cctpChainConfig(chainId) {
4329
+ return CCTP_EVM_CHAINS.find((c) => c.chainId === chainId) ?? null;
4330
+ }
4331
+ function parseCctpEvmChainId(chainId) {
4332
+ if (typeof chainId === "number") {
4333
+ return Number.isFinite(chainId) ? chainId : Number.NaN;
4334
+ }
4335
+ const t = String(chainId).trim();
4336
+ if (!t) return Number.NaN;
4337
+ const low = t.toLowerCase();
4338
+ if (low.startsWith("eip155:")) {
4339
+ const n2 = Number.parseInt(t.slice("eip155:".length).trim(), 10);
4340
+ return Number.isFinite(n2) ? n2 : Number.NaN;
4341
+ }
4342
+ if (low.startsWith("0x")) {
4343
+ const n2 = Number.parseInt(t, 16);
4344
+ return Number.isFinite(n2) ? n2 : Number.NaN;
4345
+ }
4346
+ const n = Number.parseInt(t, 10);
4347
+ return Number.isFinite(n) ? n : Number.NaN;
4348
+ }
4349
+ function isCctpSourceChainSupported(chainId) {
4350
+ const n = parseCctpEvmChainId(chainId);
4351
+ return Number.isFinite(n) && cctpChainConfig(n) != null;
4352
+ }
4353
+
4354
+ // src/protocols/evm/circle-cctp/index.ts
4355
+ var circleCctpProtocolModule = {
4356
+ id: CIRCLE_CCTP_PROTOCOL_ID,
4357
+ chainCategory: "evm",
4358
+ isChainSupported(ctx) {
4359
+ if (ctx.chainCategory !== "evm") return false;
4360
+ return isCctpSourceChainSupported(ctx.chainId);
4361
+ },
4362
+ isTokenSupported(token) {
4363
+ return token.category === "evm" && token.kind === "erc20";
4364
+ },
4365
+ actions: [
4366
+ {
4367
+ id: "circle-cctp.fetch-routes",
4368
+ protocolId: CIRCLE_CCTP_PROTOCOL_ID,
4369
+ chainCategory: "evm",
4370
+ description: "List supported CCTP Forwarding Service routes (EVM)",
4371
+ commonParams: [],
4372
+ params: {
4373
+ network: { type: "string", required: false, description: "mainnet | testnet" }
4374
+ }
4375
+ },
4376
+ {
4377
+ id: "circle-cctp.fetch-fees",
4378
+ protocolId: CIRCLE_CCTP_PROTOCOL_ID,
4379
+ chainCategory: "evm",
4380
+ description: "Quote Iris Forwarding Service burn fees for a route",
4381
+ commonParams: [],
4382
+ params: {
4383
+ sourceChainId: { type: "number", required: true, description: "Source EIP-155 chain id" },
4384
+ destChainId: { type: "number", required: true, description: "Destination EIP-155 chain id" },
4385
+ transferAmountHuman: { type: "string", required: true, description: "USDC amount recipient receives" }
4386
+ }
4387
+ },
4388
+ {
4389
+ id: "circle-cctp.burn-forward",
4390
+ protocolId: CIRCLE_CCTP_PROTOCOL_ID,
4391
+ chainCategory: "evm",
4392
+ description: "Burn USDC on source chain via CCTP Forwarding Service (approve + depositForBurnWithHook batch)",
4393
+ commonParams: ["keyGen", "purposeText", "useCustomGas"],
4394
+ params: {
4395
+ sourceChainId: { type: "number", required: true, description: "Source EIP-155 chain id" },
4396
+ destChainId: { type: "number", required: true, description: "Destination EIP-155 chain id" },
4397
+ transferAmountHuman: { type: "string", required: true, description: "USDC amount recipient receives" },
4398
+ mintRecipient: { type: "address", required: false, description: "Destination mint recipient (default executor)" }
4399
+ }
4400
+ }
4401
+ ]
4402
+ };
4403
+ registerProtocolModule(circleCctpProtocolModule);
4093
4404
  var skillsDir = join(dirname(fileURLToPath(import.meta.url)), "skills");
4094
4405
  var SKILL_PROTOCOL_IDS = [
4095
4406
  "aave-v4",
@@ -4102,7 +4413,8 @@ var SKILL_PROTOCOL_IDS = [
4102
4413
  "sky",
4103
4414
  "gmx",
4104
4415
  "hyperliquid",
4105
- "morpho"
4416
+ "morpho",
4417
+ "circle-cctp"
4106
4418
  ];
4107
4419
  function getToolsForProtocol(protocolId) {
4108
4420
  return MCP_TOOL_DEFINITIONS.filter((t) => t.protocolId === protocolId);
@@ -4429,6 +4741,7 @@ registerProtocolModule(eulerV2ProtocolModule);
4429
4741
  registerProtocolModule(gmxProtocolModule);
4430
4742
  registerProtocolModule(hyperliquidProtocolModule);
4431
4743
  registerProtocolModule(morphoProtocolModule);
4744
+ registerProtocolModule(circleCctpProtocolModule);
4432
4745
  function getAgentCatalog() {
4433
4746
  return {
4434
4747
  protocols: getProtocolModules(),
@@ -4448,6 +4761,7 @@ function getAgentCatalog() {
4448
4761
  gmx: gmxProtocolModule,
4449
4762
  hyperliquid: hyperliquidProtocolModule,
4450
4763
  morpho: morphoProtocolModule,
4764
+ circleCctp: circleCctpProtocolModule,
4451
4765
  /** Prefer getAgentCatalogForMcp() or getMcpToolDefinitions() for MCP servers. */
4452
4766
  mcp: getAgentCatalogForMcp()
4453
4767
  };