@defisaver/positions-sdk 2.1.161-portfolio-api-2-dev → 2.1.162-npm-token-dev
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/cjs/aaveV3/index.d.ts +12 -2
- package/cjs/aaveV3/index.js +7 -1
- package/cjs/aaveV3/sgho.d.ts +16 -2
- package/cjs/claiming/aaveV3.d.ts +2 -2
- package/cjs/claiming/ethena.d.ts +1 -2
- package/cjs/claiming/king.d.ts +1 -2
- package/cjs/claiming/spark.d.ts +2 -2
- package/cjs/fluid/index.d.ts +49 -5
- package/cjs/helpers/aaveHelpers/index.d.ts +9 -1
- package/cjs/helpers/aaveHelpers/index.js +23 -6
- package/cjs/liquity/index.d.ts +12 -2
- package/cjs/liquityV2/index.d.ts +23 -3
- package/cjs/portfolio/index.d.ts +5 -5
- package/cjs/portfolio/index.js +36 -51
- package/cjs/savings/index.js +5 -2
- package/cjs/savings/morphoVaults/index.d.ts +1 -1
- package/cjs/savings/morphoVaults/index.js +56 -18
- package/cjs/savings/morphoVaults/options.d.ts +2 -0
- package/cjs/savings/morphoVaults/options.js +61 -1
- package/cjs/spark/index.js +1 -0
- package/cjs/types/aave.d.ts +3 -98
- package/cjs/types/compound.d.ts +2 -26
- package/cjs/types/curveUsd.d.ts +1 -9
- package/cjs/types/fluid.d.ts +0 -13
- package/cjs/types/index.d.ts +0 -1
- package/cjs/types/index.js +0 -1
- package/cjs/types/liquity.d.ts +0 -12
- package/cjs/types/liquityV2.d.ts +0 -24
- package/cjs/types/llamaLend.d.ts +1 -12
- package/cjs/types/morphoBlue.d.ts +0 -2
- package/cjs/types/portfolio.d.ts +10 -88
- package/cjs/types/savings/morphoVaults.d.ts +10 -2
- package/cjs/types/savings/morphoVaults.js +9 -1
- package/cjs/types/spark.d.ts +1 -21
- package/cjs/umbrella/index.d.ts +3 -2
- package/esm/aaveV3/index.d.ts +12 -2
- package/esm/aaveV3/index.js +7 -1
- package/esm/aaveV3/sgho.d.ts +16 -2
- package/esm/claiming/aaveV3.d.ts +2 -2
- package/esm/claiming/aaveV3.js +1 -1
- package/esm/claiming/ethena.d.ts +1 -2
- package/esm/claiming/king.d.ts +1 -2
- package/esm/claiming/spark.d.ts +2 -2
- package/esm/claiming/spark.js +1 -1
- package/esm/fluid/index.d.ts +49 -5
- package/esm/helpers/aaveHelpers/index.d.ts +9 -1
- package/esm/helpers/aaveHelpers/index.js +20 -5
- package/esm/liquity/index.d.ts +12 -2
- package/esm/liquityV2/index.d.ts +23 -3
- package/esm/portfolio/index.d.ts +5 -5
- package/esm/portfolio/index.js +36 -51
- package/esm/savings/index.js +5 -2
- package/esm/savings/morphoVaults/index.d.ts +1 -1
- package/esm/savings/morphoVaults/index.js +57 -19
- package/esm/savings/morphoVaults/options.d.ts +2 -0
- package/esm/savings/morphoVaults/options.js +61 -1
- package/esm/spark/index.js +1 -0
- package/esm/types/aave.d.ts +3 -98
- package/esm/types/compound.d.ts +2 -26
- package/esm/types/curveUsd.d.ts +1 -9
- package/esm/types/fluid.d.ts +0 -13
- package/esm/types/index.d.ts +0 -1
- package/esm/types/index.js +0 -1
- package/esm/types/liquity.d.ts +0 -12
- package/esm/types/liquityV2.d.ts +0 -24
- package/esm/types/llamaLend.d.ts +1 -12
- package/esm/types/morphoBlue.d.ts +0 -2
- package/esm/types/portfolio.d.ts +10 -88
- package/esm/types/savings/morphoVaults.d.ts +10 -2
- package/esm/types/savings/morphoVaults.js +8 -0
- package/esm/types/spark.d.ts +1 -21
- package/esm/umbrella/index.d.ts +3 -2
- package/package.json +3 -2
- package/src/aaveV3/index.ts +7 -3
- package/src/aaveV3/sgho.ts +17 -2
- package/src/claiming/aaveV3.ts +2 -4
- package/src/claiming/ethena.ts +5 -5
- package/src/claiming/king.ts +3 -3
- package/src/claiming/spark.ts +4 -6
- package/src/fluid/index.ts +3 -4
- package/src/helpers/aaveHelpers/index.ts +24 -7
- package/src/liquity/index.ts +2 -2
- package/src/liquityV2/index.ts +3 -3
- package/src/portfolio/index.ts +57 -76
- package/src/savings/index.ts +5 -2
- package/src/savings/morphoVaults/index.ts +73 -21
- package/src/savings/morphoVaults/options.ts +67 -1
- package/src/spark/index.ts +1 -0
- package/src/types/aave.ts +2 -104
- package/src/types/compound.ts +2 -38
- package/src/types/curveUsd.ts +1 -17
- package/src/types/fluid.ts +0 -14
- package/src/types/index.ts +1 -2
- package/src/types/liquity.ts +1 -13
- package/src/types/liquityV2.ts +1 -26
- package/src/types/llamaLend.ts +1 -19
- package/src/types/morphoBlue.ts +0 -3
- package/src/types/portfolio.ts +11 -111
- package/src/types/savings/morphoVaults.ts +11 -1
- package/src/types/spark.ts +1 -25
- package/src/umbrella/index.ts +1 -2
package/cjs/types/aave.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IncentiveData, LeverageType, MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber } from './common';
|
|
2
2
|
export declare enum AaveVersions {
|
|
3
3
|
AaveV1 = "v1",
|
|
4
4
|
AaveV2 = "v2default",
|
|
@@ -40,6 +40,7 @@ export interface EModeCategoryData {
|
|
|
40
40
|
borrowAssets: string[];
|
|
41
41
|
ltvzeroBitmap?: string;
|
|
42
42
|
ltvZeroAssets: string[];
|
|
43
|
+
isolated: boolean;
|
|
43
44
|
}
|
|
44
45
|
export interface EModeCategoryDataMapping {
|
|
45
46
|
enteringTerms: boolean[];
|
|
@@ -84,8 +85,6 @@ export interface AaveV3AssetData extends AaveAssetData {
|
|
|
84
85
|
liquidationBonus: string;
|
|
85
86
|
supplyIncentives: IncentiveData[];
|
|
86
87
|
borrowIncentives: IncentiveData[];
|
|
87
|
-
aTokenAddress?: EthAddress;
|
|
88
|
-
vTokenAddress?: EthAddress;
|
|
89
88
|
}
|
|
90
89
|
export type EModeCategoriesData = Record<number, EModeCategoryData>;
|
|
91
90
|
export type AaveAssetsData<T> = {
|
|
@@ -123,12 +122,7 @@ export type AaveUsedAssets<T> = {
|
|
|
123
122
|
};
|
|
124
123
|
export type AaveV2UsedAssets = AaveUsedAssets<AaveV2UsedAsset>;
|
|
125
124
|
export type AaveV3UsedAssets = AaveUsedAssets<AaveV3UsedAsset>;
|
|
126
|
-
|
|
127
|
-
* Fields aaveAnyGetAggregatedPositionData adds to every Aave V2/V3 position at runtime, on top of those declared
|
|
128
|
-
* below. Optional, so code that builds a position by hand keeps compiling.
|
|
129
|
-
*/
|
|
130
|
-
export type AavePositionAggregatedFields = Partial<Omit<AaveV3AggregatedPositionData, keyof MMPositionData | 'ratio' | 'collRatio' | 'safetyRatioWithLtvZeroFallback' | 'suppliedUsd' | 'borrowedUsd' | 'borrowLimitUsd' | 'suppliedCollateralUsd' | 'incentiveUsd' | 'totalInterestUsd'>>;
|
|
131
|
-
export interface AavePositionData extends MMPositionData, AavePositionAggregatedFields {
|
|
125
|
+
export interface AavePositionData extends MMPositionData {
|
|
132
126
|
ratio: string;
|
|
133
127
|
minRatio: string;
|
|
134
128
|
collRatio: string;
|
|
@@ -145,12 +139,6 @@ export interface AavePositionData extends MMPositionData, AavePositionAggregated
|
|
|
145
139
|
}
|
|
146
140
|
export interface AaveV2PositionData extends AavePositionData {
|
|
147
141
|
usedAssets: AaveV2UsedAssets;
|
|
148
|
-
eModeCategory?: number;
|
|
149
|
-
isInIsolationMode?: boolean;
|
|
150
|
-
isInSiloedMode?: boolean;
|
|
151
|
-
eModeCategories?: {
|
|
152
|
-
[key: number]: EModeCategoryDataMapping;
|
|
153
|
-
};
|
|
154
142
|
}
|
|
155
143
|
export interface AaveV3PositionData extends AavePositionData {
|
|
156
144
|
usedAssets: AaveV3UsedAssets;
|
|
@@ -198,86 +186,3 @@ export interface AaveHelperCommon {
|
|
|
198
186
|
selectedMarket: Partial<AaveMarketInfo>;
|
|
199
187
|
network?: NetworkNumber;
|
|
200
188
|
}
|
|
201
|
-
export interface SghoUserData {
|
|
202
|
-
shares: string;
|
|
203
|
-
balance: string;
|
|
204
|
-
maxDeposit: string;
|
|
205
|
-
maxWithdraw: string;
|
|
206
|
-
underlyingBalance: string;
|
|
207
|
-
}
|
|
208
|
-
export interface SghoData {
|
|
209
|
-
totalAssets: string;
|
|
210
|
-
totalSupply: string;
|
|
211
|
-
supplyCap: string;
|
|
212
|
-
/** Target savings rate as an APY percent (e.g. "4.25" for 4.25%). */
|
|
213
|
-
targetRate: string;
|
|
214
|
-
paused: boolean;
|
|
215
|
-
user: SghoUserData;
|
|
216
|
-
}
|
|
217
|
-
/** stkAAVE, stkGHO and sGHO of an address, from getStakeAaveData. */
|
|
218
|
-
export interface StakeAaveData {
|
|
219
|
-
activatedCooldown: string;
|
|
220
|
-
activatedCooldownAmount: string;
|
|
221
|
-
stkAaveRewardsBalance: string;
|
|
222
|
-
aaveRewardsBalance: string;
|
|
223
|
-
stkAaveBalance: string;
|
|
224
|
-
stkGhoBalance: string;
|
|
225
|
-
ghoMeritApy: string;
|
|
226
|
-
stkAaveApy: string;
|
|
227
|
-
sgho: SghoData;
|
|
228
|
-
}
|
|
229
|
-
export interface UmbrellaTokenInfo {
|
|
230
|
-
token: EthAddress;
|
|
231
|
-
/** USD, converted from the oracle's 8 decimals. */
|
|
232
|
-
price: string;
|
|
233
|
-
name: string;
|
|
234
|
-
symbol: string;
|
|
235
|
-
decimals: number;
|
|
236
|
-
}
|
|
237
|
-
export interface UmbrellaRewardTokenData {
|
|
238
|
-
rewardTokenData: UmbrellaTokenInfo;
|
|
239
|
-
maxEmissionPerSecond: bigint;
|
|
240
|
-
distributionEnd: bigint;
|
|
241
|
-
}
|
|
242
|
-
export interface UmbrellaStakingAccountData {
|
|
243
|
-
stakeUserBalance: string;
|
|
244
|
-
rewardsTokenUserData: {
|
|
245
|
-
reward: EthAddress;
|
|
246
|
-
currentReward: string;
|
|
247
|
-
}[];
|
|
248
|
-
userCooldownAmount: string;
|
|
249
|
-
userEndOfCooldown: bigint | string;
|
|
250
|
-
userWithdrawalWindow: bigint | string;
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* One Umbrella stake token of an address, from getUmbrellaData: the view contracts' structs merged, with the amounts
|
|
254
|
-
* the app reads converted to decimal strings. The bigint fields are the views' raw values, as the SDK passes them.
|
|
255
|
-
*/
|
|
256
|
-
export interface UmbrellaStakingTokenData {
|
|
257
|
-
stakeTokenData: UmbrellaTokenInfo;
|
|
258
|
-
totalAssets: string;
|
|
259
|
-
targetLiquidity: string;
|
|
260
|
-
isStakeConfigured: boolean;
|
|
261
|
-
rewardsTokenData: UmbrellaRewardTokenData[];
|
|
262
|
-
stakeToken: EthAddress;
|
|
263
|
-
stakeUserBalance: bigint;
|
|
264
|
-
rewardsTokenUserData: {
|
|
265
|
-
reward: EthAddress;
|
|
266
|
-
currentReward: bigint;
|
|
267
|
-
}[];
|
|
268
|
-
stkToken: EthAddress;
|
|
269
|
-
totalShares: string;
|
|
270
|
-
stkUnderlyingToken: EthAddress;
|
|
271
|
-
aToken: EthAddress;
|
|
272
|
-
cooldownPeriod: bigint;
|
|
273
|
-
unstakeWindow: bigint;
|
|
274
|
-
stkTokenToWaTokenRate: string;
|
|
275
|
-
waTokenToATokenRate: string;
|
|
276
|
-
rewardsEmissionRates: string[];
|
|
277
|
-
userCooldownAmount: bigint;
|
|
278
|
-
userEndOfCooldown: bigint;
|
|
279
|
-
userWithdrawalWindow: bigint;
|
|
280
|
-
account: UmbrellaStakingAccountData;
|
|
281
|
-
}
|
|
282
|
-
/** Keyed by Umbrella stake (UmbrellaGHO, UmbrellaUSDC, UmbrellaUSDT, UmbrellaETH). */
|
|
283
|
-
export type UmbrellaStakingData = Record<string, UmbrellaStakingTokenData>;
|
package/cjs/types/compound.d.ts
CHANGED
|
@@ -52,7 +52,6 @@ export interface CompoundAssetData extends MMAssetData {
|
|
|
52
52
|
sortIndex?: number;
|
|
53
53
|
}
|
|
54
54
|
export interface CompoundV2AssetData extends CompoundAssetData {
|
|
55
|
-
exchangeRate?: string;
|
|
56
55
|
}
|
|
57
56
|
export interface CompoundV3AssetData extends CompoundAssetData {
|
|
58
57
|
borrowCollateralFactor: string;
|
|
@@ -64,17 +63,6 @@ export interface CompoundV3AssetData extends CompoundAssetData {
|
|
|
64
63
|
supplyCap: string;
|
|
65
64
|
priceInBaseAsset: string;
|
|
66
65
|
canBeWithdrawn: boolean;
|
|
67
|
-
tokenAddr?: EthAddress;
|
|
68
|
-
isBase?: boolean;
|
|
69
|
-
baseBorrowMin?: string;
|
|
70
|
-
baseTrackingBorrowRewardsSpeed?: string;
|
|
71
|
-
baseTrackingSupplyRewardsSpeed?: string;
|
|
72
|
-
borrowIndex?: string;
|
|
73
|
-
supplyIndex?: string;
|
|
74
|
-
trackingBorrowIndex?: string;
|
|
75
|
-
trackingSupplyIndex?: string;
|
|
76
|
-
rewardSupplySpeed?: string;
|
|
77
|
-
rewardBorrowSpeed?: string;
|
|
78
66
|
}
|
|
79
67
|
export interface CompoundAssetsData<T> {
|
|
80
68
|
[token: string]: T;
|
|
@@ -135,21 +123,9 @@ export interface CompoundPositionData extends MMPositionData {
|
|
|
135
123
|
isSubscribedToAutomation?: boolean;
|
|
136
124
|
automationResubscribeRequired?: boolean;
|
|
137
125
|
}
|
|
138
|
-
|
|
139
|
-
* Fields getCompoundV2AggregatedData adds to every Compound V2 position at runtime — a subset of
|
|
140
|
-
* CompoundAggregatedPositionData. Optional, so code that builds a position by hand keeps compiling.
|
|
141
|
-
*/
|
|
142
|
-
export type CompoundV2PositionAggregatedFields = Partial<Pick<CompoundAggregatedPositionData, 'suppliedCollateralUsd' | 'liquidationLimitUsd' | 'leftToBorrowUsd' | 'collRatio' | 'leveragedType' | 'leveragedAsset' | 'liquidationPrice'>>;
|
|
143
|
-
/**
|
|
144
|
-
* Fields getCompoundV3AggregatedData adds to every Compound V3 position at runtime, on top of those declared in
|
|
145
|
-
* CompoundPositionData. Optional, so code that builds a position by hand keeps compiling.
|
|
146
|
-
*/
|
|
147
|
-
export type CompoundV3PositionAggregatedFields = Partial<Omit<CompoundAggregatedPositionData, keyof MMPositionData | 'ratio' | 'minRatio' | 'suppliedUsd' | 'borrowedUsd' | 'borrowLimitUsd' | 'incentiveUsd' | 'totalInterestUsd'>>;
|
|
148
|
-
export interface CompoundV2PositionData extends CompoundPositionData, CompoundV2PositionAggregatedFields {
|
|
126
|
+
export interface CompoundV2PositionData extends CompoundPositionData {
|
|
149
127
|
usedAssets: CompoundV2UsedAssets;
|
|
150
|
-
borrowStableSupplyUnstable?: boolean;
|
|
151
128
|
}
|
|
152
|
-
export interface CompoundV3PositionData extends CompoundPositionData
|
|
129
|
+
export interface CompoundV3PositionData extends CompoundPositionData {
|
|
153
130
|
usedAssets: CompoundV3UsedAssets;
|
|
154
|
-
isAllowed?: boolean;
|
|
155
131
|
}
|
package/cjs/types/curveUsd.d.ts
CHANGED
|
@@ -60,7 +60,6 @@ export interface CrvUSDGlobalMarketData {
|
|
|
60
60
|
leftToBorrow: string;
|
|
61
61
|
bands: BandData[];
|
|
62
62
|
loanDiscount: string;
|
|
63
|
-
A?: bigint;
|
|
64
63
|
}
|
|
65
64
|
export interface CrvUSDAggregatedPositionData {
|
|
66
65
|
ratio: string;
|
|
@@ -92,8 +91,7 @@ export interface CrvUSDUsedAsset {
|
|
|
92
91
|
export interface CrvUSDUsedAssets {
|
|
93
92
|
[key: string]: CrvUSDUsedAsset;
|
|
94
93
|
}
|
|
95
|
-
export
|
|
96
|
-
export interface CrvUSDUserData extends CrvUSDPositionAggregatedFields {
|
|
94
|
+
export interface CrvUSDUserData {
|
|
97
95
|
debtAmount: string;
|
|
98
96
|
health: string;
|
|
99
97
|
healthPercent: string;
|
|
@@ -115,10 +113,4 @@ export interface CrvUSDUserData extends CrvUSDPositionAggregatedFields {
|
|
|
115
113
|
collateralPrice: string;
|
|
116
114
|
collRatio: string;
|
|
117
115
|
exposure: string;
|
|
118
|
-
marketCollateralAmount?: bigint;
|
|
119
|
-
curveUsdCollateralAmount?: bigint;
|
|
120
|
-
N?: bigint;
|
|
121
|
-
bandRange?: readonly [bigint, bigint];
|
|
122
|
-
usersBands?: readonly [readonly bigint[], readonly bigint[]];
|
|
123
|
-
isInSoftLiquidation?: boolean;
|
|
124
116
|
}
|
package/cjs/types/fluid.d.ts
CHANGED
|
@@ -458,16 +458,3 @@ export interface FluidFTokenDataStructOutput {
|
|
|
458
458
|
rewardsRate: bigint;
|
|
459
459
|
withdrawable: bigint;
|
|
460
460
|
}
|
|
461
|
-
/** One Fluid lending (fToken) deposit of an address, from getAllUserEarnPositionsWithFTokens and getFluidDepositData. */
|
|
462
|
-
export interface FluidEarnPositionData {
|
|
463
|
-
fTokenAddress: string | undefined;
|
|
464
|
-
fTokenSymbol: string;
|
|
465
|
-
decimals: string;
|
|
466
|
-
totalDeposited: string;
|
|
467
|
-
withdrawable: string;
|
|
468
|
-
apy: string;
|
|
469
|
-
depositRate: string;
|
|
470
|
-
withdrawRate: string;
|
|
471
|
-
deposited: string;
|
|
472
|
-
depositedShares: string;
|
|
473
|
-
}
|
package/cjs/types/index.d.ts
CHANGED
package/cjs/types/index.js
CHANGED
package/cjs/types/liquity.d.ts
CHANGED
|
@@ -28,15 +28,3 @@ export interface LiquityTroveInfo {
|
|
|
28
28
|
debtInFront: string;
|
|
29
29
|
exposure: string;
|
|
30
30
|
}
|
|
31
|
-
/** LQTY staking and the LUSD stability pool deposit of an address, from getLiquityStakingData. */
|
|
32
|
-
export interface LiquityStakingData {
|
|
33
|
-
totalLUSDDeposited: string;
|
|
34
|
-
totalLQTYStaked: string;
|
|
35
|
-
stakedLQTY: string;
|
|
36
|
-
stakedLUSDBalance: string;
|
|
37
|
-
rewardETH: string;
|
|
38
|
-
rewardLUSD: string;
|
|
39
|
-
stabilityRewardETH: string;
|
|
40
|
-
stabilityRewardLQTY: string;
|
|
41
|
-
showStakingBalances: boolean;
|
|
42
|
-
}
|
package/cjs/types/liquityV2.d.ts
CHANGED
|
@@ -121,27 +121,3 @@ export interface LiquityV2TroveData {
|
|
|
121
121
|
lastInterestRateAdjTime: string;
|
|
122
122
|
exposure: string;
|
|
123
123
|
}
|
|
124
|
-
/** The stability pool deposit of an address in one market, from getLiquityV2Staking. */
|
|
125
|
-
export interface LiquityV2StakingData {
|
|
126
|
-
totalBOLDDeposited: string;
|
|
127
|
-
stakedBOLDBalance: string;
|
|
128
|
-
stabilityRewardColl: string;
|
|
129
|
-
stabilityRewardYield: string;
|
|
130
|
-
showStakingBalances: boolean;
|
|
131
|
-
debtTokenBalance: string;
|
|
132
|
-
stabilityPoolApy: string;
|
|
133
|
-
}
|
|
134
|
-
/** sBOLD, yBOLD and stYBOLD of an address, from getLiquitySAndYBold. */
|
|
135
|
-
export interface LiquityV2SBoldYBoldData {
|
|
136
|
-
spApy: string;
|
|
137
|
-
yBoldApy: string;
|
|
138
|
-
totalBoldDepositedSBold: string;
|
|
139
|
-
boldRateSBold: string;
|
|
140
|
-
maxWithdrawSBold: string;
|
|
141
|
-
totalBoldDepositedYBold: string;
|
|
142
|
-
boldRateYBold: string;
|
|
143
|
-
maxWithdrawYBold: string;
|
|
144
|
-
sBoldBalance: string;
|
|
145
|
-
yBoldBalance: string;
|
|
146
|
-
stYBoldBalance: string;
|
|
147
|
-
}
|
package/cjs/types/llamaLend.d.ts
CHANGED
|
@@ -138,8 +138,7 @@ export interface LlamaLendUsedAsset {
|
|
|
138
138
|
export interface LlamaLendUsedAssets {
|
|
139
139
|
[key: string]: LlamaLendUsedAsset;
|
|
140
140
|
}
|
|
141
|
-
export
|
|
142
|
-
export interface LlamaLendUserData extends LlamaLendPositionAggregatedFields {
|
|
141
|
+
export interface LlamaLendUserData {
|
|
143
142
|
debtAmount: string;
|
|
144
143
|
health: string;
|
|
145
144
|
healthPercent: string;
|
|
@@ -158,14 +157,4 @@ export interface LlamaLendUserData extends LlamaLendPositionAggregatedFields {
|
|
|
158
157
|
loanExists: boolean;
|
|
159
158
|
borrowRate?: string;
|
|
160
159
|
exposure: string;
|
|
161
|
-
collateralPrice?: bigint;
|
|
162
|
-
marketCollateralAmount?: bigint;
|
|
163
|
-
debtTokenCollateralAmount?: bigint;
|
|
164
|
-
N?: bigint;
|
|
165
|
-
bandRange?: readonly [bigint, bigint];
|
|
166
|
-
usersBands?: readonly [readonly bigint[], readonly bigint[]];
|
|
167
|
-
collRatio?: bigint;
|
|
168
|
-
isInSoftLiquidation?: boolean;
|
|
169
|
-
debtTokenSuppliedShares?: bigint;
|
|
170
|
-
debtTokenSuppliedAssets?: bigint;
|
|
171
160
|
}
|
package/cjs/types/portfolio.d.ts
CHANGED
|
@@ -1,33 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AaveV4AccountData,
|
|
3
|
-
import { AaveRewardsClaimableToken, EthenaAirdropClaimableToken, KingRewardsClaimableToken, MerklRewardsClaimableToken, SparkAirdropClaimableToken, SparkRewardsClaimableToken, UniswapAirdropClaimableToken } from './claiming';
|
|
1
|
+
import { AaveV2PositionData, AaveV3PositionData, AaveVersions } from './aave';
|
|
2
|
+
import { AaveV4AccountData, AaveV4SpokesType } from './aaveV4';
|
|
4
3
|
import { EthAddress } from './common';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { LlamaLendGlobalMarketData, LlamaLendUserData, LlamaLendVersionsType } from './llamaLend';
|
|
4
|
+
import { CompoundV2PositionData, CompoundV3PositionData, CompoundVersions } from './compound';
|
|
5
|
+
import { CrvUSDUserData, CrvUSDVersions } from './curveUsd';
|
|
6
|
+
import { FluidVaultData } from './fluid';
|
|
7
|
+
import { LiquityTroveInfo } from './liquity';
|
|
8
|
+
import { LlamaLendUserData, LlamaLendVersionsType } from './llamaLend';
|
|
11
9
|
import { CdpData } from './maker';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
10
|
+
import { MorphoBluePositionData, MorphoBlueVersions } from './morphoBlue';
|
|
11
|
+
import { MorphoMidnightPositionData, MorphoMidnightVersions } from './morphoMidnight';
|
|
12
|
+
import { SparkPositionData, SparkVersions } from './spark';
|
|
15
13
|
export interface PortfolioProtocolData<T> {
|
|
16
14
|
error: string;
|
|
17
15
|
data: T | null;
|
|
18
16
|
}
|
|
19
|
-
/** A failed fetch of a protocol that, when it succeeds, getPortfolioData returns unwrapped rather than as `{ error, data }`. */
|
|
20
|
-
export interface PortfolioProtocolError {
|
|
21
|
-
error: string;
|
|
22
|
-
data: null;
|
|
23
|
-
}
|
|
24
|
-
/** What getPortfolioData reads besides positions and markets. Both default to true. */
|
|
25
|
-
export interface PortfolioDataOptions {
|
|
26
|
-
/** stakingPositions; with false it comes back as {} and no staking source is read. */
|
|
27
|
-
staking?: boolean;
|
|
28
|
-
/** rewardsData; with false it comes back as {} and no rewards source is read. */
|
|
29
|
-
rewards?: boolean;
|
|
30
|
-
}
|
|
31
17
|
export interface PortfolioPositionsDataForAddress {
|
|
32
18
|
aaveV3: {
|
|
33
19
|
[key in AaveVersions]?: PortfolioProtocolData<AaveV3PositionData>;
|
|
@@ -73,67 +59,3 @@ export interface PortfolioPositionsDataForAddress {
|
|
|
73
59
|
export interface PortfolioPositionsData {
|
|
74
60
|
[key: EthAddress]: PortfolioPositionsDataForAddress;
|
|
75
61
|
}
|
|
76
|
-
/**
|
|
77
|
-
* The staking positions getPortfolioData returns for an address. The shapes are uneven, and the DeFi Saver app
|
|
78
|
-
* parses them as they are: a protocol read once per address comes back unwrapped on success, as
|
|
79
|
-
* `{ error, data: null }` on failure, and as {} (or Fluid's `{ error: '', data: {} }`) on a network it is not read on.
|
|
80
|
-
*/
|
|
81
|
-
export interface PortfolioStakingPositionsDataForAddress {
|
|
82
|
-
/** stkAAVE, stkGHO and sGHO; mainnet only. */
|
|
83
|
-
aaveV3: StakeAaveData | PortfolioProtocolError | {};
|
|
84
|
-
/** Morpho Blue supply without a borrow (Earn), by market; only markets with a deposit or an error. */
|
|
85
|
-
morphoBlue: {
|
|
86
|
-
[key in MorphoBlueVersions]?: PortfolioProtocolData<MorphoBlueEarnData>;
|
|
87
|
-
};
|
|
88
|
-
compoundV3: Record<string, never>;
|
|
89
|
-
spark: Record<string, never>;
|
|
90
|
-
aaveV2: Record<string, never>;
|
|
91
|
-
compoundV2: Record<string, never>;
|
|
92
|
-
/** LQTY staking and the LUSD stability pool; mainnet only. */
|
|
93
|
-
liquity: LiquityStakingData | PortfolioProtocolError | {};
|
|
94
|
-
/** Stability pool deposits, by market; mainnet only, legacy markets left out. */
|
|
95
|
-
liquityV2: {
|
|
96
|
-
[key in LiquityV2Versions]?: PortfolioProtocolData<LiquityV2StakingData>;
|
|
97
|
-
};
|
|
98
|
-
/** Fluid lending (fToken) deposits; `{ error: '', data: {} }` on a network without Fluid. */
|
|
99
|
-
fluid: FluidEarnPositionData[] | PortfolioProtocolError | {
|
|
100
|
-
error: string;
|
|
101
|
-
data: Record<string, never>;
|
|
102
|
-
};
|
|
103
|
-
/** Umbrella stakes; absent off mainnet. */
|
|
104
|
-
umbrella?: UmbrellaStakingData | PortfolioProtocolError;
|
|
105
|
-
/** sBOLD, yBOLD and stYBOLD; data is null off mainnet. */
|
|
106
|
-
liquityV2SBoldYBold: PortfolioProtocolData<LiquityV2SBoldYBoldData>;
|
|
107
|
-
}
|
|
108
|
-
export type PortfolioStakingPositionsData = Record<EthAddress, PortfolioStakingPositionsDataForAddress>;
|
|
109
|
-
/** The claimable rewards getPortfolioData returns for an address. Off mainnet only Merkl and Aave V3 are read. */
|
|
110
|
-
export interface PortfolioRewardsDataForAddress {
|
|
111
|
-
merkl: PortfolioProtocolData<MerklRewardsClaimableToken[]>;
|
|
112
|
-
aaveV3: {
|
|
113
|
-
[key in AaveVersions]?: PortfolioProtocolData<AaveRewardsClaimableToken[]>;
|
|
114
|
-
};
|
|
115
|
-
spark: {
|
|
116
|
-
[key in SparkVersions]?: PortfolioProtocolData<SparkRewardsClaimableToken[]>;
|
|
117
|
-
};
|
|
118
|
-
/** The SPK airdrop. */
|
|
119
|
-
spk: PortfolioProtocolData<SparkAirdropClaimableToken[]>;
|
|
120
|
-
king: PortfolioProtocolData<KingRewardsClaimableToken[]>;
|
|
121
|
-
/** {} off mainnet. */
|
|
122
|
-
ethena: PortfolioProtocolData<EthenaAirdropClaimableToken[]> | {};
|
|
123
|
-
uniswap: PortfolioProtocolData<UniswapAirdropClaimableToken[]>;
|
|
124
|
-
}
|
|
125
|
-
export type PortfolioRewardsData = Record<EthAddress, PortfolioRewardsDataForAddress>;
|
|
126
|
-
/** The `markets` getPortfolioData returns: every market it read, by protocol, keyed by market or spoke. */
|
|
127
|
-
export interface PortfolioMarketsData {
|
|
128
|
-
morphoMarketsData: Record<string, MorphoBlueMarketInfo>;
|
|
129
|
-
morphoMidnightMarketsData: Record<string, MorphoMidnightMarketInfo>;
|
|
130
|
-
compoundV3MarketsData: Record<string, CompoundV3MarketsData>;
|
|
131
|
-
sparkMarketsData: Record<string, SparkMarketsData>;
|
|
132
|
-
aaveV3MarketsData: Record<string, AaveV3MarketData>;
|
|
133
|
-
aaveV2MarketsData: Record<string, AaveV2MarketData>;
|
|
134
|
-
compoundV2MarketsData: Record<string, CompoundV2MarketsData>;
|
|
135
|
-
crvUsdMarketsData: Record<string, CrvUSDGlobalMarketData>;
|
|
136
|
-
llamaLendMarketsData: Record<string, LlamaLendGlobalMarketData>;
|
|
137
|
-
liquityV2MarketsData: Record<string, LiquityV2MarketData>;
|
|
138
|
-
aaveV4SpokesData: Record<string, AaveV4SpokeData>;
|
|
139
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EthAddress } from '../common';
|
|
1
|
+
import { EthAddress, NetworkNumber } from '../common';
|
|
2
2
|
export declare enum MorphoVaultType {
|
|
3
3
|
MorphoVaultFlagshipEth = "morpho_vault_flagship_eth",
|
|
4
4
|
MorphoVaultGauntletUSDCCore = "morpho_vault_gauntlet_usdc_core",
|
|
@@ -17,13 +17,21 @@ export declare enum MorphoVaultType {
|
|
|
17
17
|
MorphoVaultSteakhousePYUSD = "morpho_vault_steakhouse_pyusd",
|
|
18
18
|
MorphoVaultSmokehouseUSDT = "morpho_vault_smokehouse_usdt",
|
|
19
19
|
MorphoVaultSmokehouseUSDC = "morpho_vault_smokehouse_usdc",
|
|
20
|
-
MorphoVaultSmokehouseDAI = "morpho_vault_smokehouse_dai"
|
|
20
|
+
MorphoVaultSmokehouseDAI = "morpho_vault_smokehouse_dai",
|
|
21
|
+
MorphoVaultGauntletUSDGPremium = "morpho_vault_gauntlet_usdg_premium",
|
|
22
|
+
MorphoVaultSteakhouseUSDGPro = "morpho_vault_steakhouse_usdg_pro"
|
|
23
|
+
}
|
|
24
|
+
export declare enum MorphoVaultVersion {
|
|
25
|
+
V1 = 1,
|
|
26
|
+
V2 = 2
|
|
21
27
|
}
|
|
22
28
|
export interface MorphoVault {
|
|
23
29
|
type: MorphoVaultType;
|
|
24
30
|
name: string;
|
|
25
31
|
address: EthAddress;
|
|
26
32
|
asset: string;
|
|
33
|
+
network: NetworkNumber;
|
|
34
|
+
version: MorphoVaultVersion;
|
|
27
35
|
deploymentBlock: number;
|
|
28
36
|
isLegacy: boolean;
|
|
29
37
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MorphoVaultType = void 0;
|
|
3
|
+
exports.MorphoVaultVersion = exports.MorphoVaultType = void 0;
|
|
4
4
|
var MorphoVaultType;
|
|
5
5
|
(function (MorphoVaultType) {
|
|
6
6
|
MorphoVaultType["MorphoVaultFlagshipEth"] = "morpho_vault_flagship_eth";
|
|
@@ -23,4 +23,12 @@ var MorphoVaultType;
|
|
|
23
23
|
MorphoVaultType["MorphoVaultSmokehouseUSDT"] = "morpho_vault_smokehouse_usdt";
|
|
24
24
|
MorphoVaultType["MorphoVaultSmokehouseUSDC"] = "morpho_vault_smokehouse_usdc";
|
|
25
25
|
MorphoVaultType["MorphoVaultSmokehouseDAI"] = "morpho_vault_smokehouse_dai";
|
|
26
|
+
// Vault V2
|
|
27
|
+
MorphoVaultType["MorphoVaultGauntletUSDGPremium"] = "morpho_vault_gauntlet_usdg_premium";
|
|
28
|
+
MorphoVaultType["MorphoVaultSteakhouseUSDGPro"] = "morpho_vault_steakhouse_usdg_pro";
|
|
26
29
|
})(MorphoVaultType || (exports.MorphoVaultType = MorphoVaultType = {}));
|
|
30
|
+
var MorphoVaultVersion;
|
|
31
|
+
(function (MorphoVaultVersion) {
|
|
32
|
+
MorphoVaultVersion[MorphoVaultVersion["V1"] = 1] = "V1";
|
|
33
|
+
MorphoVaultVersion[MorphoVaultVersion["V2"] = 2] = "V2";
|
|
34
|
+
})(MorphoVaultVersion || (exports.MorphoVaultVersion = MorphoVaultVersion = {}));
|
package/cjs/types/spark.d.ts
CHANGED
|
@@ -46,21 +46,6 @@ export interface SparkAssetData extends MMAssetData {
|
|
|
46
46
|
eModeCategory: number;
|
|
47
47
|
liquidationBonus: string;
|
|
48
48
|
liquidationRatio: string;
|
|
49
|
-
debtCeilingForIsolationMode?: string;
|
|
50
|
-
isSiloed?: boolean;
|
|
51
|
-
isolationModeTotalDebt?: string;
|
|
52
|
-
isolationModeBorrowingEnabled?: boolean;
|
|
53
|
-
assetId?: number;
|
|
54
|
-
borrowRateStable?: string;
|
|
55
|
-
supplyCap?: string;
|
|
56
|
-
isInactive?: boolean;
|
|
57
|
-
isFrozen?: boolean;
|
|
58
|
-
isPaused?: boolean;
|
|
59
|
-
canBeWithdrawn?: boolean;
|
|
60
|
-
canBePayBacked?: boolean;
|
|
61
|
-
disabledStableBorrowing?: boolean;
|
|
62
|
-
isFlashLoanEnabled?: boolean;
|
|
63
|
-
aTokenAddress?: EthAddress;
|
|
64
49
|
}
|
|
65
50
|
export interface SparkAssetsData {
|
|
66
51
|
[token: string]: SparkAssetData;
|
|
@@ -115,12 +100,7 @@ export interface SparkAggregatedPositionData {
|
|
|
115
100
|
minHealthRatio: string;
|
|
116
101
|
exposure: string;
|
|
117
102
|
}
|
|
118
|
-
|
|
119
|
-
* Fields sparkGetAggregatedPositionData adds to every Spark position at runtime, on top of those declared below.
|
|
120
|
-
* Optional, so code that builds a position by hand keeps compiling.
|
|
121
|
-
*/
|
|
122
|
-
export type SparkPositionAggregatedFields = Partial<Omit<SparkAggregatedPositionData, keyof MMPositionData | 'ratio' | 'collRatio' | 'suppliedUsd' | 'borrowedUsd' | 'borrowLimitUsd' | 'suppliedCollateralUsd' | 'incentiveUsd' | 'totalInterestUsd'>>;
|
|
123
|
-
export interface SparkPositionData extends MMPositionData, SparkPositionAggregatedFields {
|
|
103
|
+
export interface SparkPositionData extends MMPositionData {
|
|
124
104
|
ratio: string;
|
|
125
105
|
minRatio: string;
|
|
126
106
|
collRatio: string;
|
package/cjs/umbrella/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
2
|
import { EthAddress, NetworkNumber } from '../types/common';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
export declare const getUmbrellaData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<{
|
|
4
|
+
[k: string]: any;
|
|
5
|
+
}>;
|
package/esm/aaveV3/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
|
-
import { AaveMarketInfo, AaveV3MarketData, AaveV3PositionData, AaveV3UsedAssets, EModeCategoryDataMapping
|
|
2
|
+
import { AaveMarketInfo, AaveV3MarketData, AaveV3PositionData, AaveV3UsedAssets, EModeCategoryDataMapping } from '../types';
|
|
3
3
|
import { Blockish, EthAddress, EthereumProvider, NetworkNumber, PositionBalances } from '../types/common';
|
|
4
4
|
import { getMeritCampaigns } from './merit';
|
|
5
5
|
import { getMerkleCampaigns } from './merkl';
|
|
@@ -37,7 +37,17 @@ export declare const getAaveV3AccountData: (provider: EthereumProvider, network:
|
|
|
37
37
|
export declare const getAaveV3FullPositionData: (provider: EthereumProvider, network: NetworkNumber, address: EthAddress, market: AaveMarketInfo) => Promise<AaveV3PositionData>;
|
|
38
38
|
export declare const REWARDABLE_ASSETS: readonly ["0x028171bCA77440897B824Ca71D1c56caC55b68A3", "0x6C3c78838c761c6Ac7bE9F59fe808ea2A6E4379d", "0xD37EE7e4f452C6638c96536e68090De8cBcdb583", "0x279AF5b99540c1A3A7E3CDd326e19659401eF99e", "0xBcca60bB61934080951369a648Fb03DF4F96263C", "0x619beb58998eD2278e08620f97007e1116D5D25b", "0x3Ed3B47Dd13EC9a98b44e6204A523E766B225811", "0x531842cEbbdD378f8ee36D171d6cC9C4fcf475Ec", "0x9ff58f4fFB29fA2266Ab25e75e2A8b3503311656", "0x9c39809Dec7F95F5e0713634a4D0701329B3b4d2", "0x030bA81f1c18d280636F32af80b9AAd02Cf0854e", "0xF63B34710400CAd3e044cFfDcAb00a0f32E33eCf", "0xa06bC25B5805d5F8d82847D191Cb4Af5A3e873E0", "0x0b8f12b1788BFdE65Aa1ca52E3e9F3Ba401be16D", "0x6C5024Cd4F8A59110119C56f8933403A539555EB", "0xdC6a3Ab17299D9C2A412B0e0a4C1f55446AE0817", "0x5165d24277cD063F5ac44Efd447B27025e888f37", "0x7EbD09022Be45AD993BAA1CEc61166Fcc8644d97", "0xF256CC7847E919FAc9B808cC216cAc87CCF2f47a", "0xfAFEDF95E21184E3d880bd56D4806c4b8d31c69A", "0xB9D7CB55f463405CDfBe4E90a6D2Df01C2B92BF1", "0x5BdB050A92CADcCfCDcCCBFC17204a1C9cC0Ab73", "0xc713e5E149D5D0715DcD1c156a020976e7E56B88", "0xba728eAd5e496BE00DCF66F650b6d7758eCB50f8", "0x101cc05f4A51C0319f570d5E146a8C625198e636", "0x01C0eb1f8c6F1C1bF74ae028697ce7AA2a8b0E92", "0xc9BC48c72154ef3e5425641a3c747242112a46AF", "0xB5385132EE8321977FfF44b60cDE9fE9AB0B4e6b", "0x272F97b7a56a387aE942350bBC7Df5700f8a4576", "0x13210D4Fe0d5402bd7Ecbc4B5bC5cFcA3b71adB0", "0x2e8f4bdbe3d47d7d7de490437aea9915d930f1a3", "0xfdb93b3b10936cf81fa59a02a7523b6e2149b2b7", "0xA361718326c15715591c299427c62086F69923D9", "0xbA429f7011c9fa04cDd46a2Da24dc0FF0aC6099c", "0xd4937682df3C8aEF4FE912A96A74121C0829E664", "0xfE8F19B17fFeF0fDbfe2671F248903055AFAA8Ca", "0x683923dB55Fead99A79Fa01A27EeC3cB19679cC3", "0xC2e10006AccAb7B45D9184FcF5b7EC7763f5BaAe", "0x8dAE6Cb04688C62d939ed9B68d32Bc62e49970b1", "0x00ad8eBF64F141f1C81e9f8f792d3d1631c6c684", "0x6F634c6135D2EBD550000ac92F494F9CB8183dAe", "0x4dDff5885a67E4EffeC55875a3977D7E60F82ae0"];
|
|
39
39
|
export declare const fetchYearlyMeritApyForStakingGho: () => Promise<string>;
|
|
40
|
-
export declare const getStakeAaveData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<
|
|
40
|
+
export declare const getStakeAaveData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<{
|
|
41
|
+
activatedCooldown: string;
|
|
42
|
+
activatedCooldownAmount: string;
|
|
43
|
+
stkAaveRewardsBalance: string;
|
|
44
|
+
aaveRewardsBalance: string;
|
|
45
|
+
stkAaveBalance: string;
|
|
46
|
+
stkGhoBalance: string;
|
|
47
|
+
ghoMeritApy: string;
|
|
48
|
+
stkAaveApy: string;
|
|
49
|
+
sgho: import("./sgho").SghoData;
|
|
50
|
+
}>;
|
|
41
51
|
export { getMeritCampaigns, getMerkleCampaigns, };
|
|
42
52
|
export { getSghoData } from './sgho';
|
|
43
53
|
export type { SghoData, SghoUserData } from './sgho';
|
package/esm/aaveV3/index.js
CHANGED
|
@@ -31,7 +31,10 @@ export const aaveV3EmodeCategoriesMapping = (extractedState, usedAssets) => {
|
|
|
31
31
|
: !usedAssetsValues.filter(u => u.isBorrowed && !e.borrowAssets.includes(u.symbol)).length;
|
|
32
32
|
const afterEnteringCategory = aaveAnyGetAggregatedPositionData(Object.assign(Object.assign({}, extractedState), { usedAssets, eModeCategory: e.id }));
|
|
33
33
|
const willStayOverCollateralized = new Dec(afterEnteringCategory.ratio === 'NaN' ? '0' : afterEnteringCategory.ratio).eq(0) || new Dec(afterEnteringCategory.ratio).gt(afterEnteringCategory.liqPercent);
|
|
34
|
-
const
|
|
34
|
+
const collateralOnlyFromCategory = e.id === 0 || !e.isolated
|
|
35
|
+
? true
|
|
36
|
+
: !usedAssetsValues.filter(u => u.isSupplied && u.collateral && !e.collateralAssets.includes(u.symbol)).length;
|
|
37
|
+
const enteringTerms = [borrowingOnlyFromCategory, willStayOverCollateralized, collateralOnlyFromCategory];
|
|
35
38
|
categoriesMapping[e.id] = {
|
|
36
39
|
enteringTerms,
|
|
37
40
|
canEnterCategory: !enteringTerms.includes(false),
|
|
@@ -48,6 +51,7 @@ export const aaveV3EmodeCategoriesMapping = (extractedState, usedAssets) => {
|
|
|
48
51
|
};
|
|
49
52
|
export function _getAaveV3MarketData(provider_1, network_1, market_1) {
|
|
50
53
|
return __awaiter(this, arguments, void 0, function* (provider, network, market, blockNumber = 'latest') {
|
|
54
|
+
var _a;
|
|
51
55
|
const _addresses = market.assets.map(a => getAssetInfo(getWrappedNativeAssetFromUnwrapped(a), network).address);
|
|
52
56
|
const loanInfoContract = AaveV3ViewContractViem(provider, network);
|
|
53
57
|
const aaveIncentivesContract = AaveIncentiveDataProviderV3ContractViem(provider, network);
|
|
@@ -81,6 +85,7 @@ export function _getAaveV3MarketData(provider_1, network_1, market_1) {
|
|
|
81
85
|
borrowableBitmap: eModesInfo[i].borrowableBitmap.toString(),
|
|
82
86
|
collateralBitmap: eModesInfo[i].collateralBitmap.toString(),
|
|
83
87
|
ltvzeroBitmap: eModesInfo[i].ltvzeroBitmap.toString(),
|
|
88
|
+
isolated: (_a = eModesInfo[i].isolated) !== null && _a !== void 0 ? _a : false,
|
|
84
89
|
borrowAssets: [],
|
|
85
90
|
collateralAssets: [],
|
|
86
91
|
ltvZeroAssets: [],
|
|
@@ -296,6 +301,7 @@ export function _getAaveV3MarketData(provider_1, network_1, market_1) {
|
|
|
296
301
|
collateralAssets: assetsData.map((a) => a.symbol),
|
|
297
302
|
borrowAssets: assetsData.map((a) => a.symbol),
|
|
298
303
|
ltvZeroAssets: [],
|
|
304
|
+
isolated: false,
|
|
299
305
|
};
|
|
300
306
|
return { assetsData: payload, eModeCategoriesData };
|
|
301
307
|
});
|
package/esm/aaveV3/sgho.d.ts
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { EthAddress, NetworkNumber } from '../types/common';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface SghoUserData {
|
|
3
|
+
shares: string;
|
|
4
|
+
balance: string;
|
|
5
|
+
maxDeposit: string;
|
|
6
|
+
maxWithdraw: string;
|
|
7
|
+
underlyingBalance: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SghoData {
|
|
10
|
+
totalAssets: string;
|
|
11
|
+
totalSupply: string;
|
|
12
|
+
supplyCap: string;
|
|
13
|
+
/** Target savings rate as an APY percent (e.g. "4.25" for 4.25%). */
|
|
14
|
+
targetRate: string;
|
|
15
|
+
paused: boolean;
|
|
16
|
+
user: SghoUserData;
|
|
17
|
+
}
|
|
4
18
|
export declare const getSghoData: (network: NetworkNumber, address?: EthAddress) => Promise<SghoData>;
|
package/esm/claiming/aaveV3.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
2
|
import { EthAddress, NetworkNumber } from '../types';
|
|
3
|
-
import {
|
|
4
|
-
export declare function getUnclaimedRewardsForAllMarkets(provider: Client, network: NetworkNumber, walletAddress: EthAddress, marketAddress: EthAddress): Promise<
|
|
3
|
+
import { ClaimableToken, MerklRewardsClaimableToken } from '../types/claiming';
|
|
4
|
+
export declare function getUnclaimedRewardsForAllMarkets(provider: Client, network: NetworkNumber, walletAddress: EthAddress, marketAddress: EthAddress): Promise<ClaimableToken[]>;
|
|
5
5
|
export declare function getMerklUnclaimedRewards(account: EthAddress, network: NetworkNumber): Promise<MerklRewardsClaimableToken[]>;
|
|
6
6
|
export declare function getMeritUnclaimedRewards(account: EthAddress, network: NetworkNumber): Promise<ClaimableToken[]>;
|
package/esm/claiming/aaveV3.js
CHANGED
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import Dec from 'decimal.js';
|
|
11
|
-
import { ClaimType
|
|
11
|
+
import { ClaimType } from '../types/claiming';
|
|
12
12
|
import { AaveIncentiveDataProviderV3ContractViem, AaveRewardsControllerViem, } from '../contracts';
|
|
13
13
|
import { compareAddresses, getEthAmountForDecimals, LONGER_TIMEOUT } from '../services/utils';
|
|
14
14
|
import { getAaveUnderlyingSymbol } from '../helpers/aaveHelpers';
|
package/esm/claiming/ethena.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { EthAddress } from '../types/common';
|
|
2
|
-
import { EthenaAirdropClaimableToken } from '../types/claiming';
|
|
3
2
|
export declare const fetchEthenaAirdropReward: (address: EthAddress) => Promise<any>;
|
|
4
|
-
export declare const fetchEthenaAirdropRewards: (walletAddresses: EthAddress[]) => Promise<Record<string,
|
|
3
|
+
export declare const fetchEthenaAirdropRewards: (walletAddresses: EthAddress[]) => Promise<Record<string, any[]>>;
|