@1delta/data-sdk 0.0.61 → 0.0.63
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/index.js +26 -2
- package/dist/index.mjs +25 -3
- package/dist/lending/midnight.d.ts +59 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -403,6 +403,21 @@ var resolveTenorApiUrl = (chainId) => {
|
|
|
403
403
|
const cfg = midnightConfig()?.[chainId]?.tenorApiUrl;
|
|
404
404
|
return (cfg && cfg.length > 0 ? cfg : "https://api.tenor.finance/graphql").replace(/\/+$/, "");
|
|
405
405
|
};
|
|
406
|
+
var midnightTenorVaultPeriphery = (chainId) => {
|
|
407
|
+
const c = midnightConfig()?.[String(chainId)];
|
|
408
|
+
if (!c?.tenorVaultExecutor || !c?.tenorSupplyVaultCallback) return void 0;
|
|
409
|
+
return {
|
|
410
|
+
executor: c.tenorVaultExecutor,
|
|
411
|
+
supplyCallback: c.tenorSupplyVaultCallback,
|
|
412
|
+
...c.tenorWithdrawVaultCallback ? { withdrawCallback: c.tenorWithdrawVaultCallback } : {}
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
var isMidnightCollateralVault = (chainId, token) => {
|
|
416
|
+
const lower = token.toLowerCase();
|
|
417
|
+
return midnightMarketsByChain(chainId).some(
|
|
418
|
+
(m) => m.collateralParams.some((c) => !!c.collateralVault && c.token.toLowerCase() === lower)
|
|
419
|
+
);
|
|
420
|
+
};
|
|
406
421
|
var midnightMarkets = () => getGlobalData2()?.midnightMarkets;
|
|
407
422
|
var midnightMarketsByChain = (chainId) => getGlobalData2()?.midnightMarkets?.[String(chainId)] ?? [];
|
|
408
423
|
var midnightMarketById = (chainId, marketId) => {
|
|
@@ -658,8 +673,15 @@ var RESUPPLY_ETHEREUM_CONFIG = {
|
|
|
658
673
|
reusd: "0x57aB1E0003F623289CD798B1824Be09a793e4Bec",
|
|
659
674
|
utilities: "0x5f896C250DA6b462873813ceEc47F3e4D8CBA464",
|
|
660
675
|
curveSwapper: "0x042f48346be16Be381190a7397A80808243f3b2e",
|
|
661
|
-
|
|
662
|
-
|
|
676
|
+
// Resupply REDEPLOYED both RouterSwappers (re-read 2026-10-20 from
|
|
677
|
+
// `Registry.defaultSwappers(i)` + `name()`): the 2026-08 pair
|
|
678
|
+
// 0x181c98…043D (Enso) / 0x597D…1fCe (LI.FI) now reads
|
|
679
|
+
// `approvalsRevoked == true` and is whitelisted on NO pair, so every
|
|
680
|
+
// enso/lifi loop — and the 5 Fraxlend-backed pairs, whose only default is
|
|
681
|
+
// enso — answered BadSwapper. Same routers (Enso 0xF75584…, LI.FI
|
|
682
|
+
// 0x1231DE…), same RouterSwapper source; both whitelisted on all 22 pairs.
|
|
683
|
+
ensoSwapper: "0x91dD9F4A2ba16b3950103f07CE26313f310E62A1",
|
|
684
|
+
lifiSwapper: "0xbdD3daC55ac653b7E07360c7cd6616843479C20f",
|
|
663
685
|
redemptionHandler: "0x5eeB063d0abefBBc78F576E28d762a16b637A025",
|
|
664
686
|
liquidationHandler: "0x88888888c227c36401493Ed9F3e3Dcc3800B2634",
|
|
665
687
|
insurancePool: "0x00000000efe883b3304aFf71eaCf72Dbc3e1b577",
|
|
@@ -1656,6 +1678,7 @@ exports.inverseMarkets = inverseMarkets;
|
|
|
1656
1678
|
exports.isAaveV4OperationRestricted = isAaveV4OperationRestricted;
|
|
1657
1679
|
exports.isListaSmartLpAsset = isListaSmartLpAsset;
|
|
1658
1680
|
exports.isMidnightCollateralRef = isMidnightCollateralRef;
|
|
1681
|
+
exports.isMidnightCollateralVault = isMidnightCollateralVault;
|
|
1659
1682
|
exports.liquityBranchByIndex = liquityBranchByIndex;
|
|
1660
1683
|
exports.liquityBranchByTroveManager = liquityBranchByTroveManager;
|
|
1661
1684
|
exports.liquityBranchesByChain = liquityBranchesByChain;
|
|
@@ -1690,6 +1713,7 @@ exports.midnightMarketIsEnterable = midnightMarketIsEnterable;
|
|
|
1690
1713
|
exports.midnightMarkets = midnightMarkets;
|
|
1691
1714
|
exports.midnightMarketsByChain = midnightMarketsByChain;
|
|
1692
1715
|
exports.midnightNotEnterableReason = midnightNotEnterableReason;
|
|
1716
|
+
exports.midnightTenorVaultPeriphery = midnightTenorVaultPeriphery;
|
|
1693
1717
|
exports.morphoBundler3 = morphoBundler3;
|
|
1694
1718
|
exports.morphoOracles = morphoOracles;
|
|
1695
1719
|
exports.morphoPools = morphoPools;
|
package/dist/index.mjs
CHANGED
|
@@ -401,6 +401,21 @@ var resolveTenorApiUrl = (chainId) => {
|
|
|
401
401
|
const cfg = midnightConfig()?.[chainId]?.tenorApiUrl;
|
|
402
402
|
return (cfg && cfg.length > 0 ? cfg : "https://api.tenor.finance/graphql").replace(/\/+$/, "");
|
|
403
403
|
};
|
|
404
|
+
var midnightTenorVaultPeriphery = (chainId) => {
|
|
405
|
+
const c = midnightConfig()?.[String(chainId)];
|
|
406
|
+
if (!c?.tenorVaultExecutor || !c?.tenorSupplyVaultCallback) return void 0;
|
|
407
|
+
return {
|
|
408
|
+
executor: c.tenorVaultExecutor,
|
|
409
|
+
supplyCallback: c.tenorSupplyVaultCallback,
|
|
410
|
+
...c.tenorWithdrawVaultCallback ? { withdrawCallback: c.tenorWithdrawVaultCallback } : {}
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
var isMidnightCollateralVault = (chainId, token) => {
|
|
414
|
+
const lower = token.toLowerCase();
|
|
415
|
+
return midnightMarketsByChain(chainId).some(
|
|
416
|
+
(m) => m.collateralParams.some((c) => !!c.collateralVault && c.token.toLowerCase() === lower)
|
|
417
|
+
);
|
|
418
|
+
};
|
|
404
419
|
var midnightMarkets = () => getGlobalData2()?.midnightMarkets;
|
|
405
420
|
var midnightMarketsByChain = (chainId) => getGlobalData2()?.midnightMarkets?.[String(chainId)] ?? [];
|
|
406
421
|
var midnightMarketById = (chainId, marketId) => {
|
|
@@ -656,8 +671,15 @@ var RESUPPLY_ETHEREUM_CONFIG = {
|
|
|
656
671
|
reusd: "0x57aB1E0003F623289CD798B1824Be09a793e4Bec",
|
|
657
672
|
utilities: "0x5f896C250DA6b462873813ceEc47F3e4D8CBA464",
|
|
658
673
|
curveSwapper: "0x042f48346be16Be381190a7397A80808243f3b2e",
|
|
659
|
-
|
|
660
|
-
|
|
674
|
+
// Resupply REDEPLOYED both RouterSwappers (re-read 2026-10-20 from
|
|
675
|
+
// `Registry.defaultSwappers(i)` + `name()`): the 2026-08 pair
|
|
676
|
+
// 0x181c98…043D (Enso) / 0x597D…1fCe (LI.FI) now reads
|
|
677
|
+
// `approvalsRevoked == true` and is whitelisted on NO pair, so every
|
|
678
|
+
// enso/lifi loop — and the 5 Fraxlend-backed pairs, whose only default is
|
|
679
|
+
// enso — answered BadSwapper. Same routers (Enso 0xF75584…, LI.FI
|
|
680
|
+
// 0x1231DE…), same RouterSwapper source; both whitelisted on all 22 pairs.
|
|
681
|
+
ensoSwapper: "0x91dD9F4A2ba16b3950103f07CE26313f310E62A1",
|
|
682
|
+
lifiSwapper: "0xbdD3daC55ac653b7E07360c7cd6616843479C20f",
|
|
661
683
|
redemptionHandler: "0x5eeB063d0abefBBc78F576E28d762a16b637A025",
|
|
662
684
|
liquidationHandler: "0x88888888c227c36401493Ed9F3e3Dcc3800B2634",
|
|
663
685
|
insurancePool: "0x00000000efe883b3304aFf71eaCf72Dbc3e1b577",
|
|
@@ -1525,4 +1547,4 @@ async function fetchMainTokensMap() {
|
|
|
1525
1547
|
}
|
|
1526
1548
|
}
|
|
1527
1549
|
|
|
1528
|
-
export { ALCHEMIX_ARBITRUM_CONFIG, ALCHEMIX_BASE_CONFIG, ALCHEMIX_ETHEREUM_CONFIG, ALCHEMIX_OPTIMISM_CONFIG, COOLER_ETHEREUM_CONFIG, CURVANCE_MONAD_CONFIG, DOLOMITE_ROUTER_DEFAULTS, FRAXLEND_ETHEREUM_CONFIG, GEARBOX_ACCOUNT_COMPRESSOR_V310, REMOTE_CACHE_STORE_TTL_S, RESUPPLY_ETHEREUM_CONFIG, RIPE_BASE_CONFIG, RIPE_HQ_IDS, RIPE_ROBINHOOD_CONFIG, RemoteFetchError, aaveOracles, aaveOraclesConfig, aavePools, aaveReserves, aaveTokens, aaveV4Oracles, aaveV4Peripherals, aaveV4SpokeLenderKey, aaveV4Spokes, aaveWethGateway, alchemixBaseKey, alchemixConfig, alchemixConfigFor, alchemixLendersByChain, alchemixMarketByKey, alchemixMarketKey, alchemixMarketsFor, assertTwyneKeysUnique, chainLogoURI, chains, clearRemoteCache, compoundV2Oracles, compoundV2OraclesConfig, compoundV2Pools, compoundV2Reserves, compoundV2TokenArray, compoundV2Tokens, compoundV3BaseData, compoundV3Bulker, compoundV3OraclesData, compoundV3Pools, compoundV3Reserves, coolerConfig, coolerConfigFor, coolerLendersByChain, curvanceConfig, curvanceConfigFor, curvanceLendersByChain, curvancePositionManager, curvancePositionManagersFor, dolomiteChains, dolomiteConfigs, dolomiteEmode, dolomiteIsolation, dolomiteIsolationMarket, dolomiteMarketIdByToken, dolomiteOdosExecutorShim, dolomiteRouters, dssChainData, dssConfigFor, dssDebtJoin, dssDebtToken, dssMarketByIlk, eulerConfigs, eulerVaults, exactlyConfig, exactlyMarketByAddress, exactlyMarketByAsset, exactlyMarkets, exactlyMarketsByChain, fetchMainTokensMap, fetchRemoteJson, fetchTokenList, fetchTokenListFile, fetchTokenLists, findAaveV4PositionManager, fluidChains, fluidResolvers, fluidVaultEntries, fluidVaults, flyingTulipAssets, flyingTulipAssetsFor, flyingTulipConfig, flyingTulipConfigFor, flyingTulipLendersByChain, frankencoinChainData, frankencoinConfig, frankencoinConfigFor, frankencoinLendersByChain, frankencoinMarketByPosition, frankencoinMarkets, fraxlendConfig, fraxlendConfigFor, fraxlendLendersByChain, fraxlendPairKey, fraxlendPairsFor, gearboxAccountCompressor, gearboxAddressProviderV310, gearboxBotListV3, gearboxChains, gearboxMarketCompressor, gearboxMarketConfigurators, gearboxResolvers, gearboxV3LenderKey, getAaveV4GatewayAddresses, getAaveV4PositionManagers, getAaveV4SpokeAccess, getAaveV4SpokeEntry, getAaveV4SpokePeripherals, getChainEntries, getSiloV2MarketEntry, getSiloV3MarketEntry, initConfig, initializeChainData, initializeLenderData, inverseChainData, inverseConfig, inverseConfigFor, inverseLendersByChain, inverseMarketByAddress, inverseMarkets, isAaveV4OperationRestricted, isListaSmartLpAsset, isMidnightCollateralRef, liquityBranchByIndex, liquityBranchByTroveManager, liquityBranchesByChain, liquityConfig, liquityConfigFor, liquityLendersByChain, liquityMarkets, listaCollateralProvider, listaCollateralProviders, listaNativeProvider, listaSmartLpByCollateral, llamaLendApiBaseUrl, llamaLendChainData, llamaLendConfig, llamaLendConfigFor, llamaLendLenderKey, llamaLendLendersByChain, llamaLendLeverageZap, llamaLendMarketByController, llamaLendMarketByVault, llamaLendMarkets, llamaLendSupportsDelegation, llamaLendSupportsLeverage, loadCached, loadCachedJson, midnightApiBaseOverride, midnightCollateralRef, midnightConfig, midnightLoanRef, midnightMarketById, midnightMarketIsEnterable, midnightMarkets, midnightMarketsByChain, midnightNotEnterableReason, morphoBundler3, morphoOracles, morphoPools, morphoTypeMarkets, morphoTypeOracles, morphoTypeVaults, parseAaveV4SpokeLenderKey, parseAlchemixMarketKey, parseFraxlendPairKey, parseGearboxV3LenderKey, parseLlamaLendLenderKey, parseMidnightRef, parseSiloV2LenderKey, parseSiloV3LenderKey, parseTermMaxLenderKey, refreshRemoteCache, resolveMidnightApiBase, resolveTenorApiUrl, resolveTermApiBase, resolveTermOrderStoreBase, resupplyConfig, resupplyConfigFor, resupplyLendersByChain, ripeConfig, ripeConfigFor, ripeLendersByChain, riverChainData, riverConfig, riverConfigFor, riverLendersByChain, riverMarketByIndex, riverMarkets, setMidnightApiBase, setRemoteCacheGithubToken, setRemoteCacheStore, setRemoteCacheWaitUntil, setTenorApiUrl, setTermApiBase, setTermOrderStoreBase, siloMarkets, siloMarketsV3, siloPeripherals, siloPeripheralsV3, siloV2LenderKey, siloV3LenderKey, skyChainData, skyConfig, skyConfigFor, skyLendersByChain, skyMarkets, tellerConfig, tellerConfigByChain, tellerPoolByAddress, tellerPools, tellerPoolsByChain, tenorApiUrlOverride, termApiBaseOverride, termConfig, termMarketById, termMarkets, termMarketsByChain, termMaxApiBaseUrl, termMaxChainIds, termMaxConfig, termMaxConfigByChain, termMaxLenderKey, termOrderStoreBaseOverride, tokenListCacheKey, twyneBaseKey, twyneBeaconFor, twyneChainData, twyneConfig, twyneConfigFor, twyneLendersByChain, twyneMarketByKey, twyneMarketFor, twyneMarketKey, twyneMarkets, twyneMarketsForIntermediateVault, twyneOperator, usddChainData, usddConfig, usddConfigFor, usddLendersByChain, usddMarketByIlk, usddMarkets };
|
|
1550
|
+
export { ALCHEMIX_ARBITRUM_CONFIG, ALCHEMIX_BASE_CONFIG, ALCHEMIX_ETHEREUM_CONFIG, ALCHEMIX_OPTIMISM_CONFIG, COOLER_ETHEREUM_CONFIG, CURVANCE_MONAD_CONFIG, DOLOMITE_ROUTER_DEFAULTS, FRAXLEND_ETHEREUM_CONFIG, GEARBOX_ACCOUNT_COMPRESSOR_V310, REMOTE_CACHE_STORE_TTL_S, RESUPPLY_ETHEREUM_CONFIG, RIPE_BASE_CONFIG, RIPE_HQ_IDS, RIPE_ROBINHOOD_CONFIG, RemoteFetchError, aaveOracles, aaveOraclesConfig, aavePools, aaveReserves, aaveTokens, aaveV4Oracles, aaveV4Peripherals, aaveV4SpokeLenderKey, aaveV4Spokes, aaveWethGateway, alchemixBaseKey, alchemixConfig, alchemixConfigFor, alchemixLendersByChain, alchemixMarketByKey, alchemixMarketKey, alchemixMarketsFor, assertTwyneKeysUnique, chainLogoURI, chains, clearRemoteCache, compoundV2Oracles, compoundV2OraclesConfig, compoundV2Pools, compoundV2Reserves, compoundV2TokenArray, compoundV2Tokens, compoundV3BaseData, compoundV3Bulker, compoundV3OraclesData, compoundV3Pools, compoundV3Reserves, coolerConfig, coolerConfigFor, coolerLendersByChain, curvanceConfig, curvanceConfigFor, curvanceLendersByChain, curvancePositionManager, curvancePositionManagersFor, dolomiteChains, dolomiteConfigs, dolomiteEmode, dolomiteIsolation, dolomiteIsolationMarket, dolomiteMarketIdByToken, dolomiteOdosExecutorShim, dolomiteRouters, dssChainData, dssConfigFor, dssDebtJoin, dssDebtToken, dssMarketByIlk, eulerConfigs, eulerVaults, exactlyConfig, exactlyMarketByAddress, exactlyMarketByAsset, exactlyMarkets, exactlyMarketsByChain, fetchMainTokensMap, fetchRemoteJson, fetchTokenList, fetchTokenListFile, fetchTokenLists, findAaveV4PositionManager, fluidChains, fluidResolvers, fluidVaultEntries, fluidVaults, flyingTulipAssets, flyingTulipAssetsFor, flyingTulipConfig, flyingTulipConfigFor, flyingTulipLendersByChain, frankencoinChainData, frankencoinConfig, frankencoinConfigFor, frankencoinLendersByChain, frankencoinMarketByPosition, frankencoinMarkets, fraxlendConfig, fraxlendConfigFor, fraxlendLendersByChain, fraxlendPairKey, fraxlendPairsFor, gearboxAccountCompressor, gearboxAddressProviderV310, gearboxBotListV3, gearboxChains, gearboxMarketCompressor, gearboxMarketConfigurators, gearboxResolvers, gearboxV3LenderKey, getAaveV4GatewayAddresses, getAaveV4PositionManagers, getAaveV4SpokeAccess, getAaveV4SpokeEntry, getAaveV4SpokePeripherals, getChainEntries, getSiloV2MarketEntry, getSiloV3MarketEntry, initConfig, initializeChainData, initializeLenderData, inverseChainData, inverseConfig, inverseConfigFor, inverseLendersByChain, inverseMarketByAddress, inverseMarkets, isAaveV4OperationRestricted, isListaSmartLpAsset, isMidnightCollateralRef, isMidnightCollateralVault, liquityBranchByIndex, liquityBranchByTroveManager, liquityBranchesByChain, liquityConfig, liquityConfigFor, liquityLendersByChain, liquityMarkets, listaCollateralProvider, listaCollateralProviders, listaNativeProvider, listaSmartLpByCollateral, llamaLendApiBaseUrl, llamaLendChainData, llamaLendConfig, llamaLendConfigFor, llamaLendLenderKey, llamaLendLendersByChain, llamaLendLeverageZap, llamaLendMarketByController, llamaLendMarketByVault, llamaLendMarkets, llamaLendSupportsDelegation, llamaLendSupportsLeverage, loadCached, loadCachedJson, midnightApiBaseOverride, midnightCollateralRef, midnightConfig, midnightLoanRef, midnightMarketById, midnightMarketIsEnterable, midnightMarkets, midnightMarketsByChain, midnightNotEnterableReason, midnightTenorVaultPeriphery, morphoBundler3, morphoOracles, morphoPools, morphoTypeMarkets, morphoTypeOracles, morphoTypeVaults, parseAaveV4SpokeLenderKey, parseAlchemixMarketKey, parseFraxlendPairKey, parseGearboxV3LenderKey, parseLlamaLendLenderKey, parseMidnightRef, parseSiloV2LenderKey, parseSiloV3LenderKey, parseTermMaxLenderKey, refreshRemoteCache, resolveMidnightApiBase, resolveTenorApiUrl, resolveTermApiBase, resolveTermOrderStoreBase, resupplyConfig, resupplyConfigFor, resupplyLendersByChain, ripeConfig, ripeConfigFor, ripeLendersByChain, riverChainData, riverConfig, riverConfigFor, riverLendersByChain, riverMarketByIndex, riverMarkets, setMidnightApiBase, setRemoteCacheGithubToken, setRemoteCacheStore, setRemoteCacheWaitUntil, setTenorApiUrl, setTermApiBase, setTermOrderStoreBase, siloMarkets, siloMarketsV3, siloPeripherals, siloPeripheralsV3, siloV2LenderKey, siloV3LenderKey, skyChainData, skyConfig, skyConfigFor, skyLendersByChain, skyMarkets, tellerConfig, tellerConfigByChain, tellerPoolByAddress, tellerPools, tellerPoolsByChain, tenorApiUrlOverride, termApiBaseOverride, termConfig, termMarketById, termMarkets, termMarketsByChain, termMaxApiBaseUrl, termMaxChainIds, termMaxConfig, termMaxConfigByChain, termMaxLenderKey, termOrderStoreBaseOverride, tokenListCacheKey, twyneBaseKey, twyneBeaconFor, twyneChainData, twyneConfig, twyneConfigFor, twyneLendersByChain, twyneMarketByKey, twyneMarketFor, twyneMarketKey, twyneMarkets, twyneMarketsForIntermediateVault, twyneOperator, usddChainData, usddConfig, usddConfigFor, usddLendersByChain, usddMarketByIlk, usddMarkets };
|
|
@@ -2,8 +2,30 @@
|
|
|
2
2
|
export type MidnightConfigChain = {
|
|
3
3
|
/** Core Midnight contract. */
|
|
4
4
|
midnight: string;
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* MidnightBundlesV1 periphery (spot supply/borrow/repay bundles) — the ABI
|
|
7
|
+
* our encoders speak. Absent on chains that only got V2 (Robinhood 4663,
|
|
8
|
+
* Arc 5042): V2 implements none of the five V1 bundle selectors, so it can
|
|
9
|
+
* never stand in here.
|
|
10
|
+
*/
|
|
11
|
+
midnightBundles?: string;
|
|
12
|
+
/** MidnightBundlesV2 (not yet encoded by us; recorded for when it is). */
|
|
13
|
+
midnightBundlesV2?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Tenor's periphery for the vault-as-collateral leg (see
|
|
16
|
+
* {@link MidnightCollateralParam.collateralVault}). The collateral vaults gate
|
|
17
|
+
* who may RECEIVE shares to Midnight and these contracts, so a user, our
|
|
18
|
+
* composer or an aggregator can never hold one — every way into or out of the
|
|
19
|
+
* leg goes through them. Addresses are NOT shared across chains (one CREATE
|
|
20
|
+
* deployer, different nonces), and on Base the address that is the supply
|
|
21
|
+
* callback on Ethereum is the WITHDRAW callback; each was matched by runtime
|
|
22
|
+
* code against the verified Ethereum deployment. Absent = no vault-leg routes.
|
|
23
|
+
*/
|
|
24
|
+
tenorVaultExecutor?: string | null;
|
|
25
|
+
/** `MidnightSupplyVaultSharesCallback` — a borrow take whose proceeds land in the vault. */
|
|
26
|
+
tenorSupplyVaultCallback?: string | null;
|
|
27
|
+
/** `MidnightWithdrawVaultSharesCallback` — funds a borrower's buy offer from vault shares. */
|
|
28
|
+
tenorWithdrawVaultCallback?: string | null;
|
|
7
29
|
/** On-chain mempool log contract where signed offers are published. */
|
|
8
30
|
midnightMempool: string;
|
|
9
31
|
ecrecoverRatifier?: string | null;
|
|
@@ -42,6 +64,28 @@ export type MidnightCollateralParam = {
|
|
|
42
64
|
* the collateral is itself a lending position. See TENOR_PLAN.md §P4.
|
|
43
65
|
*/
|
|
44
66
|
collateralVault?: string | null;
|
|
67
|
+
/**
|
|
68
|
+
* The vault's `receiveSharesGate` is set: only allowlisted contracts (Midnight
|
|
69
|
+
* and Tenor's periphery) may hold its shares. Then nothing can be bought on a
|
|
70
|
+
* DEX, minted by a generic 4626 route or held by the user — the leg is reached
|
|
71
|
+
* only through `tenorVaultExecutor` / `tenorSupplyVaultCallback`.
|
|
72
|
+
*/
|
|
73
|
+
collateralVaultGated?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Where the vault's yield comes from: its ONE Vault V2 adapter supplies ONE
|
|
76
|
+
* Morpho Blue market, so the share earns that market's supply rate net of
|
|
77
|
+
* the vault's fees (WAD strings). Read on-chain by the lender-metadata
|
|
78
|
+
* updater; absent when the vault has any other allocation shape. yield-tracer
|
|
79
|
+
* turns it into the leg's intrinsic yield from the stored
|
|
80
|
+
* `MORPHO_BLUE_<marketId>` row (a "composite" yield — no second fetch).
|
|
81
|
+
*/
|
|
82
|
+
collateralVaultSource?: {
|
|
83
|
+
kind: 'morpho-blue';
|
|
84
|
+
morpho: string;
|
|
85
|
+
marketId: string;
|
|
86
|
+
performanceFee: string;
|
|
87
|
+
managementFee: string;
|
|
88
|
+
};
|
|
45
89
|
};
|
|
46
90
|
/**
|
|
47
91
|
* Who may enter (take offers on) / liquidate a market. Midnight markets can pin
|
|
@@ -124,6 +168,19 @@ export declare const setTenorApiUrl: (url: string | undefined | null) => void;
|
|
|
124
168
|
export declare const tenorApiUrlOverride: () => string | undefined;
|
|
125
169
|
/** Resolve the Tenor GraphQL endpoint for a chain: override → config → hosted default. */
|
|
126
170
|
export declare const resolveTenorApiUrl: (chainId: string) => string;
|
|
171
|
+
/** Tenor's vault-leg periphery on a chain, or `undefined` when any part is missing. */
|
|
172
|
+
export declare const midnightTenorVaultPeriphery: (chainId: string | number) => {
|
|
173
|
+
executor: string;
|
|
174
|
+
supplyCallback: string;
|
|
175
|
+
withdrawCallback?: string;
|
|
176
|
+
} | undefined;
|
|
177
|
+
/**
|
|
178
|
+
* Is `token` a vault-as-collateral share on this chain — a Midnight collateral
|
|
179
|
+
* leg that is an ERC-4626 over its market's own loan token? Such a share is a
|
|
180
|
+
* single-purpose collateral WRAPPER (it exists to be posted on one book), not an
|
|
181
|
+
* earn product, and — when gated — cannot be held outside Midnight at all.
|
|
182
|
+
*/
|
|
183
|
+
export declare const isMidnightCollateralVault: (chainId: string | number, token: string) => boolean;
|
|
127
184
|
export declare const midnightMarkets: () => MidnightMarketsType;
|
|
128
185
|
/** All Midnight market configs on a chain (empty array if none/unloaded). */
|
|
129
186
|
export declare const midnightMarketsByChain: (chainId: string | number) => MidnightMarketConfig[];
|