@1delta/margin-fetcher 5.0.110 → 5.0.111
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 +71 -1
- package/dist/index.js +261 -33
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -45252,31 +45252,23 @@ var stKaiaFetcher = {
|
|
|
45252
45252
|
}
|
|
45253
45253
|
}
|
|
45254
45254
|
};
|
|
45255
|
-
var
|
|
45255
|
+
var YIELD_APY_URL = "https://api.lista.org/v1/stakes/yield-apy";
|
|
45256
45256
|
var SLISBNB = "Lista Staked BNB::slisBNB";
|
|
45257
|
-
var DAY_SECONDS2 = 86400;
|
|
45258
|
-
var LOOKBACK_SECONDS = 14 * DAY_SECONDS2;
|
|
45259
45257
|
var TIMEOUT_MS = 8e3;
|
|
45260
45258
|
var slisBnbFetcher = {
|
|
45261
45259
|
label: "SLISBNB",
|
|
45262
45260
|
fetch: async () => {
|
|
45263
|
-
const nowSec9 = Math.floor(Date.now() / 1e3);
|
|
45264
|
-
const url = `${HISTORY_URL}?name=slisBNBRate&cycle=1&startTime=${nowSec9 - LOOKBACK_SECONDS}&endTime=${nowSec9}`;
|
|
45265
45261
|
const controller = new AbortController();
|
|
45266
45262
|
const timer = setTimeout(() => controller.abort(), TIMEOUT_MS);
|
|
45267
45263
|
try {
|
|
45268
|
-
const res = await fetch(
|
|
45264
|
+
const res = await fetch(YIELD_APY_URL, {
|
|
45269
45265
|
method: "GET",
|
|
45270
45266
|
headers: { Accept: "application/json" },
|
|
45271
45267
|
signal: controller.signal
|
|
45272
45268
|
}).then((r) => r.json());
|
|
45273
|
-
const
|
|
45274
|
-
if (
|
|
45275
|
-
|
|
45276
|
-
(a, b) => b.chartTime > a.chartTime ? b : a
|
|
45277
|
-
);
|
|
45278
|
-
const apr = Number(latest.amount);
|
|
45279
|
-
return { [SLISBNB]: Number.isFinite(apr) && apr > 0 ? apr : 0 };
|
|
45269
|
+
const apy = Number(res.data?.staking?.month3Apy);
|
|
45270
|
+
if (!Number.isFinite(apy) || apy <= 0) return {};
|
|
45271
|
+
return { [SLISBNB]: apyToAprPercent(apy * 100) };
|
|
45280
45272
|
} finally {
|
|
45281
45273
|
clearTimeout(timer);
|
|
45282
45274
|
}
|
|
@@ -46038,7 +46030,7 @@ var fraxSavingsFetcher = {
|
|
|
46038
46030
|
};
|
|
46039
46031
|
|
|
46040
46032
|
// src/yields/intrinsic/fetchers/binance.ts
|
|
46041
|
-
var
|
|
46033
|
+
var HISTORY_URL = "https://www.binance.com/bapi/earn/v1/public/pos/cftoken/project/exchange-rate/history";
|
|
46042
46034
|
var WBETH = "Wrapped Binance Beacon ETH::wBETH";
|
|
46043
46035
|
var LLAMA_POOL = "80b8bf92-b953-4c20-98ea-c9653ef2bb98";
|
|
46044
46036
|
var DAY_MS = 864e5;
|
|
@@ -46048,7 +46040,7 @@ var wbethFetcher = {
|
|
|
46048
46040
|
label: "WBETH",
|
|
46049
46041
|
fetch: async () => {
|
|
46050
46042
|
const now = Date.now();
|
|
46051
|
-
const url = `${
|
|
46043
|
+
const url = `${HISTORY_URL}?startTime=${now - LOOKBACK_MS}&endTime=${now}`;
|
|
46052
46044
|
try {
|
|
46053
46045
|
const res = await fetch(url, {
|
|
46054
46046
|
method: "GET",
|
|
@@ -49160,6 +49152,22 @@ var ethZeroFetcher = {
|
|
|
49160
49152
|
return { [ethZero]: Number(res?.rewards[0]?.apr ?? 0) * 100 };
|
|
49161
49153
|
}
|
|
49162
49154
|
};
|
|
49155
|
+
var USUAL_TOKEN = "0xc4441c2be5d8fa8126822b9929ca0b81ea0de38e";
|
|
49156
|
+
var fetchBusd0UsualPerDay = async () => {
|
|
49157
|
+
try {
|
|
49158
|
+
const res = await fetch(USDZEROPLUS_URL, {
|
|
49159
|
+
method: "GET",
|
|
49160
|
+
headers: { Accept: "application/json" }
|
|
49161
|
+
}).then((r) => r.json());
|
|
49162
|
+
const leg = res?.rewards?.find(
|
|
49163
|
+
(r) => r.rewardToken?.toLowerCase() === USUAL_TOKEN
|
|
49164
|
+
);
|
|
49165
|
+
const rate = Number(leg?.rate);
|
|
49166
|
+
return Number.isFinite(rate) && rate >= 0 ? rate : void 0;
|
|
49167
|
+
} catch {
|
|
49168
|
+
return void 0;
|
|
49169
|
+
}
|
|
49170
|
+
};
|
|
49163
49171
|
var CHAIN_ID14 = Chain.ETHEREUM_MAINNET;
|
|
49164
49172
|
var HUMA_PST_FEED = "0x4be50be32db1510240d542f77c5b36ca0d0965e6";
|
|
49165
49173
|
var HUMA_PST_KEY = "HUMA::PST";
|
|
@@ -52517,7 +52525,8 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
52517
52525
|
// so `solvency` stays unasserted and the reader clamps the rate to it.
|
|
52518
52526
|
//
|
|
52519
52527
|
// The rate is par and NEVER drifts: the yield is a USUAL reward stream
|
|
52520
|
-
// (Usual's `rewards/rates/USD0++` API, 5.
|
|
52528
|
+
// (Usual's `rewards/rates/USD0++` API, ~5.6 % at integration), published
|
|
52529
|
+
// as `rewardsRate` with `supplyRate` 0 (`yieldLeg: 'rewards'`). The
|
|
52521
52530
|
// interesting numbers are the early exits — `unlockUsd0ppFloorPrice` at
|
|
52522
52531
|
// `getFloorPrice()` (0.92 → `withdrawFeeBps` 800), `unlockUSD0ppWithUsual`
|
|
52523
52532
|
// at par for `calculateRequiredUsual` (2.147 USUAL per bUSD0 ≈ 2.6 % at
|
|
@@ -52547,6 +52556,32 @@ var SINGLE_CHAIN_ENTRIES = {
|
|
|
52547
52556
|
// USUAL
|
|
52548
52557
|
parUnlockTokenSymbol: "USUAL"
|
|
52549
52558
|
},
|
|
52559
|
+
// The yield is USUAL, paid outside the share price and claimed from
|
|
52560
|
+
// Usual's DistributionModule against an off-chain cumulative merkle.
|
|
52561
|
+
// `rewardsRate` is priced on the PAR basis from the per-day emission;
|
|
52562
|
+
// the API's market-basis `apr` (the `yieldFetcher`) is the fallback.
|
|
52563
|
+
yieldLeg: "rewards",
|
|
52564
|
+
rewardStream: {
|
|
52565
|
+
token: {
|
|
52566
|
+
address: "0xc4441c2be5d8fa8126822b9929ca0b81ea0de38e",
|
|
52567
|
+
chainId: "1",
|
|
52568
|
+
symbol: "USUAL",
|
|
52569
|
+
decimals: 18
|
|
52570
|
+
},
|
|
52571
|
+
source: {
|
|
52572
|
+
id: "usual:busd0",
|
|
52573
|
+
label: "Usual \xB7 bUSD0",
|
|
52574
|
+
link: "https://app.usual.money/rewards",
|
|
52575
|
+
platform: "usual",
|
|
52576
|
+
refs: {
|
|
52577
|
+
distribution: "usual-merkle",
|
|
52578
|
+
claimContract: "0x75cc0c0ddd2ccafe6ec415be686267588011e36a",
|
|
52579
|
+
proofApi: "https://app.usual.money/api/rewards/<account>"
|
|
52580
|
+
}
|
|
52581
|
+
},
|
|
52582
|
+
claim: "manual",
|
|
52583
|
+
emissionPerSharePerDay: fetchBusd0UsualPerDay
|
|
52584
|
+
},
|
|
52550
52585
|
yieldFetcher: usdZeroPlusFetcher,
|
|
52551
52586
|
yieldKey: BUSD0_KEY
|
|
52552
52587
|
},
|
|
@@ -55587,9 +55622,9 @@ function averageDataLastN(arr, n = 7) {
|
|
|
55587
55622
|
if (last.length === 0) return 0;
|
|
55588
55623
|
return last.reduce((sum3, x) => sum3 + x.data, 0) / last.length;
|
|
55589
55624
|
}
|
|
55590
|
-
var safeFetch = async (label,
|
|
55625
|
+
var safeFetch = async (label, fn2) => {
|
|
55591
55626
|
try {
|
|
55592
|
-
return await
|
|
55627
|
+
return await fn2();
|
|
55593
55628
|
} catch (e) {
|
|
55594
55629
|
console.error(`Error fetching ${label}:`, e);
|
|
55595
55630
|
return void 0;
|
|
@@ -60934,9 +60969,9 @@ function countFailures(data, offset, count) {
|
|
|
60934
60969
|
}
|
|
60935
60970
|
return failures;
|
|
60936
60971
|
}
|
|
60937
|
-
function safeGetCalls(fetcherName,
|
|
60972
|
+
function safeGetCalls(fetcherName, fn2, errors) {
|
|
60938
60973
|
try {
|
|
60939
|
-
return
|
|
60974
|
+
return fn2();
|
|
60940
60975
|
} catch (e) {
|
|
60941
60976
|
errors[fetcherName] = e instanceof Error ? e.message : String(e);
|
|
60942
60977
|
return [];
|
|
@@ -65301,14 +65336,14 @@ function mapApiDetail(d, chainId, prices, tokenList, shareDecimalsByVault, entit
|
|
|
65301
65336
|
liquidityUsd
|
|
65302
65337
|
};
|
|
65303
65338
|
}
|
|
65304
|
-
async function mapWithConcurrency(items, limit,
|
|
65339
|
+
async function mapWithConcurrency(items, limit, fn2) {
|
|
65305
65340
|
const out = new Array(items.length);
|
|
65306
65341
|
let cursor = 0;
|
|
65307
65342
|
const worker = async () => {
|
|
65308
65343
|
while (true) {
|
|
65309
65344
|
const i = cursor++;
|
|
65310
65345
|
if (i >= items.length) break;
|
|
65311
|
-
out[i] = await
|
|
65346
|
+
out[i] = await fn2(items[i]);
|
|
65312
65347
|
}
|
|
65313
65348
|
};
|
|
65314
65349
|
await Promise.all(
|
|
@@ -73383,19 +73418,64 @@ var bitfiExitRoutes = (exit, waitSeconds) => {
|
|
|
73383
73418
|
}
|
|
73384
73419
|
return routes2;
|
|
73385
73420
|
};
|
|
73421
|
+
var resolveRewardEmissions = async (entries) => {
|
|
73422
|
+
const byFn = /* @__PURE__ */ new Map();
|
|
73423
|
+
const out = /* @__PURE__ */ new Map();
|
|
73424
|
+
await Promise.all(
|
|
73425
|
+
entries.map(async (e) => {
|
|
73426
|
+
const fn2 = e.rewardStream?.emissionPerSharePerDay;
|
|
73427
|
+
if (!fn2) return;
|
|
73428
|
+
if (!byFn.has(fn2))
|
|
73429
|
+
byFn.set(
|
|
73430
|
+
fn2,
|
|
73431
|
+
fn2().catch(() => void 0)
|
|
73432
|
+
);
|
|
73433
|
+
out.set(e.address.toLowerCase(), await byFn.get(fn2));
|
|
73434
|
+
})
|
|
73435
|
+
);
|
|
73436
|
+
return out;
|
|
73437
|
+
};
|
|
73438
|
+
var rewardsLeg = (entry, i) => {
|
|
73439
|
+
const cfg = entry.rewardStream;
|
|
73440
|
+
const tokenPrice = cfg ? i.prices[cfg.token.address.toLowerCase()] : void 0;
|
|
73441
|
+
const redeemUsd = i.underlyingPriceUsd !== void 0 ? Number(i.exchangeRate) / 1e18 * i.underlyingPriceUsd : void 0;
|
|
73442
|
+
const parApr = i.perSharePerDay !== void 0 && tokenPrice !== void 0 && redeemUsd !== void 0 && redeemUsd > 0 ? i.perSharePerDay * 365 * tokenPrice / redeemUsd * 100 : void 0;
|
|
73443
|
+
const apr = parApr ?? i.fetcherApr ?? 0;
|
|
73444
|
+
if (!cfg) return { apr };
|
|
73445
|
+
return {
|
|
73446
|
+
apr,
|
|
73447
|
+
streams: [
|
|
73448
|
+
{
|
|
73449
|
+
side: "deposit",
|
|
73450
|
+
apr,
|
|
73451
|
+
kind: "token",
|
|
73452
|
+
token: { ...cfg.token, priceUsd: tokenPrice },
|
|
73453
|
+
source: {
|
|
73454
|
+
...cfg.source,
|
|
73455
|
+
refs: {
|
|
73456
|
+
...cfg.source.refs ?? {},
|
|
73457
|
+
aprBasis: parApr !== void 0 ? "redemption-value" : i.fetcherApr !== void 0 ? "source" : "unknown"
|
|
73458
|
+
}
|
|
73459
|
+
},
|
|
73460
|
+
claim: cfg.claim
|
|
73461
|
+
}
|
|
73462
|
+
]
|
|
73463
|
+
};
|
|
73464
|
+
};
|
|
73386
73465
|
var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList = {}) => {
|
|
73387
73466
|
const entries = getSavingsRegistry(chainId);
|
|
73388
73467
|
if (entries.length === 0) return {};
|
|
73389
73468
|
const readers = entries.map(buildReader2);
|
|
73390
73469
|
const allCalls = readers.flatMap((r) => r.calls);
|
|
73391
73470
|
const allAbis = readers.flatMap((r) => r.abis);
|
|
73392
|
-
const [rawResults, aprByAddress] = await Promise.all([
|
|
73471
|
+
const [rawResults, aprByAddress, emissionByAddress] = await Promise.all([
|
|
73393
73472
|
allCalls.length > 0 ? multicallRetry({
|
|
73394
73473
|
chain: chainId,
|
|
73395
73474
|
calls: allCalls,
|
|
73396
73475
|
abi: allAbis
|
|
73397
73476
|
}) : Promise.resolve([]),
|
|
73398
|
-
resolveYieldApr2(entries)
|
|
73477
|
+
resolveYieldApr2(entries),
|
|
73478
|
+
resolveRewardEmissions(entries)
|
|
73399
73479
|
]);
|
|
73400
73480
|
const out = {};
|
|
73401
73481
|
let cursor = 0;
|
|
@@ -73410,8 +73490,16 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
73410
73490
|
const underlyingLc = entry.underlying.toLowerCase();
|
|
73411
73491
|
const asset = tokenList[underlyingLc];
|
|
73412
73492
|
const priceUsd = prices[underlyingLc];
|
|
73413
|
-
const
|
|
73414
|
-
const
|
|
73493
|
+
const fetcherApr = aprByAddress[addressLc];
|
|
73494
|
+
const rewards = entry.yieldLeg === "rewards" ? rewardsLeg(entry, {
|
|
73495
|
+
perSharePerDay: emissionByAddress.get(addressLc),
|
|
73496
|
+
fetcherApr,
|
|
73497
|
+
exchangeRate: state.exchangeRate,
|
|
73498
|
+
underlyingPriceUsd: priceUsd,
|
|
73499
|
+
prices
|
|
73500
|
+
}) : void 0;
|
|
73501
|
+
const supplyRate = state.supplyRate ?? (rewards ? 0 : fetcherApr ?? 0);
|
|
73502
|
+
const rewardsRate = rewards?.apr ?? 0;
|
|
73415
73503
|
const depositRate = supplyRate + rewardsRate;
|
|
73416
73504
|
const shareDec = entry.decimals;
|
|
73417
73505
|
const underlyingDec = entry.underlyingDecimals ?? entry.decimals;
|
|
@@ -73480,6 +73568,9 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
73480
73568
|
supplyRate,
|
|
73481
73569
|
rewardsRate,
|
|
73482
73570
|
depositRate,
|
|
73571
|
+
// What `rewardsRate` is paid in and how it is claimed — only on
|
|
73572
|
+
// `yieldLeg: 'rewards'` entries.
|
|
73573
|
+
rewardStreams: rewards?.streams,
|
|
73483
73574
|
// NOT part of `depositRate` — it is the incentive the vault's position
|
|
73484
73575
|
// earns and the depositor does not. See the field's docstring.
|
|
73485
73576
|
strandedRewardsRate: state.strandedRewardsRate,
|
|
@@ -73592,6 +73683,143 @@ var fetchSavingsVaults = async (chainId, multicallRetry, prices = {}, tokenList
|
|
|
73592
73683
|
return out;
|
|
73593
73684
|
};
|
|
73594
73685
|
|
|
73686
|
+
// src/vaults/savings/usualRewards.ts
|
|
73687
|
+
var USUAL_DISTRIBUTION_MODULE = "0x75cc0c0ddd2ccafe6ec415be686267588011e36a";
|
|
73688
|
+
var USUAL_REWARDS_API = "https://app.usual.money/api/rewards";
|
|
73689
|
+
var ZERO7 = "0x0000000000000000000000000000000000000000";
|
|
73690
|
+
var fn = (name, inputs, outputs) => ({ name, type: "function", stateMutability: "view", inputs, outputs });
|
|
73691
|
+
var acct = [{ name: "account", type: "address" }];
|
|
73692
|
+
var UsualDistributionModuleReadAbi = [
|
|
73693
|
+
fn(
|
|
73694
|
+
"getOffChainDistributionData",
|
|
73695
|
+
[],
|
|
73696
|
+
[
|
|
73697
|
+
{ name: "timestamp", type: "uint256" },
|
|
73698
|
+
{ name: "merkleRoot", type: "bytes32" }
|
|
73699
|
+
]
|
|
73700
|
+
),
|
|
73701
|
+
fn("getOffChainTokensClaimed", acct, [{ name: "", type: "uint256" }]),
|
|
73702
|
+
fn("getClaimOnlySelf", acct, [{ name: "", type: "bool" }]),
|
|
73703
|
+
fn("getRedirectedAccount", acct, [{ name: "", type: "address" }]),
|
|
73704
|
+
fn("paused", [], [{ name: "", type: "bool" }]),
|
|
73705
|
+
fn("getOffChainDistributionMintCap", [], [{ name: "", type: "uint256" }])
|
|
73706
|
+
];
|
|
73707
|
+
var isHex32 = (v) => typeof v === "string" && /^0x[0-9a-fA-F]{64}$/.test(v);
|
|
73708
|
+
var selectUsualRewardEntry = (entries, onchainRoot) => {
|
|
73709
|
+
if (!Array.isArray(entries))
|
|
73710
|
+
return {
|
|
73711
|
+
status: "unknown",
|
|
73712
|
+
reason: "Usual rewards API reply is not a list"
|
|
73713
|
+
};
|
|
73714
|
+
if (entries.length === 0)
|
|
73715
|
+
return { status: "ok", cumulative: 0n, proof: [], pending: 0n };
|
|
73716
|
+
const parsed = [];
|
|
73717
|
+
for (const e of entries) {
|
|
73718
|
+
try {
|
|
73719
|
+
if (!isHex32(e?.merkleRoot) || !Array.isArray(e.merkleProof)) continue;
|
|
73720
|
+
if (!e.merkleProof.every(isHex32)) continue;
|
|
73721
|
+
parsed.push({
|
|
73722
|
+
root: e.merkleRoot.toLowerCase(),
|
|
73723
|
+
value: BigInt(e.value),
|
|
73724
|
+
proof: e.merkleProof,
|
|
73725
|
+
block: Number(e.blockNumber)
|
|
73726
|
+
});
|
|
73727
|
+
} catch {
|
|
73728
|
+
}
|
|
73729
|
+
}
|
|
73730
|
+
const root = onchainRoot.toLowerCase();
|
|
73731
|
+
const match = parsed.find((p) => p.root === root);
|
|
73732
|
+
if (!match)
|
|
73733
|
+
return {
|
|
73734
|
+
status: "unknown",
|
|
73735
|
+
reason: `Usual rewards API has no entry for the approved on-chain root ${onchainRoot} (it lists ${parsed.length} other root(s)) \u2014 the API and the chain are out of step`
|
|
73736
|
+
};
|
|
73737
|
+
const newest = parsed.reduce((a, b) => b.block > a.block ? b : a, match);
|
|
73738
|
+
const pending = newest.value > match.value ? newest.value - match.value : 0n;
|
|
73739
|
+
return {
|
|
73740
|
+
status: "ok",
|
|
73741
|
+
cumulative: match.value,
|
|
73742
|
+
proof: match.proof,
|
|
73743
|
+
pending
|
|
73744
|
+
};
|
|
73745
|
+
};
|
|
73746
|
+
var fetchUsualRewardsClaimData = async (account, multicallRetry, opts = {}) => {
|
|
73747
|
+
const dm = (opts.distributionModule ?? USUAL_DISTRIBUTION_MODULE).toLowerCase();
|
|
73748
|
+
const who = account.toLowerCase();
|
|
73749
|
+
let res;
|
|
73750
|
+
try {
|
|
73751
|
+
res = await multicallRetry({
|
|
73752
|
+
chain: "1",
|
|
73753
|
+
calls: [
|
|
73754
|
+
{ address: dm, name: "getOffChainDistributionData", params: [] },
|
|
73755
|
+
{ address: dm, name: "getOffChainTokensClaimed", params: [who] },
|
|
73756
|
+
{ address: dm, name: "getClaimOnlySelf", params: [who] },
|
|
73757
|
+
{ address: dm, name: "getRedirectedAccount", params: [who] },
|
|
73758
|
+
{ address: dm, name: "paused", params: [] },
|
|
73759
|
+
{ address: dm, name: "getOffChainDistributionMintCap", params: [] }
|
|
73760
|
+
],
|
|
73761
|
+
abi: UsualDistributionModuleReadAbi,
|
|
73762
|
+
allowFailure: true
|
|
73763
|
+
});
|
|
73764
|
+
} catch (e) {
|
|
73765
|
+
return {
|
|
73766
|
+
status: "unknown",
|
|
73767
|
+
account: who,
|
|
73768
|
+
reason: `DistributionModule read failed: ${e?.message ?? e}`
|
|
73769
|
+
};
|
|
73770
|
+
}
|
|
73771
|
+
const [data, claimedRaw, onlySelf, redirect, paused, cap] = res;
|
|
73772
|
+
const tuple = Array.isArray(data) ? data : void 0;
|
|
73773
|
+
const root = tuple?.[1];
|
|
73774
|
+
const rootTs = tuple?.[0];
|
|
73775
|
+
if (!isHex32(root) || typeof rootTs !== "bigint" || typeof claimedRaw !== "bigint" || typeof onlySelf !== "boolean" || typeof paused !== "boolean")
|
|
73776
|
+
return {
|
|
73777
|
+
status: "unknown",
|
|
73778
|
+
account: who,
|
|
73779
|
+
reason: "DistributionModule read returned an unexpected shape"
|
|
73780
|
+
};
|
|
73781
|
+
let entries;
|
|
73782
|
+
try {
|
|
73783
|
+
const r = await (opts.fetchImpl ?? fetch)(
|
|
73784
|
+
`${opts.apiBase ?? USUAL_REWARDS_API}/${who}`,
|
|
73785
|
+
{ headers: { Accept: "application/json" } }
|
|
73786
|
+
);
|
|
73787
|
+
if (!r.ok)
|
|
73788
|
+
return {
|
|
73789
|
+
status: "unknown",
|
|
73790
|
+
account: who,
|
|
73791
|
+
reason: `Usual rewards API answered HTTP ${r.status}`
|
|
73792
|
+
};
|
|
73793
|
+
entries = await r.json();
|
|
73794
|
+
} catch (e) {
|
|
73795
|
+
return {
|
|
73796
|
+
status: "unknown",
|
|
73797
|
+
account: who,
|
|
73798
|
+
reason: `Usual rewards API unreachable: ${e?.message ?? e}`
|
|
73799
|
+
};
|
|
73800
|
+
}
|
|
73801
|
+
const sel = selectUsualRewardEntry(entries, root);
|
|
73802
|
+
if (sel.status !== "ok") return { ...sel, account: who };
|
|
73803
|
+
const claimable = sel.cumulative > claimedRaw ? sel.cumulative - claimedRaw : 0n;
|
|
73804
|
+
const redirectTo = typeof redirect === "string" && redirect.toLowerCase() !== ZERO7 ? redirect.toLowerCase() : who;
|
|
73805
|
+
return {
|
|
73806
|
+
status: "ok",
|
|
73807
|
+
account: who,
|
|
73808
|
+
distributionModule: dm,
|
|
73809
|
+
merkleRoot: root.toLowerCase(),
|
|
73810
|
+
rootTimestamp: Number(rootTs),
|
|
73811
|
+
cumulative: sel.cumulative,
|
|
73812
|
+
claimed: claimedRaw,
|
|
73813
|
+
claimable,
|
|
73814
|
+
pending: sel.pending,
|
|
73815
|
+
proof: sel.proof,
|
|
73816
|
+
recipient: redirectTo,
|
|
73817
|
+
claimOnlySelf: onlySelf,
|
|
73818
|
+
paused,
|
|
73819
|
+
exceedsMintCap: typeof cap === "bigint" ? claimable > cap : false
|
|
73820
|
+
};
|
|
73821
|
+
};
|
|
73822
|
+
|
|
73595
73823
|
// src/vaults/lagoon/api.ts
|
|
73596
73824
|
var LAGOON_API_URL = "https://api.lagoon.finance/query";
|
|
73597
73825
|
var LAGOON_CHAIN_IDS = /* @__PURE__ */ new Set([
|
|
@@ -75742,7 +75970,7 @@ var getGmxUserPositions = async (chainId, account, multicallRetry, options) => {
|
|
|
75742
75970
|
};
|
|
75743
75971
|
const c = getGmxReadContracts(chainId);
|
|
75744
75972
|
if (!c) return empty;
|
|
75745
|
-
const
|
|
75973
|
+
const acct2 = account.toLowerCase();
|
|
75746
75974
|
const cap = BigInt(options?.cap ?? DEFAULT_CAP);
|
|
75747
75975
|
const tokens = options?.tokens ?? [];
|
|
75748
75976
|
const safe = async (p, fallback) => {
|
|
@@ -75759,7 +75987,7 @@ var getGmxUserPositions = async (chainId, account, multicallRetry, options) => {
|
|
|
75759
75987
|
calls: tokens.map((t) => ({
|
|
75760
75988
|
address: t.address,
|
|
75761
75989
|
name: "balanceOf",
|
|
75762
|
-
params: [
|
|
75990
|
+
params: [acct2]
|
|
75763
75991
|
})),
|
|
75764
75992
|
abi: GmxErc20BalanceAbi,
|
|
75765
75993
|
maxRetries: 3,
|
|
@@ -75774,12 +76002,12 @@ var getGmxUserPositions = async (chainId, account, multicallRetry, options) => {
|
|
|
75774
76002
|
{
|
|
75775
76003
|
address: c.glvReader,
|
|
75776
76004
|
name: "getAccountGlvDeposits",
|
|
75777
|
-
params: [c.dataStore,
|
|
76005
|
+
params: [c.dataStore, acct2, 0n, cap]
|
|
75778
76006
|
},
|
|
75779
76007
|
{
|
|
75780
76008
|
address: c.glvReader,
|
|
75781
76009
|
name: "getAccountGlvWithdrawals",
|
|
75782
|
-
params: [c.dataStore,
|
|
76010
|
+
params: [c.dataStore, acct2, 0n, cap]
|
|
75783
76011
|
}
|
|
75784
76012
|
],
|
|
75785
76013
|
abi: GmxGlvReaderAbi,
|
|
@@ -75795,12 +76023,12 @@ var getGmxUserPositions = async (chainId, account, multicallRetry, options) => {
|
|
|
75795
76023
|
{
|
|
75796
76024
|
address: c.dataStore,
|
|
75797
76025
|
name: "getBytes32ValuesAt",
|
|
75798
|
-
params: [accountDepositListKey(
|
|
76026
|
+
params: [accountDepositListKey(acct2), 0n, cap]
|
|
75799
76027
|
},
|
|
75800
76028
|
{
|
|
75801
76029
|
address: c.dataStore,
|
|
75802
76030
|
name: "getBytes32ValuesAt",
|
|
75803
|
-
params: [accountWithdrawalListKey(
|
|
76031
|
+
params: [accountWithdrawalListKey(acct2), 0n, cap]
|
|
75804
76032
|
}
|
|
75805
76033
|
],
|
|
75806
76034
|
abi: GmxDataStoreAbi,
|
|
@@ -85152,6 +85380,6 @@ function earnPositionTotals(items) {
|
|
|
85152
85380
|
};
|
|
85153
85381
|
}
|
|
85154
85382
|
|
|
85155
|
-
export { ApiBookSource, DEFAULT_MIDNIGHT_API, DEFAULT_OUTLIER_GUARD, DEFAULT_PROFILE_ID, DEFAULT_STALE_REJECT_SECONDS, DEFAULT_TERMMAX_API, DEFAULT_TERM_ORDER_STORE, DOLOMITE_ISO_ID_PREFIX, EARN_DESCRIPTIONS, EARN_LABELS, EARN_RATE_SOURCE_BY_PROVIDER, EMPTY_BALANCE, EXACTLY_LENDER_KEY, FLYING_TULIP_LENDER_KEY, FRACTION_RATE_PROVIDERS, GMX_API_HOSTS, GMX_READ_CONTRACTS, GMX_SUPPORTED_CHAINS, HYPERCORE_VAULT_REGISTRY, IDLE_MARKET_ID, INTERFACE_IDS, LAGOON_API_URL, LAGOON_CHAIN_IDS, MORPHO_LENS, MULTICALL_FAILURE, MaxParamThresholds, NON_EVM_VAULT_PROVIDERS, PASSTHROUGH_RATE_EPSILON, PENDLE_ASSETS_URL, PENDLE_CHAIN_IDS, PENDLE_MARKETS_URL, PREFIX_LENDERS, SDK_FRACTION_RATE_PROVIDERS, SPECTRA_NETWORKS, SPECTRA_RATE_MAX_PERCENT, SPECTRA_RATE_MIN_PERCENT, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, SVM_EARN_VAULT_BUILDERS, TELLER_CALLS_PER_BID, DECIMAL_BASE as TERMMAX_DECIMAL_BASE, TERMMAX_LIQUIDATION_PENALTY, TERMMAX_LIQUIDATION_WINDOW_SECS, TERMMAX_LIQUIDATOR_BONUS, TERMMAX_MARKETS_PER_CALL, TERMMAX_PARTIAL_CLOSE_FACTOR, TERMMAX_PARTIAL_LIQUIDATION_THRESHOLD_USD, TERM_ADAPTERS, TERM_PROFILES, TERM_SHEET_SCHEMA_VERSION, TermMaxApiSource, TermSubgraphSource, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL, VAULT_PROVIDERS, VAULT_PROVIDER_PROFILE, VAULT_PROVIDER_TRAITS, VAULT_SHARE_PRICE_PROBE, VAULT_VENUE_PREFIX, VOLATILE_VAULT_OVERRIDES, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, __resetResupplyUserCaches, accountDepositListKey, accountWithdrawalListKey, appendSnapshot, applyEarnSanity, applyPositionDelta, attachImplications, attachPricesToFlashLiquidity, blockNumberFromTag, borrowDescription, borrowFindings, borrowHeadline, buildExposures2 as buildExposures, buildFluidFTokensCall, buildLendingPositionUid, buildLiquityUserCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildQueriesFromMeta, buildSumerAccumulators, buildSummaries, buildTellerUserCall, buildTermMaxUserCall, buildTermSheet, buildTermSheetsForGroup, buildVaultEarnUid, buildVaultLookup, buildVaultTermSheet, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyFreshness, classifyReliability, classifyVault, clearPendleMarketsCache, clearSpectraMarketsCache, collateralSymbolsByVenue, collectFeedObservations, computeBorrowDelta2 as computeBorrowDelta, computeCloseTradeDeltas, computeCollateralSwapDeltas, computeDebtSwapDeltas, computeDepositDelta2 as computeDepositDelta, computeEModeAnalysis, computeOpenTradeDeltas, computePostTradeMetrics, computeRepayDelta2 as computeRepayDelta, computeSumerBorrowDelta, computeSumerDepositDelta, computeSumerRepayDelta, computeSumerWaterfall, computeSumerWithdrawDelta, computeVaultApr, computeWithdrawDelta2 as computeWithdrawDelta, computeZapTradeDeltas, consensusReference, convertCoolerMarketsToResponse, convertDssMarketsToResponse, convertExactlyMarketsToResponse, convertFlyingTulipMarketsToResponse, convertFrankencoinMarketsToResponse, convertFraxlendPairsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertLlamaLendMarketsToResponse, convertResupplyMarketsToResponse, convertRiverMarketsToResponse, convertTellerMarketsToResponse, convertTermMarketsToResponse, convertTermMaxMarketsToResponse, convertUsddMarketsToResponse, createMarketUid, createMidnightBookSource, createMultiAccountTypeUserState, createMulticallRpcCall, createRawRpcCalls, createTermBookSource, createTermMaxDataSource, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, deriveBorrowTags, deriveSupplyTags, detectInterfaceKinds, dexResolverFor, disambiguateEarnNames, dolomiteVaultAddress, dssIlkBytes32, dssKeyParts, dssLenderKey, duration, earnDescription, earnLabel, earnMarketFromPool, earnMarketFromVault, earnMarketLabel, earnPositionFromLenderEntry, earnPositionFromVaultBalance, earnPositionTotals, earnRateAtMaturity, earnRowSubtitle, earnUidFromMarketUid, earnVaultTerms, earnVenueKind, emitterCoverage, encodeBalanceFetcherCalldata, enrichTermSheet, enrichmentIndexFromRows, enumerateEmitters, exactlyPairLtv, exactlyPenaltyRateToAprPercent, exactlyWadRateToPercent, feePhrase, feedKeyOf, feedStatKey, fetchCoolerMarkets, fetchDolomiteAccountNumbers, fetchDolomiteSubAccounts, fetchDssMarkets, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchExactlyMarkets, fetchFlashLiquidityForChain, fetchFluidDexState, fetchFluidFTokens, fetchFlyingTulipMarkets, fetchFrankencoinMarkets, fetchFraxlendPairs, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLiquityMarkets, fetchListaVaultsFromChain, fetchLlamaLendMarkets, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendleApiAssets, fetchPendleApiMarkets, fetchPendlePrices, fetchPendlePtMarkets, fetchResupplyMarkets, fetchRiverMarkets, fetchSiloVaults, fetchSpectraApiMarkets, fetchSpectraPtMarkets, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTermStoreOrders, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchUsddMarkets, fetchYearnApiVaults, fetchYearnVaults, fillableRemaining, filterActiveLenders, filterLenderMeta, filterLendersByProtocol, finalizeInfo, findingsFor, formatRaw, frankencoinKeyParts, frankencoinLenderKey, fraxlendAssetPerCollateral, fraxlendKeyParts, fraxlendLenderKey, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, getCachedFluidDexState, getCachedLiquityTroves, getCachedTellerBids, getCachedTermMaxDiscovery, getCachedTermMaxMarket, getCachedTermMaxMarkets, getCoreValidators, getFluidFTokensConverter, getGmxApiHost, getGmxReadContracts, getGmxUserPositions, getHealthFactor, getHypercoreUserPositions, getHypercoreVaultRegistry, getLenderAssets, getLenderPublicData, getLenderPublicDataAll, getLenderPublicDataViaApi, getLenderUserDataMulti, getLenderUserDataResult, getLendersForChain, getLstDelegation, getLstValidators, getLstWithdrawalRegistry, getLstWithdrawalRequests, getMaxAmountClose, getMaxAmountCollateralSwap, getMaxAmountDebtSwap, getMaxAmountOpen, getMergedUserData, getMorphoTypeMarketConverter, getReadFailurePolicy, getResolvedDolomiteAccountNumbers, getResolvedDolomiteSubAccounts, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getTermProfile, getVaultPublicDataAll, getVaultWithdrawalRequests, hasCritical, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasPendleMarkets, hasSpectraMarkets, hasUpshiftVaults, hasYearnVaults, ilkToKeySegment, implausibleRatePercent, injectLenderInfoIntoEntries, inverseKeyParts, inverseLenderKey, isBoundNeed, isFailedCall, isIlliquid, isLenderVenueKey, isLendingPosition, isLiveMarket as isLivePendleMarket, isLiveSpectraMarket, isMaturedTerm, isSecondaryMarketOnly, isStablecoinSymbol, isUnearnableEarnRate, isUnrealizableEarnRate, isVaultPosition, isVaultVenue, isYearnV3, keySegmentToIlk, keysFromMaps, lenderApiOnly, lenderFamily, liquityCandidateTroveIds, liquityKeyParts, liquityLenderKey, llamaLendKeyParts, llamaLendLenderKey, marketKeysOf, meetsLiquidityFloor, mergeDeep, multicall3Abi2 as multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, organizeUserQueries, parseBalanceFetcherResult, parseDolomiteSubAccountId, parseEarnUid, parseLenderKey, parseMergedResult, parseMulticallRpcResponses, parseExpirySeconds as parsePendleExpirySeconds, parseRawRpcBatchResponses, parseRawRpcResponses, parseCurveFee as parseSpectraCurveFee, parsePtRate as parseSpectraPtRate, parseTermMaxLtv, parseTokenBalanceResult, pct, assetKey as pendleAssetKey, pickPool as pickSpectraPool, positivePart2 as positivePart, predictInverseEscrow, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, probeAaveFeedTimestamps, pruneFeedStats, rankFindings, ratePercent, readUserPositions, readVaultSharePrices, rejectOutliers as rejectPriceOutliers, repairImpossibleTvl, resolveAdapter, resolveDerivation, resolveDolomiteRowIdentity, resolveEarnIdentity, resolveModeConfig, resolveStCeloDepositGroup, resolveVaultProfileId, resupplyKeyParts, resupplyLenderKey, resupplyMarketLabel, riverKeyParts, riverLenderKey, sanePercent as saneSpectraPercent, savingsAddresses, savingsBalanceKind, secondaryMarketVault, selectAssetGroupPrices, setMysticApiKey, shortDate, spectraAddress, spectraNetwork, spectraPoolsUrl, splitChainScopedAddress as splitPendleChainScopedAddress, stampCapabilities, stampEarnSubtitles, stampVaultClassification, stampVaultTermSheets, stripLeadingBrand, subAccountsOf, supplyDescription, supplyFindings, supplyHeadline, svmEarnBuildability, swapRoutedProvidersArePriceConsistent, tellerBpsToPercent, tellerImpliedLtv, tellerLenderKey, tellerPoolFromLenderKey, termApiBaseUrl, termLenderKey, termMaxApiBase, borrowNif as termMaxBorrowNif, curveApr as termMaxCurveApr, curveAprNumber as termMaxCurveAprNumber, daysToMaturity as termMaxDaysToMaturity, lendNif as termMaxLendNif, mintGtFeeRatio as termMaxMintGtFeeRatio, ratioToNumber as termMaxRatioToNumber, ratioToPercent as termMaxRatioToPercent, termOfferRateToAprPct, termOrderStoreBaseUrl, tickToAprNumber, tickToPrice, toDigest, toDolomiteSubAccountId, toTermFillNow, toTermSheetInput, toVaultTermInput, trancheFromCounterparty, tryParseEarnUid, unflattenLenderData, updateFeedStats, usdValue, usddIlkBytes32, usddKeyParts, usddLenderKey, validateTermSheet, validateTermSheets, validateUserData, vaultSharesToAssets, vaultTermInputFromEarnMarket, vaultTermInputFromSourceRow, vaultTraits, vaultVenue, venueBrand, venueBrandKey, withMaturityLabel, withTrancheLabel };
|
|
85383
|
+
export { ApiBookSource, DEFAULT_MIDNIGHT_API, DEFAULT_OUTLIER_GUARD, DEFAULT_PROFILE_ID, DEFAULT_STALE_REJECT_SECONDS, DEFAULT_TERMMAX_API, DEFAULT_TERM_ORDER_STORE, DOLOMITE_ISO_ID_PREFIX, EARN_DESCRIPTIONS, EARN_LABELS, EARN_RATE_SOURCE_BY_PROVIDER, EMPTY_BALANCE, EXACTLY_LENDER_KEY, FLYING_TULIP_LENDER_KEY, FRACTION_RATE_PROVIDERS, GMX_API_HOSTS, GMX_READ_CONTRACTS, GMX_SUPPORTED_CHAINS, HYPERCORE_VAULT_REGISTRY, IDLE_MARKET_ID, INTERFACE_IDS, LAGOON_API_URL, LAGOON_CHAIN_IDS, MORPHO_LENS, MULTICALL_FAILURE, MaxParamThresholds, NON_EVM_VAULT_PROVIDERS, PASSTHROUGH_RATE_EPSILON, PENDLE_ASSETS_URL, PENDLE_CHAIN_IDS, PENDLE_MARKETS_URL, PREFIX_LENDERS, SDK_FRACTION_RATE_PROVIDERS, SPECTRA_NETWORKS, SPECTRA_RATE_MAX_PERCENT, SPECTRA_RATE_MIN_PERCENT, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, SVM_EARN_VAULT_BUILDERS, TELLER_CALLS_PER_BID, DECIMAL_BASE as TERMMAX_DECIMAL_BASE, TERMMAX_LIQUIDATION_PENALTY, TERMMAX_LIQUIDATION_WINDOW_SECS, TERMMAX_LIQUIDATOR_BONUS, TERMMAX_MARKETS_PER_CALL, TERMMAX_PARTIAL_CLOSE_FACTOR, TERMMAX_PARTIAL_LIQUIDATION_THRESHOLD_USD, TERM_ADAPTERS, TERM_PROFILES, TERM_SHEET_SCHEMA_VERSION, TermMaxApiSource, TermSubgraphSource, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL, VAULT_PROVIDERS, VAULT_PROVIDER_PROFILE, VAULT_PROVIDER_TRAITS, VAULT_SHARE_PRICE_PROBE, VAULT_VENUE_PREFIX, VOLATILE_VAULT_OVERRIDES, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, __resetResupplyUserCaches, accountDepositListKey, accountWithdrawalListKey, appendSnapshot, applyEarnSanity, applyPositionDelta, attachImplications, attachPricesToFlashLiquidity, blockNumberFromTag, borrowDescription, borrowFindings, borrowHeadline, buildExposures2 as buildExposures, buildFluidFTokensCall, buildLendingPositionUid, buildLiquityUserCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildQueriesFromMeta, buildSumerAccumulators, buildSummaries, buildTellerUserCall, buildTermMaxUserCall, buildTermSheet, buildTermSheetsForGroup, buildVaultEarnUid, buildVaultLookup, buildVaultTermSheet, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyFreshness, classifyReliability, classifyVault, clearPendleMarketsCache, clearSpectraMarketsCache, collateralSymbolsByVenue, collectFeedObservations, computeBorrowDelta2 as computeBorrowDelta, computeCloseTradeDeltas, computeCollateralSwapDeltas, computeDebtSwapDeltas, computeDepositDelta2 as computeDepositDelta, computeEModeAnalysis, computeOpenTradeDeltas, computePostTradeMetrics, computeRepayDelta2 as computeRepayDelta, computeSumerBorrowDelta, computeSumerDepositDelta, computeSumerRepayDelta, computeSumerWaterfall, computeSumerWithdrawDelta, computeVaultApr, computeWithdrawDelta2 as computeWithdrawDelta, computeZapTradeDeltas, consensusReference, convertCoolerMarketsToResponse, convertDssMarketsToResponse, convertExactlyMarketsToResponse, convertFlyingTulipMarketsToResponse, convertFrankencoinMarketsToResponse, convertFraxlendPairsToResponse, convertInverseMarketsToResponse, convertLenderUserDataResult, convertLiquityMarketsToResponse, convertLlamaLendMarketsToResponse, convertResupplyMarketsToResponse, convertRiverMarketsToResponse, convertTellerMarketsToResponse, convertTermMarketsToResponse, convertTermMaxMarketsToResponse, convertUsddMarketsToResponse, createMarketUid, createMidnightBookSource, createMultiAccountTypeUserState, createMulticallRpcCall, createRawRpcCalls, createTermBookSource, createTermMaxDataSource, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, deriveBorrowTags, deriveSupplyTags, detectInterfaceKinds, dexResolverFor, disambiguateEarnNames, dolomiteVaultAddress, dssIlkBytes32, dssKeyParts, dssLenderKey, duration, earnDescription, earnLabel, earnMarketFromPool, earnMarketFromVault, earnMarketLabel, earnPositionFromLenderEntry, earnPositionFromVaultBalance, earnPositionTotals, earnRateAtMaturity, earnRowSubtitle, earnUidFromMarketUid, earnVaultTerms, earnVenueKind, emitterCoverage, encodeBalanceFetcherCalldata, enrichTermSheet, enrichmentIndexFromRows, enumerateEmitters, exactlyPairLtv, exactlyPenaltyRateToAprPercent, exactlyWadRateToPercent, feePhrase, feedKeyOf, feedStatKey, fetchCoolerMarkets, fetchDolomiteAccountNumbers, fetchDolomiteSubAccounts, fetchDssMarkets, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchExactlyMarkets, fetchFlashLiquidityForChain, fetchFluidDexState, fetchFluidFTokens, fetchFlyingTulipMarkets, fetchFrankencoinMarkets, fetchFraxlendPairs, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchInverseMarkets, fetchLagoonApiVaults, fetchLagoonVaults, fetchLiquityMarkets, fetchListaVaultsFromChain, fetchLlamaLendMarkets, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendleApiAssets, fetchPendleApiMarkets, fetchPendlePrices, fetchPendlePtMarkets, fetchResupplyMarkets, fetchRiverMarkets, fetchSiloVaults, fetchSpectraApiMarkets, fetchSpectraPtMarkets, fetchTellerMarkets, fetchTermMarkets, fetchTermMaxMarkets, fetchTermStoreOrders, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchUsddMarkets, fetchUsualRewardsClaimData, fetchYearnApiVaults, fetchYearnVaults, fillableRemaining, filterActiveLenders, filterLenderMeta, filterLendersByProtocol, finalizeInfo, findingsFor, formatRaw, frankencoinKeyParts, frankencoinLenderKey, fraxlendAssetPerCollateral, fraxlendKeyParts, fraxlendLenderKey, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, getCachedFluidDexState, getCachedLiquityTroves, getCachedTellerBids, getCachedTermMaxDiscovery, getCachedTermMaxMarket, getCachedTermMaxMarkets, getCoreValidators, getFluidFTokensConverter, getGmxApiHost, getGmxReadContracts, getGmxUserPositions, getHealthFactor, getHypercoreUserPositions, getHypercoreVaultRegistry, getLenderAssets, getLenderPublicData, getLenderPublicDataAll, getLenderPublicDataViaApi, getLenderUserDataMulti, getLenderUserDataResult, getLendersForChain, getLstDelegation, getLstValidators, getLstWithdrawalRegistry, getLstWithdrawalRequests, getMaxAmountClose, getMaxAmountCollateralSwap, getMaxAmountDebtSwap, getMaxAmountOpen, getMergedUserData, getMorphoTypeMarketConverter, getReadFailurePolicy, getResolvedDolomiteAccountNumbers, getResolvedDolomiteSubAccounts, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getTermProfile, getVaultPublicDataAll, getVaultWithdrawalRequests, hasCritical, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasPendleMarkets, hasSpectraMarkets, hasUpshiftVaults, hasYearnVaults, ilkToKeySegment, implausibleRatePercent, injectLenderInfoIntoEntries, inverseKeyParts, inverseLenderKey, isBoundNeed, isFailedCall, isIlliquid, isLenderVenueKey, isLendingPosition, isLiveMarket as isLivePendleMarket, isLiveSpectraMarket, isMaturedTerm, isSecondaryMarketOnly, isStablecoinSymbol, isUnearnableEarnRate, isUnrealizableEarnRate, isVaultPosition, isVaultVenue, isYearnV3, keySegmentToIlk, keysFromMaps, lenderApiOnly, lenderFamily, liquityCandidateTroveIds, liquityKeyParts, liquityLenderKey, llamaLendKeyParts, llamaLendLenderKey, marketKeysOf, meetsLiquidityFloor, mergeDeep, multicall3Abi2 as multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, organizeUserQueries, parseBalanceFetcherResult, parseDolomiteSubAccountId, parseEarnUid, parseLenderKey, parseMergedResult, parseMulticallRpcResponses, parseExpirySeconds as parsePendleExpirySeconds, parseRawRpcBatchResponses, parseRawRpcResponses, parseCurveFee as parseSpectraCurveFee, parsePtRate as parseSpectraPtRate, parseTermMaxLtv, parseTokenBalanceResult, pct, assetKey as pendleAssetKey, pickPool as pickSpectraPool, positivePart2 as positivePart, predictInverseEscrow, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, probeAaveFeedTimestamps, pruneFeedStats, rankFindings, ratePercent, readUserPositions, readVaultSharePrices, rejectOutliers as rejectPriceOutliers, repairImpossibleTvl, resolveAdapter, resolveDerivation, resolveDolomiteRowIdentity, resolveEarnIdentity, resolveModeConfig, resolveStCeloDepositGroup, resolveVaultProfileId, resupplyKeyParts, resupplyLenderKey, resupplyMarketLabel, riverKeyParts, riverLenderKey, sanePercent as saneSpectraPercent, savingsAddresses, savingsBalanceKind, secondaryMarketVault, selectAssetGroupPrices, selectUsualRewardEntry, setMysticApiKey, shortDate, spectraAddress, spectraNetwork, spectraPoolsUrl, splitChainScopedAddress as splitPendleChainScopedAddress, stampCapabilities, stampEarnSubtitles, stampVaultClassification, stampVaultTermSheets, stripLeadingBrand, subAccountsOf, supplyDescription, supplyFindings, supplyHeadline, svmEarnBuildability, swapRoutedProvidersArePriceConsistent, tellerBpsToPercent, tellerImpliedLtv, tellerLenderKey, tellerPoolFromLenderKey, termApiBaseUrl, termLenderKey, termMaxApiBase, borrowNif as termMaxBorrowNif, curveApr as termMaxCurveApr, curveAprNumber as termMaxCurveAprNumber, daysToMaturity as termMaxDaysToMaturity, lendNif as termMaxLendNif, mintGtFeeRatio as termMaxMintGtFeeRatio, ratioToNumber as termMaxRatioToNumber, ratioToPercent as termMaxRatioToPercent, termOfferRateToAprPct, termOrderStoreBaseUrl, tickToAprNumber, tickToPrice, toDigest, toDolomiteSubAccountId, toTermFillNow, toTermSheetInput, toVaultTermInput, trancheFromCounterparty, tryParseEarnUid, unflattenLenderData, updateFeedStats, usdValue, usddIlkBytes32, usddKeyParts, usddLenderKey, validateTermSheet, validateTermSheets, validateUserData, vaultSharesToAssets, vaultTermInputFromEarnMarket, vaultTermInputFromSourceRow, vaultTraits, vaultVenue, venueBrand, venueBrandKey, withMaturityLabel, withTrancheLabel };
|
|
85156
85384
|
//# sourceMappingURL=index.js.map
|
|
85157
85385
|
//# sourceMappingURL=index.js.map
|