@1delta/margin-fetcher 5.0.68 → 5.0.69

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.d.ts CHANGED
@@ -6620,6 +6620,18 @@ interface EulerEarnVault extends VaultClassificationFields {
6620
6620
  * changes take effect (Euler Earn `governance.timelock`). Governance-only,
6621
6621
  * NOT a per-deposit withdrawal lock. Mirrors `MorphoVault.timelock`. */
6622
6622
  timelock?: number;
6623
+ /** Whether Euler's Data API lists the vault on the Euler frontend
6624
+ * (`visibility.status` of `visible` or `warning`). Vaults failing Euler's
6625
+ * automated config vetting are delisted to `hidden` / `pending_review`
6626
+ * and carry `false` — we still fetch them (the API's `visibility` filter
6627
+ * defaults to listed-only, which emptied this provider overnight in Aug
6628
+ * 2026), so downstream must flag rather than assume listed. Subgraph-
6629
+ * sourced vaults default to `true` (visibility is Data-API-only).
6630
+ * Mirrors `MorphoVault.whitelisted`. */
6631
+ whitelisted: boolean;
6632
+ /** Raw Euler visibility status (`visible` | `warning` | `hidden` |
6633
+ * `pending_review`), when the Data API supplied one. */
6634
+ visibilityStatus?: string;
6623
6635
  /** Owner address, lowercased — may be absent if not set. */
6624
6636
  owner?: string;
6625
6637
  /** Curator / fee-recipient address, lowercased. */
package/dist/index.js CHANGED
@@ -61157,6 +61157,8 @@ function parseVault6(v, chainId, prices, tokenList, evkIndex, shareDecimalsByVau
61157
61157
  name: v.name ?? "",
61158
61158
  decimals,
61159
61159
  assetDecimals,
61160
+ // Visibility is Data-API-only; subgraph-sourced vaults default to listed.
61161
+ whitelisted: true,
61160
61162
  totalAssets: totalAssetsRaw,
61161
61163
  totalSupply: totalSupplyRaw,
61162
61164
  convertToAssets,
@@ -61270,6 +61272,8 @@ async function fetchEulerEarnVaultsFromSubgraph(chainId, prices = {}, tokenList
61270
61272
  var EULER_DATA_API_BASE2 = "https://v3.euler.finance/v3";
61271
61273
  var API_TIMEOUT_MS2 = 1e4;
61272
61274
  var DETAIL_CONCURRENCY = 8;
61275
+ var VISIBILITY_ALL = "visible,warning,hidden,pending_review";
61276
+ var isListedStatus = (status) => status === void 0 || status === "visible" || status === "warning";
61273
61277
  function safeBigInt2(v) {
61274
61278
  if (v == null || v === "") return 0n;
61275
61279
  try {
@@ -61297,7 +61301,7 @@ async function getJson3(url) {
61297
61301
  clearTimeout(timer);
61298
61302
  }
61299
61303
  }
61300
- function mapApiDetail(d, chainId, prices, tokenList, shareDecimalsByVault, entityNames) {
61304
+ function mapApiDetail(d, chainId, prices, tokenList, shareDecimalsByVault, entityNames, visibilityStatus) {
61301
61305
  const address = (d.address ?? "").toLowerCase();
61302
61306
  const underlying = (d.asset?.address ?? "").toLowerCase();
61303
61307
  if (!address || !underlying) return null;
@@ -61332,6 +61336,8 @@ function mapApiDetail(d, chainId, prices, tokenList, shareDecimalsByVault, entit
61332
61336
  name: d.name ?? "",
61333
61337
  decimals,
61334
61338
  assetDecimals,
61339
+ whitelisted: isListedStatus(visibilityStatus),
61340
+ visibilityStatus,
61335
61341
  totalAssets: totalAssetsRaw,
61336
61342
  totalSupply: totalSupplyRaw,
61337
61343
  convertToAssets,
@@ -61375,11 +61381,18 @@ async function mapWithConcurrency(items, limit, fn) {
61375
61381
  }
61376
61382
  async function fetchEulerEarnVaultsFromApi(chainId, prices = {}, tokenList = {}, multicallRetry) {
61377
61383
  const list = await getJson3(
61378
- `${EULER_DATA_API_BASE2}/earn/vaults?chainId=${chainId}&limit=200`
61384
+ `${EULER_DATA_API_BASE2}/earn/vaults?chainId=${chainId}&limit=200&visibility=${VISIBILITY_ALL}`
61379
61385
  );
61380
61386
  if (!list) return void 0;
61381
61387
  const rows = list.data ?? [];
61382
61388
  if (rows.length === 0) return {};
61389
+ const statusByAddress = /* @__PURE__ */ new Map();
61390
+ for (const row of rows) {
61391
+ const status = row.visibility?.status;
61392
+ if (row.address && typeof status === "string") {
61393
+ statusByAddress.set(row.address.toLowerCase(), status);
61394
+ }
61395
+ }
61383
61396
  const [details, entityNames] = await Promise.all([
61384
61397
  mapWithConcurrency(
61385
61398
  rows,
@@ -61405,7 +61418,8 @@ async function fetchEulerEarnVaultsFromApi(chainId, prices = {}, tokenList = {},
61405
61418
  prices,
61406
61419
  tokenList,
61407
61420
  shareDecimalsByVault,
61408
- entityNames
61421
+ entityNames,
61422
+ statusByAddress.get((d.address ?? "").toLowerCase())
61409
61423
  );
61410
61424
  if (v) out[v.address] = v;
61411
61425
  }