@defisaver/positions-sdk 2.1.151-midnight-3-dev → 2.1.151

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 (42) hide show
  1. package/cjs/claiming/compV3.js +1 -0
  2. package/cjs/config/contracts.d.ts +0 -4
  3. package/cjs/config/contracts.js +0 -4
  4. package/cjs/helpers/morphoMidnightHelpers/tenor.d.ts +2 -6
  5. package/cjs/helpers/morphoMidnightHelpers/tenor.js +1 -5
  6. package/cjs/markets/aaveV4/index.d.ts +2 -0
  7. package/cjs/markets/aaveV4/index.js +13 -1
  8. package/cjs/markets/index.d.ts +1 -1
  9. package/cjs/markets/index.js +1 -2
  10. package/cjs/markets/morphoMidnight/index.d.ts +10 -92
  11. package/cjs/markets/morphoMidnight/index.js +60 -519
  12. package/cjs/morphoMidnight/index.js +1 -11
  13. package/cjs/types/aaveV4.d.ts +1 -0
  14. package/cjs/types/aaveV4.js +1 -0
  15. package/cjs/types/morphoMidnight.d.ts +4 -57
  16. package/cjs/types/morphoMidnight.js +0 -45
  17. package/esm/claiming/compV3.js +1 -0
  18. package/esm/config/contracts.d.ts +0 -4
  19. package/esm/config/contracts.js +0 -4
  20. package/esm/helpers/morphoMidnightHelpers/tenor.d.ts +2 -6
  21. package/esm/helpers/morphoMidnightHelpers/tenor.js +2 -6
  22. package/esm/markets/aaveV4/index.d.ts +2 -0
  23. package/esm/markets/aaveV4/index.js +11 -0
  24. package/esm/markets/index.d.ts +1 -1
  25. package/esm/markets/index.js +1 -1
  26. package/esm/markets/morphoMidnight/index.d.ts +10 -92
  27. package/esm/markets/morphoMidnight/index.js +59 -473
  28. package/esm/morphoMidnight/index.js +1 -11
  29. package/esm/types/aaveV4.d.ts +1 -0
  30. package/esm/types/aaveV4.js +1 -0
  31. package/esm/types/morphoMidnight.d.ts +4 -57
  32. package/esm/types/morphoMidnight.js +0 -45
  33. package/package.json +2 -2
  34. package/src/claiming/compV3.ts +1 -0
  35. package/src/config/contracts.ts +0 -4
  36. package/src/helpers/morphoMidnightHelpers/tenor.ts +2 -6
  37. package/src/markets/aaveV4/index.ts +12 -0
  38. package/src/markets/index.ts +0 -1
  39. package/src/markets/morphoMidnight/index.ts +61 -724
  40. package/src/morphoMidnight/index.ts +1 -8
  41. package/src/types/aaveV4.ts +1 -0
  42. package/src/types/morphoMidnight.ts +3 -59
@@ -78,13 +78,8 @@ function _getMorphoMidnightMarketData(provider, network, selectedMarket) {
78
78
  supplyIncentives: [],
79
79
  borrowIncentives: [],
80
80
  };
81
- // `collaterals` is the full on-chain set, so `i` is the index `prices` is keyed by. Hidden entries
82
- // (curator vaults, the loan token itself) are skipped rather than filtered out beforehand, which would
83
- // shift every later collateral onto the wrong price.
84
81
  const collateralSymbols = [];
85
82
  collaterals.forEach((coll, i) => {
86
- if (coll.hidden)
87
- return;
88
83
  const collInfo = (0, tokens_1.getAssetInfoByAddress)(coll.token, network);
89
84
  const collSym = (0, utils_1.wethToEth)(collInfo.symbol);
90
85
  collateralSymbols.push(collSym);
@@ -147,11 +142,8 @@ function _getMorphoMidnightAccountData(provider, network, account, selectedMarke
147
142
  suppliedUsd: new decimal_js_1.default(credit).mul(loanTokenData.price).toString(),
148
143
  borrowedUsd: new decimal_js_1.default(debt).mul(loanTokenData.price).toString(),
149
144
  };
150
- // positionInfo.collateral is index-aligned with the market's full on-chain collateral set (0 where
151
- // unused), so hidden entries are skipped in place rather than filtered out first.
145
+ // positionInfo.collateral is index-aligned with the market's collateral set (0 where unused).
152
146
  collaterals.forEach((coll, i) => {
153
- if (coll.hidden)
154
- return;
155
147
  const collInfo = (0, tokens_1.getAssetInfoByAddress)(coll.token, network);
156
148
  const collSym = (0, utils_1.wethToEth)(collInfo.symbol);
157
149
  const rawAmount = positionInfo.collateral[i] ? positionInfo.collateral[i].toString() : '0';
@@ -231,8 +223,6 @@ const _getMorphoMidnightAccountBalances = (provider, network, block, addressMapp
231
223
  };
232
224
  const collateral = {};
233
225
  collaterals.forEach((coll, i) => {
234
- if (coll.hidden)
235
- return;
236
226
  const collInfo = (0, tokens_1.getAssetInfoByAddress)(coll.token, network);
237
227
  const rawAmount = positionInfo.collateral[i] ? positionInfo.collateral[i].toString() : '0';
238
228
  collateral[addressMapping ? collInfo.address.toLowerCase() : (0, utils_1.wethToEth)(collInfo.symbol)] = (0, tokens_1.assetAmountInEth)(rawAmount, (0, utils_1.wethToEth)(collInfo.symbol));
@@ -16,6 +16,7 @@ export declare enum AaveV4SpokesType {
16
16
  AaveV4LidoSpoke = "aave_v4_lido_spoke",
17
17
  AaveV4LombardBtcSpoke = "aave_v4_lombard_btc_spoke",
18
18
  AaveV4MainSpoke = "aave_v4_main_spoke",
19
+ AaveV4PaxgGoldSpoke = "aave_v4_paxg_gold_spoke",
19
20
  AaveV4USDGPendleSpoke = "aave_v4_usdg_pendle_spoke",
20
21
  AaveV4USDGMapleSpoke = "aave_v4_usdg_maple_spoke"
21
22
  }
@@ -20,6 +20,7 @@ var AaveV4SpokesType;
20
20
  AaveV4SpokesType["AaveV4LidoSpoke"] = "aave_v4_lido_spoke";
21
21
  AaveV4SpokesType["AaveV4LombardBtcSpoke"] = "aave_v4_lombard_btc_spoke";
22
22
  AaveV4SpokesType["AaveV4MainSpoke"] = "aave_v4_main_spoke";
23
+ AaveV4SpokesType["AaveV4PaxgGoldSpoke"] = "aave_v4_paxg_gold_spoke";
23
24
  AaveV4SpokesType["AaveV4USDGPendleSpoke"] = "aave_v4_usdg_pendle_spoke";
24
25
  AaveV4SpokesType["AaveV4USDGMapleSpoke"] = "aave_v4_usdg_maple_spoke";
25
26
  })(AaveV4SpokesType || (exports.AaveV4SpokesType = AaveV4SpokesType = {}));
@@ -31,49 +31,7 @@ export declare enum MorphoMidnightVersions {
31
31
  MorphoMidnightTenorCbETHWETH_20261030_Base = "morphomidnighttenorcbethweth_20261030_base",
32
32
  MorphoMidnightTenorCbETHWETH_20261127_Base = "morphomidnighttenorcbethweth_20261127_base",
33
33
  MorphoMidnightTenorCbETHWETH_20261225_Base = "morphomidnighttenorcbethweth_20261225_base",
34
- MorphoMidnightTenorCbETHWETH_20270129_Base = "morphomidnighttenorcbethweth_20270129_base",
35
- MorphoMidnightWBTCUSDC_860_20260925_Eth = "morphomidnightwbtcusdc_860_20260925_eth",
36
- MorphoMidnightWBTCUSDC_860_20261030_Eth = "morphomidnightwbtcusdc_860_20261030_eth",
37
- MorphoMidnightWBTCUSDC_860_20261127_Eth = "morphomidnightwbtcusdc_860_20261127_eth",
38
- MorphoMidnightWBTCUSDC_860_20261225_Eth = "morphomidnightwbtcusdc_860_20261225_eth",
39
- MorphoMidnightWBTCUSDC_860_20270129_Eth = "morphomidnightwbtcusdc_860_20270129_eth",
40
- MorphoMidnightWBTCUSDC_860_20270226_Eth = "morphomidnightwbtcusdc_860_20270226_eth",
41
- MorphoMidnightWBTCUSDC_860_20270326_Eth = "morphomidnightwbtcusdc_860_20270326_eth",
42
- MorphoMidnightCbBTCUSDC_860_20260925_Eth = "morphomidnightcbbtcusdc_860_20260925_eth",
43
- MorphoMidnightCbBTCUSDC_860_20261030_Eth = "morphomidnightcbbtcusdc_860_20261030_eth",
44
- MorphoMidnightCbBTCUSDC_860_20261127_Eth = "morphomidnightcbbtcusdc_860_20261127_eth",
45
- MorphoMidnightCbBTCUSDC_860_20261225_Eth = "morphomidnightcbbtcusdc_860_20261225_eth",
46
- MorphoMidnightCbBTCUSDC_860_20270129_Eth = "morphomidnightcbbtcusdc_860_20270129_eth",
47
- MorphoMidnightCbBTCUSDC_860_20270226_Eth = "morphomidnightcbbtcusdc_860_20270226_eth",
48
- MorphoMidnightCbBTCUSDC_860_20270326_Eth = "morphomidnightcbbtcusdc_860_20270326_eth",
49
- MorphoMidnightTenorReUSDUSDC_20260925_Eth = "morphomidnighttenorreusdusdc_20260925_eth",
50
- MorphoMidnightTenorReUSDUSDC_20261030_Eth = "morphomidnighttenorreusdusdc_20261030_eth",
51
- MorphoMidnightTenorReUSDUSDC_20261127_Eth = "morphomidnighttenorreusdusdc_20261127_eth",
52
- MorphoMidnightTenorReUSDUSDC_20261225_Eth = "morphomidnighttenorreusdusdc_20261225_eth",
53
- MorphoMidnightTenorSiUSDUSDC_20260925_Eth = "morphomidnighttenorsiusdusdc_20260925_eth",
54
- MorphoMidnightTenorSiUSDUSDC_20261030_Eth = "morphomidnighttenorsiusdusdc_20261030_eth",
55
- MorphoMidnightTenorSiUSDUSDC_20261127_Eth = "morphomidnighttenorsiusdusdc_20261127_eth",
56
- MorphoMidnightTenorSiUSDUSDC_20261225_Eth = "morphomidnighttenorsiusdusdc_20261225_eth",
57
- MorphoMidnightTenorStrUSDUSDC_20260925_Eth = "morphomidnighttenorstrusdusdc_20260925_eth",
58
- MorphoMidnightTenorStrUSDUSDC_20261030_Eth = "morphomidnighttenorstrusdusdc_20261030_eth",
59
- MorphoMidnightTenorStrUSDUSDC_20261127_Eth = "morphomidnighttenorstrusdusdc_20261127_eth",
60
- MorphoMidnightTenorStrUSDUSDC_20261225_Eth = "morphomidnighttenorstrusdusdc_20261225_eth",
61
- MorphoMidnightTenorUSD3USDC_20260925_Eth = "morphomidnighttenorusd3usdc_20260925_eth",
62
- MorphoMidnightTenorUSD3USDC_20261030_Eth = "morphomidnighttenorusd3usdc_20261030_eth",
63
- MorphoMidnightTenorUSD3USDC_20261127_Eth = "morphomidnighttenorusd3usdc_20261127_eth",
64
- MorphoMidnightTenorUSD3USDC_20261225_Eth = "morphomidnighttenorusd3usdc_20261225_eth",
65
- MorphoMidnightTenorWETHUSDC_20260925_Eth = "morphomidnighttenorwethusdc_20260925_eth",
66
- MorphoMidnightTenorWETHUSDC_20261030_Eth = "morphomidnighttenorwethusdc_20261030_eth",
67
- MorphoMidnightTenorWETHUSDC_20261127_Eth = "morphomidnighttenorwethusdc_20261127_eth",
68
- MorphoMidnightTenorWETHUSDC_20261225_Eth = "morphomidnighttenorwethusdc_20261225_eth",
69
- MorphoMidnightTenorWsrUSDUSDC_20260925_Eth = "morphomidnighttenorwsrusdusdc_20260925_eth",
70
- MorphoMidnightTenorWsrUSDUSDC_20261030_Eth = "morphomidnighttenorwsrusdusdc_20261030_eth",
71
- MorphoMidnightTenorWsrUSDUSDC_20261127_Eth = "morphomidnighttenorwsrusdusdc_20261127_eth",
72
- MorphoMidnightTenorWsrUSDUSDC_20261225_Eth = "morphomidnighttenorwsrusdusdc_20261225_eth",
73
- MorphoMidnightTenorWstETHWETH_20260925_Eth = "morphomidnighttenorwstethweth_20260925_eth",
74
- MorphoMidnightTenorWstETHWETH_20261030_Eth = "morphomidnighttenorwstethweth_20261030_eth",
75
- MorphoMidnightTenorWstETHWETH_20261127_Eth = "morphomidnighttenorwstethweth_20261127_eth",
76
- MorphoMidnightTenorWstETHWETH_20261225_Eth = "morphomidnighttenorwstethweth_20261225_eth"
34
+ MorphoMidnightTenorCbETHWETH_20270129_Base = "morphomidnighttenorcbethweth_20270129_base"
77
35
  }
78
36
  export type MorphoMidnightCurator = 'Morpho' | 'Tenor';
79
37
  export interface MorphoMidnightCollateralParams {
@@ -81,13 +39,6 @@ export interface MorphoMidnightCollateralParams {
81
39
  lltv: number | string;
82
40
  liquidationCursor: number | string;
83
41
  oracle: EthAddress;
84
- /**
85
- * A collateral the market carries on-chain but the app never surfaces: a curator's own vault share
86
- * token (Tenor's collateral vaults) or the loan token itself (Morpho's mainnet ladders list USDC at
87
- * 98% next to the real collateral). It is not an asset the app deals in — nothing renders, prices or
88
- * supplies it — but it stays in `collaterals` because the market id is the hash of the full set.
89
- */
90
- hidden?: boolean;
91
42
  }
92
43
  export interface MorphoMidnightMarketData {
93
44
  chainIds: NetworkNumber[];
@@ -97,15 +48,11 @@ export interface MorphoMidnightMarketData {
97
48
  value: MorphoMidnightVersions;
98
49
  midnight: EthAddress;
99
50
  loanToken: EthAddress;
51
+ collaterals: MorphoMidnightCollateralParams[];
100
52
  /**
101
- * Every collateral the market carries on-chain, in the chain's own order which is what the id is
102
- * hashed from, so neither the set nor the order may be rearranged. Entries the app does not deal in
103
- * are flagged `hidden` rather than kept in a second list: their on-chain position varies per market
104
- * (Morpho's mainnet cbBTC ladder lists USDC first, its WBTC ladder second), so a separate list can
105
- * only be re-joined by guessing, and every positional read — `MarketInfo.prices[i]`,
106
- * `PositionInfo.collateral[i]`, the collateral index a supply call takes — indexes into *this* array.
53
+ * Tenor's curated markets list the curator's own vault share token next to the real collateral.
107
54
  */
108
- collaterals: MorphoMidnightCollateralParams[];
55
+ hiddenCollaterals?: MorphoMidnightCollateralParams[];
109
56
  maturity: number;
110
57
  rcfThreshold: number | string;
111
58
  enterGate: EthAddress;
@@ -39,51 +39,6 @@ var MorphoMidnightVersions;
39
39
  MorphoMidnightVersions["MorphoMidnightTenorCbETHWETH_20261127_Base"] = "morphomidnighttenorcbethweth_20261127_base";
40
40
  MorphoMidnightVersions["MorphoMidnightTenorCbETHWETH_20261225_Base"] = "morphomidnighttenorcbethweth_20261225_base";
41
41
  MorphoMidnightVersions["MorphoMidnightTenorCbETHWETH_20270129_Base"] = "morphomidnighttenorcbethweth_20270129_base";
42
- // ETHEREUM
43
- // Sourced from the official listing at https://markets.morpho.org/fixed?chains=1
44
- MorphoMidnightVersions["MorphoMidnightWBTCUSDC_860_20260925_Eth"] = "morphomidnightwbtcusdc_860_20260925_eth";
45
- MorphoMidnightVersions["MorphoMidnightWBTCUSDC_860_20261030_Eth"] = "morphomidnightwbtcusdc_860_20261030_eth";
46
- MorphoMidnightVersions["MorphoMidnightWBTCUSDC_860_20261127_Eth"] = "morphomidnightwbtcusdc_860_20261127_eth";
47
- MorphoMidnightVersions["MorphoMidnightWBTCUSDC_860_20261225_Eth"] = "morphomidnightwbtcusdc_860_20261225_eth";
48
- MorphoMidnightVersions["MorphoMidnightWBTCUSDC_860_20270129_Eth"] = "morphomidnightwbtcusdc_860_20270129_eth";
49
- MorphoMidnightVersions["MorphoMidnightWBTCUSDC_860_20270226_Eth"] = "morphomidnightwbtcusdc_860_20270226_eth";
50
- MorphoMidnightVersions["MorphoMidnightWBTCUSDC_860_20270326_Eth"] = "morphomidnightwbtcusdc_860_20270326_eth";
51
- MorphoMidnightVersions["MorphoMidnightCbBTCUSDC_860_20260925_Eth"] = "morphomidnightcbbtcusdc_860_20260925_eth";
52
- MorphoMidnightVersions["MorphoMidnightCbBTCUSDC_860_20261030_Eth"] = "morphomidnightcbbtcusdc_860_20261030_eth";
53
- MorphoMidnightVersions["MorphoMidnightCbBTCUSDC_860_20261127_Eth"] = "morphomidnightcbbtcusdc_860_20261127_eth";
54
- MorphoMidnightVersions["MorphoMidnightCbBTCUSDC_860_20261225_Eth"] = "morphomidnightcbbtcusdc_860_20261225_eth";
55
- MorphoMidnightVersions["MorphoMidnightCbBTCUSDC_860_20270129_Eth"] = "morphomidnightcbbtcusdc_860_20270129_eth";
56
- MorphoMidnightVersions["MorphoMidnightCbBTCUSDC_860_20270226_Eth"] = "morphomidnightcbbtcusdc_860_20270226_eth";
57
- MorphoMidnightVersions["MorphoMidnightCbBTCUSDC_860_20270326_Eth"] = "morphomidnightcbbtcusdc_860_20270326_eth";
58
- // Tenor-hosted Midnight markets (same core, different order book)
59
- MorphoMidnightVersions["MorphoMidnightTenorReUSDUSDC_20260925_Eth"] = "morphomidnighttenorreusdusdc_20260925_eth";
60
- MorphoMidnightVersions["MorphoMidnightTenorReUSDUSDC_20261030_Eth"] = "morphomidnighttenorreusdusdc_20261030_eth";
61
- MorphoMidnightVersions["MorphoMidnightTenorReUSDUSDC_20261127_Eth"] = "morphomidnighttenorreusdusdc_20261127_eth";
62
- MorphoMidnightVersions["MorphoMidnightTenorReUSDUSDC_20261225_Eth"] = "morphomidnighttenorreusdusdc_20261225_eth";
63
- MorphoMidnightVersions["MorphoMidnightTenorSiUSDUSDC_20260925_Eth"] = "morphomidnighttenorsiusdusdc_20260925_eth";
64
- MorphoMidnightVersions["MorphoMidnightTenorSiUSDUSDC_20261030_Eth"] = "morphomidnighttenorsiusdusdc_20261030_eth";
65
- MorphoMidnightVersions["MorphoMidnightTenorSiUSDUSDC_20261127_Eth"] = "morphomidnighttenorsiusdusdc_20261127_eth";
66
- MorphoMidnightVersions["MorphoMidnightTenorSiUSDUSDC_20261225_Eth"] = "morphomidnighttenorsiusdusdc_20261225_eth";
67
- MorphoMidnightVersions["MorphoMidnightTenorStrUSDUSDC_20260925_Eth"] = "morphomidnighttenorstrusdusdc_20260925_eth";
68
- MorphoMidnightVersions["MorphoMidnightTenorStrUSDUSDC_20261030_Eth"] = "morphomidnighttenorstrusdusdc_20261030_eth";
69
- MorphoMidnightVersions["MorphoMidnightTenorStrUSDUSDC_20261127_Eth"] = "morphomidnighttenorstrusdusdc_20261127_eth";
70
- MorphoMidnightVersions["MorphoMidnightTenorStrUSDUSDC_20261225_Eth"] = "morphomidnighttenorstrusdusdc_20261225_eth";
71
- MorphoMidnightVersions["MorphoMidnightTenorUSD3USDC_20260925_Eth"] = "morphomidnighttenorusd3usdc_20260925_eth";
72
- MorphoMidnightVersions["MorphoMidnightTenorUSD3USDC_20261030_Eth"] = "morphomidnighttenorusd3usdc_20261030_eth";
73
- MorphoMidnightVersions["MorphoMidnightTenorUSD3USDC_20261127_Eth"] = "morphomidnighttenorusd3usdc_20261127_eth";
74
- MorphoMidnightVersions["MorphoMidnightTenorUSD3USDC_20261225_Eth"] = "morphomidnighttenorusd3usdc_20261225_eth";
75
- MorphoMidnightVersions["MorphoMidnightTenorWETHUSDC_20260925_Eth"] = "morphomidnighttenorwethusdc_20260925_eth";
76
- MorphoMidnightVersions["MorphoMidnightTenorWETHUSDC_20261030_Eth"] = "morphomidnighttenorwethusdc_20261030_eth";
77
- MorphoMidnightVersions["MorphoMidnightTenorWETHUSDC_20261127_Eth"] = "morphomidnighttenorwethusdc_20261127_eth";
78
- MorphoMidnightVersions["MorphoMidnightTenorWETHUSDC_20261225_Eth"] = "morphomidnighttenorwethusdc_20261225_eth";
79
- MorphoMidnightVersions["MorphoMidnightTenorWsrUSDUSDC_20260925_Eth"] = "morphomidnighttenorwsrusdusdc_20260925_eth";
80
- MorphoMidnightVersions["MorphoMidnightTenorWsrUSDUSDC_20261030_Eth"] = "morphomidnighttenorwsrusdusdc_20261030_eth";
81
- MorphoMidnightVersions["MorphoMidnightTenorWsrUSDUSDC_20261127_Eth"] = "morphomidnighttenorwsrusdusdc_20261127_eth";
82
- MorphoMidnightVersions["MorphoMidnightTenorWsrUSDUSDC_20261225_Eth"] = "morphomidnighttenorwsrusdusdc_20261225_eth";
83
- MorphoMidnightVersions["MorphoMidnightTenorWstETHWETH_20260925_Eth"] = "morphomidnighttenorwstethweth_20260925_eth";
84
- MorphoMidnightVersions["MorphoMidnightTenorWstETHWETH_20261030_Eth"] = "morphomidnighttenorwstethweth_20261030_eth";
85
- MorphoMidnightVersions["MorphoMidnightTenorWstETHWETH_20261127_Eth"] = "morphomidnighttenorwstethweth_20261127_eth";
86
- MorphoMidnightVersions["MorphoMidnightTenorWstETHWETH_20261225_Eth"] = "morphomidnighttenorwstethweth_20261225_eth";
87
42
  })(MorphoMidnightVersions || (exports.MorphoMidnightVersions = MorphoMidnightVersions = {}));
88
43
  /**
89
44
  * How much weight `borrowRate` / `debtBase` / `debtInterest` carry on a given position. They fall back to
@@ -15,6 +15,7 @@ import { ClaimType } from '../types/claiming';
15
15
  // `rewardConfig` set - such a market never accrues COMP, so there is nothing to claim.
16
16
  // Not decodable by name, since the error lives in CometRewards' ABI and we call through CompV3View.
17
17
  const NOT_SUPPORTED_ERROR_SIG = '0x9c58e3b6';
18
+ // Only an actual on-chain revert counts - viem reports transport failures as ContractFunctionExecutionError too.
18
19
  const isMarketWithoutRewardsConfig = (err) => {
19
20
  var _a;
20
21
  if (!(err instanceof BaseError))
@@ -89746,10 +89746,6 @@ export declare const MidnightView: {
89746
89746
  readonly type: "function";
89747
89747
  }];
89748
89748
  readonly networks: {
89749
- readonly "1": {
89750
- readonly address: "0xB64FBf011343961D9AC4A04b714414E35ebE6BE0";
89751
- readonly createdBlock: 25938908;
89752
- };
89753
89749
  readonly "8453": {
89754
89750
  readonly address: "0x3aa272f329E8B562A3bA56Bb6979a44D23A28839";
89755
89751
  readonly createdBlock: 48932293;
@@ -1126,10 +1126,6 @@ export const MorphoBlueView = {
1126
1126
  export const MidnightView = {
1127
1127
  "abi": [{ "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "getMarketInfo", "outputs": [{ "components": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalUnits", "type": "uint128" }, { "internalType": "uint128", "name": "lossFactor", "type": "uint128" }, { "internalType": "uint128", "name": "withdrawable", "type": "uint128" }, { "internalType": "uint128", "name": "continuousFeeCredit", "type": "uint128" }, { "internalType": "uint16[7]", "name": "settlementFees", "type": "uint16[7]" }, { "internalType": "uint32", "name": "continuousFee", "type": "uint32" }, { "internalType": "uint8", "name": "tickSpacing", "type": "uint8" }, { "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "internalType": "struct MidnightView.MarketInfo", "name": "info", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getPositionInfo", "outputs": [{ "components": [{ "internalType": "uint128", "name": "credit", "type": "uint128" }, { "internalType": "uint128", "name": "pendingFee", "type": "uint128" }, { "internalType": "uint128", "name": "debt", "type": "uint128" }, { "internalType": "uint128", "name": "collateralBitmap", "type": "uint128" }, { "internalType": "uint128[]", "name": "collateral", "type": "uint128[]" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }], "internalType": "struct MidnightView.PositionInfo", "name": "pos", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "ratio", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "_market", "type": "tuple" }], "name": "toId", "outputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "toMarket", "outputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "market", "type": "tuple" }], "stateMutability": "view", "type": "function" }],
1128
1128
  "networks": {
1129
- "1": {
1130
- "address": "0xB64FBf011343961D9AC4A04b714414E35ebE6BE0",
1131
- "createdBlock": 25938908,
1132
- },
1133
1129
  "8453": {
1134
1130
  "address": "0x3aa272f329E8B562A3bA56Bb6979a44D23A28839",
1135
1131
  "createdBlock": 48932293,
@@ -41,15 +41,11 @@ interface TenorOfferFill {
41
41
  /**
42
42
  * Tenor's offer JSON is flat (market fields live on the offer). Morpho's is nested, and that nested
43
43
  * shape is what the app encodes for `Midnight.take`. Map Tenor into that shape so recipes stay on one encoder.
44
- *
45
- * The core address is the one field Tenor's offer does not carry, so it is derived from the offer's own
46
- * `chain_id` rather than the caller's network — an offer names the chain it was made on, and taking it
47
- * against another chain's core would address a market that does not exist.
48
44
  */
49
45
  export declare const tenorOfferToApiOffer: (offer: TenorOffer) => {
50
46
  market: {
51
47
  chain_id: string | number;
52
- midnight: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A" | "0x471686c42792F93528B000beF54bC10E3aa2045f";
48
+ midnight: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A";
53
49
  loan_token: string;
54
50
  collaterals: TenorOfferCollateral[];
55
51
  maturity: string | number;
@@ -77,7 +73,7 @@ export declare const tenorOfferFillToApiFill: (fill: TenorOfferFill) => {
77
73
  offer: {
78
74
  market: {
79
75
  chain_id: string | number;
80
- midnight: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A" | "0x471686c42792F93528B000beF54bC10E3aa2045f";
76
+ midnight: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A";
81
77
  loan_token: string;
82
78
  collaterals: TenorOfferCollateral[];
83
79
  maturity: string | number;
@@ -11,7 +11,7 @@ import Dec from 'decimal.js';
11
11
  import { assetAmountInEth, getAssetInfoByAddress } from '@defisaver/tokens';
12
12
  import { ZERO_ADDRESS, ZERO_BYTES32 } from '../../constants';
13
13
  import { NetworkNumber, } from '../../types';
14
- import { isTenorMidnightMarket, midnightCoreAddress } from '../../markets/morphoMidnight';
14
+ import { isTenorMidnightMarket, MIDNIGHT_BASE } from '../../markets/morphoMidnight';
15
15
  import { buildMidnightParsedBook, midnightApyFromPrice, midnightBoundPrice, midnightTimeToMaturityDays, } from './rate';
16
16
  // Notion doc by Rajko: https://app.notion.com/p/defisaver/Tenor-API-3ba0be682adc80dfad35c81a9a4cb442
17
17
  const TENOR_QUOTES_URL = 'https://router.tenor.finance/v1/quotes';
@@ -26,15 +26,11 @@ const tenorFillPrice = (assets, units) => (new Dec(units).lte(0) ? '0' : new Dec
26
26
  /**
27
27
  * Tenor's offer JSON is flat (market fields live on the offer). Morpho's is nested, and that nested
28
28
  * shape is what the app encodes for `Midnight.take`. Map Tenor into that shape so recipes stay on one encoder.
29
- *
30
- * The core address is the one field Tenor's offer does not carry, so it is derived from the offer's own
31
- * `chain_id` rather than the caller's network — an offer names the chain it was made on, and taking it
32
- * against another chain's core would address a market that does not exist.
33
29
  */
34
30
  export const tenorOfferToApiOffer = (offer) => ({
35
31
  market: {
36
32
  chain_id: offer.chain_id,
37
- midnight: midnightCoreAddress(Number(offer.chain_id)),
33
+ midnight: MIDNIGHT_BASE,
38
34
  loan_token: offer.loan_token_address,
39
35
  collaterals: offer.collaterals || [],
40
36
  maturity: offer.maturity,
@@ -21,6 +21,7 @@ export declare const AAVE_V4_KELP_SPOKE: (networkId: NetworkNumber) => AaveV4Spo
21
21
  export declare const AAVE_V4_LIDO_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
22
22
  export declare const AAVE_V4_LOMBARD_BTC_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
23
23
  export declare const AAVE_V4_MAIN_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
24
+ export declare const AAVE_V4_PAXG_GOLD_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
24
25
  export declare const AAVE_V4_USDG_PENDLE_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
25
26
  export declare const AAVE_V4_USDG_MAPLE_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
26
27
  export declare const AaveV4Spokes: (networkId: NetworkNumber) => {
@@ -34,6 +35,7 @@ export declare const AaveV4Spokes: (networkId: NetworkNumber) => {
34
35
  readonly aave_v4_lido_spoke: AaveV4SpokeInfo;
35
36
  readonly aave_v4_lombard_btc_spoke: AaveV4SpokeInfo;
36
37
  readonly aave_v4_main_spoke: AaveV4SpokeInfo;
38
+ readonly aave_v4_paxg_gold_spoke: AaveV4SpokeInfo;
37
39
  readonly aave_v4_usdg_pendle_spoke: AaveV4SpokeInfo;
38
40
  readonly aave_v4_usdg_maple_spoke: AaveV4SpokeInfo;
39
41
  };
@@ -153,6 +153,16 @@ export const AAVE_V4_MAIN_SPOKE = (networkId) => ({
153
153
  AAVE_V4_PRIME_HUB(NetworkNumber.Eth).address,
154
154
  ],
155
155
  });
156
+ export const AAVE_V4_PAXG_GOLD_SPOKE = (networkId) => ({
157
+ chainIds: [NetworkNumber.Eth],
158
+ label: 'PAXG Gold',
159
+ value: AaveV4SpokesType.AaveV4PaxgGoldSpoke,
160
+ url: 'paxg-gold',
161
+ address: '0xAD75cE6354f87F3135cE10621d385d8D1e2562C2',
162
+ hubs: [
163
+ AAVE_V4_PAXOS_HUB(NetworkNumber.Eth).address,
164
+ ],
165
+ });
156
166
  export const AAVE_V4_USDG_PENDLE_SPOKE = (networkId) => ({
157
167
  chainIds: [NetworkNumber.Eth],
158
168
  label: 'USDG Pendle',
@@ -186,6 +196,7 @@ export const AaveV4Spokes = (networkId) => ({
186
196
  [AaveV4SpokesType.AaveV4LidoSpoke]: AAVE_V4_LIDO_SPOKE(networkId),
187
197
  [AaveV4SpokesType.AaveV4LombardBtcSpoke]: AAVE_V4_LOMBARD_BTC_SPOKE(networkId),
188
198
  [AaveV4SpokesType.AaveV4MainSpoke]: AAVE_V4_MAIN_SPOKE(networkId),
199
+ [AaveV4SpokesType.AaveV4PaxgGoldSpoke]: AAVE_V4_PAXG_GOLD_SPOKE(networkId),
189
200
  [AaveV4SpokesType.AaveV4USDGPendleSpoke]: AAVE_V4_USDG_PENDLE_SPOKE(networkId),
190
201
  [AaveV4SpokesType.AaveV4USDGMapleSpoke]: AAVE_V4_USDG_MAPLE_SPOKE(networkId),
191
202
  });
@@ -3,7 +3,7 @@ export { CompoundMarkets, compoundV2CollateralAssets, v3ETHCollAssets, v3USDbCCo
3
3
  export { SparkMarkets } from './spark';
4
4
  export { CrvUsdMarkets } from './curveUsd';
5
5
  export { MorphoBlueMarkets, findMorphoBlueMarket } from './morphoBlue';
6
- export { MorphoMidnightMarkets, findMorphoMidnightMarket, isTenorMidnightMarket, morphoMidnightMarketCollateralParams, morphoMidnightVisibleCollaterals, } from './morphoMidnight';
6
+ export { MorphoMidnightMarkets, findMorphoMidnightMarket, isTenorMidnightMarket, morphoMidnightMarketCollateralParams, } from './morphoMidnight';
7
7
  export { LlamaLendMarkets } from './llamaLend';
8
8
  export { LiquityV2Markets, findLiquityV2MarketByAddress } from './liquityV2';
9
9
  export { FluidMarkets, getFluidVersionsDataForNetwork, getFluidMarketInfoById, getFTokenAddress, getFluidMarketInfoByAddress, } from './fluid';
@@ -3,7 +3,7 @@ export { CompoundMarkets, compoundV2CollateralAssets, v3ETHCollAssets, v3USDbCCo
3
3
  export { SparkMarkets } from './spark';
4
4
  export { CrvUsdMarkets } from './curveUsd';
5
5
  export { MorphoBlueMarkets, findMorphoBlueMarket } from './morphoBlue';
6
- export { MorphoMidnightMarkets, findMorphoMidnightMarket, isTenorMidnightMarket, morphoMidnightMarketCollateralParams, morphoMidnightVisibleCollaterals, } from './morphoMidnight';
6
+ export { MorphoMidnightMarkets, findMorphoMidnightMarket, isTenorMidnightMarket, morphoMidnightMarketCollateralParams, } from './morphoMidnight';
7
7
  export { LlamaLendMarkets } from './llamaLend';
8
8
  export { LiquityV2Markets, findLiquityV2MarketByAddress } from './liquityV2';
9
9
  export { FluidMarkets, getFluidVersionsDataForNetwork, getFluidMarketInfoById, getFTokenAddress, getFluidMarketInfoByAddress, } from './fluid';
@@ -1,13 +1,10 @@
1
1
  import { MorphoMidnightCollateralParams, MorphoMidnightMarketData, NetworkNumber } from '../../types';
2
2
  /**
3
- * Morpho Midnight core contract, one per chain. Every Midnight market on a chain trades against its core,
4
- * whoever curates the order book — it is part of the market struct the id is hashed from, and it is what
5
- * offer tuples encode for `Midnight.take`. Listed at
6
- * https://docs.morpho.org/get-started/resources/addresses/.
3
+ * Morpho Midnight core contract on Base. Every Midnight market trades against this one, whoever curates
4
+ * its order book — it is part of the market struct the id is hashed from, and it is what offer tuples
5
+ * encode for `Midnight.take`.
7
6
  */
8
7
  export declare const MIDNIGHT_BASE: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A";
9
- export declare const MIDNIGHT_ETH: "0x471686c42792F93528B000beF54bC10E3aa2045f";
10
- export declare const midnightCoreAddress: (network: NetworkNumber) => "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A" | "0x471686c42792F93528B000beF54bC10E3aa2045f";
11
8
  export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
12
9
  export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260828: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
13
10
  export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
@@ -40,48 +37,6 @@ export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261030: () => Morpho
40
37
  export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261127: () => MorphoMidnightMarketData;
41
38
  export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261225: () => MorphoMidnightMarketData;
42
39
  export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20270129: () => MorphoMidnightMarketData;
43
- export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20260925_ETH: () => MorphoMidnightMarketData;
44
- export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20261030_ETH: () => MorphoMidnightMarketData;
45
- export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20261127_ETH: () => MorphoMidnightMarketData;
46
- export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20261225_ETH: () => MorphoMidnightMarketData;
47
- export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20270129_ETH: () => MorphoMidnightMarketData;
48
- export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20270226_ETH: () => MorphoMidnightMarketData;
49
- export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20270326_ETH: () => MorphoMidnightMarketData;
50
- export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925_ETH: () => MorphoMidnightMarketData;
51
- export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261030_ETH: () => MorphoMidnightMarketData;
52
- export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261127_ETH: () => MorphoMidnightMarketData;
53
- export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261225_ETH: () => MorphoMidnightMarketData;
54
- export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270129_ETH: () => MorphoMidnightMarketData;
55
- export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270226_ETH: () => MorphoMidnightMarketData;
56
- export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270326_ETH: () => MorphoMidnightMarketData;
57
- export declare const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20260925_ETH: () => MorphoMidnightMarketData;
58
- export declare const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261030_ETH: () => MorphoMidnightMarketData;
59
- export declare const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261127_ETH: () => MorphoMidnightMarketData;
60
- export declare const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261225_ETH: () => MorphoMidnightMarketData;
61
- export declare const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20260925_ETH: () => MorphoMidnightMarketData;
62
- export declare const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261030_ETH: () => MorphoMidnightMarketData;
63
- export declare const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261127_ETH: () => MorphoMidnightMarketData;
64
- export declare const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261225_ETH: () => MorphoMidnightMarketData;
65
- export declare const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20260925_ETH: () => MorphoMidnightMarketData;
66
- export declare const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261030_ETH: () => MorphoMidnightMarketData;
67
- export declare const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261127_ETH: () => MorphoMidnightMarketData;
68
- export declare const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261225_ETH: () => MorphoMidnightMarketData;
69
- export declare const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20260925_ETH: () => MorphoMidnightMarketData;
70
- export declare const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261030_ETH: () => MorphoMidnightMarketData;
71
- export declare const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261127_ETH: () => MorphoMidnightMarketData;
72
- export declare const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261225_ETH: () => MorphoMidnightMarketData;
73
- export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260925_ETH: () => MorphoMidnightMarketData;
74
- export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261030_ETH: () => MorphoMidnightMarketData;
75
- export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261127_ETH: () => MorphoMidnightMarketData;
76
- export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261225_ETH: () => MorphoMidnightMarketData;
77
- export declare const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20260925_ETH: () => MorphoMidnightMarketData;
78
- export declare const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261030_ETH: () => MorphoMidnightMarketData;
79
- export declare const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261127_ETH: () => MorphoMidnightMarketData;
80
- export declare const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261225_ETH: () => MorphoMidnightMarketData;
81
- export declare const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20260925_ETH: () => MorphoMidnightMarketData;
82
- export declare const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261030_ETH: () => MorphoMidnightMarketData;
83
- export declare const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261127_ETH: () => MorphoMidnightMarketData;
84
- export declare const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261225_ETH: () => MorphoMidnightMarketData;
85
40
  export declare const MorphoMidnightMarkets: (networkId: NetworkNumber) => {
86
41
  readonly morphomidnightcbbtcusdc_860_20260731_base: MorphoMidnightMarketData;
87
42
  readonly morphomidnightcbbtcusdc_860_20260828_base: MorphoMidnightMarketData;
@@ -115,50 +70,13 @@ export declare const MorphoMidnightMarkets: (networkId: NetworkNumber) => {
115
70
  readonly morphomidnighttenorcbethweth_20261127_base: MorphoMidnightMarketData;
116
71
  readonly morphomidnighttenorcbethweth_20261225_base: MorphoMidnightMarketData;
117
72
  readonly morphomidnighttenorcbethweth_20270129_base: MorphoMidnightMarketData;
118
- readonly morphomidnightwbtcusdc_860_20260925_eth: MorphoMidnightMarketData;
119
- readonly morphomidnightwbtcusdc_860_20261030_eth: MorphoMidnightMarketData;
120
- readonly morphomidnightwbtcusdc_860_20261127_eth: MorphoMidnightMarketData;
121
- readonly morphomidnightwbtcusdc_860_20261225_eth: MorphoMidnightMarketData;
122
- readonly morphomidnightwbtcusdc_860_20270129_eth: MorphoMidnightMarketData;
123
- readonly morphomidnightwbtcusdc_860_20270226_eth: MorphoMidnightMarketData;
124
- readonly morphomidnightwbtcusdc_860_20270326_eth: MorphoMidnightMarketData;
125
- readonly morphomidnightcbbtcusdc_860_20260925_eth: MorphoMidnightMarketData;
126
- readonly morphomidnightcbbtcusdc_860_20261030_eth: MorphoMidnightMarketData;
127
- readonly morphomidnightcbbtcusdc_860_20261127_eth: MorphoMidnightMarketData;
128
- readonly morphomidnightcbbtcusdc_860_20261225_eth: MorphoMidnightMarketData;
129
- readonly morphomidnightcbbtcusdc_860_20270129_eth: MorphoMidnightMarketData;
130
- readonly morphomidnightcbbtcusdc_860_20270226_eth: MorphoMidnightMarketData;
131
- readonly morphomidnightcbbtcusdc_860_20270326_eth: MorphoMidnightMarketData;
132
- readonly morphomidnighttenorreusdusdc_20260925_eth: MorphoMidnightMarketData;
133
- readonly morphomidnighttenorreusdusdc_20261030_eth: MorphoMidnightMarketData;
134
- readonly morphomidnighttenorreusdusdc_20261127_eth: MorphoMidnightMarketData;
135
- readonly morphomidnighttenorreusdusdc_20261225_eth: MorphoMidnightMarketData;
136
- readonly morphomidnighttenorsiusdusdc_20260925_eth: MorphoMidnightMarketData;
137
- readonly morphomidnighttenorsiusdusdc_20261030_eth: MorphoMidnightMarketData;
138
- readonly morphomidnighttenorsiusdusdc_20261127_eth: MorphoMidnightMarketData;
139
- readonly morphomidnighttenorsiusdusdc_20261225_eth: MorphoMidnightMarketData;
140
- readonly morphomidnighttenorstrusdusdc_20260925_eth: MorphoMidnightMarketData;
141
- readonly morphomidnighttenorstrusdusdc_20261030_eth: MorphoMidnightMarketData;
142
- readonly morphomidnighttenorstrusdusdc_20261127_eth: MorphoMidnightMarketData;
143
- readonly morphomidnighttenorstrusdusdc_20261225_eth: MorphoMidnightMarketData;
144
- readonly morphomidnighttenorusd3usdc_20260925_eth: MorphoMidnightMarketData;
145
- readonly morphomidnighttenorusd3usdc_20261030_eth: MorphoMidnightMarketData;
146
- readonly morphomidnighttenorusd3usdc_20261127_eth: MorphoMidnightMarketData;
147
- readonly morphomidnighttenorusd3usdc_20261225_eth: MorphoMidnightMarketData;
148
- readonly morphomidnighttenorwethusdc_20260925_eth: MorphoMidnightMarketData;
149
- readonly morphomidnighttenorwethusdc_20261030_eth: MorphoMidnightMarketData;
150
- readonly morphomidnighttenorwethusdc_20261127_eth: MorphoMidnightMarketData;
151
- readonly morphomidnighttenorwethusdc_20261225_eth: MorphoMidnightMarketData;
152
- readonly morphomidnighttenorwsrusdusdc_20260925_eth: MorphoMidnightMarketData;
153
- readonly morphomidnighttenorwsrusdusdc_20261030_eth: MorphoMidnightMarketData;
154
- readonly morphomidnighttenorwsrusdusdc_20261127_eth: MorphoMidnightMarketData;
155
- readonly morphomidnighttenorwsrusdusdc_20261225_eth: MorphoMidnightMarketData;
156
- readonly morphomidnighttenorwstethweth_20260925_eth: MorphoMidnightMarketData;
157
- readonly morphomidnighttenorwstethweth_20261030_eth: MorphoMidnightMarketData;
158
- readonly morphomidnighttenorwstethweth_20261127_eth: MorphoMidnightMarketData;
159
- readonly morphomidnighttenorwstethweth_20261225_eth: MorphoMidnightMarketData;
160
73
  };
161
74
  export declare const isTenorMidnightMarket: (market: Pick<MorphoMidnightMarketData, "curator"> | string) => boolean;
162
75
  export declare const findMorphoMidnightMarket: (marketId: string, network?: NetworkNumber) => MorphoMidnightMarketData | undefined;
163
- export declare const morphoMidnightMarketCollateralParams: (market: Pick<MorphoMidnightMarketData, "collaterals">) => MorphoMidnightCollateralParams[];
164
- export declare const morphoMidnightVisibleCollaterals: (market: Pick<MorphoMidnightMarketData, "collaterals">) => MorphoMidnightCollateralParams[];
76
+ /**
77
+ * The market's collateral set as the chain knows it: the listed collaterals followed by the curator's
78
+ * hidden ones. This — not `collaterals` — is what a `Market` struct takes, since the market id is the hash
79
+ * of that struct. Anything assembling one for a contract call goes through here so it can't quietly build
80
+ * a market of its own instead.
81
+ */
82
+ export declare const morphoMidnightMarketCollateralParams: (market: Pick<MorphoMidnightMarketData, "collaterals" | "hiddenCollaterals">) => MorphoMidnightCollateralParams[];