@1delta/data-sdk 0.0.30 → 0.0.31

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/README.md CHANGED
@@ -519,6 +519,39 @@ const providers = listaNativeProvider()
519
519
 
520
520
  ---
521
521
 
522
+ ### Morpho Midnight
523
+
524
+ Morpho Midnight is a Base-only, fixed-rate / fixed-maturity **order-book** protocol (offers are fetched from an HTTP API rather than read from a pool). It is a distinct `'midnight'` provider — **not** a Morpho Blue fork — so it has its own registry slots. Each maturity is its own isolated market, keyed by a bytes32 `marketId`.
525
+
526
+ #### `midnightConfig()`
527
+
528
+ Per-chain Midnight deployment (core/bundles/mempool/ratifier addresses + optional `apiBaseUrl`).
529
+
530
+ ```ts
531
+ import { midnightConfig } from '@1delta/data-sdk'
532
+
533
+ const cfg = midnightConfig()
534
+ // { '8453': { midnight: '0x...', midnightBundles: '0x...', apiBaseUrl: '...' } }
535
+ ```
536
+
537
+ #### `midnightMarkets()` / `midnightMarketsByChain(chainId)` / `midnightMarketById(chainId, marketId)`
538
+
539
+ The market set (one entry per maturity), plus convenience lookups.
540
+
541
+ ```ts
542
+ import { midnightMarkets, midnightMarketsByChain, midnightMarketById } from '@1delta/data-sdk'
543
+
544
+ const all = midnightMarkets() // { [chainId]: MidnightMarketConfig[] }
545
+ const base = midnightMarketsByChain('8453') // MidnightMarketConfig[]
546
+ const market = midnightMarketById('8453', '0x...') // MidnightMarketConfig | undefined
547
+ ```
548
+
549
+ #### `setMidnightApiBase(url)` / `midnightApiBaseOverride()` / `resolveMidnightApiBase(chainId)`
550
+
551
+ Runtime override for the Midnight HTTP API base (override → config `apiBaseUrl` → hosted default `https://api.morpho.org/v0/midnight`). A worker sets this per request (e.g. from an env var) so it survives the per-request metadata re-init that would otherwise clobber the config value — used for pointing at a local/dev offer API.
552
+
553
+ ---
554
+
522
555
  ## Chain Data
523
556
 
524
557
  #### `chains()`
@@ -656,3 +689,5 @@ All deployment data originates from the `1delta-DAO/lender-metadata` GitHub repo
656
689
  | `data/compound-v3-base-data.json` | `compoundV3BaseData()` |
657
690
  | `data/compound-v3-reserves.json` | `compoundV3Reserves()` |
658
691
  | `data/euler-vaults.json` | `eulerVaults()` |
692
+ | `config/midnight.json` | `midnightConfig()` |
693
+ | `data/midnight-markets.json` | `midnightMarkets()` |
package/dist/lending.d.ts CHANGED
@@ -107,6 +107,21 @@ export type MidnightMarketConfig = {
107
107
  rcfThreshold: string;
108
108
  enterGate: string;
109
109
  liquidatorGate: string;
110
+ /**
111
+ * Mutable per-market settlement fees, one per TTM breakpoint index
112
+ * [0d,1d,7d,30d,90d,180d,360d], in cbp (centi-basis-points; fraction =
113
+ * cbp·1e-6). Governance-settable (`feeSetter`), so it is NOT part of the
114
+ * immutable market id and is snapshotted on-chain each metadata refresh.
115
+ * Absent when the on-chain read was unavailable.
116
+ */
117
+ settlementFeeCbp?: number[];
118
+ /**
119
+ * Mutable per-market continuous fee (uint32), a per-second WAD rate borne by
120
+ * lenders (annual fraction = continuousFee·secondsPerYear/1e18, capped 1%/yr).
121
+ * Governance-settable; snapshotted on-chain like `settlementFeeCbp`. Stored
122
+ * as a decimal string. Absent when the on-chain read was unavailable.
123
+ */
124
+ continuousFee?: string;
110
125
  /** Optional display label, e.g. "USDC / WETH — 2026-09-18". */
111
126
  name?: string;
112
127
  };
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.0.30",
7
+ "version": "0.0.31",
8
8
  "description": "Hold and initialize lending protocol data across a stack",
9
9
  "files": [
10
10
  "dist"