@continuumdao/ctm-mpc-defi 0.2.34 → 0.2.35
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 +712 -44
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +1630 -244
- package/dist/agent/catalog.js +678 -45
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/aave-v4/SKILL.md +19 -4
- package/dist/agent/skills/aerodrome/SKILL.md +2 -2
- package/dist/agent/skills/compound-v3/SKILL.md +2 -2
- package/dist/agent/skills/curve-dao/SKILL.md +14 -0
- package/dist/agent/skills/ethena/SKILL.md +3 -1
- package/dist/agent/skills/euler-v2/SKILL.md +1 -1
- package/dist/agent/skills/gmx/SKILL.md +1 -1
- package/dist/agent/skills/hyperliquid/SKILL.md +7 -5
- package/dist/agent/skills/lido/SKILL.md +3 -0
- package/dist/agent/skills/maple-syrup/SKILL.md +35 -3
- package/dist/agent/skills/morpho/SKILL.md +1 -1
- package/dist/agent/skills/sky/SKILL.md +2 -0
- package/dist/agent/skills/yield-compare/SKILL.md +78 -0
- package/dist/index.cjs +129 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +129 -27
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/aave-v4/index.cjs +170 -0
- package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/aave-v4/index.d.ts +59 -1
- package/dist/protocols/evm/aave-v4/index.js +164 -1
- package/dist/protocols/evm/aave-v4/index.js.map +1 -1
- package/dist/protocols/evm/aerodrome/index.cjs +1308 -901
- package/dist/protocols/evm/aerodrome/index.cjs.map +1 -1
- package/dist/protocols/evm/aerodrome/index.d.ts +69 -2
- package/dist/protocols/evm/aerodrome/index.js +1217 -807
- package/dist/protocols/evm/aerodrome/index.js.map +1 -1
- package/dist/protocols/evm/compound-v3/index.cjs +82 -6
- package/dist/protocols/evm/compound-v3/index.cjs.map +1 -1
- package/dist/protocols/evm/compound-v3/index.d.ts +89 -1
- package/dist/protocols/evm/compound-v3/index.js +80 -7
- package/dist/protocols/evm/compound-v3/index.js.map +1 -1
- package/dist/protocols/evm/curve-dao/index.cjs +447 -18
- package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/curve-dao/index.d.ts +108 -1
- package/dist/protocols/evm/curve-dao/index.js +440 -19
- package/dist/protocols/evm/curve-dao/index.js.map +1 -1
- package/dist/protocols/evm/ethena/index.cjs +89 -0
- package/dist/protocols/evm/ethena/index.cjs.map +1 -1
- package/dist/protocols/evm/ethena/index.d.ts +17 -1
- package/dist/protocols/evm/ethena/index.js +89 -2
- package/dist/protocols/evm/ethena/index.js.map +1 -1
- package/dist/protocols/evm/euler-v2/index.cjs +29 -0
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
- package/dist/protocols/evm/euler-v2/index.d.ts +21 -1
- package/dist/protocols/evm/euler-v2/index.js +29 -1
- package/dist/protocols/evm/euler-v2/index.js.map +1 -1
- package/dist/protocols/evm/gmx/index.cjs +83 -1
- package/dist/protocols/evm/gmx/index.cjs.map +1 -1
- package/dist/protocols/evm/gmx/index.d.ts +22 -2
- package/dist/protocols/evm/gmx/index.js +80 -2
- package/dist/protocols/evm/gmx/index.js.map +1 -1
- package/dist/protocols/evm/hyperliquid/index.cjs +67 -11
- package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
- package/dist/protocols/evm/hyperliquid/index.d.ts +39 -2
- package/dist/protocols/evm/hyperliquid/index.js +64 -12
- package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
- package/dist/protocols/evm/lido/index.cjs +13 -0
- package/dist/protocols/evm/lido/index.cjs.map +1 -1
- package/dist/protocols/evm/lido/index.d.ts +9 -1
- package/dist/protocols/evm/lido/index.js +13 -1
- package/dist/protocols/evm/lido/index.js.map +1 -1
- package/dist/protocols/evm/maple/index.cjs +129 -1
- package/dist/protocols/evm/maple/index.cjs.map +1 -1
- package/dist/protocols/evm/maple/index.d.ts +45 -1
- package/dist/protocols/evm/maple/index.js +124 -3
- package/dist/protocols/evm/maple/index.js.map +1 -1
- package/dist/protocols/evm/morpho/index.cjs +34 -7
- package/dist/protocols/evm/morpho/index.cjs.map +1 -1
- package/dist/protocols/evm/morpho/index.d.ts +23 -1
- package/dist/protocols/evm/morpho/index.js +34 -8
- package/dist/protocols/evm/morpho/index.js.map +1 -1
- package/dist/protocols/evm/sky/index.cjs +52 -0
- package/dist/protocols/evm/sky/index.cjs.map +1 -1
- package/dist/protocols/evm/sky/index.d.ts +16 -1
- package/dist/protocols/evm/sky/index.js +50 -1
- package/dist/protocols/evm/sky/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -296,6 +296,7 @@ async function hyperliquidFetchMarketSnapshot(args) {
|
|
|
296
296
|
dex,
|
|
297
297
|
livePrice,
|
|
298
298
|
midUsd: livePrice.midUsd,
|
|
299
|
+
funding: assetCtx.funding,
|
|
299
300
|
fetchedAtMs: Date.now(),
|
|
300
301
|
interval,
|
|
301
302
|
latestCandle,
|
|
@@ -524,6 +525,36 @@ function scoreMarketMatch(query, market, annotation) {
|
|
|
524
525
|
}
|
|
525
526
|
return null;
|
|
526
527
|
}
|
|
528
|
+
async function hyperliquidCollectNativePerpMarkets(args) {
|
|
529
|
+
const [{ markets }, { dexes }] = await Promise.all([
|
|
530
|
+
hyperliquidFetchPerpMeta({ chainId: args.chainId }),
|
|
531
|
+
hyperliquidFetchDexList({ chainId: args.chainId })
|
|
532
|
+
]);
|
|
533
|
+
return { markets, dexes };
|
|
534
|
+
}
|
|
535
|
+
async function hyperliquidCollectHip3StockMarkets(args) {
|
|
536
|
+
const [{ dexes }, annotationMap] = await Promise.all([
|
|
537
|
+
hyperliquidFetchDexList({ chainId: args.chainId }),
|
|
538
|
+
hyperliquidFetchPerpConciseAnnotations({ chainId: args.chainId })
|
|
539
|
+
]);
|
|
540
|
+
const hip3Batches = await Promise.all(
|
|
541
|
+
dexes.map(async (d) => {
|
|
542
|
+
const { markets: dexMarkets } = await hyperliquidFetchPerpMeta({ chainId: args.chainId, dex: d.name });
|
|
543
|
+
return dexMarkets.map((m) => {
|
|
544
|
+
const annotation = annotationMap.get(m.name);
|
|
545
|
+
return {
|
|
546
|
+
...m,
|
|
547
|
+
dex: d.name,
|
|
548
|
+
displayName: annotation?.displayName,
|
|
549
|
+
category: annotation?.category,
|
|
550
|
+
keywords: annotation?.keywords
|
|
551
|
+
};
|
|
552
|
+
});
|
|
553
|
+
})
|
|
554
|
+
);
|
|
555
|
+
const markets = hip3Batches.flat();
|
|
556
|
+
return { markets, dexes };
|
|
557
|
+
}
|
|
527
558
|
async function hyperliquidCollectAllPerpMarkets(args) {
|
|
528
559
|
const dexFilter = args.dex?.trim();
|
|
529
560
|
const { dexes } = await hyperliquidFetchDexList({ chainId: args.chainId });
|
|
@@ -533,13 +564,8 @@ async function hyperliquidCollectAllPerpMarkets(args) {
|
|
|
533
564
|
}
|
|
534
565
|
const { markets: nativeMarkets } = await hyperliquidFetchPerpMeta({ chainId: args.chainId });
|
|
535
566
|
const markets = [...nativeMarkets];
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
const { markets: dexMarkets } = await hyperliquidFetchPerpMeta({ chainId: args.chainId, dex: d.name });
|
|
539
|
-
return dexMarkets.map((m) => ({ ...m, dex: d.name }));
|
|
540
|
-
})
|
|
541
|
-
);
|
|
542
|
-
for (const batch of hip3Batches) markets.push(...batch);
|
|
567
|
+
const { markets: hip3 } = await hyperliquidCollectHip3StockMarkets({ chainId: args.chainId });
|
|
568
|
+
markets.push(...hip3);
|
|
543
569
|
return { markets, dexes };
|
|
544
570
|
}
|
|
545
571
|
async function hyperliquidSearchMarkets(args) {
|
|
@@ -730,12 +756,20 @@ async function hyperliquidFetchOrdersForExecutor(args) {
|
|
|
730
756
|
});
|
|
731
757
|
}
|
|
732
758
|
async function hyperliquidFetchMarketsSummary(args) {
|
|
733
|
-
const
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
759
|
+
const dex = args.dex?.trim();
|
|
760
|
+
if (dex) {
|
|
761
|
+
const { markets: markets2, dexes: dexes2 } = await hyperliquidCollectAllPerpMarkets({
|
|
762
|
+
chainId: args.chainId,
|
|
763
|
+
dex
|
|
764
|
+
});
|
|
765
|
+
return { markets: markets2, dexes: dexes2 };
|
|
766
|
+
}
|
|
767
|
+
const { markets, dexes } = await hyperliquidCollectNativePerpMarkets({ chainId: args.chainId });
|
|
737
768
|
return { markets, dexes };
|
|
738
769
|
}
|
|
770
|
+
async function hyperliquidFetchStockMarketsSummary(args) {
|
|
771
|
+
return hyperliquidCollectHip3StockMarkets({ chainId: args.chainId });
|
|
772
|
+
}
|
|
739
773
|
async function hyperliquidSearchMarketsSummary(args) {
|
|
740
774
|
return hyperliquidSearchMarkets(args);
|
|
741
775
|
}
|
|
@@ -762,6 +796,24 @@ async function hyperliquidFetchVaultCatalogSummary(args) {
|
|
|
762
796
|
});
|
|
763
797
|
return { vaults };
|
|
764
798
|
}
|
|
799
|
+
async function hyperliquidFetchVaultApysSummary(args) {
|
|
800
|
+
const { vaults } = await hyperliquidFetchVaultSummaries({
|
|
801
|
+
chainId: args.chainId,
|
|
802
|
+
executorAddress: args.executorAddress
|
|
803
|
+
});
|
|
804
|
+
const hlp = HYPERLIQUID_HLP_VAULT_ADDRESS.toLowerCase();
|
|
805
|
+
const sorted = [...vaults].sort((a, b) => {
|
|
806
|
+
const aHlp = a.vaultAddress.toLowerCase() === hlp;
|
|
807
|
+
const bHlp = b.vaultAddress.toLowerCase() === hlp;
|
|
808
|
+
if (aHlp && !bHlp) return -1;
|
|
809
|
+
if (bHlp && !aHlp) return 1;
|
|
810
|
+
return (b.apr ?? -1) - (a.apr ?? -1);
|
|
811
|
+
});
|
|
812
|
+
return {
|
|
813
|
+
vaults: sorted,
|
|
814
|
+
notes: "Hyperliquid vault APR from official stats, sorted APR descending (HLP first). This is a vault return, not HIP-3 stock trading. Do not web-search vault APRs."
|
|
815
|
+
};
|
|
816
|
+
}
|
|
765
817
|
async function hyperliquidFetchUserVaultEquitiesSummary(args) {
|
|
766
818
|
const { rows } = await hyperliquidFetchUserVaultEquities({
|
|
767
819
|
chainId: args.chainId,
|
|
@@ -2236,6 +2288,8 @@ exports.hyperliquidApiBaseUrl = hyperliquidApiBaseUrl;
|
|
|
2236
2288
|
exports.hyperliquidBridgeArbitrumChainId = hyperliquidBridgeArbitrumChainId;
|
|
2237
2289
|
exports.hyperliquidBridgeConfig = hyperliquidBridgeConfig;
|
|
2238
2290
|
exports.hyperliquidCollectAllPerpMarkets = hyperliquidCollectAllPerpMarkets;
|
|
2291
|
+
exports.hyperliquidCollectHip3StockMarkets = hyperliquidCollectHip3StockMarkets;
|
|
2292
|
+
exports.hyperliquidCollectNativePerpMarkets = hyperliquidCollectNativePerpMarkets;
|
|
2239
2293
|
exports.hyperliquidEncodePx8 = hyperliquidEncodePx8;
|
|
2240
2294
|
exports.hyperliquidEncodeUsd6 = hyperliquidEncodeUsd6;
|
|
2241
2295
|
exports.hyperliquidEncodeWei8 = hyperliquidEncodeWei8;
|
|
@@ -2266,10 +2320,12 @@ exports.hyperliquidFetchSpotClearinghouseState = hyperliquidFetchSpotClearinghou
|
|
|
2266
2320
|
exports.hyperliquidFetchSpotMeta = hyperliquidFetchSpotMeta;
|
|
2267
2321
|
exports.hyperliquidFetchStakingSummary = hyperliquidFetchStakingSummary;
|
|
2268
2322
|
exports.hyperliquidFetchStakingSummaryForExecutor = hyperliquidFetchStakingSummaryForExecutor;
|
|
2323
|
+
exports.hyperliquidFetchStockMarketsSummary = hyperliquidFetchStockMarketsSummary;
|
|
2269
2324
|
exports.hyperliquidFetchUsdClassBalances = hyperliquidFetchUsdClassBalances;
|
|
2270
2325
|
exports.hyperliquidFetchUsdClassBalancesSummary = hyperliquidFetchUsdClassBalancesSummary;
|
|
2271
2326
|
exports.hyperliquidFetchUserVaultEquities = hyperliquidFetchUserVaultEquities;
|
|
2272
2327
|
exports.hyperliquidFetchUserVaultEquitiesSummary = hyperliquidFetchUserVaultEquitiesSummary;
|
|
2328
|
+
exports.hyperliquidFetchVaultApysSummary = hyperliquidFetchVaultApysSummary;
|
|
2273
2329
|
exports.hyperliquidFetchVaultCatalogSummary = hyperliquidFetchVaultCatalogSummary;
|
|
2274
2330
|
exports.hyperliquidFetchVaultSummaries = hyperliquidFetchVaultSummaries;
|
|
2275
2331
|
exports.hyperliquidFloatToWire = hyperliquidFloatToWire;
|