@1delta/margin-fetcher 0.0.285 → 0.0.286
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 +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +273 -252
- package/dist/index.js.map +1 -1
- package/dist/lending/user-data/euler/userCallParse.d.ts.map +1 -1
- package/dist/lending/user-data/fetch-balances/parse.d.ts.map +1 -1
- package/dist/vaults/classification.d.ts.map +1 -1
- package/dist/vaults/fetchVaultsAll.d.ts +6 -1
- package/dist/vaults/fetchVaultsAll.d.ts.map +1 -1
- package/dist/vaults/index.d.ts +1 -0
- package/dist/vaults/index.d.ts.map +1 -1
- package/dist/vaults/lookup.d.ts.map +1 -1
- package/dist/vaults/upshift/api.d.ts +67 -0
- package/dist/vaults/upshift/api.d.ts.map +1 -0
- package/dist/vaults/upshift/fetchPublic.d.ts +20 -0
- package/dist/vaults/upshift/fetchPublic.d.ts.map +1 -0
- package/dist/vaults/upshift/index.d.ts +4 -0
- package/dist/vaults/upshift/index.d.ts.map +1 -0
- package/dist/vaults/upshift/types.d.ts +79 -0
- package/dist/vaults/upshift/types.d.ts.map +1 -0
- package/dist/yields/intrinsic/fetchers/accountable.d.ts +3 -0
- package/dist/yields/intrinsic/fetchers/accountable.d.ts.map +1 -0
- package/dist/yields/intrinsic/fetchers/monadLst.d.ts +3 -0
- package/dist/yields/intrinsic/fetchers/monadLst.d.ts.map +1 -0
- package/dist/yields/intrinsic/fetchers/upshift.d.ts +3 -0
- package/dist/yields/intrinsic/fetchers/upshift.d.ts.map +1 -0
- package/dist/yields/intrinsic/index.d.ts.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { parseAbi, keccak256, encodeAbiParameters, formatEther, BaseError, encodeFunctionData, formatUnits, isAddress, getAddress, decodeFunctionResult, decodeAbiParameters, AbiEncodingLengthMismatchError, concatHex, pad, InvalidAddressError, stringToHex, boolToHex, integerRegex, numberToHex, bytesRegex, BytesSizeMismatchError, arrayRegex, UnsupportedPackedAbiType } from './chunk-Z3MGRQJR.js';
|
|
2
2
|
import './chunk-BYTNVMX7.js';
|
|
3
3
|
import './chunk-PR4QN5HX.js';
|
|
4
|
-
import { Lender, isAaveType, isCompoundV3, isMultiMarket, isSiloV2Type, isSiloV3Type, isDolomite, isAaveV4Type, isInit, isMorphoType, isCompoundV2Type, isVenusType, isSumerType, AAVE_V3_LENDERS, AAVE_V2_LENDERS, isAaveV2Type, isAaveV32Type, isAaveV3Type,
|
|
4
|
+
import { Lender, isAaveType, isCompoundV3, isMultiMarket, isSiloV2Type, isSiloV3Type, isDolomite, isEulerType, isAaveV4Type, isInit, isMorphoType, isCompoundV2Type, isVenusType, isSumerType, AAVE_V3_LENDERS, AAVE_V2_LENDERS, isAaveV2Type, isAaveV32Type, isAaveV3Type, isFluid, isGearboxV3, isYLDR, isCompoundV3Type, isLista, isTectonicType, isKineticType, isBenqiType } from '@1delta/lender-registry';
|
|
5
5
|
export { isAaveType, isAaveV2Type, isAaveV32Type, isAaveV3Type, isCompoundV3, isCompoundV3Type, isInit, isMorphoType, isMultiMarket, isYLDR } from '@1delta/lender-registry';
|
|
6
|
+
import { aavePools, compoundV3Pools, initConfig, morphoPools, compoundV2Pools, eulerVaults, siloMarkets, siloV2LenderKey, siloMarketsV3, siloV3LenderKey, aaveV4Spokes, aaveV4SpokeLenderKey, fluidResolvers, gearboxResolvers, dolomiteConfigs, aaveReserves, compoundV3Reserves, morphoTypeMarkets, getSiloV2MarketEntry, getSiloV3MarketEntry, dolomiteEmode, aaveTokens, morphoTypeVaults, eulerConfigs, gearboxMarketCompressor, gearboxMarketConfigurators, gearboxV3LenderKey, parseAaveV4SpokeLenderKey, gearboxAccountCompressor, compoundV2Tokens, aaveOracles, aaveOraclesConfig, compoundV2Oracles, compoundV2TokenArray, compoundV2OraclesConfig, compoundV3OraclesData, compoundV3BaseData, compoundV2Reserves, fetchTokenLists, fetchTokenList, aaveV4Oracles } from '@1delta/data-sdk';
|
|
6
7
|
import lodash from 'lodash';
|
|
7
8
|
import { getEvmClient, getEvmChain, getEvmClientUniversal, multicallRetryUniversal } from '@1delta/providers';
|
|
8
9
|
import { MetaMorphoAbi, FluidLendingResolverAbi, FluidVaultResolverAbi, MoolahVaultAbi, MorphoLensAbi, AaveV4SpokeAbi, AaveV4OracleAbi, AaveV4HubAbi, DolomiteMarginAbi, GearboxMarketCompressorV310Abi, MorphoBlueAbi, GearboxCreditAccountCompressorV310Abi } from '@1delta/abis';
|
|
@@ -6246,165 +6247,6 @@ var IrgetterAbi = [
|
|
|
6246
6247
|
}
|
|
6247
6248
|
];
|
|
6248
6249
|
|
|
6249
|
-
// ../data-sdk/dist/index.mjs
|
|
6250
|
-
var GLOBAL_CHAIN_DATA_KEY = "__1delta_chain_registry__";
|
|
6251
|
-
globalThis[GLOBAL_CHAIN_DATA_KEY] = {};
|
|
6252
|
-
var GLOBAL_LENDER_DATA_KEY = "__1delta_lender_registry__";
|
|
6253
|
-
globalThis[GLOBAL_LENDER_DATA_KEY] = {
|
|
6254
|
-
aaveTokens: {},
|
|
6255
|
-
aavePools: {},
|
|
6256
|
-
compoundV3Pools: {},
|
|
6257
|
-
morphoPools: {},
|
|
6258
|
-
compoundV3BaseData: {},
|
|
6259
|
-
compoundV2Pools: {},
|
|
6260
|
-
compoundV2Tokens: {},
|
|
6261
|
-
compoundV2TokenArray: {},
|
|
6262
|
-
initConfig: {},
|
|
6263
|
-
aaveReserves: {},
|
|
6264
|
-
compoundV2Reserves: {},
|
|
6265
|
-
compoundV3Reserves: {},
|
|
6266
|
-
aaveOracles: {},
|
|
6267
|
-
compoundV2Oracles: {},
|
|
6268
|
-
compoundV3OraclesData: {},
|
|
6269
|
-
morphoOracles: {},
|
|
6270
|
-
morphoTypeOracles: {},
|
|
6271
|
-
morphoTypeMarkets: {},
|
|
6272
|
-
morphoTypeVaults: {},
|
|
6273
|
-
aaveOraclesConfig: {},
|
|
6274
|
-
compoundV2OraclesConfig: {},
|
|
6275
|
-
aaveWethGateway: {},
|
|
6276
|
-
morphoBundler3: {},
|
|
6277
|
-
listaNativeProvider: {},
|
|
6278
|
-
compoundV3Bulker: {},
|
|
6279
|
-
eulerConfigs: {},
|
|
6280
|
-
eulerVaults: {},
|
|
6281
|
-
dolomiteConfigs: {},
|
|
6282
|
-
dolomiteEmode: {},
|
|
6283
|
-
aaveV4Spokes: {},
|
|
6284
|
-
aaveV4Oracles: {},
|
|
6285
|
-
aaveV4Peripherals: {},
|
|
6286
|
-
siloMarkets: {},
|
|
6287
|
-
siloPeripherals: {},
|
|
6288
|
-
siloMarketsV3: {},
|
|
6289
|
-
siloPeripheralsV3: {},
|
|
6290
|
-
fluidResolvers: {},
|
|
6291
|
-
fluidVaults: {},
|
|
6292
|
-
gearboxResolvers: {
|
|
6293
|
-
addressProviderV310: "",
|
|
6294
|
-
marketCompressorV310: "",
|
|
6295
|
-
chains: {}
|
|
6296
|
-
}
|
|
6297
|
-
};
|
|
6298
|
-
function getGlobalData2() {
|
|
6299
|
-
return globalThis[GLOBAL_LENDER_DATA_KEY];
|
|
6300
|
-
}
|
|
6301
|
-
var aaveTokens = () => getGlobalData2()?.aaveTokens;
|
|
6302
|
-
var aavePools = () => getGlobalData2()?.aavePools;
|
|
6303
|
-
var aaveOracles = () => getGlobalData2()?.aaveOracles;
|
|
6304
|
-
var compoundV2Oracles = () => getGlobalData2()?.compoundV2Oracles;
|
|
6305
|
-
var compoundV3OraclesData = () => getGlobalData2()?.compoundV3OraclesData;
|
|
6306
|
-
var morphoTypeMarkets = () => getGlobalData2()?.morphoTypeMarkets;
|
|
6307
|
-
var morphoTypeVaults = () => getGlobalData2()?.morphoTypeVaults;
|
|
6308
|
-
var aaveReserves = () => getGlobalData2()?.aaveReserves;
|
|
6309
|
-
var compoundV3Reserves = () => getGlobalData2()?.compoundV3Reserves;
|
|
6310
|
-
var compoundV2Reserves = () => getGlobalData2()?.compoundV2Reserves;
|
|
6311
|
-
var compoundV3Pools = () => getGlobalData2()?.compoundV3Pools;
|
|
6312
|
-
var morphoPools = () => getGlobalData2()?.morphoPools;
|
|
6313
|
-
var compoundV3BaseData = () => getGlobalData2()?.compoundV3BaseData;
|
|
6314
|
-
var compoundV2Pools = () => getGlobalData2()?.compoundV2Pools;
|
|
6315
|
-
var compoundV2Tokens = () => getGlobalData2()?.compoundV2Tokens;
|
|
6316
|
-
var compoundV2TokenArray = () => getGlobalData2()?.compoundV2TokenArray;
|
|
6317
|
-
var initConfig = () => getGlobalData2()?.initConfig;
|
|
6318
|
-
var aaveOraclesConfig = () => getGlobalData2()?.aaveOraclesConfig;
|
|
6319
|
-
var compoundV2OraclesConfig = () => getGlobalData2()?.compoundV2OraclesConfig;
|
|
6320
|
-
var eulerConfigs = () => getGlobalData2()?.eulerConfigs;
|
|
6321
|
-
var eulerVaults = () => getGlobalData2()?.eulerVaults;
|
|
6322
|
-
var dolomiteConfigs = () => getGlobalData2()?.dolomiteConfigs;
|
|
6323
|
-
var dolomiteEmode = () => getGlobalData2()?.dolomiteEmode;
|
|
6324
|
-
var aaveV4Spokes = () => getGlobalData2()?.aaveV4Spokes;
|
|
6325
|
-
var aaveV4Oracles = () => getGlobalData2()?.aaveV4Oracles;
|
|
6326
|
-
var siloMarkets = () => getGlobalData2()?.siloMarkets;
|
|
6327
|
-
var siloMarketsV3 = () => getGlobalData2()?.siloMarketsV3;
|
|
6328
|
-
var fluidResolvers = () => getGlobalData2()?.fluidResolvers;
|
|
6329
|
-
var gearboxResolvers = () => getGlobalData2()?.gearboxResolvers;
|
|
6330
|
-
var gearboxMarketCompressor = () => getGlobalData2()?.gearboxResolvers?.marketCompressorV310 || void 0;
|
|
6331
|
-
var GEARBOX_ACCOUNT_COMPRESSOR_V310 = "0x4115708Fc8fe6bB392De2e0C21c2C81dA2222394";
|
|
6332
|
-
var gearboxAccountCompressor = () => GEARBOX_ACCOUNT_COMPRESSOR_V310;
|
|
6333
|
-
var gearboxMarketConfigurators = (chainId) => getGlobalData2()?.gearboxResolvers?.chains?.[chainId]?.marketConfigurators;
|
|
6334
|
-
function aaveV4SpokeLenderKey(spoke) {
|
|
6335
|
-
if (!spoke || !spoke.startsWith("0x") || spoke.length !== 42) {
|
|
6336
|
-
throw new Error(`aaveV4SpokeLenderKey: invalid spoke address ${spoke}`);
|
|
6337
|
-
}
|
|
6338
|
-
return `AAVE_V4_${spoke.slice(2).toUpperCase()}`;
|
|
6339
|
-
}
|
|
6340
|
-
function parseAaveV4SpokeLenderKey(lenderKey) {
|
|
6341
|
-
const match = lenderKey.match(/^AAVE_V4_([0-9A-F]{40})$/);
|
|
6342
|
-
if (!match) return void 0;
|
|
6343
|
-
return { spokeAddrLower: "0x" + match[1].toLowerCase() };
|
|
6344
|
-
}
|
|
6345
|
-
function siloV2LenderKey(siloConfig) {
|
|
6346
|
-
if (!siloConfig || !siloConfig.startsWith("0x") || siloConfig.length !== 42) {
|
|
6347
|
-
throw new Error(`siloV2LenderKey: invalid siloConfig address ${siloConfig}`);
|
|
6348
|
-
}
|
|
6349
|
-
return `SILO_V2_${siloConfig.slice(2).toUpperCase()}`;
|
|
6350
|
-
}
|
|
6351
|
-
function parseSiloV2LenderKey(lenderKey) {
|
|
6352
|
-
const match = lenderKey.match(/^SILO_V2_([0-9A-F]{40})$/);
|
|
6353
|
-
if (!match) return void 0;
|
|
6354
|
-
return { siloConfigAddrLower: "0x" + match[1].toLowerCase() };
|
|
6355
|
-
}
|
|
6356
|
-
function getSiloV2MarketEntry(chainId, lenderKey) {
|
|
6357
|
-
const parsed = parseSiloV2LenderKey(lenderKey);
|
|
6358
|
-
if (!parsed) return void 0;
|
|
6359
|
-
const list = getGlobalData2()?.siloMarkets?.[chainId];
|
|
6360
|
-
if (!list) return void 0;
|
|
6361
|
-
return list.find(
|
|
6362
|
-
(m) => m.siloConfig.toLowerCase() === parsed.siloConfigAddrLower
|
|
6363
|
-
);
|
|
6364
|
-
}
|
|
6365
|
-
function siloV3LenderKey(siloConfig) {
|
|
6366
|
-
if (!siloConfig || !siloConfig.startsWith("0x") || siloConfig.length !== 42) {
|
|
6367
|
-
throw new Error(`siloV3LenderKey: invalid siloConfig address ${siloConfig}`);
|
|
6368
|
-
}
|
|
6369
|
-
return `SILO_V3_${siloConfig.slice(2).toUpperCase()}`;
|
|
6370
|
-
}
|
|
6371
|
-
function parseSiloV3LenderKey(lenderKey) {
|
|
6372
|
-
const match = lenderKey.match(/^SILO_V3_([0-9A-F]{40})$/);
|
|
6373
|
-
if (!match) return void 0;
|
|
6374
|
-
return { siloConfigAddrLower: "0x" + match[1].toLowerCase() };
|
|
6375
|
-
}
|
|
6376
|
-
function getSiloV3MarketEntry(chainId, lenderKey) {
|
|
6377
|
-
const parsed = parseSiloV3LenderKey(lenderKey);
|
|
6378
|
-
if (!parsed) return void 0;
|
|
6379
|
-
const list = getGlobalData2()?.siloMarketsV3?.[chainId];
|
|
6380
|
-
if (!list) return void 0;
|
|
6381
|
-
return list.find(
|
|
6382
|
-
(m) => m.siloConfig.toLowerCase() === parsed.siloConfigAddrLower
|
|
6383
|
-
);
|
|
6384
|
-
}
|
|
6385
|
-
function gearboxV3LenderKey(creditManager) {
|
|
6386
|
-
if (!creditManager || !creditManager.startsWith("0x") || creditManager.length !== 42) {
|
|
6387
|
-
throw new Error(
|
|
6388
|
-
`gearboxV3LenderKey: invalid creditManager address ${creditManager}`
|
|
6389
|
-
);
|
|
6390
|
-
}
|
|
6391
|
-
return `GEARBOX_V3_${creditManager.slice(2).toUpperCase()}`;
|
|
6392
|
-
}
|
|
6393
|
-
var getListUrl = (chainId) => `https://raw.githubusercontent.com/1delta-DAO/token-lists/main/${chainId}.json`;
|
|
6394
|
-
async function fetchTokenList(chainId) {
|
|
6395
|
-
const data = await fetch(getListUrl(chainId));
|
|
6396
|
-
if (!data.ok) throw new Error(`HTTP error! status: ${data.status}`);
|
|
6397
|
-
return (await data.json()).list;
|
|
6398
|
-
}
|
|
6399
|
-
async function fetchTokenLists(chainIds) {
|
|
6400
|
-
const promises = chainIds.map(async (chainId) => {
|
|
6401
|
-
const list = await fetchTokenList(chainId);
|
|
6402
|
-
return [chainId, list];
|
|
6403
|
-
});
|
|
6404
|
-
const results = await Promise.all(promises);
|
|
6405
|
-
return Object.fromEntries(results);
|
|
6406
|
-
}
|
|
6407
|
-
|
|
6408
6250
|
// src/utils/marketUid.ts
|
|
6409
6251
|
function createMarketUid(chainId, lender, refAddress) {
|
|
6410
6252
|
if (!refAddress || !lender || !chainId) {
|
|
@@ -7913,8 +7755,6 @@ var buildAaveV3StyleLenderReserveCall = (chainId, lender) => {
|
|
|
7913
7755
|
}
|
|
7914
7756
|
}
|
|
7915
7757
|
};
|
|
7916
|
-
|
|
7917
|
-
// src/lending/public-data/addresses/init.ts
|
|
7918
7758
|
function getInitLensAddress(chainId) {
|
|
7919
7759
|
return addressesInitCore.PublicLens[chainId];
|
|
7920
7760
|
}
|
|
@@ -13644,8 +13484,6 @@ function buildMorphoTypeCall(chainId, lender, marketsOVerride) {
|
|
|
13644
13484
|
return buildListaCall(chainId, marketsOVerride);
|
|
13645
13485
|
return buildMorphoCall(chainId, marketsOVerride);
|
|
13646
13486
|
}
|
|
13647
|
-
|
|
13648
|
-
// src/lending/public-data/morpho/getMarketsFromChain.ts
|
|
13649
13487
|
function getMorphoMarketDataConverter(lender, chainId, prices, additionalYields = {
|
|
13650
13488
|
intrinsicYields: {},
|
|
13651
13489
|
lenderRewards: {},
|
|
@@ -18487,8 +18325,6 @@ var vaultLensAbi = [
|
|
|
18487
18325
|
stateMutability: "view"
|
|
18488
18326
|
}
|
|
18489
18327
|
];
|
|
18490
|
-
|
|
18491
|
-
// src/lending/public-data/euler/publicCallBuild.ts
|
|
18492
18328
|
var buildEulerV2LenderReserveCall = (chainId, lender) => {
|
|
18493
18329
|
if (!ENABLED_EULER_V2_CHAINS.includes(chainId)) return [];
|
|
18494
18330
|
const config = eulerConfigs()?.[lender]?.[chainId];
|
|
@@ -18955,8 +18791,6 @@ var getEulerV2ReservesDataConverter = (lender, chainId, prices, additionalYields
|
|
|
18955
18791
|
expectedNumberOfCalls
|
|
18956
18792
|
];
|
|
18957
18793
|
};
|
|
18958
|
-
|
|
18959
|
-
// src/lending/public-data/aave-v4-type/publicCallBuild.ts
|
|
18960
18794
|
var BASE_CALLS_PER_RESERVE = 5;
|
|
18961
18795
|
var CALLS_PER_SPOKE_TAIL = 1;
|
|
18962
18796
|
var MAX_HUB_ASSETS = 25;
|
|
@@ -19067,8 +18901,6 @@ var getAaveV4ExpectedCallCount = (chainId, lender) => {
|
|
|
19067
18901
|
}
|
|
19068
18902
|
return count;
|
|
19069
18903
|
};
|
|
19070
|
-
|
|
19071
|
-
// src/lending/public-data/aave-v4-type/fetcher/normalize.ts
|
|
19072
18904
|
function toTokenAmount2(raw, decimals) {
|
|
19073
18905
|
if (raw === 0n) return "0";
|
|
19074
18906
|
const negative = raw < 0n;
|
|
@@ -19625,8 +19457,6 @@ var InterestRateModelV2Abi = [
|
|
|
19625
19457
|
]
|
|
19626
19458
|
}
|
|
19627
19459
|
];
|
|
19628
|
-
|
|
19629
|
-
// src/lending/public-data/silo-v2/publicCallBuild.ts
|
|
19630
19460
|
var SILO_V2_CALLS_PER_SIDE = 3;
|
|
19631
19461
|
var SILO_V2_CALLS_PER_PAIR = SILO_V2_CALLS_PER_SIDE * 2;
|
|
19632
19462
|
function buildSiloV2LenderReserveCall(_chainId, lender) {
|
|
@@ -19873,8 +19703,6 @@ var getSiloV2ReservesDataConverter = (lender, chainId, prices, additionalYields,
|
|
|
19873
19703
|
SILO_V2_CALLS_PER_PAIR
|
|
19874
19704
|
];
|
|
19875
19705
|
};
|
|
19876
|
-
|
|
19877
|
-
// src/lending/public-data/silo-v3/publicCallBuild.ts
|
|
19878
19706
|
var SILO_V3_CALLS_PER_SIDE = 3;
|
|
19879
19707
|
var SILO_V3_CALLS_PER_PAIR = SILO_V3_CALLS_PER_SIDE * 2;
|
|
19880
19708
|
function buildSiloV3LenderReserveCall(_chainId, lender) {
|
|
@@ -19905,8 +19733,6 @@ function buildSiloV3LenderReserveCall(_chainId, lender) {
|
|
|
19905
19733
|
}
|
|
19906
19734
|
return calls;
|
|
19907
19735
|
}
|
|
19908
|
-
|
|
19909
|
-
// src/lending/public-data/silo-v3/publicCallParse.ts
|
|
19910
19736
|
var ZERO_ADDRESS3 = "0x0000000000000000000000000000000000000000";
|
|
19911
19737
|
var getSiloV3ReservesDataConverter = (lender, chainId, prices, additionalYields, tokenList = {}) => {
|
|
19912
19738
|
const market = getSiloV3MarketEntry(chainId, lender);
|
|
@@ -20264,8 +20090,6 @@ function parseVault(vault, chainId, prices, additionalYields, tokenList) {
|
|
|
20264
20090
|
}
|
|
20265
20091
|
};
|
|
20266
20092
|
}
|
|
20267
|
-
|
|
20268
|
-
// src/lending/public-data/dolomite/publicCallBuild.ts
|
|
20269
20093
|
var getDolomiteMarketIds = (chainId) => {
|
|
20270
20094
|
const markets = dolomiteConfigs()?.[chainId]?.markets;
|
|
20271
20095
|
return markets ? Object.keys(markets) : [];
|
|
@@ -20450,8 +20274,6 @@ var getDolomitePublicDataConverter = (lender, chainId, _prices, additionalYields
|
|
|
20450
20274
|
expectedNumberOfCalls
|
|
20451
20275
|
];
|
|
20452
20276
|
};
|
|
20453
|
-
|
|
20454
|
-
// src/lending/public-data/gearbox/publicCallBuild.ts
|
|
20455
20277
|
var buildGearboxCall = (chainId, _lender) => {
|
|
20456
20278
|
const compressor = gearboxMarketCompressor();
|
|
20457
20279
|
const configurators = gearboxMarketConfigurators(chainId);
|
|
@@ -20472,8 +20294,6 @@ var buildGearboxCall = (chainId, _lender) => {
|
|
|
20472
20294
|
}
|
|
20473
20295
|
];
|
|
20474
20296
|
};
|
|
20475
|
-
|
|
20476
|
-
// src/lending/public-data/gearbox/publicCallParse.ts
|
|
20477
20297
|
var RAY_TO_PERCENT = 1e25;
|
|
20478
20298
|
var scaleGearboxRate = (raw) => {
|
|
20479
20299
|
if (raw === void 0 || raw === null) return 0;
|
|
@@ -21118,8 +20938,6 @@ async function fetchSiloMarkets(chainId, options) {
|
|
|
21118
20938
|
(s) => s.protocol?.protocolVersion === options.protocolVersion
|
|
21119
20939
|
);
|
|
21120
20940
|
}
|
|
21121
|
-
|
|
21122
|
-
// src/lending/public-data/silo-v2/convertPublic.ts
|
|
21123
20941
|
function convertSiloMarketsToPublicResponse(apiItems, chainId, prices, additionalYields = {
|
|
21124
20942
|
intrinsicYields: {},
|
|
21125
20943
|
lenderRewards: {},
|
|
@@ -21259,8 +21077,6 @@ function bigintToLtv(v) {
|
|
|
21259
21077
|
return Number.isFinite(n) ? n / 1e18 : 0;
|
|
21260
21078
|
}
|
|
21261
21079
|
}
|
|
21262
|
-
|
|
21263
|
-
// src/lending/public-data/silo-v3/convertPublic.ts
|
|
21264
21080
|
var ZERO_ADDRESS4 = "0x0000000000000000000000000000000000000000";
|
|
21265
21081
|
function convertSiloV3MarketsToPublicResponse(apiItems, chainId, prices, additionalYields = {
|
|
21266
21082
|
intrinsicYields: {},
|
|
@@ -22153,8 +21969,6 @@ var buildEulerUserCall = async (chainId, lender, account, subAccountIndexes) =>
|
|
|
22153
21969
|
params: [evcAddress, getSubAccountAddress(account, i)]
|
|
22154
21970
|
}));
|
|
22155
21971
|
};
|
|
22156
|
-
|
|
22157
|
-
// src/lending/user-data/aave-v4-type/userCallBuild.ts
|
|
22158
21972
|
var USER_CALLS_PER_RESERVE = 4;
|
|
22159
21973
|
function resolveSpokeEntry2(chainId, lender) {
|
|
22160
21974
|
const parsed = parseAaveV4SpokeLenderKey(lender);
|
|
@@ -22195,8 +22009,6 @@ var buildAaveV4UserCall = (chainId, lender, account) => {
|
|
|
22195
22009
|
}
|
|
22196
22010
|
return calls;
|
|
22197
22011
|
};
|
|
22198
|
-
|
|
22199
|
-
// src/lending/user-data/silo-v2/userCallBuild.ts
|
|
22200
22012
|
var ASSET_TYPE_PROTECTED = 0;
|
|
22201
22013
|
var ASSET_TYPE_COLLATERAL = 1;
|
|
22202
22014
|
var SILO_V2_USER_CALLS_PER_SIDE = 5;
|
|
@@ -22244,8 +22056,6 @@ var buildSiloV2UserCall = (chainId, lender, account) => {
|
|
|
22244
22056
|
}
|
|
22245
22057
|
return calls;
|
|
22246
22058
|
};
|
|
22247
|
-
|
|
22248
|
-
// src/lending/user-data/silo-v3/userCallBuild.ts
|
|
22249
22059
|
var ASSET_TYPE_PROTECTED2 = 0;
|
|
22250
22060
|
var ASSET_TYPE_COLLATERAL2 = 1;
|
|
22251
22061
|
var SILO_V3_USER_CALLS_PER_SIDE = 5;
|
|
@@ -22293,8 +22103,6 @@ var buildSiloV3UserCall = (chainId, lender, account) => {
|
|
|
22293
22103
|
}
|
|
22294
22104
|
return calls;
|
|
22295
22105
|
};
|
|
22296
|
-
|
|
22297
|
-
// src/lending/user-data/fluid/userCallBuild.ts
|
|
22298
22106
|
var FLUID_USER_CALL_COUNT = 1;
|
|
22299
22107
|
var buildFluidUserCall = (chainId, _lender, account) => {
|
|
22300
22108
|
const resolvers = fluidResolvers()?.[chainId];
|
|
@@ -22307,14 +22115,12 @@ var buildFluidUserCall = (chainId, _lender, account) => {
|
|
|
22307
22115
|
}
|
|
22308
22116
|
];
|
|
22309
22117
|
};
|
|
22310
|
-
|
|
22311
|
-
// src/lending/user-data/gearbox/userCallBuild.ts
|
|
22312
22118
|
var CA_QUERY_LIMIT = 128;
|
|
22313
22119
|
var GEARBOX_V3_USER_CALL_COUNT = 1;
|
|
22314
22120
|
var buildGearboxV3UserCall = (chainId, _lender, account) => {
|
|
22315
22121
|
const compressor = gearboxAccountCompressor();
|
|
22316
22122
|
const configurators = gearboxMarketConfigurators(chainId);
|
|
22317
|
-
if (!configurators) return [];
|
|
22123
|
+
if (!compressor || !configurators) return [];
|
|
22318
22124
|
const curatorAddrs = Object.keys(configurators);
|
|
22319
22125
|
if (curatorAddrs.length === 0) return [];
|
|
22320
22126
|
return [
|
|
@@ -22346,8 +22152,6 @@ var buildGearboxV3UserCall = (chainId, _lender, account) => {
|
|
|
22346
22152
|
}
|
|
22347
22153
|
];
|
|
22348
22154
|
};
|
|
22349
|
-
|
|
22350
|
-
// src/lending/user-data/dolomite/userCallBuild.ts
|
|
22351
22155
|
var SUBGRAPH_CACHE_TTL_MS = 3e4;
|
|
22352
22156
|
var SUBGRAPH_TIMEOUT_MS2 = 1e4;
|
|
22353
22157
|
var subgraphCache = /* @__PURE__ */ new Map();
|
|
@@ -23612,7 +23416,6 @@ var getEulerUserDataConverter = (lender, chainId, account, metaMap, subAccountIn
|
|
|
23612
23416
|
if (!result) continue;
|
|
23613
23417
|
const evcInfo = result.evcAccountInfo ?? result[0];
|
|
23614
23418
|
const vaultAccounts = result.vaultAccountInfo ?? result[1] ?? [];
|
|
23615
|
-
if (vaultAccounts.length === 0) continue;
|
|
23616
23419
|
const subAccountId = String(sortedIndices[idx]);
|
|
23617
23420
|
const enabledControllers = (evcInfo?.enabledControllers ?? []).map((a) => a.toLowerCase());
|
|
23618
23421
|
const controller = enabledControllers.length > 0 ? enabledControllers[0] : void 0;
|
|
@@ -23660,7 +23463,7 @@ var getEulerUserDataConverter = (lender, chainId, account, metaMap, subAccountIn
|
|
|
23660
23463
|
isAllowed: assets > 0n || borrowed > 0n
|
|
23661
23464
|
};
|
|
23662
23465
|
}
|
|
23663
|
-
if (Object.keys(positions).length > 0) {
|
|
23466
|
+
if (Object.keys(positions).length > 0 || controller) {
|
|
23664
23467
|
lendingPositions[subAccountId] = positions;
|
|
23665
23468
|
histData[subAccountId] = { totalDebt24h, totalDeposits24h };
|
|
23666
23469
|
}
|
|
@@ -24030,8 +23833,6 @@ function createAaveV4Entry(base, data, key, meta, spokeAddr) {
|
|
|
24030
23833
|
addedDebt: Number(currentDebt) * priceHist
|
|
24031
23834
|
};
|
|
24032
23835
|
}
|
|
24033
|
-
|
|
24034
|
-
// src/lending/user-data/silo-v2/userCallParse.ts
|
|
24035
23836
|
var getSiloV2UserDataConverter = (lender, chainId, account, metaMap) => {
|
|
24036
23837
|
const market = getSiloV2MarketEntry(chainId, lender);
|
|
24037
23838
|
if (!market) return [() => void 0, 0];
|
|
@@ -24144,8 +23945,6 @@ function toBigInt6(v) {
|
|
|
24144
23945
|
return 0n;
|
|
24145
23946
|
}
|
|
24146
23947
|
}
|
|
24147
|
-
|
|
24148
|
-
// src/lending/user-data/silo-v3/userCallParse.ts
|
|
24149
23948
|
var getSiloV3UserDataConverter = (lender, chainId, account, metaMap) => {
|
|
24150
23949
|
const market = getSiloV3MarketEntry(chainId, lender);
|
|
24151
23950
|
if (!market) return [() => void 0, 0];
|
|
@@ -24391,8 +24190,6 @@ var getFluidUserDataConverter = (lender, chainId, account, meta) => {
|
|
|
24391
24190
|
FLUID_USER_CALL_COUNT
|
|
24392
24191
|
];
|
|
24393
24192
|
};
|
|
24394
|
-
|
|
24395
|
-
// src/lending/user-data/gearbox/userCallParse.ts
|
|
24396
24193
|
function toBigInt9(v) {
|
|
24397
24194
|
if (v === void 0 || v === null || v === "0x") return 0n;
|
|
24398
24195
|
if (typeof v === "bigint") return v;
|
|
@@ -24587,8 +24384,6 @@ var getGearboxV3UserDataConverter = (_lender, chainId, account, meta) => {
|
|
|
24587
24384
|
GEARBOX_V3_USER_CALL_COUNT
|
|
24588
24385
|
];
|
|
24589
24386
|
};
|
|
24590
|
-
|
|
24591
|
-
// src/lending/user-data/dolomite/userCallParse.ts
|
|
24592
24387
|
var getDolomiteUserDataConverter = (lender, chainId, account, metaMap) => {
|
|
24593
24388
|
const numbers = getResolvedDolomiteAccountNumbers(chainId, account) ?? ["0"];
|
|
24594
24389
|
const expectedNumberOfCalls = numbers.length;
|
|
@@ -24668,12 +24463,7 @@ function normalizeUnderlying3(token) {
|
|
|
24668
24463
|
// src/lending/user-data/fetch-balances/parse.ts
|
|
24669
24464
|
function getUserDataConverter(lender, chainId, account, params, meta) {
|
|
24670
24465
|
if (isAaveV4Type(lender))
|
|
24671
|
-
return getAaveV4UserDataConverter(
|
|
24672
|
-
lender,
|
|
24673
|
-
chainId,
|
|
24674
|
-
account,
|
|
24675
|
-
meta?.[lender]
|
|
24676
|
-
);
|
|
24466
|
+
return getAaveV4UserDataConverter(lender, chainId, account, meta?.[lender]);
|
|
24677
24467
|
if (isYLDR(lender))
|
|
24678
24468
|
return getYldrUserDataConverter(lender, chainId, account, meta?.[lender]);
|
|
24679
24469
|
if (isAaveV2Type(lender))
|
|
@@ -24698,7 +24488,13 @@ function getUserDataConverter(lender, chainId, account, params, meta) {
|
|
|
24698
24488
|
meta?.[lender]
|
|
24699
24489
|
);
|
|
24700
24490
|
if (isEulerType(lender))
|
|
24701
|
-
return getEulerUserDataConverter(
|
|
24491
|
+
return getEulerUserDataConverter(
|
|
24492
|
+
lender,
|
|
24493
|
+
chainId,
|
|
24494
|
+
account,
|
|
24495
|
+
meta?.[lender],
|
|
24496
|
+
params?.subAccountIndexes
|
|
24497
|
+
);
|
|
24702
24498
|
if (isSiloV2Type(lender))
|
|
24703
24499
|
return getSiloV2UserDataConverter(lender, chainId, account, meta?.[lender]);
|
|
24704
24500
|
if (isSiloV3Type(lender))
|
|
@@ -24708,7 +24504,12 @@ function getUserDataConverter(lender, chainId, account, params, meta) {
|
|
|
24708
24504
|
if (isGearboxV3(lender))
|
|
24709
24505
|
return getGearboxV3UserDataConverter(lender, chainId, account, meta);
|
|
24710
24506
|
if (isDolomite(lender))
|
|
24711
|
-
return getDolomiteUserDataConverter(
|
|
24507
|
+
return getDolomiteUserDataConverter(
|
|
24508
|
+
lender,
|
|
24509
|
+
chainId,
|
|
24510
|
+
account,
|
|
24511
|
+
meta?.[lender]
|
|
24512
|
+
);
|
|
24712
24513
|
return getCompoundV2UserDataConverter(
|
|
24713
24514
|
lender,
|
|
24714
24515
|
chainId,
|
|
@@ -24716,13 +24517,16 @@ function getUserDataConverter(lender, chainId, account, params, meta) {
|
|
|
24716
24517
|
meta?.[lender]
|
|
24717
24518
|
);
|
|
24718
24519
|
}
|
|
24719
|
-
var hasBalanceOrPositions = (entry) => {
|
|
24520
|
+
var hasBalanceOrPositions = (entry, keepActiveControllerMode = false) => {
|
|
24720
24521
|
const hasBalance = entry.balanceData.deposits > 0 || entry.balanceData.debt > 0;
|
|
24721
24522
|
const hasPositions = entry.positions && entry.positions.length > 0;
|
|
24722
|
-
|
|
24523
|
+
const hasActiveMode = keepActiveControllerMode && !!entry.userConfig?.selectedMode && entry.userConfig.selectedMode !== String(LENDER_MODE_NO_MODE);
|
|
24524
|
+
return hasBalance || hasPositions || hasActiveMode;
|
|
24723
24525
|
};
|
|
24724
|
-
var filterEmptyUserData = (userData) => {
|
|
24725
|
-
const filteredData = userData.data.filter(
|
|
24526
|
+
var filterEmptyUserData = (userData, keepActiveControllerMode = false) => {
|
|
24527
|
+
const filteredData = userData.data.filter(
|
|
24528
|
+
(e) => hasBalanceOrPositions(e, keepActiveControllerMode)
|
|
24529
|
+
);
|
|
24726
24530
|
if (filteredData.length === 0) return null;
|
|
24727
24531
|
return { ...userData, data: filteredData };
|
|
24728
24532
|
};
|
|
@@ -24751,7 +24555,12 @@ var convertLenderUserDataResult = (chainId, queriesRaw, rawResults, lenderState)
|
|
|
24751
24555
|
}
|
|
24752
24556
|
});
|
|
24753
24557
|
} else {
|
|
24754
|
-
const filtered = filterEmptyUserData(
|
|
24558
|
+
const filtered = filterEmptyUserData(
|
|
24559
|
+
convertedData,
|
|
24560
|
+
// Euler: retain a controller-only (empty) sub-account so its active
|
|
24561
|
+
// controller mode reaches the leverage-open builder.
|
|
24562
|
+
isEulerType(query3.lender)
|
|
24563
|
+
);
|
|
24755
24564
|
if (filtered) {
|
|
24756
24565
|
filtered.lender = query3.lender;
|
|
24757
24566
|
lenderData[query3.lender] = filtered;
|
|
@@ -31292,8 +31101,6 @@ function getMaxAmountClose(borrowDiscountedCollateral, adjustedDebt, ltvIn, bfOu
|
|
|
31292
31101
|
if (denominator <= 0) return Infinity;
|
|
31293
31102
|
return (borrowDiscountedCollateral - 1.01 /* SAFE_HF */ * adjustedDebt) / denominator;
|
|
31294
31103
|
}
|
|
31295
|
-
|
|
31296
|
-
// src/yields/helpers.ts
|
|
31297
31104
|
function averageDataLastN(arr, n = 7) {
|
|
31298
31105
|
const last = arr.slice(-n);
|
|
31299
31106
|
if (last.length === 0) return 0;
|
|
@@ -33044,6 +32851,96 @@ var lombardLbtcvFetcher = createLombardVaultFetcher(
|
|
|
33044
32851
|
"VAULT_WRAPPER_BTCE",
|
|
33045
32852
|
"LBTCv"
|
|
33046
32853
|
);
|
|
32854
|
+
var ACCOUNTABLE_LIST_URL = "https://yield.accountable.capital/api/loan";
|
|
32855
|
+
async function symbolToAssetGroup(chainId) {
|
|
32856
|
+
const list = await fetchTokenList(chainId);
|
|
32857
|
+
const bySymbol = /* @__PURE__ */ new Map();
|
|
32858
|
+
const ambiguous = /* @__PURE__ */ new Set();
|
|
32859
|
+
for (const t of Object.values(list)) {
|
|
32860
|
+
const symbol = t?.symbol?.toLowerCase();
|
|
32861
|
+
const group = t?.assetGroup;
|
|
32862
|
+
if (!symbol || !group) continue;
|
|
32863
|
+
const existing = bySymbol.get(symbol);
|
|
32864
|
+
if (existing && existing !== group) {
|
|
32865
|
+
ambiguous.add(symbol);
|
|
32866
|
+
} else {
|
|
32867
|
+
bySymbol.set(symbol, group);
|
|
32868
|
+
}
|
|
32869
|
+
}
|
|
32870
|
+
for (const s of ambiguous) bySymbol.delete(s);
|
|
32871
|
+
return bySymbol;
|
|
32872
|
+
}
|
|
32873
|
+
var accountableFetcher = {
|
|
32874
|
+
label: "ACCOUNTABLE",
|
|
32875
|
+
fetch: async () => {
|
|
32876
|
+
const res = await fetch(ACCOUNTABLE_LIST_URL, {
|
|
32877
|
+
headers: { Accept: "application/json" }
|
|
32878
|
+
}).then((r) => r.json());
|
|
32879
|
+
const loans = res?.items ?? [];
|
|
32880
|
+
const chains = Array.from(
|
|
32881
|
+
new Set(
|
|
32882
|
+
loans.map((l) => l?.chain_id).filter((c) => typeof c === "number").map(String)
|
|
32883
|
+
)
|
|
32884
|
+
);
|
|
32885
|
+
const maps = /* @__PURE__ */ new Map();
|
|
32886
|
+
await Promise.all(
|
|
32887
|
+
chains.map(async (chainId) => {
|
|
32888
|
+
const map = await symbolToAssetGroup(chainId).catch(
|
|
32889
|
+
() => /* @__PURE__ */ new Map()
|
|
32890
|
+
);
|
|
32891
|
+
maps.set(chainId, map);
|
|
32892
|
+
})
|
|
32893
|
+
);
|
|
32894
|
+
const out = {};
|
|
32895
|
+
for (const loan of loans) {
|
|
32896
|
+
const chainId = loan?.chain_id != null ? String(loan.chain_id) : void 0;
|
|
32897
|
+
const symbol = loan?.shares_symbol?.toLowerCase();
|
|
32898
|
+
if (!chainId || !symbol) continue;
|
|
32899
|
+
const assetGroup = maps.get(chainId)?.get(symbol);
|
|
32900
|
+
if (!assetGroup) continue;
|
|
32901
|
+
const apy = Number(loan.net_apy ?? loan.apy_7d ?? 0);
|
|
32902
|
+
if (!Number.isFinite(apy)) continue;
|
|
32903
|
+
out[assetGroup] = apyToAprPercent(apy);
|
|
32904
|
+
}
|
|
32905
|
+
return out;
|
|
32906
|
+
}
|
|
32907
|
+
};
|
|
32908
|
+
|
|
32909
|
+
// src/yields/intrinsic/fetchers/upshift.ts
|
|
32910
|
+
var UPSHIFT_VAULTS_URL = "https://app.upshift.finance/api/proxy/vaults";
|
|
32911
|
+
var EARN_AUSD_VAULT = "0x36eDbF0C834591BFdfCaC0Ef9605528c75c406aA";
|
|
32912
|
+
var earnAUSD = "earnAUSD::earnAUSD";
|
|
32913
|
+
var upshiftFetcher = {
|
|
32914
|
+
label: "UPSHIFT",
|
|
32915
|
+
fetch: async () => {
|
|
32916
|
+
const res = await fetch(UPSHIFT_VAULTS_URL).then((r) => r.json());
|
|
32917
|
+
const vaults = res?.data ?? [];
|
|
32918
|
+
const vault = vaults.find(
|
|
32919
|
+
(v) => String(v?.address).toLowerCase() === EARN_AUSD_VAULT.toLowerCase()
|
|
32920
|
+
);
|
|
32921
|
+
const apy = Number(vault?.apy?.apy ?? 0);
|
|
32922
|
+
return { [earnAUSD]: apyToAprPercent(apy) };
|
|
32923
|
+
}
|
|
32924
|
+
};
|
|
32925
|
+
|
|
32926
|
+
// src/yields/intrinsic/fetchers/monadLst.ts
|
|
32927
|
+
var SMON_POOL_ID = "73c511a9-4dc0-4397-babe-e578fd75f0dd";
|
|
32928
|
+
var SHMON_POOL_ID = "ee40513c-9356-4c53-9f26-446b484a8ae2";
|
|
32929
|
+
var SMON_KEY = "Kintsu Staked Monad::sMON";
|
|
32930
|
+
var SHMON_KEY = "ShMonad::shMON";
|
|
32931
|
+
var monadLstFetcher = {
|
|
32932
|
+
label: "MONAD_LST",
|
|
32933
|
+
fetch: async () => {
|
|
32934
|
+
const [sMon, shMon] = await Promise.allSettled([
|
|
32935
|
+
fetchDefiLlamaApy(SMON_POOL_ID),
|
|
32936
|
+
fetchDefiLlamaApy(SHMON_POOL_ID)
|
|
32937
|
+
]);
|
|
32938
|
+
const out = {};
|
|
32939
|
+
if (sMon.status === "fulfilled") out[SMON_KEY] = sMon.value;
|
|
32940
|
+
if (shMon.status === "fulfilled") out[SHMON_KEY] = shMon.value;
|
|
32941
|
+
return out;
|
|
32942
|
+
}
|
|
32943
|
+
};
|
|
33047
32944
|
|
|
33048
32945
|
// src/yields/intrinsic/index.ts
|
|
33049
32946
|
async function fetchIntrinsicYields() {
|
|
@@ -33116,7 +33013,10 @@ async function fetchIntrinsicYields() {
|
|
|
33116
33013
|
coreLstFetcher,
|
|
33117
33014
|
hastraPrimeFetcher,
|
|
33118
33015
|
lombardLbtcFetcher,
|
|
33119
|
-
lombardLbtcvFetcher
|
|
33016
|
+
lombardLbtcvFetcher,
|
|
33017
|
+
accountableFetcher,
|
|
33018
|
+
upshiftFetcher,
|
|
33019
|
+
monadLstFetcher
|
|
33120
33020
|
];
|
|
33121
33021
|
const results = await Promise.all([
|
|
33122
33022
|
wstethPromise,
|
|
@@ -33787,8 +33687,6 @@ var morphoFetcher = {
|
|
|
33787
33687
|
parse: parseMorphoResults,
|
|
33788
33688
|
getAbi: getMorphoAbi
|
|
33789
33689
|
};
|
|
33790
|
-
|
|
33791
|
-
// src/prices/oracle-prices/fetchers/compoundV2.ts
|
|
33792
33690
|
var CompoundV2OracleAbi = [
|
|
33793
33691
|
{
|
|
33794
33692
|
inputs: [{ internalType: "address", name: "cToken", type: "address" }],
|
|
@@ -34340,8 +34238,6 @@ var aaveV4Fetcher = {
|
|
|
34340
34238
|
parse: parseAaveV4Results,
|
|
34341
34239
|
getAbi: getAaveV4Abi
|
|
34342
34240
|
};
|
|
34343
|
-
|
|
34344
|
-
// src/prices/oracle-prices/fetchers/siloV2.ts
|
|
34345
34241
|
var SiloOracleAbi = [
|
|
34346
34242
|
{
|
|
34347
34243
|
inputs: [
|
|
@@ -34511,8 +34407,6 @@ var siloV2Fetcher = {
|
|
|
34511
34407
|
parse: parseSiloV2Results,
|
|
34512
34408
|
getAbi: getSiloV2Abi
|
|
34513
34409
|
};
|
|
34514
|
-
|
|
34515
|
-
// src/prices/oracle-prices/fetchers/siloV3.ts
|
|
34516
34410
|
var SiloOracleAbi2 = [
|
|
34517
34411
|
{
|
|
34518
34412
|
inputs: [
|
|
@@ -34887,8 +34781,6 @@ var dolomiteFetcher = {
|
|
|
34887
34781
|
parse: parseDolomiteResults,
|
|
34888
34782
|
getAbi: getDolomiteAbi
|
|
34889
34783
|
};
|
|
34890
|
-
|
|
34891
|
-
// src/prices/oracle-prices/fetchers/siloV2Graphql.ts
|
|
34892
34784
|
async function fetchSiloV2GraphQLMarkets(chainId) {
|
|
34893
34785
|
if (!SILO_API_SUPPORTED_CHAIN_IDS.has(chainId)) return null;
|
|
34894
34786
|
try {
|
|
@@ -35031,8 +34923,6 @@ function parseSiloV2GraphQLResults(items, context) {
|
|
|
35031
34923
|
}
|
|
35032
34924
|
return out;
|
|
35033
34925
|
}
|
|
35034
|
-
|
|
35035
|
-
// src/prices/oracle-prices/fetchers/siloV3Graphql.ts
|
|
35036
34926
|
async function fetchSiloV3GraphQLMarkets(chainId) {
|
|
35037
34927
|
if (!SILO_API_SUPPORTED_CHAIN_IDS.has(chainId)) return null;
|
|
35038
34928
|
try {
|
|
@@ -36351,8 +36241,6 @@ function withIdleExposure(exposures, totalAssetsFormatted, pricePerUnit) {
|
|
|
36351
36241
|
out.sort((a, b) => b.weightPct - a.weightPct);
|
|
36352
36242
|
return out;
|
|
36353
36243
|
}
|
|
36354
|
-
|
|
36355
|
-
// src/vaults/fluid/publicCallBuild.ts
|
|
36356
36244
|
var buildFluidFTokensCall = (chainId) => {
|
|
36357
36245
|
const resolvers = fluidResolvers()?.[chainId];
|
|
36358
36246
|
if (!resolvers) return [];
|
|
@@ -36575,8 +36463,6 @@ async function fetchFluidExposures(chainId, multicallRetry, prices, tokenList) {
|
|
|
36575
36463
|
}
|
|
36576
36464
|
return out;
|
|
36577
36465
|
}
|
|
36578
|
-
|
|
36579
|
-
// src/vaults/gearbox/publicCallBuild.ts
|
|
36580
36466
|
var buildGearboxV3PoolsCall = (chainId) => {
|
|
36581
36467
|
const compressor = gearboxMarketCompressor();
|
|
36582
36468
|
const configurators = gearboxMarketConfigurators(chainId);
|
|
@@ -45513,6 +45399,127 @@ var fetchLagoonVaults = async (chainId, prices = {}, tokenList = {}) => {
|
|
|
45513
45399
|
return out;
|
|
45514
45400
|
};
|
|
45515
45401
|
|
|
45402
|
+
// src/vaults/upshift/api.ts
|
|
45403
|
+
var UPSHIFT_VAULTS_URL2 = "https://app.upshift.finance/api/proxy/vaults";
|
|
45404
|
+
var UPSHIFT_CHAIN_IDS = /* @__PURE__ */ new Set([
|
|
45405
|
+
"1",
|
|
45406
|
+
// Ethereum
|
|
45407
|
+
"14",
|
|
45408
|
+
// Flare
|
|
45409
|
+
"56",
|
|
45410
|
+
// BNB Chain
|
|
45411
|
+
"143",
|
|
45412
|
+
// Monad
|
|
45413
|
+
"43114",
|
|
45414
|
+
// Avalanche
|
|
45415
|
+
"8453",
|
|
45416
|
+
// Base
|
|
45417
|
+
"9745",
|
|
45418
|
+
// Plasma
|
|
45419
|
+
"57073",
|
|
45420
|
+
// Ink
|
|
45421
|
+
"999"
|
|
45422
|
+
// HyperEVM
|
|
45423
|
+
]);
|
|
45424
|
+
var hasUpshiftVaults = (chainId) => UPSHIFT_CHAIN_IDS.has(String(chainId));
|
|
45425
|
+
async function fetchUpshiftApiVaults() {
|
|
45426
|
+
const response = await fetch(UPSHIFT_VAULTS_URL2, {
|
|
45427
|
+
headers: { Accept: "application/json" }
|
|
45428
|
+
});
|
|
45429
|
+
if (!response.ok) {
|
|
45430
|
+
throw new Error(
|
|
45431
|
+
`Upshift vaults API failed: ${response.status} - ${response.statusText}`
|
|
45432
|
+
);
|
|
45433
|
+
}
|
|
45434
|
+
const json = await response.json();
|
|
45435
|
+
return json?.data ?? [];
|
|
45436
|
+
}
|
|
45437
|
+
|
|
45438
|
+
// src/vaults/upshift/fetchPublic.ts
|
|
45439
|
+
var num2 = (v) => typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
45440
|
+
var isEvmAddress = (a) => /^0x[0-9a-fA-F]{40}$/.test(a);
|
|
45441
|
+
var derivePricePerShare = (totalAssetsRaw, totalSupplyRaw, shareDecimals) => {
|
|
45442
|
+
try {
|
|
45443
|
+
const supply = BigInt(totalSupplyRaw);
|
|
45444
|
+
if (supply === 0n) return "0";
|
|
45445
|
+
const assets = BigInt(totalAssetsRaw);
|
|
45446
|
+
return (assets * 10n ** BigInt(shareDecimals) / supply).toString();
|
|
45447
|
+
} catch {
|
|
45448
|
+
return "0";
|
|
45449
|
+
}
|
|
45450
|
+
};
|
|
45451
|
+
function parseVault8(v, chainId, prices, tokenList) {
|
|
45452
|
+
const receiptAddr = (v?.receipt?.address ?? v?.address ?? "").toLowerCase();
|
|
45453
|
+
const vaultAddr = (v?.address ?? receiptAddr).toLowerCase();
|
|
45454
|
+
const asset0 = v.depositAssets?.find((a) => a?.address);
|
|
45455
|
+
const assetAddr = (asset0?.address ?? "").toLowerCase();
|
|
45456
|
+
if (!receiptAddr || !assetAddr) return null;
|
|
45457
|
+
if (!isEvmAddress(receiptAddr) || !isEvmAddress(assetAddr)) return null;
|
|
45458
|
+
const assetMeta = tokenList[assetAddr];
|
|
45459
|
+
const decimals = Number(v.receipt?.decimals ?? v.decimals ?? 18);
|
|
45460
|
+
const assetDecimals = Number(asset0?.decimals ?? assetMeta?.decimals ?? 18);
|
|
45461
|
+
const totalAssetsRaw = v.totalAssets?.raw?.toString() ?? "0";
|
|
45462
|
+
const totalSupplyRaw = v.totalSupply?.raw?.toString() ?? "0";
|
|
45463
|
+
const totalAssetsFormatted = Number(
|
|
45464
|
+
parseRawAmount(totalAssetsRaw, assetDecimals)
|
|
45465
|
+
);
|
|
45466
|
+
const base = num2(v.apy?.apy) ?? 0;
|
|
45467
|
+
const campaign = num2(v.apy?.campaignApy);
|
|
45468
|
+
const supplyRate = base;
|
|
45469
|
+
const rewardsRate = campaign ?? 0;
|
|
45470
|
+
const oracleKey = toOracleKey(assetMeta?.assetGroup) ?? toGenericPriceKey(assetAddr, chainId);
|
|
45471
|
+
const apiTvlUsd = num2(v.latest_reported_tvl) ?? 0;
|
|
45472
|
+
const impliedPriceUsd = totalAssetsFormatted > 0 ? apiTvlUsd / totalAssetsFormatted : 0;
|
|
45473
|
+
const priceUsd = prices[oracleKey] ?? prices[assetAddr] ?? impliedPriceUsd;
|
|
45474
|
+
const totalAssetsUsd = apiTvlUsd || totalAssetsFormatted * priceUsd;
|
|
45475
|
+
const name = (v.name ?? "").trim();
|
|
45476
|
+
const symbol = (v.receipt?.symbol ?? "").trim();
|
|
45477
|
+
return {
|
|
45478
|
+
address: receiptAddr,
|
|
45479
|
+
vaultAddress: vaultAddr,
|
|
45480
|
+
underlying: assetAddr,
|
|
45481
|
+
symbol,
|
|
45482
|
+
name: name || symbol,
|
|
45483
|
+
decimals,
|
|
45484
|
+
assetDecimals,
|
|
45485
|
+
totalAssets: totalAssetsRaw,
|
|
45486
|
+
totalSupply: totalSupplyRaw,
|
|
45487
|
+
pricePerShare: derivePricePerShare(
|
|
45488
|
+
totalAssetsRaw,
|
|
45489
|
+
totalSupplyRaw,
|
|
45490
|
+
decimals
|
|
45491
|
+
),
|
|
45492
|
+
supplyRate,
|
|
45493
|
+
rewardsRate,
|
|
45494
|
+
depositRate: supplyRate + rewardsRate,
|
|
45495
|
+
apy: {
|
|
45496
|
+
base: num2(v.apy?.apy),
|
|
45497
|
+
campaign,
|
|
45498
|
+
points: num2(v.apy?.pointsApy),
|
|
45499
|
+
underlying: num2(v.apy?.underlyingApy)
|
|
45500
|
+
},
|
|
45501
|
+
isDepositPaused: v.isDepositPaused ?? false,
|
|
45502
|
+
isWithdrawalPaused: v.isWithdrawalPaused ?? false,
|
|
45503
|
+
asset: assetMeta,
|
|
45504
|
+
priceUsd,
|
|
45505
|
+
totalAssetsFormatted,
|
|
45506
|
+
totalAssetsUsd
|
|
45507
|
+
};
|
|
45508
|
+
}
|
|
45509
|
+
var fetchUpshiftVaults = async (chainId, prices = {}, tokenList = {}) => {
|
|
45510
|
+
if (!hasUpshiftVaults(chainId)) return {};
|
|
45511
|
+
const items = await fetchUpshiftApiVaults();
|
|
45512
|
+
const want = Number(chainId);
|
|
45513
|
+
const out = {};
|
|
45514
|
+
for (const item of items) {
|
|
45515
|
+
if (Number(item?.chainId) !== want) continue;
|
|
45516
|
+
if (item?.isVisible === false) continue;
|
|
45517
|
+
const parsed = parseVault8(item, chainId, prices, tokenList);
|
|
45518
|
+
if (parsed) out[parsed.address] = parsed;
|
|
45519
|
+
}
|
|
45520
|
+
return out;
|
|
45521
|
+
};
|
|
45522
|
+
|
|
45516
45523
|
// src/vaults/yearn/api.ts
|
|
45517
45524
|
var YEARN_YDAEMON_BASE = "https://ydaemon.yearn.fi";
|
|
45518
45525
|
var YEARN_CHAIN_IDS = /* @__PURE__ */ new Set([
|
|
@@ -45598,9 +45605,9 @@ var asBig = (v) => {
|
|
|
45598
45605
|
return null;
|
|
45599
45606
|
}
|
|
45600
45607
|
};
|
|
45601
|
-
var
|
|
45608
|
+
var num3 = (v) => typeof v === "number" && Number.isFinite(v) ? v : null;
|
|
45602
45609
|
var toPct = (v) => {
|
|
45603
|
-
const n =
|
|
45610
|
+
const n = num3(v);
|
|
45604
45611
|
return n == null ? 0 : n * 100;
|
|
45605
45612
|
};
|
|
45606
45613
|
var deriveTotalSupply = (totalAssetsRaw, pricePerShareRaw, decimals) => {
|
|
@@ -45615,7 +45622,7 @@ var deriveTotalSupply = (totalAssetsRaw, pricePerShareRaw, decimals) => {
|
|
|
45615
45622
|
return totalAssetsRaw || "0";
|
|
45616
45623
|
}
|
|
45617
45624
|
};
|
|
45618
|
-
function
|
|
45625
|
+
function parseVault9(v, chainId, prices, tokenList) {
|
|
45619
45626
|
const address = (v?.address ?? "").toLowerCase();
|
|
45620
45627
|
const assetAddr = (v?.token?.address ?? "").toLowerCase();
|
|
45621
45628
|
if (!address || !assetAddr) return null;
|
|
@@ -45632,16 +45639,16 @@ function parseVault8(v, chainId, prices, tokenList) {
|
|
|
45632
45639
|
const totalAssetsFormatted = Number(
|
|
45633
45640
|
parseRawAmount(totalAssetsRaw, assetDecimals)
|
|
45634
45641
|
);
|
|
45635
|
-
const realized =
|
|
45636
|
-
const forward =
|
|
45642
|
+
const realized = num3(v.apr?.netAPR);
|
|
45643
|
+
const forward = num3(v.apr?.forwardAPR?.netAPR);
|
|
45637
45644
|
const isForwardApr = realized == null && forward != null;
|
|
45638
45645
|
const supplyRate = toPct(realized ?? forward);
|
|
45639
45646
|
const rewardsRate = toPct(v.apr?.extra?.stakingRewardsAPR);
|
|
45640
45647
|
const fee = toPct(v.apr?.fees?.performance);
|
|
45641
45648
|
const oracleKey = toOracleKey(assetMeta?.assetGroup) ?? toGenericPriceKey(assetAddr, chainId);
|
|
45642
|
-
const apiPrice =
|
|
45649
|
+
const apiPrice = num3(v.tvl?.price) ?? 0;
|
|
45643
45650
|
const priceUsd = prices[oracleKey] ?? prices[assetAddr] ?? apiPrice;
|
|
45644
|
-
const apiTvlUsd =
|
|
45651
|
+
const apiTvlUsd = num3(v.tvl?.tvl) ?? 0;
|
|
45645
45652
|
const totalAssetsUsd = apiTvlUsd || totalAssetsFormatted * priceUsd;
|
|
45646
45653
|
const name = (v.name ?? "").trim();
|
|
45647
45654
|
const symbol = (v.symbol ?? "").trim();
|
|
@@ -45742,7 +45749,7 @@ var fetchYearnVaults = async (chainId, multicallRetry, prices = {}, tokenList =
|
|
|
45742
45749
|
const items = await fetchYearnApiVaults(chainId);
|
|
45743
45750
|
const out = {};
|
|
45744
45751
|
for (const item of items) {
|
|
45745
|
-
const parsed =
|
|
45752
|
+
const parsed = parseVault9(item, chainId, prices, tokenList);
|
|
45746
45753
|
if (parsed) out[parsed.address] = parsed;
|
|
45747
45754
|
}
|
|
45748
45755
|
try {
|
|
@@ -46053,6 +46060,7 @@ var stampVaultClassification = (data, chainId, tokenList = {}) => {
|
|
|
46053
46060
|
stampBag(data.lst, "lst");
|
|
46054
46061
|
stampBag(data.savings, "savings");
|
|
46055
46062
|
stampBag(data.lagoon, "lagoon");
|
|
46063
|
+
stampBag(data.upshift, "upshift");
|
|
46056
46064
|
stampBag(data.yearn, "yearn");
|
|
46057
46065
|
stampBag(data.hypercore, "hypercore", false);
|
|
46058
46066
|
stampBag(data.gmx, "gmx", false);
|
|
@@ -46873,7 +46881,7 @@ var fetchGmxExecutionFees = async (chainId, multicallRetry, gasPriceWei) => {
|
|
|
46873
46881
|
// src/vaults/gmx/fetchPublic.ts
|
|
46874
46882
|
var GMX_TOKEN_DECIMALS = 18;
|
|
46875
46883
|
var DEFAULT_PERIOD = "90d";
|
|
46876
|
-
var
|
|
46884
|
+
var num4 = (n) => typeof n === "number" && Number.isFinite(n) ? n : 0;
|
|
46877
46885
|
var minDefined = (a, b) => a == null ? b : b == null ? a : Math.min(a, b);
|
|
46878
46886
|
var glvMarketRoomUsd = (cap, priceUsd) => {
|
|
46879
46887
|
const currentUsd = Number(cap.balanceAmount) / 1e18 * priceUsd;
|
|
@@ -46907,9 +46915,9 @@ var fetchGmxVaults = async (chainId, multicallRetry, options) => {
|
|
|
46907
46915
|
indexToken: indexToken ? indexToken.toLowerCase() : void 0,
|
|
46908
46916
|
longSymbol,
|
|
46909
46917
|
shortSymbol,
|
|
46910
|
-
apy:
|
|
46911
|
-
baseApy:
|
|
46912
|
-
bonusApr:
|
|
46918
|
+
apy: num4(entry?.apy),
|
|
46919
|
+
baseApy: num4(entry?.baseApy),
|
|
46920
|
+
bonusApr: num4(entry?.bonusApr),
|
|
46913
46921
|
yieldProfile: "volatile",
|
|
46914
46922
|
denomination: denominationFor(longSymbol, shortSymbol)
|
|
46915
46923
|
};
|
|
@@ -47333,6 +47341,7 @@ function buildVaultLookup(data) {
|
|
|
47333
47341
|
addEntries(data.lst, "lst");
|
|
47334
47342
|
addEntries(data.savings, "savings");
|
|
47335
47343
|
addEntries(data.lagoon, "lagoon");
|
|
47344
|
+
addEntries(data.upshift, "upshift");
|
|
47336
47345
|
addEntries(data.yearn, "yearn");
|
|
47337
47346
|
return map;
|
|
47338
47347
|
}
|
|
@@ -47455,6 +47464,18 @@ var getVaultPublicDataAll = async (chainId, providers, multicallRetry, prices =
|
|
|
47455
47464
|
})
|
|
47456
47465
|
);
|
|
47457
47466
|
}
|
|
47467
|
+
if (requested.has("upshift")) {
|
|
47468
|
+
tasks.push(
|
|
47469
|
+
fetchUpshiftVaults(chainId, prices, tokenList).then((res) => {
|
|
47470
|
+
out.upshift = res;
|
|
47471
|
+
}).catch((e) => {
|
|
47472
|
+
warn4(
|
|
47473
|
+
`[vaults] upshift fetch failed for chain ${chainId}:`,
|
|
47474
|
+
e?.message ?? e
|
|
47475
|
+
);
|
|
47476
|
+
})
|
|
47477
|
+
);
|
|
47478
|
+
}
|
|
47458
47479
|
if (requested.has("yearn")) {
|
|
47459
47480
|
tasks.push(
|
|
47460
47481
|
fetchYearnVaults(chainId, multicallRetry, prices, tokenList).then((res) => {
|
|
@@ -48047,6 +48068,6 @@ async function fetchTokenBalances(chainId, account, tokens, options = {}) {
|
|
|
48047
48068
|
return parseTokenBalanceResult(rawResult, prepared.query);
|
|
48048
48069
|
}
|
|
48049
48070
|
|
|
48050
|
-
export { EMPTY_BALANCE, 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, MaxParamThresholds, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, VAULT_SHARE_PRICE_PROBE, VOLATILE_VAULT_OVERRIDES, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, accountDepositListKey, accountWithdrawalListKey, appendSnapshot, applyPositionDelta, attachPricesToFlashLiquidity, buildFluidFTokensCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildSumerAccumulators, buildSummaries, buildVaultLookup, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyVault, 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, convertLenderUserDataResult, createMarketUid, createMulticallRpcCall, createRawRpcCalls, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, detectInterfaceKinds, encodeBalanceFetcherCalldata, fetchDolomiteAccountNumbers, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchFlashLiquidityForChain, fetchFluidFTokens, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchLagoonApiVaults, fetchLagoonVaults, fetchListaVaultsFromChain, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendlePrices, fetchSiloVaults, fetchTokenBalances, fetchTokenMetadata, fetchYearnApiVaults, fetchYearnVaults, filterActiveLenders, filterLendersByProtocol, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, 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, getResolvedDolomiteAccountNumbers, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getVaultPublicDataAll, getVaultWithdrawalRequests, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasYearnVaults, isStablecoinSymbol, isYearnV3, keysFromMaps, multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, parseBalanceFetcherResult, parseMergedResult, parseMulticallRpcResponses, parseRawRpcBatchResponses, parseRawRpcResponses, parseTokenBalanceResult, positivePart2 as positivePart, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, readVaultSharePrices, resolveStCeloDepositGroup, selectAssetGroupPrices, stampVaultClassification, unflattenLenderData };
|
|
48071
|
+
export { EMPTY_BALANCE, 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, MaxParamThresholds, STABLECOIN_SYMBOLS, STCELO_MANAGER_ADDRESS, UPSHIFT_CHAIN_IDS, UPSHIFT_VAULTS_URL2 as UPSHIFT_VAULTS_URL, VAULT_SHARE_PRICE_PROBE, VOLATILE_VAULT_OVERRIDES, YEARN_CHAIN_IDS, YEARN_YDAEMON_BASE, accountDepositListKey, accountWithdrawalListKey, appendSnapshot, applyPositionDelta, attachPricesToFlashLiquidity, buildFluidFTokensCall, buildLoopResult, buildMorphoTypeCall, buildMorphoTypeUserCallWithLens, buildPortfolioTotals, buildSumerAccumulators, buildSummaries, buildVaultLookup, calculateLeverage, calculateNetApr, calculateOverallNetApr, calculateWeightedAverage, classifyVault, 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, convertLenderUserDataResult, createMarketUid, createMulticallRpcCall, createRawRpcCalls, decodeListaMarkets, decodeMarkets, decodePackedListaUserDataset, decodePackedMorphoUserDataset, detectInterfaceKinds, encodeBalanceFetcherCalldata, fetchDolomiteAccountNumbers, fetchEulerEarnVaults, fetchEulerEarnVaultsFromSubgraph, fetchEulerSubAccountIndexes, fetchFlashLiquidityForChain, fetchFluidFTokens, fetchGeneralYields, fetchGeneralYieldsByMarketUid, fetchGmxExecutionFees, fetchGmxTickerPrices, fetchGmxVaults, fetchHypercoreVaults, fetchLagoonApiVaults, fetchLagoonVaults, fetchListaVaultsFromChain, fetchMorphoUserBalances, fetchMorphoUserPositionMarkets, fetchMorphoVaults, fetchMorphoVaultsFromApi, fetchMorphoVaultsFromChain, fetchOraclePrices, fetchPendlePrices, fetchSiloVaults, fetchTokenBalances, fetchTokenMetadata, fetchUpshiftApiVaults, fetchUpshiftVaults, fetchYearnApiVaults, fetchYearnVaults, filterActiveLenders, filterLendersByProtocol, fuseLenderData, generateLendingPools, getAavesForChain, getAssetConfig, getBalanceForMarketUid, getBorrowCapacity, 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, getResolvedDolomiteAccountNumbers, getStCeloValidatorGroups, getSubAccountAddress, getSubAccountIndex, getVaultPublicDataAll, getVaultWithdrawalRequests, hasEulerEarnVaultSubgraph, hasLagoonVaults, hasMorphoPositionIndex, hasMorphoUserApi, hasMorphoUserSubgraph, hasUpshiftVaults, hasYearnVaults, isStablecoinSymbol, isYearnV3, keysFromMaps, multicall3Abi, nanTo, needsLenderApproval, needsTokenApproval, noOpResult, normalizeToBytes, parseBalanceFetcherResult, parseMergedResult, parseMulticallRpcResponses, parseRawRpcBatchResponses, parseRawRpcResponses, parseTokenBalanceResult, positivePart2 as positivePart, prepareLenderUserDataRpcCalls, prepareMergedMulticallParams, prepareMergedRpcCalls, prepareMulticallInputs, prepareTokenBalanceRpcCalls, priceGlvVaults, priceGmMarkets, readVaultSharePrices, resolveStCeloDepositGroup, selectAssetGroupPrices, stampVaultClassification, unflattenLenderData };
|
|
48051
48072
|
//# sourceMappingURL=index.js.map
|
|
48052
48073
|
//# sourceMappingURL=index.js.map
|