@1delta/margin-fetcher 0.0.303 → 0.0.305

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 CHANGED
@@ -31740,8 +31740,8 @@ var KHYPE_KEY = "Kinetiq Staked HYPE::kHYPE";
31740
31740
  var kinetiqKHypeFetcher = {
31741
31741
  label: "KHYPE",
31742
31742
  fetch: async () => {
31743
- const apr = await fetchDefiLlamaApy(KHYPE_POOL_ID);
31744
- return { [KHYPE_KEY]: apr };
31743
+ const apy = await fetchDefiLlamaApy(KHYPE_POOL_ID);
31744
+ return { [KHYPE_KEY]: apyToAprPercent(apy) };
31745
31745
  }
31746
31746
  };
31747
31747
 
@@ -32939,9 +32939,10 @@ var monadLstFetcher = {
32939
32939
  fetchDefiLlamaApy(GMON_POOL_ID)
32940
32940
  ]);
32941
32941
  const out = {};
32942
- if (sMon.status === "fulfilled") out[SMON_KEY] = sMon.value;
32943
- if (shMon.status === "fulfilled") out[SHMON_KEY] = shMon.value;
32944
- if (gMon.status === "fulfilled") out[GMON_KEY] = gMon.value;
32942
+ if (sMon.status === "fulfilled") out[SMON_KEY] = apyToAprPercent(sMon.value);
32943
+ if (shMon.status === "fulfilled")
32944
+ out[SHMON_KEY] = apyToAprPercent(shMon.value);
32945
+ if (gMon.status === "fulfilled") out[GMON_KEY] = apyToAprPercent(gMon.value);
32945
32946
  return out;
32946
32947
  }
32947
32948
  };
@@ -38408,7 +38409,9 @@ function mapApiDetail(d, chainId, prices, tokenList) {
38408
38409
  const totalAssetsRaw = String(d.totalAssets ?? "0");
38409
38410
  const totalSupplyRaw = String(d.totalShares ?? "0");
38410
38411
  const convertToAssets = d.exchangeRate != null ? rescaleExchangeRate(d.exchangeRate, decimals) : deriveConvertToAssets(totalAssetsRaw, totalSupplyRaw, decimals);
38411
- const supplyRate = Number(d.supplyApy ?? d.apyCurrent ?? 0) || 0;
38412
+ const supplyRate = apyToAprPercent(
38413
+ Number(d.supplyApy ?? d.apyCurrent ?? 0) || 0
38414
+ );
38412
38415
  const availableRaw = safeBigInt2(d.availableAssets) || safeBigInt2(totalAssetsRaw);
38413
38416
  const totalAssetsBig = safeBigInt2(totalAssetsRaw);
38414
38417
  const liquidityRaw = (availableRaw > totalAssetsBig ? totalAssetsBig : availableRaw).toString();
@@ -38436,11 +38439,15 @@ function mapApiDetail(d, chainId, prices, tokenList) {
38436
38439
  // The API doesn't surface the performance fee on this endpoint; the
38437
38440
  // headline APY is already net, so 0 here only affects fee display.
38438
38441
  fee: 0,
38439
- owner: d.owner?.toLowerCase(),
38440
- curator: d.curator?.toLowerCase(),
38442
+ // owner/curator/guardian/feeRecipient + timelock live under
38443
+ // `governance`/`management` in the current API; fall back to the legacy
38444
+ // flat fields for older snapshots.
38445
+ timelock: Number(d.governance?.timelock ?? d.management?.timelockSeconds ?? 0) || void 0,
38446
+ owner: (d.governance?.owner ?? d.management?.owner ?? d.owner)?.toLowerCase(),
38447
+ curator: (d.governance?.curator ?? d.management?.curator ?? d.curator)?.toLowerCase(),
38441
38448
  curatorName: curatorNameFromVaultName(d.name, assetMeta?.symbol),
38442
- guardian: d.guardian?.toLowerCase(),
38443
- feeRecipient: d.feeReceiver?.toLowerCase() || void 0,
38449
+ guardian: (d.governance?.guardian ?? d.management?.guardian ?? d.guardian)?.toLowerCase(),
38450
+ feeRecipient: (d.governance?.feeReceiver ?? d.management?.feeRecipient ?? d.feeReceiver)?.toLowerCase() || void 0,
38444
38451
  asset: assetMeta,
38445
38452
  priceUsd: priceUsd || void 0,
38446
38453
  totalAssetsFormatted,