@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
|
@@ -543,7 +543,28 @@ declare function buildEvmMultisignBodyMorphoMerklDistributorClaim(args: {
|
|
|
543
543
|
messageToSign: string;
|
|
544
544
|
}>;
|
|
545
545
|
|
|
546
|
+
/** Robinhood Earn on Robinhood Chain — Morpho Vault V2 curated by Steakhouse. */
|
|
547
|
+
declare const ROBINHOOD_CHAIN_ID = 4663;
|
|
548
|
+
declare const ROBINHOOD_EARN_VAULT_ADDRESS: "0xBeEff033F34C046626B8D0A041844C5d1A5409dd";
|
|
549
|
+
declare const ROBINHOOD_EARN_VAULT_SYMBOL: "steakUSDG";
|
|
550
|
+
declare const ROBINHOOD_EARN_VAULT_NAME: "Steakhouse USDG";
|
|
551
|
+
declare const ROBINHOOD_EARN_USDG_ADDRESS: "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168";
|
|
552
|
+
/** True when the user/agent is asking for Robinhood Earn rather than a generic Morpho vault search. */
|
|
553
|
+
declare function isRobinhoodEarnQuery(query: string | undefined): boolean;
|
|
554
|
+
declare function isRobinhoodEarnProductFlag(raw: unknown): boolean;
|
|
555
|
+
/** Map Robinhood Earn aliases to the listed Steakhouse USDG vault on chain 4663. */
|
|
556
|
+
declare function resolveRobinhoodEarnFetchQuery(args: {
|
|
557
|
+
chainId: number;
|
|
558
|
+
query?: string;
|
|
559
|
+
underlying?: string;
|
|
560
|
+
}): {
|
|
561
|
+
query?: string;
|
|
562
|
+
underlying?: string;
|
|
563
|
+
};
|
|
564
|
+
/** Pre-fill Robinhood Earn vault addresses for multisign deposit/withdraw builders. */
|
|
565
|
+
declare function applyRobinhoodEarnMultisignDefaults(o: Record<string, unknown>): void;
|
|
566
|
+
|
|
546
567
|
declare const MORPHO_PROTOCOL_ID = "morpho";
|
|
547
568
|
declare const morphoProtocolModule: ProtocolModule;
|
|
548
569
|
|
|
549
|
-
export { MORPHO_BLUE_BORROW_FALLBACK_GAS, MORPHO_BLUE_COLLATERAL_DEPOSIT_FALLBACK_GAS, MORPHO_BLUE_COLLATERAL_WITHDRAW_FALLBACK_GAS, MORPHO_BLUE_REPAY_FALLBACK_GAS, MORPHO_GRAPHQL_URL, MORPHO_MIDNIGHT_UNAVAILABLE_MESSAGE, MORPHO_PROTOCOL_ID, MORPHO_VAULT_DEPOSIT_FALLBACK_GAS, MORPHO_VAULT_WITHDRAW_FALLBACK_GAS, type MorphoAssetRef, type MorphoBlueMarketDiscoveryRow, type MorphoBluePositionRow, type MorphoBorrowMarketRow, type MorphoChainRow, type MorphoEarnOfferingRow, type MorphoEarnVaultDetailFields, type MorphoEarnVaultDiscoveryRow, type MorphoEarnVaultExposureRow, type MorphoMarketApiRow, type MorphoMarketParams, type MorphoMidnightLoanIntent, type MorphoMidnightLoanIntentStatus, type MorphoVaultApiRow, type MorphoVaultPositionRow, type MorphoVaultV2ApiRow, type ResolvedMorphoMarket, buildEvmMultisignBodyMorphoBlueBorrowBatch, buildEvmMultisignBodyMorphoBlueRepayBatch, buildEvmMultisignBodyMorphoBlueSupplyCollateralBatch, buildEvmMultisignBodyMorphoBlueWithdrawCollateralBatch, buildEvmMultisignBodyMorphoMerklDistributorClaim, buildEvmMultisignBodyMorphoVaultDepositBatch, buildEvmMultisignBodyMorphoVaultWithdraw, emptyMorphoEarnVaultDetailFields, enrichMorphoEarnOfferingRows, enrichMorphoEarnOfferingRowsForAgent, ensureMorphoChainAssetCache, fetchMorphoBorrowMarketsForCollateral, fetchMorphoBorrowMarketsForLoan, fetchMorphoChains, fetchMorphoEarnOfferingsForAsset, fetchMorphoEarnVaultDetails, fetchMorphoMarketById, fetchMorphoMarketsForChain, fetchMorphoMidnightIntents, fetchMorphoUserBluePositions, fetchMorphoUserPortfolioUsd, fetchMorphoUserVaultPositions, fetchMorphoVaultAssetDecimals, fetchMorphoVaultByAddress, fetchMorphoVaultMaxWithdrawWei, fetchMorphoVaultV2sForChain, fetchMorphoVaultsForChain, formatMorphoApyPct, formatMorphoFeePct, formatMorphoMarketApySummary, formatMorphoUsd, isMorphoVaultListed, loadMorphoSupportedChainIds, marketParamsFromApiRow, morphoEarnOfferingToDiscoveryRow, morphoFetchBlueMarketsSummary, morphoFetchEarnVaultsSummary, morphoGql, morphoKeyForAssetRow, morphoMarketToBorrowRow, morphoProtocolModule, morphoResolveListedEarnVaultByAddress, previewMorphoBlueHealthAfterCollateralWithdraw, searchMorphoListedEarnVaults };
|
|
570
|
+
export { MORPHO_BLUE_BORROW_FALLBACK_GAS, MORPHO_BLUE_COLLATERAL_DEPOSIT_FALLBACK_GAS, MORPHO_BLUE_COLLATERAL_WITHDRAW_FALLBACK_GAS, MORPHO_BLUE_REPAY_FALLBACK_GAS, MORPHO_GRAPHQL_URL, MORPHO_MIDNIGHT_UNAVAILABLE_MESSAGE, MORPHO_PROTOCOL_ID, MORPHO_VAULT_DEPOSIT_FALLBACK_GAS, MORPHO_VAULT_WITHDRAW_FALLBACK_GAS, type MorphoAssetRef, type MorphoBlueMarketDiscoveryRow, type MorphoBluePositionRow, type MorphoBorrowMarketRow, type MorphoChainRow, type MorphoEarnOfferingRow, type MorphoEarnVaultDetailFields, type MorphoEarnVaultDiscoveryRow, type MorphoEarnVaultExposureRow, type MorphoMarketApiRow, type MorphoMarketParams, type MorphoMidnightLoanIntent, type MorphoMidnightLoanIntentStatus, type MorphoVaultApiRow, type MorphoVaultPositionRow, type MorphoVaultV2ApiRow, ROBINHOOD_CHAIN_ID, ROBINHOOD_EARN_USDG_ADDRESS, ROBINHOOD_EARN_VAULT_ADDRESS, ROBINHOOD_EARN_VAULT_NAME, ROBINHOOD_EARN_VAULT_SYMBOL, type ResolvedMorphoMarket, applyRobinhoodEarnMultisignDefaults, buildEvmMultisignBodyMorphoBlueBorrowBatch, buildEvmMultisignBodyMorphoBlueRepayBatch, buildEvmMultisignBodyMorphoBlueSupplyCollateralBatch, buildEvmMultisignBodyMorphoBlueWithdrawCollateralBatch, buildEvmMultisignBodyMorphoMerklDistributorClaim, buildEvmMultisignBodyMorphoVaultDepositBatch, buildEvmMultisignBodyMorphoVaultWithdraw, emptyMorphoEarnVaultDetailFields, enrichMorphoEarnOfferingRows, enrichMorphoEarnOfferingRowsForAgent, ensureMorphoChainAssetCache, fetchMorphoBorrowMarketsForCollateral, fetchMorphoBorrowMarketsForLoan, fetchMorphoChains, fetchMorphoEarnOfferingsForAsset, fetchMorphoEarnVaultDetails, fetchMorphoMarketById, fetchMorphoMarketsForChain, fetchMorphoMidnightIntents, fetchMorphoUserBluePositions, fetchMorphoUserPortfolioUsd, fetchMorphoUserVaultPositions, fetchMorphoVaultAssetDecimals, fetchMorphoVaultByAddress, fetchMorphoVaultMaxWithdrawWei, fetchMorphoVaultV2sForChain, fetchMorphoVaultsForChain, formatMorphoApyPct, formatMorphoFeePct, formatMorphoMarketApySummary, formatMorphoUsd, isMorphoVaultListed, isRobinhoodEarnProductFlag, isRobinhoodEarnQuery, loadMorphoSupportedChainIds, marketParamsFromApiRow, morphoEarnOfferingToDiscoveryRow, morphoFetchBlueMarketsSummary, morphoFetchEarnVaultsSummary, morphoGql, morphoKeyForAssetRow, morphoMarketToBorrowRow, morphoProtocolModule, morphoResolveListedEarnVaultByAddress, previewMorphoBlueHealthAfterCollateralWithdraw, resolveRobinhoodEarnFetchQuery, searchMorphoListedEarnVaults };
|
|
@@ -799,11 +799,76 @@ async function ensureMorphoChainAssetCache(chainId) {
|
|
|
799
799
|
chainAssetCache.set(chainId, cache);
|
|
800
800
|
return cache;
|
|
801
801
|
}
|
|
802
|
+
|
|
803
|
+
// src/protocols/evm/morpho/robinhoodEarn.ts
|
|
804
|
+
var ROBINHOOD_CHAIN_ID = 4663;
|
|
805
|
+
var ROBINHOOD_EARN_VAULT_ADDRESS = "0xBeEff033F34C046626B8D0A041844C5d1A5409dd";
|
|
806
|
+
var ROBINHOOD_EARN_VAULT_SYMBOL = "steakUSDG";
|
|
807
|
+
var ROBINHOOD_EARN_VAULT_NAME = "Steakhouse USDG";
|
|
808
|
+
var ROBINHOOD_EARN_USDG_ADDRESS = "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168";
|
|
809
|
+
var ROBINHOOD_EARN_QUERY_ALIASES = [
|
|
810
|
+
"robinhood earn",
|
|
811
|
+
"robinhood-earn",
|
|
812
|
+
"robinhood",
|
|
813
|
+
"earn usdg",
|
|
814
|
+
"steakhouse usdg",
|
|
815
|
+
"steakusd g"
|
|
816
|
+
];
|
|
817
|
+
function normalizeRobinhoodEarnQuery(query) {
|
|
818
|
+
return query.trim().toLowerCase().replace(/\s+/g, " ");
|
|
819
|
+
}
|
|
820
|
+
function isRobinhoodEarnQuery(query) {
|
|
821
|
+
if (!query?.trim()) return false;
|
|
822
|
+
const q = normalizeRobinhoodEarnQuery(query);
|
|
823
|
+
if (q === ROBINHOOD_EARN_VAULT_ADDRESS.toLowerCase()) return true;
|
|
824
|
+
return ROBINHOOD_EARN_QUERY_ALIASES.some((alias) => q === alias || q.includes(alias));
|
|
825
|
+
}
|
|
826
|
+
function isRobinhoodEarnProductFlag(raw) {
|
|
827
|
+
if (raw === true || raw === "true") return true;
|
|
828
|
+
if (typeof raw !== "string") return false;
|
|
829
|
+
const v = raw.trim().toLowerCase();
|
|
830
|
+
return v === "robinhood-earn" || v === "robinhood_earn" || v === "robinhood earn";
|
|
831
|
+
}
|
|
832
|
+
function resolveRobinhoodEarnFetchQuery(args) {
|
|
833
|
+
if (args.chainId !== ROBINHOOD_CHAIN_ID) {
|
|
834
|
+
return { query: args.query?.trim() || void 0, underlying: args.underlying?.trim() || void 0 };
|
|
835
|
+
}
|
|
836
|
+
if (!isRobinhoodEarnQuery(args.query)) {
|
|
837
|
+
return { query: args.query?.trim() || void 0, underlying: args.underlying?.trim() || void 0 };
|
|
838
|
+
}
|
|
839
|
+
return {
|
|
840
|
+
query: ROBINHOOD_EARN_VAULT_SYMBOL,
|
|
841
|
+
underlying: args.underlying?.trim() || "USDG"
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
function applyRobinhoodEarnMultisignDefaults(o) {
|
|
845
|
+
const flagged = o.robinhoodEarn === true || isRobinhoodEarnProductFlag(o.robinhoodEarn) || isRobinhoodEarnProductFlag(o.product) || isRobinhoodEarnQuery(String(o.query ?? o.vaultName ?? ""));
|
|
846
|
+
if (!flagged) return;
|
|
847
|
+
const chainRaw = o.chainId;
|
|
848
|
+
const chainId = chainRaw == null || chainRaw === "" ? ROBINHOOD_CHAIN_ID : typeof chainRaw === "number" ? chainRaw : Number.parseInt(String(chainRaw), chainRaw.toString().startsWith("0x") ? 16 : 10);
|
|
849
|
+
if (!Number.isFinite(chainId) || chainId !== ROBINHOOD_CHAIN_ID) return;
|
|
850
|
+
if (chainRaw == null || chainRaw === "") o.chainId = ROBINHOOD_CHAIN_ID;
|
|
851
|
+
const vaultAddr = o.vaultAddress ?? o.vault ?? ROBINHOOD_EARN_VAULT_ADDRESS;
|
|
852
|
+
o.vaultAddress = vaultAddr;
|
|
853
|
+
o.vault = vaultAddr;
|
|
854
|
+
const underlyingAddr = o.underlyingAddress ?? o.underlying ?? ROBINHOOD_EARN_USDG_ADDRESS;
|
|
855
|
+
o.underlyingAddress = underlyingAddr;
|
|
856
|
+
o.underlying = underlyingAddr;
|
|
857
|
+
o.vaultName = o.vaultName ?? ROBINHOOD_EARN_VAULT_NAME;
|
|
858
|
+
o.vaultSymbol = o.vaultSymbol ?? ROBINHOOD_EARN_VAULT_SYMBOL;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
// src/protocols/evm/morpho/earnDiscovery.ts
|
|
802
862
|
async function morphoFetchEarnVaultsSummary(args) {
|
|
863
|
+
const resolved = resolveRobinhoodEarnFetchQuery({
|
|
864
|
+
chainId: args.chainId,
|
|
865
|
+
query: args.query,
|
|
866
|
+
underlying: args.underlying
|
|
867
|
+
});
|
|
803
868
|
const vaults = await searchMorphoListedEarnVaults({
|
|
804
869
|
chainId: args.chainId,
|
|
805
|
-
underlying:
|
|
806
|
-
query:
|
|
870
|
+
underlying: resolved.underlying,
|
|
871
|
+
query: resolved.query,
|
|
807
872
|
limit: args.limit
|
|
808
873
|
});
|
|
809
874
|
return { vaults };
|
|
@@ -1972,6 +2037,6 @@ var morphoProtocolModule = {
|
|
|
1972
2037
|
};
|
|
1973
2038
|
registerProtocolModule(morphoProtocolModule);
|
|
1974
2039
|
|
|
1975
|
-
export { MORPHO_BLUE_BORROW_FALLBACK_GAS, MORPHO_BLUE_COLLATERAL_DEPOSIT_FALLBACK_GAS, MORPHO_BLUE_COLLATERAL_WITHDRAW_FALLBACK_GAS, MORPHO_BLUE_REPAY_FALLBACK_GAS, MORPHO_GRAPHQL_URL, MORPHO_MIDNIGHT_UNAVAILABLE_MESSAGE, MORPHO_PROTOCOL_ID, MORPHO_VAULT_DEPOSIT_FALLBACK_GAS, MORPHO_VAULT_WITHDRAW_FALLBACK_GAS, buildEvmMultisignBodyMorphoBlueBorrowBatch, buildEvmMultisignBodyMorphoBlueRepayBatch, buildEvmMultisignBodyMorphoBlueSupplyCollateralBatch, buildEvmMultisignBodyMorphoBlueWithdrawCollateralBatch, buildEvmMultisignBodyMorphoMerklDistributorClaim, buildEvmMultisignBodyMorphoVaultDepositBatch, buildEvmMultisignBodyMorphoVaultWithdraw, emptyMorphoEarnVaultDetailFields, enrichMorphoEarnOfferingRows, enrichMorphoEarnOfferingRowsForAgent, ensureMorphoChainAssetCache, fetchMorphoBorrowMarketsForCollateral, fetchMorphoBorrowMarketsForLoan, fetchMorphoChains, fetchMorphoEarnOfferingsForAsset, fetchMorphoEarnVaultDetails, fetchMorphoMarketById, fetchMorphoMarketsForChain, fetchMorphoMidnightIntents, fetchMorphoUserBluePositions, fetchMorphoUserPortfolioUsd, fetchMorphoUserVaultPositions, fetchMorphoVaultAssetDecimals, fetchMorphoVaultByAddress, fetchMorphoVaultMaxWithdrawWei, fetchMorphoVaultV2sForChain, fetchMorphoVaultsForChain, formatMorphoApyPct, formatMorphoFeePct, formatMorphoMarketApySummary, formatMorphoUsd, isMorphoVaultListed, loadMorphoSupportedChainIds, marketParamsFromApiRow, morphoEarnOfferingToDiscoveryRow, morphoFetchBlueMarketsSummary, morphoFetchEarnVaultsSummary, morphoGql, morphoKeyForAssetRow, morphoMarketToBorrowRow, morphoProtocolModule, morphoResolveListedEarnVaultByAddress, previewMorphoBlueHealthAfterCollateralWithdraw, searchMorphoListedEarnVaults };
|
|
2040
|
+
export { MORPHO_BLUE_BORROW_FALLBACK_GAS, MORPHO_BLUE_COLLATERAL_DEPOSIT_FALLBACK_GAS, MORPHO_BLUE_COLLATERAL_WITHDRAW_FALLBACK_GAS, MORPHO_BLUE_REPAY_FALLBACK_GAS, MORPHO_GRAPHQL_URL, MORPHO_MIDNIGHT_UNAVAILABLE_MESSAGE, MORPHO_PROTOCOL_ID, MORPHO_VAULT_DEPOSIT_FALLBACK_GAS, MORPHO_VAULT_WITHDRAW_FALLBACK_GAS, ROBINHOOD_CHAIN_ID, ROBINHOOD_EARN_USDG_ADDRESS, ROBINHOOD_EARN_VAULT_ADDRESS, ROBINHOOD_EARN_VAULT_NAME, ROBINHOOD_EARN_VAULT_SYMBOL, applyRobinhoodEarnMultisignDefaults, buildEvmMultisignBodyMorphoBlueBorrowBatch, buildEvmMultisignBodyMorphoBlueRepayBatch, buildEvmMultisignBodyMorphoBlueSupplyCollateralBatch, buildEvmMultisignBodyMorphoBlueWithdrawCollateralBatch, buildEvmMultisignBodyMorphoMerklDistributorClaim, buildEvmMultisignBodyMorphoVaultDepositBatch, buildEvmMultisignBodyMorphoVaultWithdraw, emptyMorphoEarnVaultDetailFields, enrichMorphoEarnOfferingRows, enrichMorphoEarnOfferingRowsForAgent, ensureMorphoChainAssetCache, fetchMorphoBorrowMarketsForCollateral, fetchMorphoBorrowMarketsForLoan, fetchMorphoChains, fetchMorphoEarnOfferingsForAsset, fetchMorphoEarnVaultDetails, fetchMorphoMarketById, fetchMorphoMarketsForChain, fetchMorphoMidnightIntents, fetchMorphoUserBluePositions, fetchMorphoUserPortfolioUsd, fetchMorphoUserVaultPositions, fetchMorphoVaultAssetDecimals, fetchMorphoVaultByAddress, fetchMorphoVaultMaxWithdrawWei, fetchMorphoVaultV2sForChain, fetchMorphoVaultsForChain, formatMorphoApyPct, formatMorphoFeePct, formatMorphoMarketApySummary, formatMorphoUsd, isMorphoVaultListed, isRobinhoodEarnProductFlag, isRobinhoodEarnQuery, loadMorphoSupportedChainIds, marketParamsFromApiRow, morphoEarnOfferingToDiscoveryRow, morphoFetchBlueMarketsSummary, morphoFetchEarnVaultsSummary, morphoGql, morphoKeyForAssetRow, morphoMarketToBorrowRow, morphoProtocolModule, morphoResolveListedEarnVaultByAddress, previewMorphoBlueHealthAfterCollateralWithdraw, resolveRobinhoodEarnFetchQuery, searchMorphoListedEarnVaults };
|
|
1976
2041
|
//# sourceMappingURL=index.js.map
|
|
1977
2042
|
//# sourceMappingURL=index.js.map
|