@continuumdao/ctm-mpc-defi 0.2.41 → 0.2.43

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 (98) hide show
  1. package/dist/agent/catalog.cjs +219 -27
  2. package/dist/agent/catalog.cjs.map +1 -1
  3. package/dist/agent/catalog.d.ts +914 -197
  4. package/dist/agent/catalog.js +214 -28
  5. package/dist/agent/catalog.js.map +1 -1
  6. package/dist/agent/skills/aerodrome/SKILL.md +1 -1
  7. package/dist/agent/skills/arcus/SKILL.md +1 -1
  8. package/dist/agent/skills/morpho/SKILL.md +32 -5
  9. package/dist/agent/skills/yield-compare/SKILL.md +6 -2
  10. package/dist/chains/evm/index.cjs +6 -2
  11. package/dist/chains/evm/index.cjs.map +1 -1
  12. package/dist/chains/evm/index.js +7 -3
  13. package/dist/chains/evm/index.js.map +1 -1
  14. package/dist/core/index.cjs +14 -0
  15. package/dist/core/index.cjs.map +1 -1
  16. package/dist/core/index.d.ts +7 -2
  17. package/dist/core/index.js +13 -2
  18. package/dist/core/index.js.map +1 -1
  19. package/dist/index.cjs +45 -6
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.js +44 -8
  23. package/dist/index.js.map +1 -1
  24. package/dist/protocols/evm/aave-v4/index.cjs +11 -7
  25. package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
  26. package/dist/protocols/evm/aave-v4/index.js +12 -8
  27. package/dist/protocols/evm/aave-v4/index.js.map +1 -1
  28. package/dist/protocols/evm/aerodrome/index.cjs +81 -50
  29. package/dist/protocols/evm/aerodrome/index.cjs.map +1 -1
  30. package/dist/protocols/evm/aerodrome/index.d.ts +8 -8
  31. package/dist/protocols/evm/aerodrome/index.js +96 -65
  32. package/dist/protocols/evm/aerodrome/index.js.map +1 -1
  33. package/dist/protocols/evm/arcus/index.cjs +6 -2
  34. package/dist/protocols/evm/arcus/index.cjs.map +1 -1
  35. package/dist/protocols/evm/arcus/index.js +7 -3
  36. package/dist/protocols/evm/arcus/index.js.map +1 -1
  37. package/dist/protocols/evm/circle-cctp/index.cjs +7 -3
  38. package/dist/protocols/evm/circle-cctp/index.cjs.map +1 -1
  39. package/dist/protocols/evm/circle-cctp/index.js +8 -4
  40. package/dist/protocols/evm/circle-cctp/index.js.map +1 -1
  41. package/dist/protocols/evm/compound-v3/index.cjs +9 -3
  42. package/dist/protocols/evm/compound-v3/index.cjs.map +1 -1
  43. package/dist/protocols/evm/compound-v3/index.js +10 -4
  44. package/dist/protocols/evm/compound-v3/index.js.map +1 -1
  45. package/dist/protocols/evm/continuum-dao/index.cjs +11 -5
  46. package/dist/protocols/evm/continuum-dao/index.cjs.map +1 -1
  47. package/dist/protocols/evm/continuum-dao/index.js +12 -6
  48. package/dist/protocols/evm/continuum-dao/index.js.map +1 -1
  49. package/dist/protocols/evm/curve-dao/index.cjs +8 -4
  50. package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
  51. package/dist/protocols/evm/curve-dao/index.js +9 -5
  52. package/dist/protocols/evm/curve-dao/index.js.map +1 -1
  53. package/dist/protocols/evm/ethena/index.cjs +13 -9
  54. package/dist/protocols/evm/ethena/index.cjs.map +1 -1
  55. package/dist/protocols/evm/ethena/index.js +14 -10
  56. package/dist/protocols/evm/ethena/index.js.map +1 -1
  57. package/dist/protocols/evm/euler-v2/index.cjs +20 -16
  58. package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
  59. package/dist/protocols/evm/euler-v2/index.js +21 -17
  60. package/dist/protocols/evm/euler-v2/index.js.map +1 -1
  61. package/dist/protocols/evm/gmx/index.cjs +12 -8
  62. package/dist/protocols/evm/gmx/index.cjs.map +1 -1
  63. package/dist/protocols/evm/gmx/index.js +13 -9
  64. package/dist/protocols/evm/gmx/index.js.map +1 -1
  65. package/dist/protocols/evm/hyperliquid/index.cjs +5 -1
  66. package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
  67. package/dist/protocols/evm/hyperliquid/index.js +6 -2
  68. package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
  69. package/dist/protocols/evm/lido/index.cjs +7 -3
  70. package/dist/protocols/evm/lido/index.cjs.map +1 -1
  71. package/dist/protocols/evm/lido/index.js +8 -4
  72. package/dist/protocols/evm/lido/index.js.map +1 -1
  73. package/dist/protocols/evm/maple/index.cjs +7 -3
  74. package/dist/protocols/evm/maple/index.cjs.map +1 -1
  75. package/dist/protocols/evm/maple/index.js +8 -4
  76. package/dist/protocols/evm/maple/index.js.map +1 -1
  77. package/dist/protocols/evm/morpho/index.cjs +454 -64
  78. package/dist/protocols/evm/morpho/index.cjs.map +1 -1
  79. package/dist/protocols/evm/morpho/index.d.ts +123 -2
  80. package/dist/protocols/evm/morpho/index.js +432 -66
  81. package/dist/protocols/evm/morpho/index.js.map +1 -1
  82. package/dist/protocols/evm/pendle/index.cjs +9 -3
  83. package/dist/protocols/evm/pendle/index.cjs.map +1 -1
  84. package/dist/protocols/evm/pendle/index.js +10 -4
  85. package/dist/protocols/evm/pendle/index.js.map +1 -1
  86. package/dist/protocols/evm/sky/index.cjs +17 -13
  87. package/dist/protocols/evm/sky/index.cjs.map +1 -1
  88. package/dist/protocols/evm/sky/index.js +18 -14
  89. package/dist/protocols/evm/sky/index.js.map +1 -1
  90. package/dist/protocols/evm/uniswap-v4/index.cjs +13 -7
  91. package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
  92. package/dist/protocols/evm/uniswap-v4/index.js +14 -8
  93. package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
  94. package/dist/protocols/evm/venice/index.cjs +10 -4
  95. package/dist/protocols/evm/venice/index.cjs.map +1 -1
  96. package/dist/protocols/evm/venice/index.js +10 -4
  97. package/dist/protocols/evm/venice/index.js.map +1 -1
  98. package/package.json +1 -1
@@ -571,6 +571,10 @@ function buildAaveV4BorrowTableRowsFromHub(borrowable, hubReserves, debtByUnderl
571
571
  };
572
572
  });
573
573
  }
574
+ function defiEvmTransport(rpcUrl, opts) {
575
+ const url = rpcUrl.trim();
576
+ return viem.http(url, opts);
577
+ }
574
578
  var spokeStaticAbi = [
575
579
  {
576
580
  name: "getReserveCount",
@@ -632,7 +636,7 @@ async function fetchAaveV4SpokeReserveIdForUnderlying(args) {
632
636
  nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
633
637
  rpcUrls: { default: { http: [url] } }
634
638
  });
635
- const client = viem.createPublicClient({ chain, transport: viem.http(url) });
639
+ const client = viem.createPublicClient({ chain, transport: defiEvmTransport(url) });
636
640
  const count = await client.readContract({
637
641
  address: spoke,
638
642
  abi: spokeStaticAbi,
@@ -662,7 +666,7 @@ async function fetchAaveV4SpokeReserveStatusForUnderlying(args) {
662
666
  nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
663
667
  rpcUrls: { default: { http: [url] } }
664
668
  });
665
- const client = viem.createPublicClient({ chain, transport: viem.http(url) });
669
+ const client = viem.createPublicClient({ chain, transport: defiEvmTransport(url) });
666
670
  const cfg = await client.readContract({
667
671
  address: spoke,
668
672
  abi: spokeStaticAbi,
@@ -769,7 +773,7 @@ async function buildEvmMultisignBatch(args) {
769
773
  nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
770
774
  rpcUrls: { default: { http: [rpcUrl] } }
771
775
  });
772
- const publicClient = viem.createPublicClient({ chain: ch, transport: viem.http(rpcUrl) });
776
+ const publicClient = viem.createPublicClient({ chain: ch, transport: defiEvmTransport(rpcUrl) });
773
777
  const feeParams = await continuumNodeSdk.fetchChainFeeParams(rpcUrl, chainId);
774
778
  const legacy = Boolean(chainDetail?.legacy) || !feeParams.isEip1559;
775
779
  const latestBaseFeeWei = !legacy ? (await publicClient.getBlock({ blockTag: "latest" })).baseFeePerGas ?? 0n : 0n;
@@ -955,7 +959,7 @@ async function buildEvmMultisignBodyAaveV4DepositBatch(args) {
955
959
  nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
956
960
  rpcUrls: { default: { http: [args.rpcUrl] } }
957
961
  });
958
- const publicClient = viem.createPublicClient({ chain: ch, transport: viem.http(args.rpcUrl) });
962
+ const publicClient = viem.createPublicClient({ chain: ch, transport: defiEvmTransport(args.rpcUrl) });
959
963
  const dec = await publicClient.readContract({
960
964
  address: asset,
961
965
  abi: erc20AllowanceAbi,
@@ -1168,7 +1172,7 @@ async function buildEvmMultisignBodyAaveV4SpokeWithdraw(args) {
1168
1172
  nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
1169
1173
  rpcUrls: { default: { http: [args.rpcUrl] } }
1170
1174
  });
1171
- const publicClient = viem.createPublicClient({ chain: ch, transport: viem.http(args.rpcUrl) });
1175
+ const publicClient = viem.createPublicClient({ chain: ch, transport: defiEvmTransport(args.rpcUrl) });
1172
1176
  const dec = await publicClient.readContract({
1173
1177
  address: asset,
1174
1178
  abi: erc20AllowanceAbi,
@@ -1244,7 +1248,7 @@ async function buildEvmMultisignBodyAaveV4SpokeBorrow(args) {
1244
1248
  nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
1245
1249
  rpcUrls: { default: { http: [args.rpcUrl] } }
1246
1250
  });
1247
- const publicClient = viem.createPublicClient({ chain: ch, transport: viem.http(args.rpcUrl) });
1251
+ const publicClient = viem.createPublicClient({ chain: ch, transport: defiEvmTransport(args.rpcUrl) });
1248
1252
  const dec = await publicClient.readContract({
1249
1253
  address: asset,
1250
1254
  abi: erc20AllowanceAbi,
@@ -1320,7 +1324,7 @@ async function buildEvmMultisignBodyAaveV4SpokeRepay(args) {
1320
1324
  nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
1321
1325
  rpcUrls: { default: { http: [args.rpcUrl] } }
1322
1326
  });
1323
- const publicClient = viem.createPublicClient({ chain: ch, transport: viem.http(args.rpcUrl) });
1327
+ const publicClient = viem.createPublicClient({ chain: ch, transport: defiEvmTransport(args.rpcUrl) });
1324
1328
  const dec = await publicClient.readContract({
1325
1329
  address: asset,
1326
1330
  abi: erc20AllowanceAbi,