@continuumdao/ctm-mpc-defi 0.2.25 → 0.2.26
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 +400 -8
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +266 -1
- package/dist/agent/catalog.js +387 -9
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/arcus/SKILL.md +4 -0
- package/dist/agent/skills/morpho/SKILL.md +39 -0
- package/dist/agent/skills/venice/SKILL.md +29 -0
- package/dist/protocols/evm/arcus/index.cjs +9 -2
- package/dist/protocols/evm/arcus/index.cjs.map +1 -1
- package/dist/protocols/evm/arcus/index.d.ts +3 -1
- package/dist/protocols/evm/arcus/index.js +9 -3
- package/dist/protocols/evm/arcus/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs +76 -2
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.d.ts +22 -1
- package/dist/protocols/evm/morpho/index.js +68 -3
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/dist/protocols/evm/venice/index.cjs +936 -0
- package/dist/protocols/evm/venice/index.cjs.map +1 -0
- package/dist/protocols/evm/venice/index.d.ts +238 -0
- package/dist/protocols/evm/venice/index.js +901 -0
- package/dist/protocols/evm/venice/index.js.map +1 -0
- package/package.json +6 -1
|
@@ -801,11 +801,76 @@ async function ensureMorphoChainAssetCache(chainId) {
|
|
|
801
801
|
chainAssetCache.set(chainId, cache);
|
|
802
802
|
return cache;
|
|
803
803
|
}
|
|
804
|
+
|
|
805
|
+
// src/protocols/evm/morpho/robinhoodEarn.ts
|
|
806
|
+
var ROBINHOOD_CHAIN_ID = 4663;
|
|
807
|
+
var ROBINHOOD_EARN_VAULT_ADDRESS = "0xBeEff033F34C046626B8D0A041844C5d1A5409dd";
|
|
808
|
+
var ROBINHOOD_EARN_VAULT_SYMBOL = "steakUSDG";
|
|
809
|
+
var ROBINHOOD_EARN_VAULT_NAME = "Steakhouse USDG";
|
|
810
|
+
var ROBINHOOD_EARN_USDG_ADDRESS = "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168";
|
|
811
|
+
var ROBINHOOD_EARN_QUERY_ALIASES = [
|
|
812
|
+
"robinhood earn",
|
|
813
|
+
"robinhood-earn",
|
|
814
|
+
"robinhood",
|
|
815
|
+
"earn usdg",
|
|
816
|
+
"steakhouse usdg",
|
|
817
|
+
"steakusd g"
|
|
818
|
+
];
|
|
819
|
+
function normalizeRobinhoodEarnQuery(query) {
|
|
820
|
+
return query.trim().toLowerCase().replace(/\s+/g, " ");
|
|
821
|
+
}
|
|
822
|
+
function isRobinhoodEarnQuery(query) {
|
|
823
|
+
if (!query?.trim()) return false;
|
|
824
|
+
const q = normalizeRobinhoodEarnQuery(query);
|
|
825
|
+
if (q === ROBINHOOD_EARN_VAULT_ADDRESS.toLowerCase()) return true;
|
|
826
|
+
return ROBINHOOD_EARN_QUERY_ALIASES.some((alias) => q === alias || q.includes(alias));
|
|
827
|
+
}
|
|
828
|
+
function isRobinhoodEarnProductFlag(raw) {
|
|
829
|
+
if (raw === true || raw === "true") return true;
|
|
830
|
+
if (typeof raw !== "string") return false;
|
|
831
|
+
const v = raw.trim().toLowerCase();
|
|
832
|
+
return v === "robinhood-earn" || v === "robinhood_earn" || v === "robinhood earn";
|
|
833
|
+
}
|
|
834
|
+
function resolveRobinhoodEarnFetchQuery(args) {
|
|
835
|
+
if (args.chainId !== ROBINHOOD_CHAIN_ID) {
|
|
836
|
+
return { query: args.query?.trim() || void 0, underlying: args.underlying?.trim() || void 0 };
|
|
837
|
+
}
|
|
838
|
+
if (!isRobinhoodEarnQuery(args.query)) {
|
|
839
|
+
return { query: args.query?.trim() || void 0, underlying: args.underlying?.trim() || void 0 };
|
|
840
|
+
}
|
|
841
|
+
return {
|
|
842
|
+
query: ROBINHOOD_EARN_VAULT_SYMBOL,
|
|
843
|
+
underlying: args.underlying?.trim() || "USDG"
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
function applyRobinhoodEarnMultisignDefaults(o) {
|
|
847
|
+
const flagged = o.robinhoodEarn === true || isRobinhoodEarnProductFlag(o.robinhoodEarn) || isRobinhoodEarnProductFlag(o.product) || isRobinhoodEarnQuery(String(o.query ?? o.vaultName ?? ""));
|
|
848
|
+
if (!flagged) return;
|
|
849
|
+
const chainRaw = o.chainId;
|
|
850
|
+
const chainId = chainRaw == null || chainRaw === "" ? ROBINHOOD_CHAIN_ID : typeof chainRaw === "number" ? chainRaw : Number.parseInt(String(chainRaw), chainRaw.toString().startsWith("0x") ? 16 : 10);
|
|
851
|
+
if (!Number.isFinite(chainId) || chainId !== ROBINHOOD_CHAIN_ID) return;
|
|
852
|
+
if (chainRaw == null || chainRaw === "") o.chainId = ROBINHOOD_CHAIN_ID;
|
|
853
|
+
const vaultAddr = o.vaultAddress ?? o.vault ?? ROBINHOOD_EARN_VAULT_ADDRESS;
|
|
854
|
+
o.vaultAddress = vaultAddr;
|
|
855
|
+
o.vault = vaultAddr;
|
|
856
|
+
const underlyingAddr = o.underlyingAddress ?? o.underlying ?? ROBINHOOD_EARN_USDG_ADDRESS;
|
|
857
|
+
o.underlyingAddress = underlyingAddr;
|
|
858
|
+
o.underlying = underlyingAddr;
|
|
859
|
+
o.vaultName = o.vaultName ?? ROBINHOOD_EARN_VAULT_NAME;
|
|
860
|
+
o.vaultSymbol = o.vaultSymbol ?? ROBINHOOD_EARN_VAULT_SYMBOL;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
// src/protocols/evm/morpho/earnDiscovery.ts
|
|
804
864
|
async function morphoFetchEarnVaultsSummary(args) {
|
|
865
|
+
const resolved = resolveRobinhoodEarnFetchQuery({
|
|
866
|
+
chainId: args.chainId,
|
|
867
|
+
query: args.query,
|
|
868
|
+
underlying: args.underlying
|
|
869
|
+
});
|
|
805
870
|
const vaults = await searchMorphoListedEarnVaults({
|
|
806
871
|
chainId: args.chainId,
|
|
807
|
-
underlying:
|
|
808
|
-
query:
|
|
872
|
+
underlying: resolved.underlying,
|
|
873
|
+
query: resolved.query,
|
|
809
874
|
limit: args.limit
|
|
810
875
|
});
|
|
811
876
|
return { vaults };
|
|
@@ -1983,6 +2048,12 @@ exports.MORPHO_MIDNIGHT_UNAVAILABLE_MESSAGE = MORPHO_MIDNIGHT_UNAVAILABLE_MESSAG
|
|
|
1983
2048
|
exports.MORPHO_PROTOCOL_ID = MORPHO_PROTOCOL_ID;
|
|
1984
2049
|
exports.MORPHO_VAULT_DEPOSIT_FALLBACK_GAS = MORPHO_VAULT_DEPOSIT_FALLBACK_GAS;
|
|
1985
2050
|
exports.MORPHO_VAULT_WITHDRAW_FALLBACK_GAS = MORPHO_VAULT_WITHDRAW_FALLBACK_GAS;
|
|
2051
|
+
exports.ROBINHOOD_CHAIN_ID = ROBINHOOD_CHAIN_ID;
|
|
2052
|
+
exports.ROBINHOOD_EARN_USDG_ADDRESS = ROBINHOOD_EARN_USDG_ADDRESS;
|
|
2053
|
+
exports.ROBINHOOD_EARN_VAULT_ADDRESS = ROBINHOOD_EARN_VAULT_ADDRESS;
|
|
2054
|
+
exports.ROBINHOOD_EARN_VAULT_NAME = ROBINHOOD_EARN_VAULT_NAME;
|
|
2055
|
+
exports.ROBINHOOD_EARN_VAULT_SYMBOL = ROBINHOOD_EARN_VAULT_SYMBOL;
|
|
2056
|
+
exports.applyRobinhoodEarnMultisignDefaults = applyRobinhoodEarnMultisignDefaults;
|
|
1986
2057
|
exports.buildEvmMultisignBodyMorphoBlueBorrowBatch = buildEvmMultisignBodyMorphoBlueBorrowBatch;
|
|
1987
2058
|
exports.buildEvmMultisignBodyMorphoBlueRepayBatch = buildEvmMultisignBodyMorphoBlueRepayBatch;
|
|
1988
2059
|
exports.buildEvmMultisignBodyMorphoBlueSupplyCollateralBatch = buildEvmMultisignBodyMorphoBlueSupplyCollateralBatch;
|
|
@@ -2015,6 +2086,8 @@ exports.formatMorphoFeePct = formatMorphoFeePct;
|
|
|
2015
2086
|
exports.formatMorphoMarketApySummary = formatMorphoMarketApySummary;
|
|
2016
2087
|
exports.formatMorphoUsd = formatMorphoUsd;
|
|
2017
2088
|
exports.isMorphoVaultListed = isMorphoVaultListed;
|
|
2089
|
+
exports.isRobinhoodEarnProductFlag = isRobinhoodEarnProductFlag;
|
|
2090
|
+
exports.isRobinhoodEarnQuery = isRobinhoodEarnQuery;
|
|
2018
2091
|
exports.loadMorphoSupportedChainIds = loadMorphoSupportedChainIds;
|
|
2019
2092
|
exports.marketParamsFromApiRow = marketParamsFromApiRow;
|
|
2020
2093
|
exports.morphoEarnOfferingToDiscoveryRow = morphoEarnOfferingToDiscoveryRow;
|
|
@@ -2026,6 +2099,7 @@ exports.morphoMarketToBorrowRow = morphoMarketToBorrowRow;
|
|
|
2026
2099
|
exports.morphoProtocolModule = morphoProtocolModule;
|
|
2027
2100
|
exports.morphoResolveListedEarnVaultByAddress = morphoResolveListedEarnVaultByAddress;
|
|
2028
2101
|
exports.previewMorphoBlueHealthAfterCollateralWithdraw = previewMorphoBlueHealthAfterCollateralWithdraw;
|
|
2102
|
+
exports.resolveRobinhoodEarnFetchQuery = resolveRobinhoodEarnFetchQuery;
|
|
2029
2103
|
exports.searchMorphoListedEarnVaults = searchMorphoListedEarnVaults;
|
|
2030
2104
|
//# sourceMappingURL=index.cjs.map
|
|
2031
2105
|
//# sourceMappingURL=index.cjs.map
|