@continuumdao/ctm-mpc-defi 0.2.39 → 0.2.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/agent/catalog.cjs +50 -10
  2. package/dist/agent/catalog.cjs.map +1 -1
  3. package/dist/agent/catalog.js +50 -10
  4. package/dist/agent/catalog.js.map +1 -1
  5. package/dist/agent/skills/aave-v4/SKILL.md +1 -1
  6. package/dist/agent/skills/circle-cctp/SKILL.md +1 -0
  7. package/dist/agent/skills/gmx/SKILL.md +4 -4
  8. package/dist/agent/skills/morpho/SKILL.md +11 -0
  9. package/dist/agent/skills/uniswap-v4/SKILL.md +1 -1
  10. package/dist/chains/evm/index.cjs +1 -0
  11. package/dist/chains/evm/index.cjs.map +1 -1
  12. package/dist/chains/evm/index.js +1 -0
  13. package/dist/chains/evm/index.js.map +1 -1
  14. package/dist/index.cjs +7 -2
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.js +7 -2
  17. package/dist/index.js.map +1 -1
  18. package/dist/protocols/evm/circle-cctp/index.cjs +16 -0
  19. package/dist/protocols/evm/circle-cctp/index.cjs.map +1 -1
  20. package/dist/protocols/evm/circle-cctp/index.js +16 -0
  21. package/dist/protocols/evm/circle-cctp/index.js.map +1 -1
  22. package/dist/protocols/evm/euler-v2/index.cjs +1 -0
  23. package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
  24. package/dist/protocols/evm/euler-v2/index.js +1 -0
  25. package/dist/protocols/evm/euler-v2/index.js.map +1 -1
  26. package/dist/protocols/evm/gmx/index.cjs +17 -7
  27. package/dist/protocols/evm/gmx/index.cjs.map +1 -1
  28. package/dist/protocols/evm/gmx/index.d.ts +7 -1
  29. package/dist/protocols/evm/gmx/index.js +17 -7
  30. package/dist/protocols/evm/gmx/index.js.map +1 -1
  31. package/dist/protocols/evm/morpho/index.cjs +21 -2
  32. package/dist/protocols/evm/morpho/index.cjs.map +1 -1
  33. package/dist/protocols/evm/morpho/index.d.ts +12 -1
  34. package/dist/protocols/evm/morpho/index.js +17 -3
  35. package/dist/protocols/evm/morpho/index.js.map +1 -1
  36. package/dist/protocols/evm/permit2/index.cjs.map +1 -1
  37. package/dist/protocols/evm/permit2/index.js.map +1 -1
  38. package/dist/protocols/evm/uniswap-v4/index.cjs +6 -2
  39. package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
  40. package/dist/protocols/evm/uniswap-v4/index.js +6 -2
  41. package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
  42. package/package.json +2 -2
@@ -541,7 +541,9 @@ var UNIVERSAL_ROUTER_SPENDER = {
541
541
  4217: "0x1febb76be10aaf3a1402f04e8e835f2c382f7914",
542
542
  196: "0x5507749f2c558bb3e162c6e90c314c092e7372ff",
543
543
  /** Robinhood Chain mainnet — Universal Router v2.1.1 (Trade API / interface) */
544
- 4663: "0x8876789976decbfcbbbe364623c63652db8c0904"
544
+ 4663: "0x8876789976decbfcbbbe364623c63652db8c0904",
545
+ /** Circle Arc mainnet — official Uniswap v4 deployments */
546
+ 5042: "0x4fcA4a51Ab4F23A7447b3284fBd7D73289A89Fb1"
545
547
  };
546
548
  function isUniswapV4ChainSupported(chainId) {
547
549
  if (chainId == null) return false;
@@ -5145,7 +5147,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
5145
5147
  actionId: "gmx.gmDeposit",
5146
5148
  protocolId: "gmx",
5147
5149
  chainCategory: "evm",
5148
- description: "Create and submit mpc-auth multiSignRequest for GMX GM pool deposit (ExchangeRouter multicall). Keeper executes asynchronously.",
5150
+ description: "Create and submit mpc-auth multiSignRequest for GMX v2.2c GM pool deposit (approve SyntheticsRouter, ExchangeRouter multicall). Keeper executes asynchronously.",
5149
5151
  prerequisites: ["keyGen", "executorAddress", "marketSymbol", "collateral token"],
5150
5152
  handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxGmDepositBatch" },
5151
5153
  inputZod: mcpGmxGmDepositInputSchema
@@ -5155,7 +5157,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
5155
5157
  actionId: "gmx.gmWithdraw",
5156
5158
  protocolId: "gmx",
5157
5159
  chainCategory: "evm",
5158
- description: "Create and submit mpc-auth multiSignRequest for GMX GM pool withdrawal (ExchangeRouter multicall). Keeper executes asynchronously.",
5160
+ description: "Create and submit mpc-auth multiSignRequest for GMX v2.2c GM pool withdrawal (approve SyntheticsRouter, ExchangeRouter multicall). Keeper executes asynchronously.",
5159
5161
  prerequisites: ["keyGen", "executorAddress", "GM market token balance"],
5160
5162
  handler: { importPath: "protocols/evm/gmx", exportName: "buildEvmMultisignBodyGmxGmWithdrawBatch" },
5161
5163
  inputZod: mcpGmxGmWithdrawInputSchema
@@ -8457,7 +8459,14 @@ function gmxResolvedApiBaseUrls(chainId) {
8457
8459
  if (!primary) {
8458
8460
  throw new Error(`GMX API URLs are not configured for chain ${chainId}.`);
8459
8461
  }
8460
- return [primary, ...getApiFallbackUrls(chainId)];
8462
+ const urls = [primary, ...getApiFallbackUrls(chainId)].map((url) => url.replace(/\/$/, ""));
8463
+ const peer = gmxApiPeerFallback(urls[0]);
8464
+ if (peer && !urls.includes(peer)) urls.push(peer);
8465
+ return urls;
8466
+ }
8467
+ function gmxApiPeerFallback(primary) {
8468
+ if (primary.includes(".gmxapi.io")) return primary.replace(".gmxapi.io", ".gmxapi.ai");
8469
+ return void 0;
8461
8470
  }
8462
8471
  function buildGmxUrl(baseUrl, path, query) {
8463
8472
  const base = baseUrl.replace(/\/$/, "");
@@ -8626,7 +8635,7 @@ var gmxProtocolModule = {
8626
8635
  id: "gmx.gmDeposit",
8627
8636
  protocolId: GMX_PROTOCOL_ID,
8628
8637
  chainCategory: "evm",
8629
- description: "Deposit collateral into a GMX GM liquidity pool (ExchangeRouter multicall)",
8638
+ description: "Deposit collateral into a GMX v2.2c GM liquidity pool (ExchangeRouter multicall)",
8630
8639
  commonParams: ["keyGen", "purposeText", "useCustomGas"],
8631
8640
  params: {
8632
8641
  marketSymbol: { type: "string", required: true, description: "GM market symbol e.g. ETH/USD [WETH-USDC]" },
@@ -8638,7 +8647,7 @@ var gmxProtocolModule = {
8638
8647
  id: "gmx.gmWithdraw",
8639
8648
  protocolId: GMX_PROTOCOL_ID,
8640
8649
  chainCategory: "evm",
8641
- description: "Withdraw GM market tokens from a GMX liquidity pool",
8650
+ description: "Withdraw GM market tokens from a GMX v2.2c liquidity pool",
8642
8651
  commonParams: ["keyGen", "purposeText", "useCustomGas"],
8643
8652
  params: {
8644
8653
  marketSymbol: { type: "string", required: true, description: "GM market symbol" },
@@ -8978,6 +8987,16 @@ registerProtocolModule(arcusProtocolModule);
8978
8987
 
8979
8988
  // src/protocols/evm/morpho/api.ts
8980
8989
  init_defiProxy();
8990
+
8991
+ // src/protocols/evm/morpho/support.ts
8992
+ var ARC_MAINNET_CHAIN_ID = 5042;
8993
+ var ARC_TESTNET_CHAIN_ID = 5042002;
8994
+ var MORPHO_EXTRA_SUPPORTED_CHAIN_IDS = [ARC_MAINNET_CHAIN_ID, ARC_TESTNET_CHAIN_ID];
8995
+ function isMorphoArcChainId(chainId) {
8996
+ return chainId === ARC_MAINNET_CHAIN_ID || chainId === ARC_TESTNET_CHAIN_ID;
8997
+ }
8998
+
8999
+ // src/protocols/evm/morpho/api.ts
8981
9000
  var MORPHO_GRAPHQL_URL = "https://api.morpho.org/graphql";
8982
9001
  async function morphoGql(query, variables) {
8983
9002
  const body = { query, variables: variables ?? {} };
@@ -9000,14 +9019,18 @@ async function fetchMorphoChains() {
9000
9019
  `);
9001
9020
  return d.chains ?? [];
9002
9021
  }
9003
- async function loadMorphoSupportedChainIds() {
9004
- const rows = await fetchMorphoChains();
9022
+ function mergeMorphoSupportedChainIds(rows) {
9005
9023
  const s = /* @__PURE__ */ new Set();
9006
9024
  for (const c of rows) {
9007
9025
  if (typeof c.id === "number" && Number.isFinite(c.id)) s.add(c.id);
9008
9026
  }
9027
+ for (const id of MORPHO_EXTRA_SUPPORTED_CHAIN_IDS) s.add(id);
9009
9028
  return s;
9010
9029
  }
9030
+ async function loadMorphoSupportedChainIds() {
9031
+ const rows = await fetchMorphoChains();
9032
+ return mergeMorphoSupportedChainIds(rows);
9033
+ }
9011
9034
  var VAULT_PAGE_SIZE = 100;
9012
9035
  async function fetchMorphoVaultsForChain(chainId, first = 100) {
9013
9036
  const d = await morphoGql(
@@ -9283,6 +9306,22 @@ var CCTP_EVM_CHAINS = [
9283
9306
  usdc: "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582",
9284
9307
  tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
9285
9308
  label: "Polygon Amoy"
9309
+ },
9310
+ {
9311
+ chainId: 5042,
9312
+ domain: 26,
9313
+ network: "mainnet",
9314
+ usdc: "0x3600000000000000000000000000000000000000",
9315
+ tokenMessenger: TOKEN_MESSENGER_V2_MAINNET,
9316
+ label: "Arc"
9317
+ },
9318
+ {
9319
+ chainId: 5042002,
9320
+ domain: 26,
9321
+ network: "testnet",
9322
+ usdc: "0x3600000000000000000000000000000000000000",
9323
+ tokenMessenger: TOKEN_MESSENGER_V2_TESTNET,
9324
+ label: "Arc Testnet"
9286
9325
  }
9287
9326
  ];
9288
9327
  function cctpChainConfig(chainId) {
@@ -10907,7 +10946,8 @@ var PROTOCOL_SUPPORT_ADVISORS = {
10907
10946
  59144,
10908
10947
  4217,
10909
10948
  196,
10910
- 4663
10949
+ 4663,
10950
+ 5042
10911
10951
  ]) {
10912
10952
  if (isUniswapV4ChainSupported(id)) ids.push(id);
10913
10953
  }
@@ -11015,7 +11055,7 @@ var PROTOCOL_SUPPORT_ADVISORS = {
11015
11055
  }));
11016
11056
  return {
11017
11057
  tokens,
11018
- 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."
11058
+ 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.' : isMorphoArcChainId(chainId) ? "Morpho vault and Blue market assets on Arc (USDC-native gas). Mainnet is 5042; testnet is 5042002. Midnight remains Ethereum/Base only." : "Morpho vault assets, Blue market loan/collateral tokens, and Midnight book loan/collateral tokens from api.morpho.org."
11019
11059
  };
11020
11060
  },
11021
11061
  async isTokenSupported(chainId, address) {