@defisaver/positions-sdk 2.1.174 → 2.1.175-looping-2-dev-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.
Files changed (249) hide show
  1. package/cjs/aaveV2/index.d.ts +4 -4
  2. package/cjs/aaveV2/index.js +7 -7
  3. package/cjs/aaveV3/index.d.ts +5 -14
  4. package/cjs/aaveV3/index.js +14 -10
  5. package/cjs/aaveV3/merkl.d.ts +5 -1
  6. package/cjs/aaveV3/merkl.js +8 -3
  7. package/cjs/aaveV3/sgho.d.ts +2 -16
  8. package/cjs/aaveV4/index.d.ts +4 -3
  9. package/cjs/aaveV4/index.js +19 -16
  10. package/cjs/aaveV4/lend.d.ts +2 -43
  11. package/cjs/aaveV4/merkl.d.ts +10 -2
  12. package/cjs/aaveV4/merkl.js +15 -6
  13. package/cjs/claiming/aaveV3.d.ts +3 -3
  14. package/cjs/claiming/aaveV3.js +5 -4
  15. package/cjs/claiming/ethena.d.ts +2 -1
  16. package/cjs/claiming/king.d.ts +3 -2
  17. package/cjs/claiming/king.js +3 -2
  18. package/cjs/claiming/spark.d.ts +4 -4
  19. package/cjs/claiming/spark.js +8 -7
  20. package/cjs/claiming/uniswap.d.ts +2 -2
  21. package/cjs/claiming/uniswap.js +3 -2
  22. package/cjs/compoundV2/index.d.ts +4 -4
  23. package/cjs/compoundV2/index.js +9 -9
  24. package/cjs/compoundV3/index.d.ts +5 -4
  25. package/cjs/compoundV3/index.js +17 -13
  26. package/cjs/compoundV3/merkl.d.ts +1 -1
  27. package/cjs/compoundV3/merkl.js +2 -5
  28. package/cjs/curveUsd/index.d.ts +5 -5
  29. package/cjs/curveUsd/index.js +17 -17
  30. package/cjs/fluid/index.d.ts +23 -66
  31. package/cjs/fluid/index.js +75 -72
  32. package/cjs/fluid/merkl.d.ts +5 -3
  33. package/cjs/fluid/merkl.js +11 -6
  34. package/cjs/helpers/aaveHelpers/index.js +1 -1
  35. package/cjs/helpers/aaveV4Helpers/index.js +14 -2
  36. package/cjs/helpers/compoundHelpers/index.js +2 -2
  37. package/cjs/helpers/curveUsdHelpers/index.js +1 -1
  38. package/cjs/helpers/fluidHelpers/index.js +1 -1
  39. package/cjs/helpers/liquityV2Helpers/index.js +1 -1
  40. package/cjs/helpers/llamaLendHelpers/index.js +1 -1
  41. package/cjs/helpers/morphoBlueHelpers/index.js +1 -1
  42. package/cjs/helpers/morphoMidnightHelpers/index.js +1 -1
  43. package/cjs/helpers/sparkHelpers/index.js +1 -1
  44. package/cjs/liquity/index.d.ts +5 -15
  45. package/cjs/liquity/index.js +23 -23
  46. package/cjs/liquityV2/index.d.ts +16 -31
  47. package/cjs/liquityV2/index.js +96 -78
  48. package/cjs/llamaLend/index.d.ts +5 -5
  49. package/cjs/llamaLend/index.js +13 -13
  50. package/cjs/maker/index.d.ts +6 -6
  51. package/cjs/maker/index.js +16 -16
  52. package/cjs/moneymarket/moneymarketCommonService.js +13 -2
  53. package/cjs/morphoBlue/index.d.ts +7 -7
  54. package/cjs/morphoBlue/index.js +28 -26
  55. package/cjs/morphoBlue/merkl.d.ts +5 -3
  56. package/cjs/morphoBlue/merkl.js +6 -8
  57. package/cjs/morphoMidnight/index.d.ts +5 -5
  58. package/cjs/morphoMidnight/index.js +18 -18
  59. package/cjs/portfolio/customDeFiData.d.ts +3 -0
  60. package/cjs/portfolio/customDeFiData.js +267 -0
  61. package/cjs/portfolio/index.d.ts +17 -8
  62. package/cjs/portfolio/index.js +459 -520
  63. package/cjs/portfolio/lendingProtocols.d.ts +184 -0
  64. package/cjs/portfolio/lendingProtocols.js +196 -0
  65. package/cjs/savings/index.d.ts +8 -2
  66. package/cjs/savings/index.js +33 -4
  67. package/cjs/services/merkl.d.ts +46 -2
  68. package/cjs/services/merkl.js +190 -19
  69. package/cjs/services/priceService.d.ts +12 -12
  70. package/cjs/services/priceService.js +30 -29
  71. package/cjs/services/viem.d.ts +10 -2
  72. package/cjs/services/viem.js +27 -1
  73. package/cjs/spark/index.d.ts +4 -4
  74. package/cjs/spark/index.js +9 -9
  75. package/cjs/types/aave.d.ts +98 -2
  76. package/cjs/types/aaveV4.d.ts +45 -0
  77. package/cjs/types/common.d.ts +1 -0
  78. package/cjs/types/common.js +1 -0
  79. package/cjs/types/compound.d.ts +26 -2
  80. package/cjs/types/curveUsd.d.ts +9 -1
  81. package/cjs/types/fluid.d.ts +13 -0
  82. package/cjs/types/index.d.ts +1 -0
  83. package/cjs/types/index.js +1 -0
  84. package/cjs/types/liquity.d.ts +12 -0
  85. package/cjs/types/liquityV2.d.ts +24 -0
  86. package/cjs/types/llamaLend.d.ts +12 -1
  87. package/cjs/types/merkl.d.ts +18 -0
  88. package/cjs/types/morphoBlue.d.ts +2 -0
  89. package/cjs/types/portfolio.d.ts +162 -5
  90. package/cjs/types/portfolio.js +18 -0
  91. package/cjs/types/savings/index.d.ts +9 -1
  92. package/cjs/types/spark.d.ts +21 -1
  93. package/cjs/umbrella/index.d.ts +3 -4
  94. package/cjs/umbrella/index.js +5 -4
  95. package/esm/aaveV2/index.d.ts +4 -4
  96. package/esm/aaveV2/index.js +8 -8
  97. package/esm/aaveV3/index.d.ts +5 -14
  98. package/esm/aaveV3/index.js +15 -11
  99. package/esm/aaveV3/merkl.d.ts +5 -1
  100. package/esm/aaveV3/merkl.js +9 -4
  101. package/esm/aaveV3/sgho.d.ts +2 -16
  102. package/esm/aaveV4/index.d.ts +4 -3
  103. package/esm/aaveV4/index.js +20 -17
  104. package/esm/aaveV4/lend.d.ts +2 -43
  105. package/esm/aaveV4/merkl.d.ts +10 -2
  106. package/esm/aaveV4/merkl.js +16 -7
  107. package/esm/claiming/aaveV3.d.ts +3 -3
  108. package/esm/claiming/aaveV3.js +6 -5
  109. package/esm/claiming/ethena.d.ts +2 -1
  110. package/esm/claiming/king.d.ts +3 -2
  111. package/esm/claiming/king.js +3 -2
  112. package/esm/claiming/spark.d.ts +4 -4
  113. package/esm/claiming/spark.js +9 -8
  114. package/esm/claiming/uniswap.d.ts +2 -2
  115. package/esm/claiming/uniswap.js +3 -2
  116. package/esm/compoundV2/index.d.ts +4 -4
  117. package/esm/compoundV2/index.js +9 -9
  118. package/esm/compoundV3/index.d.ts +5 -4
  119. package/esm/compoundV3/index.js +19 -15
  120. package/esm/compoundV3/merkl.d.ts +1 -1
  121. package/esm/compoundV3/merkl.js +3 -6
  122. package/esm/curveUsd/index.d.ts +5 -5
  123. package/esm/curveUsd/index.js +17 -17
  124. package/esm/fluid/index.d.ts +23 -66
  125. package/esm/fluid/index.js +76 -73
  126. package/esm/fluid/merkl.d.ts +5 -3
  127. package/esm/fluid/merkl.js +12 -7
  128. package/esm/helpers/aaveHelpers/index.js +1 -1
  129. package/esm/helpers/aaveV4Helpers/index.js +15 -3
  130. package/esm/helpers/compoundHelpers/index.js +2 -2
  131. package/esm/helpers/curveUsdHelpers/index.js +1 -1
  132. package/esm/helpers/fluidHelpers/index.js +1 -1
  133. package/esm/helpers/liquityV2Helpers/index.js +1 -1
  134. package/esm/helpers/llamaLendHelpers/index.js +1 -1
  135. package/esm/helpers/morphoBlueHelpers/index.js +1 -1
  136. package/esm/helpers/morphoMidnightHelpers/index.js +1 -1
  137. package/esm/helpers/sparkHelpers/index.js +1 -1
  138. package/esm/liquity/index.d.ts +5 -15
  139. package/esm/liquity/index.js +23 -23
  140. package/esm/liquityV2/index.d.ts +16 -31
  141. package/esm/liquityV2/index.js +95 -78
  142. package/esm/llamaLend/index.d.ts +5 -5
  143. package/esm/llamaLend/index.js +13 -13
  144. package/esm/maker/index.d.ts +6 -6
  145. package/esm/maker/index.js +16 -16
  146. package/esm/moneymarket/moneymarketCommonService.js +13 -2
  147. package/esm/morphoBlue/index.d.ts +7 -7
  148. package/esm/morphoBlue/index.js +29 -27
  149. package/esm/morphoBlue/merkl.d.ts +5 -3
  150. package/esm/morphoBlue/merkl.js +7 -9
  151. package/esm/morphoMidnight/index.d.ts +5 -5
  152. package/esm/morphoMidnight/index.js +18 -18
  153. package/esm/portfolio/customDeFiData.d.ts +3 -0
  154. package/esm/portfolio/customDeFiData.js +261 -0
  155. package/esm/portfolio/index.d.ts +17 -8
  156. package/esm/portfolio/index.js +459 -522
  157. package/esm/portfolio/lendingProtocols.d.ts +184 -0
  158. package/esm/portfolio/lendingProtocols.js +189 -0
  159. package/esm/savings/index.d.ts +8 -2
  160. package/esm/savings/index.js +31 -3
  161. package/esm/services/merkl.d.ts +46 -2
  162. package/esm/services/merkl.js +180 -18
  163. package/esm/services/priceService.d.ts +12 -12
  164. package/esm/services/priceService.js +31 -30
  165. package/esm/services/viem.d.ts +10 -2
  166. package/esm/services/viem.js +25 -0
  167. package/esm/spark/index.d.ts +4 -4
  168. package/esm/spark/index.js +10 -10
  169. package/esm/types/aave.d.ts +98 -2
  170. package/esm/types/aaveV4.d.ts +45 -0
  171. package/esm/types/common.d.ts +1 -0
  172. package/esm/types/common.js +1 -0
  173. package/esm/types/compound.d.ts +26 -2
  174. package/esm/types/curveUsd.d.ts +9 -1
  175. package/esm/types/fluid.d.ts +13 -0
  176. package/esm/types/index.d.ts +1 -0
  177. package/esm/types/index.js +1 -0
  178. package/esm/types/liquity.d.ts +12 -0
  179. package/esm/types/liquityV2.d.ts +24 -0
  180. package/esm/types/llamaLend.d.ts +12 -1
  181. package/esm/types/merkl.d.ts +18 -0
  182. package/esm/types/morphoBlue.d.ts +2 -0
  183. package/esm/types/portfolio.d.ts +162 -5
  184. package/esm/types/portfolio.js +17 -1
  185. package/esm/types/savings/index.d.ts +9 -1
  186. package/esm/types/spark.d.ts +21 -1
  187. package/esm/umbrella/index.d.ts +3 -4
  188. package/esm/umbrella/index.js +5 -4
  189. package/package.json +1 -1
  190. package/src/aaveV2/index.ts +7 -7
  191. package/src/aaveV3/index.ts +16 -11
  192. package/src/aaveV3/merkl.ts +9 -4
  193. package/src/aaveV3/sgho.ts +2 -17
  194. package/src/aaveV4/index.ts +19 -16
  195. package/src/aaveV4/lend.ts +2 -48
  196. package/src/aaveV4/merkl.ts +16 -7
  197. package/src/claiming/aaveV3.ts +9 -5
  198. package/src/claiming/ethena.ts +5 -5
  199. package/src/claiming/king.ts +8 -5
  200. package/src/claiming/spark.ts +15 -10
  201. package/src/claiming/uniswap.ts +4 -3
  202. package/src/compoundV2/index.ts +10 -9
  203. package/src/compoundV3/index.ts +20 -14
  204. package/src/compoundV3/merkl.ts +5 -4
  205. package/src/curveUsd/index.ts +19 -17
  206. package/src/fluid/index.ts +91 -72
  207. package/src/fluid/merkl.ts +12 -7
  208. package/src/helpers/aaveHelpers/index.ts +1 -1
  209. package/src/helpers/aaveV4Helpers/index.ts +16 -2
  210. package/src/helpers/compoundHelpers/index.ts +2 -2
  211. package/src/helpers/curveUsdHelpers/index.ts +1 -1
  212. package/src/helpers/fluidHelpers/index.ts +1 -1
  213. package/src/helpers/liquityV2Helpers/index.ts +1 -1
  214. package/src/helpers/llamaLendHelpers/index.ts +1 -1
  215. package/src/helpers/morphoBlueHelpers/index.ts +1 -1
  216. package/src/helpers/morphoMidnightHelpers/index.ts +1 -1
  217. package/src/helpers/sparkHelpers/index.ts +1 -1
  218. package/src/liquity/index.ts +24 -24
  219. package/src/liquityV2/index.ts +110 -76
  220. package/src/llamaLend/index.ts +15 -13
  221. package/src/maker/index.ts +19 -16
  222. package/src/moneymarket/moneymarketCommonService.ts +14 -2
  223. package/src/morphoBlue/index.ts +23 -20
  224. package/src/morphoBlue/merkl.ts +9 -6
  225. package/src/morphoMidnight/index.ts +13 -13
  226. package/src/portfolio/customDeFiData.ts +385 -0
  227. package/src/portfolio/index.ts +307 -331
  228. package/src/portfolio/lendingProtocols.ts +281 -0
  229. package/src/savings/index.ts +41 -4
  230. package/src/services/merkl.ts +209 -19
  231. package/src/services/priceService.ts +33 -30
  232. package/src/services/viem.ts +16 -0
  233. package/src/spark/index.ts +11 -8
  234. package/src/types/aave.ts +104 -1
  235. package/src/types/aaveV4.ts +50 -0
  236. package/src/types/common.ts +1 -0
  237. package/src/types/compound.ts +38 -2
  238. package/src/types/curveUsd.ts +17 -1
  239. package/src/types/fluid.ts +14 -0
  240. package/src/types/index.ts +1 -0
  241. package/src/types/liquity.ts +13 -1
  242. package/src/types/liquityV2.ts +26 -1
  243. package/src/types/llamaLend.ts +19 -1
  244. package/src/types/merkl.ts +20 -0
  245. package/src/types/morphoBlue.ts +3 -0
  246. package/src/types/portfolio.ts +191 -5
  247. package/src/types/savings/index.ts +12 -1
  248. package/src/types/spark.ts +25 -1
  249. package/src/umbrella/index.ts +7 -5
@@ -1,4 +1,4 @@
1
- import { IncentiveData, LeverageType, MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber } from './common';
1
+ import { EthAddress, IncentiveData, LeverageType, MMAssetData, MMPositionData, MMUsedAsset, NetworkNumber } from './common';
2
2
  export declare enum AaveVersions {
3
3
  AaveV1 = "v1",
4
4
  AaveV2 = "v2default",
@@ -85,6 +85,8 @@ export interface AaveV3AssetData extends AaveAssetData {
85
85
  liquidationBonus: string;
86
86
  supplyIncentives: IncentiveData[];
87
87
  borrowIncentives: IncentiveData[];
88
+ aTokenAddress?: EthAddress;
89
+ vTokenAddress?: EthAddress;
88
90
  }
89
91
  export type EModeCategoriesData = Record<number, EModeCategoryData>;
90
92
  export type AaveAssetsData<T> = {
@@ -122,7 +124,12 @@ export type AaveUsedAssets<T> = {
122
124
  };
123
125
  export type AaveV2UsedAssets = AaveUsedAssets<AaveV2UsedAsset>;
124
126
  export type AaveV3UsedAssets = AaveUsedAssets<AaveV3UsedAsset>;
125
- export interface AavePositionData extends MMPositionData {
127
+ /**
128
+ * Fields aaveAnyGetAggregatedPositionData adds to every Aave V2/V3 position at runtime, on top of those declared
129
+ * below. Optional, so code that builds a position by hand keeps compiling.
130
+ */
131
+ export type AavePositionAggregatedFields = Partial<Omit<AaveV3AggregatedPositionData, keyof MMPositionData | 'ratio' | 'collRatio' | 'safetyRatioWithLtvZeroFallback' | 'suppliedUsd' | 'borrowedUsd' | 'borrowLimitUsd' | 'suppliedCollateralUsd' | 'incentiveUsd' | 'totalInterestUsd'>>;
132
+ export interface AavePositionData extends MMPositionData, AavePositionAggregatedFields {
126
133
  ratio: string;
127
134
  minRatio: string;
128
135
  collRatio: string;
@@ -140,6 +147,12 @@ export interface AavePositionData extends MMPositionData {
140
147
  }
141
148
  export interface AaveV2PositionData extends AavePositionData {
142
149
  usedAssets: AaveV2UsedAssets;
150
+ eModeCategory?: number;
151
+ isInIsolationMode?: boolean;
152
+ isInSiloedMode?: boolean;
153
+ eModeCategories?: {
154
+ [key: number]: EModeCategoryDataMapping;
155
+ };
143
156
  }
144
157
  export interface AaveV3PositionData extends AavePositionData {
145
158
  usedAssets: AaveV3UsedAssets;
@@ -188,3 +201,86 @@ export interface AaveHelperCommon {
188
201
  selectedMarket: Partial<AaveMarketInfo>;
189
202
  network?: NetworkNumber;
190
203
  }
204
+ export interface SghoUserData {
205
+ shares: string;
206
+ balance: string;
207
+ maxDeposit: string;
208
+ maxWithdraw: string;
209
+ underlyingBalance: string;
210
+ }
211
+ export interface SghoData {
212
+ totalAssets: string;
213
+ totalSupply: string;
214
+ supplyCap: string;
215
+ /** Target savings rate as an APY percent (e.g. "4.25" for 4.25%). */
216
+ targetRate: string;
217
+ paused: boolean;
218
+ user: SghoUserData;
219
+ }
220
+ /** stkAAVE, stkGHO and sGHO of an address, from getStakeAaveData. */
221
+ export interface StakeAaveData {
222
+ activatedCooldown: string;
223
+ activatedCooldownAmount: string;
224
+ stkAaveRewardsBalance: string;
225
+ aaveRewardsBalance: string;
226
+ stkAaveBalance: string;
227
+ stkGhoBalance: string;
228
+ ghoMeritApy: string;
229
+ stkAaveApy: string;
230
+ sgho: SghoData;
231
+ }
232
+ export interface UmbrellaTokenInfo {
233
+ token: EthAddress;
234
+ /** USD, converted from the oracle's 8 decimals. */
235
+ price: string;
236
+ name: string;
237
+ symbol: string;
238
+ decimals: number;
239
+ }
240
+ export interface UmbrellaRewardTokenData {
241
+ rewardTokenData: UmbrellaTokenInfo;
242
+ maxEmissionPerSecond: bigint;
243
+ distributionEnd: bigint;
244
+ }
245
+ export interface UmbrellaStakingAccountData {
246
+ stakeUserBalance: string;
247
+ rewardsTokenUserData: {
248
+ reward: EthAddress;
249
+ currentReward: string;
250
+ }[];
251
+ userCooldownAmount: string;
252
+ userEndOfCooldown: bigint | string;
253
+ userWithdrawalWindow: bigint | string;
254
+ }
255
+ /**
256
+ * One Umbrella stake token of an address, from getUmbrellaData: the view contracts' structs merged, with the amounts
257
+ * the app reads converted to decimal strings. The bigint fields are the views' raw values, as the SDK passes them.
258
+ */
259
+ export interface UmbrellaStakingTokenData {
260
+ stakeTokenData: UmbrellaTokenInfo;
261
+ totalAssets: string;
262
+ targetLiquidity: string;
263
+ isStakeConfigured: boolean;
264
+ rewardsTokenData: UmbrellaRewardTokenData[];
265
+ stakeToken: EthAddress;
266
+ stakeUserBalance: bigint;
267
+ rewardsTokenUserData: {
268
+ reward: EthAddress;
269
+ currentReward: bigint;
270
+ }[];
271
+ stkToken: EthAddress;
272
+ totalShares: string;
273
+ stkUnderlyingToken: EthAddress;
274
+ aToken: EthAddress;
275
+ cooldownPeriod: bigint;
276
+ unstakeWindow: bigint;
277
+ stkTokenToWaTokenRate: string;
278
+ waTokenToATokenRate: string;
279
+ rewardsEmissionRates: string[];
280
+ userCooldownAmount: bigint;
281
+ userEndOfCooldown: bigint;
282
+ userWithdrawalWindow: bigint;
283
+ account: UmbrellaStakingAccountData;
284
+ }
285
+ /** Keyed by Umbrella stake (UmbrellaGHO, UmbrellaUSDC, UmbrellaUSDT, UmbrellaETH). */
286
+ export type UmbrellaStakingData = Record<string, UmbrellaStakingTokenData>;
@@ -184,6 +184,7 @@ export interface AaveV4AggregatedPositionData {
184
184
  totalInterestUsd: string;
185
185
  currentVolatilePairRatio?: string;
186
186
  minRatio: string;
187
+ exposure: string;
187
188
  }
188
189
  export type AaveV4UsedReserveAssets = Record<string, AaveV4UsedReserveAsset>;
189
190
  export interface AaveV4AccountData extends AaveV4AggregatedPositionData {
@@ -191,3 +192,47 @@ export interface AaveV4AccountData extends AaveV4AggregatedPositionData {
191
192
  healthFactor: string;
192
193
  riskPremiumBps: number;
193
194
  }
195
+ /** One Aave V4 tokenized spoke (Lend vault) as the view contract returns it for a user. */
196
+ export interface AaveV4TokenizationSpokeData {
197
+ underlyingAsset: EthAddress;
198
+ assetId: string;
199
+ decimals: number;
200
+ spoke: EthAddress;
201
+ spokeActive: boolean;
202
+ spokeHalted: boolean;
203
+ spokeDepositCap: string;
204
+ spokeTotalAssets: string;
205
+ spokeTotalShares: string;
206
+ hub: EthAddress;
207
+ hubLiquidity: string;
208
+ hubDrawnRate: string;
209
+ convertToShares: string;
210
+ convertToAssets: string;
211
+ user: EthAddress;
212
+ userSuppliedAssets: string;
213
+ userSuppliedShares: string;
214
+ }
215
+ /** Parsed tokenization spoke data with human-readable supplied amounts for display */
216
+ export interface AaveV4TokenizationSpokeDataParsed {
217
+ vaultAddress: EthAddress;
218
+ key: string | null;
219
+ symbol: string;
220
+ hubKey: string;
221
+ spokeActive: boolean;
222
+ spokeHalted: boolean;
223
+ /** Deposit cap in asset units (wei string) */
224
+ spokeDepositCap: string;
225
+ /** Total assets currently in spoke in asset units (wei string) */
226
+ spokeTotalAssets: string;
227
+ /** Available hub liquidity in asset units (wei string) */
228
+ hubLiquidity: string;
229
+ /** The conversion rate from assets to shares expressed in asset units. */
230
+ convertToShares: string;
231
+ userSuppliedAssetsEth: string;
232
+ userSuppliedSharesEth: string;
233
+ userSuppliedAssets: string;
234
+ userSuppliedShares: string;
235
+ underlyingAsset: EthAddress;
236
+ spoke: EthAddress;
237
+ decimals: number;
238
+ }
@@ -22,6 +22,7 @@ export declare enum LeverageType {
22
22
  Short = "short",
23
23
  VolatilePair = "volatile-pair",
24
24
  VolatilePairReverse = "volatile-pair-reverse",
25
+ StablePair = "stable-pair",
25
26
  None = ""
26
27
  }
27
28
  export interface IncentiveData {
@@ -27,6 +27,7 @@ export var LeverageType;
27
27
  LeverageType["Short"] = "short";
28
28
  LeverageType["VolatilePair"] = "volatile-pair";
29
29
  LeverageType["VolatilePairReverse"] = "volatile-pair-reverse";
30
+ LeverageType["StablePair"] = "stable-pair";
30
31
  LeverageType["None"] = "";
31
32
  })(LeverageType || (LeverageType = {}));
32
33
  export var NetworkNumber;
@@ -52,6 +52,7 @@ export interface CompoundAssetData extends MMAssetData {
52
52
  sortIndex?: number;
53
53
  }
54
54
  export interface CompoundV2AssetData extends CompoundAssetData {
55
+ exchangeRate?: string;
55
56
  }
56
57
  export interface CompoundV3AssetData extends CompoundAssetData {
57
58
  borrowCollateralFactor: string;
@@ -63,6 +64,17 @@ export interface CompoundV3AssetData extends CompoundAssetData {
63
64
  supplyCap: string;
64
65
  priceInBaseAsset: string;
65
66
  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;
66
78
  }
67
79
  export interface CompoundAssetsData<T> {
68
80
  [token: string]: T;
@@ -125,9 +137,21 @@ export interface CompoundPositionData extends MMPositionData {
125
137
  isSubscribedToAutomation?: boolean;
126
138
  automationResubscribeRequired?: boolean;
127
139
  }
128
- export interface CompoundV2PositionData extends CompoundPositionData {
140
+ /**
141
+ * Fields getCompoundV2AggregatedData adds to every Compound V2 position at runtime — a subset of
142
+ * CompoundAggregatedPositionData. Optional, so code that builds a position by hand keeps compiling.
143
+ */
144
+ export type CompoundV2PositionAggregatedFields = Partial<Pick<CompoundAggregatedPositionData, 'suppliedCollateralUsd' | 'liquidationLimitUsd' | 'leftToBorrowUsd' | 'collRatio' | 'leveragedType' | 'leveragedAsset' | 'liquidationPrice'>>;
145
+ /**
146
+ * Fields getCompoundV3AggregatedData adds to every Compound V3 position at runtime, on top of those declared in
147
+ * CompoundPositionData. Optional, so code that builds a position by hand keeps compiling.
148
+ */
149
+ export type CompoundV3PositionAggregatedFields = Partial<Omit<CompoundAggregatedPositionData, keyof MMPositionData | 'ratio' | 'minRatio' | 'suppliedUsd' | 'borrowedUsd' | 'borrowLimitUsd' | 'incentiveUsd' | 'totalInterestUsd'>>;
150
+ export interface CompoundV2PositionData extends CompoundPositionData, CompoundV2PositionAggregatedFields {
129
151
  usedAssets: CompoundV2UsedAssets;
152
+ borrowStableSupplyUnstable?: boolean;
130
153
  }
131
- export interface CompoundV3PositionData extends CompoundPositionData {
154
+ export interface CompoundV3PositionData extends CompoundPositionData, CompoundV3PositionAggregatedFields {
132
155
  usedAssets: CompoundV3UsedAssets;
156
+ isAllowed?: boolean;
133
157
  }
@@ -60,6 +60,7 @@ export interface CrvUSDGlobalMarketData {
60
60
  leftToBorrow: string;
61
61
  bands: BandData[];
62
62
  loanDiscount: string;
63
+ A?: bigint;
63
64
  }
64
65
  export interface CrvUSDAggregatedPositionData {
65
66
  ratio: string;
@@ -94,7 +95,8 @@ export interface CrvUSDUsedAsset {
94
95
  export interface CrvUSDUsedAssets {
95
96
  [key: string]: CrvUSDUsedAsset;
96
97
  }
97
- export interface CrvUSDUserData {
98
+ export type CrvUSDPositionAggregatedFields = Partial<Pick<CrvUSDAggregatedPositionData, 'borrowLimitUsd' | 'minAllowedRatio' | 'collFactor' | 'leveragedType' | 'leveragedAsset' | 'liquidationPrice'>>;
99
+ export interface CrvUSDUserData extends CrvUSDPositionAggregatedFields {
98
100
  debtAmount: string;
99
101
  health: string;
100
102
  healthPercent: string;
@@ -119,4 +121,10 @@ export interface CrvUSDUserData {
119
121
  netApy: string;
120
122
  totalInterestUsd: string;
121
123
  incentiveUsd: string;
124
+ marketCollateralAmount?: bigint;
125
+ curveUsdCollateralAmount?: bigint;
126
+ N?: bigint;
127
+ bandRange?: readonly [bigint, bigint];
128
+ usersBands?: readonly [readonly bigint[], readonly bigint[]];
129
+ isInSoftLiquidation?: boolean;
122
130
  }
@@ -459,3 +459,16 @@ export interface FluidFTokenDataStructOutput {
459
459
  rewardsRate: bigint;
460
460
  withdrawable: bigint;
461
461
  }
462
+ /** One Fluid lending (fToken) deposit of an address, from getAllUserEarnPositionsWithFTokens and getFluidDepositData. */
463
+ export interface FluidEarnPositionData {
464
+ fTokenAddress: string | undefined;
465
+ fTokenSymbol: string;
466
+ decimals: string;
467
+ totalDeposited: string;
468
+ withdrawable: string;
469
+ apy: string;
470
+ depositRate: string;
471
+ withdrawRate: string;
472
+ deposited: string;
473
+ depositedShares: string;
474
+ }
@@ -15,4 +15,5 @@ export * from './merkl';
15
15
  export * from './savings';
16
16
  export * from './common';
17
17
  export * from './aaveV4';
18
+ export * from './claiming';
18
19
  export * from './lendingSummary';
@@ -15,4 +15,5 @@ export * from './merkl';
15
15
  export * from './savings';
16
16
  export * from './common';
17
17
  export * from './aaveV4';
18
+ export * from './claiming';
18
19
  export * from './lendingSummary';
@@ -32,3 +32,15 @@ export interface LiquityTroveInfo {
32
32
  totalInterestUsd: string;
33
33
  incentiveUsd: string;
34
34
  }
35
+ /** LQTY staking and the LUSD stability pool deposit of an address, from getLiquityStakingData. */
36
+ export interface LiquityStakingData {
37
+ totalLUSDDeposited: string;
38
+ totalLQTYStaked: string;
39
+ stakedLQTY: string;
40
+ stakedLUSDBalance: string;
41
+ rewardETH: string;
42
+ rewardLUSD: string;
43
+ stabilityRewardETH: string;
44
+ stabilityRewardLQTY: string;
45
+ showStakingBalances: boolean;
46
+ }
@@ -123,3 +123,27 @@ export interface LiquityV2TroveData {
123
123
  lastInterestRateAdjTime: string;
124
124
  exposure: string;
125
125
  }
126
+ /** The stability pool deposit of an address in one market, from getLiquityV2Staking. */
127
+ export interface LiquityV2StakingData {
128
+ totalBOLDDeposited: string;
129
+ stakedBOLDBalance: string;
130
+ stabilityRewardColl: string;
131
+ stabilityRewardYield: string;
132
+ showStakingBalances: boolean;
133
+ debtTokenBalance: string;
134
+ stabilityPoolApy: string;
135
+ }
136
+ /** sBOLD, yBOLD and stYBOLD of an address, from getLiquitySAndYBold. */
137
+ export interface LiquityV2SBoldYBoldData {
138
+ spApy: string;
139
+ yBoldApy: string;
140
+ totalBoldDepositedSBold: string;
141
+ boldRateSBold: string;
142
+ maxWithdrawSBold: string;
143
+ totalBoldDepositedYBold: string;
144
+ boldRateYBold: string;
145
+ maxWithdrawYBold: string;
146
+ sBoldBalance: string;
147
+ yBoldBalance: string;
148
+ stYBoldBalance: string;
149
+ }
@@ -138,7 +138,8 @@ export interface LlamaLendUsedAsset {
138
138
  export interface LlamaLendUsedAssets {
139
139
  [key: string]: LlamaLendUsedAsset;
140
140
  }
141
- export interface LlamaLendUserData {
141
+ export type LlamaLendPositionAggregatedFields = Partial<Pick<LlamaLendAggregatedPositionData, 'borrowLimitUsd' | 'minAllowedRatio' | 'collFactor' | 'leveragedType' | 'leveragedAsset' | 'liquidationPrice' | 'netApy' | 'incentiveUsd' | 'totalInterestUsd'>>;
142
+ export interface LlamaLendUserData extends LlamaLendPositionAggregatedFields {
142
143
  debtAmount: string;
143
144
  health: string;
144
145
  healthPercent: string;
@@ -157,4 +158,14 @@ export interface LlamaLendUserData {
157
158
  loanExists: boolean;
158
159
  borrowRate?: string;
159
160
  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;
160
171
  }
@@ -126,6 +126,24 @@ export type MerklOpportunity = {
126
126
  }[];
127
127
  };
128
128
  };
129
+ /** One entry of Merkl's campaign listing: a campaign plus the opportunity it rewards. */
130
+ export type MerklCampaignListItem = MerklCampaign & {
131
+ opportunityId: string;
132
+ type: string;
133
+ rewardToken?: MerklOpportunity['rewardsRecord']['breakdowns'][number]['token'];
134
+ };
135
+ /** One bucket of an opportunity's APR history (`apr` is the last value recorded in the bucket). */
136
+ export type MerklAprRecord = {
137
+ timestamp: string;
138
+ date: string;
139
+ apr: number;
140
+ open: number;
141
+ min: number;
142
+ max: number;
143
+ avg: number;
144
+ samples: number;
145
+ hasUntrustedContribution: boolean;
146
+ };
129
147
  export type MerkleRewardInfo = {
130
148
  apy: string;
131
149
  rewardTokenSymbol: string;
@@ -219,6 +219,8 @@ export interface MorphoBluePositionData {
219
219
  supplyShares: string;
220
220
  borrowShares: string;
221
221
  exposure: string;
222
+ minCollRatio?: string;
223
+ collLiquidationRatio?: string;
222
224
  }
223
225
  export interface MorphoBlueEarnData {
224
226
  apy: string;
@@ -1,20 +1,47 @@
1
- import { AaveV2MarketData, AaveV2PositionData, AaveV3MarketData, AaveV3PositionData, AaveVersions } from './aave';
1
+ import { AaveV2MarketData, AaveV2PositionData, AaveV3MarketData, AaveV3PositionData, AaveVersions, StakeAaveData, UmbrellaStakingData } from './aave';
2
2
  import { AaveV4AccountData, AaveV4SpokeData, AaveV4SpokesType } from './aaveV4';
3
+ import { AaveRewardsClaimableToken, EthenaAirdropClaimableToken, KingRewardsClaimableToken, MerklRewardsClaimableToken, SparkAirdropClaimableToken, SparkRewardsClaimableToken, UniswapAirdropClaimableToken } from './claiming';
3
4
  import { EthAddress } from './common';
4
5
  import { CompoundV2MarketsData, CompoundV2PositionData, CompoundV3MarketsData, CompoundV3PositionData, CompoundVersions } from './compound';
5
6
  import { CrvUSDGlobalMarketData, CrvUSDUserData, CrvUSDVersions } from './curveUsd';
6
- import { FluidMarketData, FluidVaultData } from './fluid';
7
- import { LiquityTroveInfo } from './liquity';
8
- import { LiquityV2MarketData } from './liquityV2';
7
+ import { FluidEarnPositionData, FluidMarketData, FluidVaultData } from './fluid';
8
+ import { LiquityStakingData, LiquityTroveInfo } from './liquity';
9
+ import { LiquityV2MarketData, LiquityV2SBoldYBoldData, LiquityV2StakingData, LiquityV2TroveData, LiquityV2Versions } from './liquityV2';
9
10
  import { LlamaLendGlobalMarketData, LlamaLendUserData, LlamaLendVersionsType } from './llamaLend';
10
11
  import { CdpData, IlkInfo } from './maker';
11
- import { MorphoBlueMarketInfo, MorphoBluePositionData, MorphoBlueVersions } from './morphoBlue';
12
+ import { MorphoBlueEarnData, MorphoBlueMarketInfo, MorphoBluePositionData, MorphoBlueVersions } from './morphoBlue';
12
13
  import { MorphoMidnightMarketInfo, MorphoMidnightPositionData, MorphoMidnightVersions } from './morphoMidnight';
13
14
  import { SparkMarketsData, SparkPositionData, SparkVersions } from './spark';
14
15
  export interface PortfolioProtocolData<T> {
15
16
  error: string;
16
17
  data: T | null;
17
18
  }
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 markets. */
25
+ export interface PortfolioDataOptions {
26
+ /** positions (lending); default true. With false it comes back as {} and no lending position is read. */
27
+ positions?: boolean;
28
+ /** stakingPositions; default true. With false it comes back as {} and no staking source is read. */
29
+ staking?: boolean;
30
+ /** rewardsData; default true. With false it comes back as {} and no rewards source is read. */
31
+ rewards?: boolean;
32
+ /**
33
+ * Liquity V2 troves in positions[address].liquityV2; default false, as the DeFi Saver app reads them on its own.
34
+ * Mainnet only: elsewhere liquityV2 is {}. Needs positions.
35
+ */
36
+ liquityV2?: boolean;
37
+ }
38
+ /** One Liquity V2 market's troves of an address, by trove id — with an error when the ids or any trove failed to load. */
39
+ export interface PortfolioLiquityV2Troves {
40
+ error: string;
41
+ data: {
42
+ [troveId: string]: LiquityV2TroveData;
43
+ };
44
+ }
18
45
  export interface PortfolioPositionsDataForAddress {
19
46
  aaveV3: {
20
47
  [key in AaveVersions]?: PortfolioProtocolData<AaveV3PositionData>;
@@ -56,10 +83,102 @@ export interface PortfolioPositionsDataForAddress {
56
83
  aaveV4: {
57
84
  [key in AaveV4SpokesType]?: PortfolioProtocolData<AaveV4AccountData>;
58
85
  };
86
+ /** Only with the liquityV2 option. Every trove the address holds, by market. */
87
+ liquityV2?: {
88
+ [key in LiquityV2Versions]?: PortfolioLiquityV2Troves;
89
+ };
59
90
  }
60
91
  export interface PortfolioPositionsData {
61
92
  [key: EthAddress]: PortfolioPositionsDataForAddress;
62
93
  }
94
+ export declare enum PortfolioProtocol {
95
+ AaveV2 = "aaveV2",
96
+ AaveV3 = "aaveV3",
97
+ AaveV4 = "aaveV4",
98
+ CompoundV2 = "compoundV2",
99
+ CompoundV3 = "compoundV3",
100
+ Spark = "spark",
101
+ MorphoBlue = "morphoBlue",
102
+ MorphoMidnight = "morphoMidnight",
103
+ CrvUsd = "crvUsd",
104
+ LlamaLend = "llamaLend",
105
+ Maker = "maker",
106
+ Liquity = "liquity",
107
+ LiquityV2 = "liquityV2",
108
+ Fluid = "fluid"
109
+ }
110
+ export interface CustomDeFiDataOptions {
111
+ /** Defaults to every protocol. */
112
+ protocols?: PortfolioProtocol[];
113
+ fetchStaking?: boolean;
114
+ fetchRewards?: boolean;
115
+ /** Keep Aave V3 / Spark positions with no supply so the eMode category is available. */
116
+ returnEmptyEModePositions?: boolean;
117
+ fetchFluidMarkets?: boolean;
118
+ isSim?: boolean;
119
+ /** viem multicall calldata cap in bytes; defaults to 250k (2k when isSim). */
120
+ batchSize?: number;
121
+ /** Every read is made at this block; defaults to latest. */
122
+ blockNumber?: number;
123
+ }
124
+ export interface CustomDeFiData {
125
+ positions: PortfolioPositionsData;
126
+ stakingPositions: Record<string, any>;
127
+ rewardsData: Record<string, any>;
128
+ /** Includes Fluid's and Maker's markets, filled when their protocols (and fetchFluidMarkets) are requested. */
129
+ markets: ShifterPortfolioMarketsData;
130
+ }
131
+ /**
132
+ * The staking positions getPortfolioData returns for an address. The shapes are uneven, and the DeFi Saver app
133
+ * parses them as they are: a protocol read once per address comes back unwrapped on success, as
134
+ * `{ error, data: null }` on failure, and as {} (or Fluid's `{ error: '', data: {} }`) on a network it is not read on.
135
+ */
136
+ export interface PortfolioStakingPositionsDataForAddress {
137
+ /** stkAAVE, stkGHO and sGHO; mainnet only. */
138
+ aaveV3: StakeAaveData | PortfolioProtocolError | {};
139
+ /** Morpho Blue supply without a borrow (Earn), by market; only markets with a deposit or an error. */
140
+ morphoBlue: {
141
+ [key in MorphoBlueVersions]?: PortfolioProtocolData<MorphoBlueEarnData>;
142
+ };
143
+ compoundV3: Record<string, never>;
144
+ spark: Record<string, never>;
145
+ aaveV2: Record<string, never>;
146
+ compoundV2: Record<string, never>;
147
+ /** LQTY staking and the LUSD stability pool; mainnet only. */
148
+ liquity: LiquityStakingData | PortfolioProtocolError | {};
149
+ /** Stability pool deposits, by market; mainnet only, legacy markets left out. */
150
+ liquityV2: {
151
+ [key in LiquityV2Versions]?: PortfolioProtocolData<LiquityV2StakingData>;
152
+ };
153
+ /** Fluid lending (fToken) deposits; `{ error: '', data: {} }` on a network without Fluid. */
154
+ fluid: FluidEarnPositionData[] | PortfolioProtocolError | {
155
+ error: string;
156
+ data: Record<string, never>;
157
+ };
158
+ /** Umbrella stakes; absent off mainnet. */
159
+ umbrella?: UmbrellaStakingData | PortfolioProtocolError;
160
+ /** sBOLD, yBOLD and stYBOLD; data is null off mainnet. */
161
+ liquityV2SBoldYBold: PortfolioProtocolData<LiquityV2SBoldYBoldData>;
162
+ }
163
+ export type PortfolioStakingPositionsData = Record<EthAddress, PortfolioStakingPositionsDataForAddress>;
164
+ /** The claimable rewards getPortfolioData returns for an address. Off mainnet only Merkl and Aave V3 are read. */
165
+ export interface PortfolioRewardsDataForAddress {
166
+ merkl: PortfolioProtocolData<MerklRewardsClaimableToken[]>;
167
+ aaveV3: {
168
+ [key in AaveVersions]?: PortfolioProtocolData<AaveRewardsClaimableToken[]>;
169
+ };
170
+ spark: {
171
+ [key in SparkVersions]?: PortfolioProtocolData<SparkRewardsClaimableToken[]>;
172
+ };
173
+ /** The SPK airdrop. */
174
+ spk: PortfolioProtocolData<SparkAirdropClaimableToken[]>;
175
+ king: PortfolioProtocolData<KingRewardsClaimableToken[]>;
176
+ /** {} off mainnet. */
177
+ ethena: PortfolioProtocolData<EthenaAirdropClaimableToken[]> | {};
178
+ uniswap: PortfolioProtocolData<UniswapAirdropClaimableToken[]>;
179
+ }
180
+ export type PortfolioRewardsData = Record<EthAddress, PortfolioRewardsDataForAddress>;
181
+ /** The `markets` getPortfolioData returns: every market it read, by protocol, keyed by market or spoke. */
63
182
  export interface PortfolioMarketsData {
64
183
  morphoMarketsData: Record<string, MorphoBlueMarketInfo>;
65
184
  morphoMidnightMarketsData: Record<string, MorphoMidnightMarketInfo>;
@@ -72,6 +191,44 @@ export interface PortfolioMarketsData {
72
191
  llamaLendMarketsData: Record<string, LlamaLendGlobalMarketData>;
73
192
  liquityV2MarketsData: Record<string, LiquityV2MarketData>;
74
193
  aaveV4SpokesData: Record<string, AaveV4SpokeData>;
194
+ }
195
+ /**
196
+ * The `markets` getShifterPortfolioData returns: the portfolio's markets, plus Fluid's and Maker's, which the shifter
197
+ * offers as destinations. Kept apart from PortfolioMarketsData, which getPortfolioData does not fill these into.
198
+ */
199
+ export interface ShifterPortfolioMarketsData extends PortfolioMarketsData {
75
200
  fluidMarketsData: Record<string, FluidMarketData>;
76
201
  makerMarketsData: Record<string, IlkInfo>;
77
202
  }
203
+ /** The markets that could not be read, by their key in PortfolioMarketsData, then by market or spoke: the error. */
204
+ export type PortfolioMarketsErrors = {
205
+ [key in keyof PortfolioMarketsData]?: Record<string, string>;
206
+ };
207
+ /**
208
+ * What the portfolio fetch could not read and has no `{ error, data }` entry of its own to report it in. A key is
209
+ * present only when something under it failed; {} when everything was read.
210
+ */
211
+ export interface PortfolioErrors {
212
+ /** Markets missing from `markets`; every position on such a market is an entry with an error. */
213
+ markets?: PortfolioMarketsErrors;
214
+ /** Addresses whose Maker vault list could not be read: their `maker` is {}, which would otherwise read as "no vaults". */
215
+ makerCdps?: Record<EthAddress, string>;
216
+ }
217
+ /** getPortfolioMarketsData's result. */
218
+ export interface PortfolioMarketsResult {
219
+ /** Every market read; one that failed is missing and named in `errors`. */
220
+ markets: PortfolioMarketsData;
221
+ errors: PortfolioMarketsErrors;
222
+ }
223
+ /** getPortfolioUserData's result: what is read per address. */
224
+ export interface PortfolioUserData {
225
+ positions: PortfolioPositionsData;
226
+ stakingPositions: PortfolioStakingPositionsData;
227
+ rewardsData: PortfolioRewardsData;
228
+ errors: Pick<PortfolioErrors, 'makerCdps'>;
229
+ }
230
+ /** getPortfolioData's result. */
231
+ export interface PortfolioData extends Omit<PortfolioUserData, 'errors'> {
232
+ markets: PortfolioMarketsData;
233
+ errors: PortfolioErrors;
234
+ }
@@ -1 +1,17 @@
1
- export {};
1
+ export var PortfolioProtocol;
2
+ (function (PortfolioProtocol) {
3
+ PortfolioProtocol["AaveV2"] = "aaveV2";
4
+ PortfolioProtocol["AaveV3"] = "aaveV3";
5
+ PortfolioProtocol["AaveV4"] = "aaveV4";
6
+ PortfolioProtocol["CompoundV2"] = "compoundV2";
7
+ PortfolioProtocol["CompoundV3"] = "compoundV3";
8
+ PortfolioProtocol["Spark"] = "spark";
9
+ PortfolioProtocol["MorphoBlue"] = "morphoBlue";
10
+ PortfolioProtocol["MorphoMidnight"] = "morphoMidnight";
11
+ PortfolioProtocol["CrvUsd"] = "crvUsd";
12
+ PortfolioProtocol["LlamaLend"] = "llamaLend";
13
+ PortfolioProtocol["Maker"] = "maker";
14
+ PortfolioProtocol["Liquity"] = "liquity";
15
+ PortfolioProtocol["LiquityV2"] = "liquityV2";
16
+ PortfolioProtocol["Fluid"] = "fluid";
17
+ })(PortfolioProtocol || (PortfolioProtocol = {}));
@@ -20,4 +20,12 @@ export interface SavingsVaultData {
20
20
  asset: string;
21
21
  optionType: string;
22
22
  }
23
- export type SavingsData = Partial<Record<MorphoVaultType | YearnVaultType | MakerDsrType | SkySavingsType | SparkSavingsVaultType | SummerVaultType | YearnV3VaultType, SavingsVaultData>>;
23
+ /** The key of every savings vault getSavingsData reads. */
24
+ export type SavingsVaultKey = MorphoVaultType | YearnVaultType | MakerDsrType | SkySavingsType | SparkSavingsVaultType | SummerVaultType | YearnV3VaultType;
25
+ export type SavingsData = Partial<Record<SavingsVaultKey, SavingsVaultData>>;
26
+ /** Why each vault that was read for a network came back without data. */
27
+ export type SavingsErrors = Partial<Record<SavingsVaultKey, string>>;
28
+ export interface SavingsDataWithErrors {
29
+ data: SavingsData;
30
+ errors: SavingsErrors;
31
+ }