@defisaver/positions-sdk 2.1.168-stable-pair-dev → 2.1.169-portfolio-api-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 +2 -12
- package/cjs/aaveV3/sgho.d.ts +2 -16
- package/cjs/aaveV4/lend.d.ts +2 -43
- package/cjs/claiming/aaveV3.d.ts +2 -2
- package/cjs/claiming/ethena.d.ts +2 -1
- package/cjs/claiming/king.d.ts +2 -1
- package/cjs/claiming/spark.d.ts +2 -2
- package/cjs/fluid/index.d.ts +5 -49
- package/cjs/helpers/aaveV4Helpers/index.js +1 -11
- package/cjs/liquity/index.d.ts +2 -12
- package/cjs/liquityV2/index.d.ts +8 -23
- package/cjs/liquityV2/index.js +37 -19
- package/cjs/moneymarket/moneymarketCommonService.js +2 -12
- package/cjs/portfolio/index.d.ts +16 -8
- package/cjs/portfolio/index.js +458 -520
- package/cjs/portfolio/lendingProtocols.d.ts +184 -0
- package/cjs/portfolio/lendingProtocols.js +196 -0
- package/cjs/savings/index.d.ts +8 -2
- package/cjs/savings/index.js +33 -4
- package/cjs/types/aave.d.ts +98 -2
- package/cjs/types/aaveV4.d.ts +44 -0
- package/cjs/types/common.d.ts +0 -1
- package/cjs/types/common.js +0 -1
- package/cjs/types/compound.d.ts +26 -2
- package/cjs/types/curveUsd.d.ts +9 -1
- package/cjs/types/fluid.d.ts +13 -0
- package/cjs/types/index.d.ts +1 -0
- package/cjs/types/index.js +1 -0
- package/cjs/types/liquity.d.ts +12 -0
- package/cjs/types/liquityV2.d.ts +24 -0
- package/cjs/types/llamaLend.d.ts +12 -1
- package/cjs/types/morphoBlue.d.ts +2 -0
- package/cjs/types/portfolio.d.ts +125 -5
- package/cjs/types/savings/index.d.ts +9 -1
- package/cjs/types/spark.d.ts +21 -1
- package/cjs/umbrella/index.d.ts +2 -3
- package/esm/aaveV3/index.d.ts +2 -12
- package/esm/aaveV3/sgho.d.ts +2 -16
- package/esm/aaveV4/lend.d.ts +2 -43
- package/esm/claiming/aaveV3.d.ts +2 -2
- package/esm/claiming/aaveV3.js +1 -1
- package/esm/claiming/ethena.d.ts +2 -1
- package/esm/claiming/king.d.ts +2 -1
- package/esm/claiming/spark.d.ts +2 -2
- package/esm/claiming/spark.js +1 -1
- package/esm/fluid/index.d.ts +5 -49
- package/esm/helpers/aaveV4Helpers/index.js +1 -11
- package/esm/liquity/index.d.ts +2 -12
- package/esm/liquityV2/index.d.ts +8 -23
- package/esm/liquityV2/index.js +35 -18
- package/esm/moneymarket/moneymarketCommonService.js +2 -12
- package/esm/portfolio/index.d.ts +16 -8
- package/esm/portfolio/index.js +458 -522
- package/esm/portfolio/lendingProtocols.d.ts +184 -0
- package/esm/portfolio/lendingProtocols.js +189 -0
- package/esm/savings/index.d.ts +8 -2
- package/esm/savings/index.js +31 -3
- package/esm/types/aave.d.ts +98 -2
- package/esm/types/aaveV4.d.ts +44 -0
- package/esm/types/common.d.ts +0 -1
- package/esm/types/common.js +0 -1
- package/esm/types/compound.d.ts +26 -2
- package/esm/types/curveUsd.d.ts +9 -1
- package/esm/types/fluid.d.ts +13 -0
- package/esm/types/index.d.ts +1 -0
- package/esm/types/index.js +1 -0
- package/esm/types/liquity.d.ts +12 -0
- package/esm/types/liquityV2.d.ts +24 -0
- package/esm/types/llamaLend.d.ts +12 -1
- package/esm/types/morphoBlue.d.ts +2 -0
- package/esm/types/portfolio.d.ts +125 -5
- package/esm/types/savings/index.d.ts +9 -1
- package/esm/types/spark.d.ts +21 -1
- package/esm/umbrella/index.d.ts +2 -3
- package/package.json +1 -1
- package/src/aaveV3/index.ts +2 -1
- package/src/aaveV3/sgho.ts +2 -17
- package/src/aaveV4/lend.ts +2 -48
- package/src/claiming/aaveV3.ts +4 -2
- package/src/claiming/ethena.ts +5 -5
- package/src/claiming/king.ts +3 -3
- package/src/claiming/spark.ts +6 -4
- package/src/fluid/index.ts +4 -3
- package/src/helpers/aaveV4Helpers/index.ts +1 -12
- package/src/liquity/index.ts +2 -2
- package/src/liquityV2/index.ts +48 -22
- package/src/moneymarket/moneymarketCommonService.ts +2 -13
- package/src/portfolio/index.ts +306 -331
- package/src/portfolio/lendingProtocols.ts +281 -0
- package/src/savings/index.ts +41 -4
- package/src/types/aave.ts +104 -1
- package/src/types/aaveV4.ts +49 -0
- package/src/types/common.ts +0 -1
- package/src/types/compound.ts +38 -2
- package/src/types/curveUsd.ts +17 -1
- package/src/types/fluid.ts +14 -0
- package/src/types/index.ts +1 -0
- package/src/types/liquity.ts +13 -1
- package/src/types/liquityV2.ts +26 -1
- package/src/types/llamaLend.ts +19 -1
- package/src/types/morphoBlue.ts +3 -0
- package/src/types/portfolio.ts +151 -5
- package/src/types/savings/index.ts +12 -1
- package/src/types/spark.ts +25 -1
- package/src/umbrella/index.ts +2 -1
package/cjs/types/aaveV4.d.ts
CHANGED
|
@@ -191,3 +191,47 @@ export interface AaveV4AccountData extends AaveV4AggregatedPositionData {
|
|
|
191
191
|
healthFactor: string;
|
|
192
192
|
riskPremiumBps: number;
|
|
193
193
|
}
|
|
194
|
+
/** One Aave V4 tokenized spoke (Lend vault) as the view contract returns it for a user. */
|
|
195
|
+
export interface AaveV4TokenizationSpokeData {
|
|
196
|
+
underlyingAsset: EthAddress;
|
|
197
|
+
assetId: string;
|
|
198
|
+
decimals: number;
|
|
199
|
+
spoke: EthAddress;
|
|
200
|
+
spokeActive: boolean;
|
|
201
|
+
spokeHalted: boolean;
|
|
202
|
+
spokeDepositCap: string;
|
|
203
|
+
spokeTotalAssets: string;
|
|
204
|
+
spokeTotalShares: string;
|
|
205
|
+
hub: EthAddress;
|
|
206
|
+
hubLiquidity: string;
|
|
207
|
+
hubDrawnRate: string;
|
|
208
|
+
convertToShares: string;
|
|
209
|
+
convertToAssets: string;
|
|
210
|
+
user: EthAddress;
|
|
211
|
+
userSuppliedAssets: string;
|
|
212
|
+
userSuppliedShares: string;
|
|
213
|
+
}
|
|
214
|
+
/** Parsed tokenization spoke data with human-readable supplied amounts for display */
|
|
215
|
+
export interface AaveV4TokenizationSpokeDataParsed {
|
|
216
|
+
vaultAddress: EthAddress;
|
|
217
|
+
key: string | null;
|
|
218
|
+
symbol: string;
|
|
219
|
+
hubKey: string;
|
|
220
|
+
spokeActive: boolean;
|
|
221
|
+
spokeHalted: boolean;
|
|
222
|
+
/** Deposit cap in asset units (wei string) */
|
|
223
|
+
spokeDepositCap: string;
|
|
224
|
+
/** Total assets currently in spoke in asset units (wei string) */
|
|
225
|
+
spokeTotalAssets: string;
|
|
226
|
+
/** Available hub liquidity in asset units (wei string) */
|
|
227
|
+
hubLiquidity: string;
|
|
228
|
+
/** The conversion rate from assets to shares expressed in asset units. */
|
|
229
|
+
convertToShares: string;
|
|
230
|
+
userSuppliedAssetsEth: string;
|
|
231
|
+
userSuppliedSharesEth: string;
|
|
232
|
+
userSuppliedAssets: string;
|
|
233
|
+
userSuppliedShares: string;
|
|
234
|
+
underlyingAsset: EthAddress;
|
|
235
|
+
spoke: EthAddress;
|
|
236
|
+
decimals: number;
|
|
237
|
+
}
|
package/cjs/types/common.d.ts
CHANGED
package/cjs/types/common.js
CHANGED
|
@@ -30,7 +30,6 @@ var LeverageType;
|
|
|
30
30
|
LeverageType["Short"] = "short";
|
|
31
31
|
LeverageType["VolatilePair"] = "volatile-pair";
|
|
32
32
|
LeverageType["VolatilePairReverse"] = "volatile-pair-reverse";
|
|
33
|
-
LeverageType["StablePair"] = "stable-pair";
|
|
34
33
|
LeverageType["None"] = "";
|
|
35
34
|
})(LeverageType || (exports.LeverageType = LeverageType = {}));
|
|
36
35
|
var NetworkNumber;
|
package/cjs/types/compound.d.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
}
|
package/cjs/types/curveUsd.d.ts
CHANGED
|
@@ -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
|
|
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
|
}
|
package/cjs/types/fluid.d.ts
CHANGED
|
@@ -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
|
+
}
|
package/cjs/types/index.d.ts
CHANGED
package/cjs/types/index.js
CHANGED
|
@@ -31,4 +31,5 @@ __exportStar(require("./merkl"), exports);
|
|
|
31
31
|
__exportStar(require("./savings"), exports);
|
|
32
32
|
__exportStar(require("./common"), exports);
|
|
33
33
|
__exportStar(require("./aaveV4"), exports);
|
|
34
|
+
__exportStar(require("./claiming"), exports);
|
|
34
35
|
__exportStar(require("./lendingSummary"), exports);
|
package/cjs/types/liquity.d.ts
CHANGED
|
@@ -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
|
+
}
|
package/cjs/types/liquityV2.d.ts
CHANGED
|
@@ -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
|
+
}
|
package/cjs/types/llamaLend.d.ts
CHANGED
|
@@ -138,7 +138,8 @@ export interface LlamaLendUsedAsset {
|
|
|
138
138
|
export interface LlamaLendUsedAssets {
|
|
139
139
|
[key: string]: LlamaLendUsedAsset;
|
|
140
140
|
}
|
|
141
|
-
export
|
|
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
|
}
|
package/cjs/types/portfolio.d.ts
CHANGED
|
@@ -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,65 @@ 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
|
+
/**
|
|
95
|
+
* The staking positions getPortfolioData returns for an address. The shapes are uneven, and the DeFi Saver app
|
|
96
|
+
* parses them as they are: a protocol read once per address comes back unwrapped on success, as
|
|
97
|
+
* `{ error, data: null }` on failure, and as {} (or Fluid's `{ error: '', data: {} }`) on a network it is not read on.
|
|
98
|
+
*/
|
|
99
|
+
export interface PortfolioStakingPositionsDataForAddress {
|
|
100
|
+
/** stkAAVE, stkGHO and sGHO; mainnet only. */
|
|
101
|
+
aaveV3: StakeAaveData | PortfolioProtocolError | {};
|
|
102
|
+
/** Morpho Blue supply without a borrow (Earn), by market; only markets with a deposit or an error. */
|
|
103
|
+
morphoBlue: {
|
|
104
|
+
[key in MorphoBlueVersions]?: PortfolioProtocolData<MorphoBlueEarnData>;
|
|
105
|
+
};
|
|
106
|
+
compoundV3: Record<string, never>;
|
|
107
|
+
spark: Record<string, never>;
|
|
108
|
+
aaveV2: Record<string, never>;
|
|
109
|
+
compoundV2: Record<string, never>;
|
|
110
|
+
/** LQTY staking and the LUSD stability pool; mainnet only. */
|
|
111
|
+
liquity: LiquityStakingData | PortfolioProtocolError | {};
|
|
112
|
+
/** Stability pool deposits, by market; mainnet only, legacy markets left out. */
|
|
113
|
+
liquityV2: {
|
|
114
|
+
[key in LiquityV2Versions]?: PortfolioProtocolData<LiquityV2StakingData>;
|
|
115
|
+
};
|
|
116
|
+
/** Fluid lending (fToken) deposits; `{ error: '', data: {} }` on a network without Fluid. */
|
|
117
|
+
fluid: FluidEarnPositionData[] | PortfolioProtocolError | {
|
|
118
|
+
error: string;
|
|
119
|
+
data: Record<string, never>;
|
|
120
|
+
};
|
|
121
|
+
/** Umbrella stakes; absent off mainnet. */
|
|
122
|
+
umbrella?: UmbrellaStakingData | PortfolioProtocolError;
|
|
123
|
+
/** sBOLD, yBOLD and stYBOLD; data is null off mainnet. */
|
|
124
|
+
liquityV2SBoldYBold: PortfolioProtocolData<LiquityV2SBoldYBoldData>;
|
|
125
|
+
}
|
|
126
|
+
export type PortfolioStakingPositionsData = Record<EthAddress, PortfolioStakingPositionsDataForAddress>;
|
|
127
|
+
/** The claimable rewards getPortfolioData returns for an address. Off mainnet only Merkl and Aave V3 are read. */
|
|
128
|
+
export interface PortfolioRewardsDataForAddress {
|
|
129
|
+
merkl: PortfolioProtocolData<MerklRewardsClaimableToken[]>;
|
|
130
|
+
aaveV3: {
|
|
131
|
+
[key in AaveVersions]?: PortfolioProtocolData<AaveRewardsClaimableToken[]>;
|
|
132
|
+
};
|
|
133
|
+
spark: {
|
|
134
|
+
[key in SparkVersions]?: PortfolioProtocolData<SparkRewardsClaimableToken[]>;
|
|
135
|
+
};
|
|
136
|
+
/** The SPK airdrop. */
|
|
137
|
+
spk: PortfolioProtocolData<SparkAirdropClaimableToken[]>;
|
|
138
|
+
king: PortfolioProtocolData<KingRewardsClaimableToken[]>;
|
|
139
|
+
/** {} off mainnet. */
|
|
140
|
+
ethena: PortfolioProtocolData<EthenaAirdropClaimableToken[]> | {};
|
|
141
|
+
uniswap: PortfolioProtocolData<UniswapAirdropClaimableToken[]>;
|
|
142
|
+
}
|
|
143
|
+
export type PortfolioRewardsData = Record<EthAddress, PortfolioRewardsDataForAddress>;
|
|
144
|
+
/** The `markets` getPortfolioData returns: every market it read, by protocol, keyed by market or spoke. */
|
|
63
145
|
export interface PortfolioMarketsData {
|
|
64
146
|
morphoMarketsData: Record<string, MorphoBlueMarketInfo>;
|
|
65
147
|
morphoMidnightMarketsData: Record<string, MorphoMidnightMarketInfo>;
|
|
@@ -72,6 +154,44 @@ export interface PortfolioMarketsData {
|
|
|
72
154
|
llamaLendMarketsData: Record<string, LlamaLendGlobalMarketData>;
|
|
73
155
|
liquityV2MarketsData: Record<string, LiquityV2MarketData>;
|
|
74
156
|
aaveV4SpokesData: Record<string, AaveV4SpokeData>;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* The `markets` getShifterPortfolioData returns: the portfolio's markets, plus Fluid's and Maker's, which the shifter
|
|
160
|
+
* offers as destinations. Kept apart from PortfolioMarketsData, which getPortfolioData does not fill these into.
|
|
161
|
+
*/
|
|
162
|
+
export interface ShifterPortfolioMarketsData extends PortfolioMarketsData {
|
|
75
163
|
fluidMarketsData: Record<string, FluidMarketData>;
|
|
76
164
|
makerMarketsData: Record<string, IlkInfo>;
|
|
77
165
|
}
|
|
166
|
+
/** The markets that could not be read, by their key in PortfolioMarketsData, then by market or spoke: the error. */
|
|
167
|
+
export type PortfolioMarketsErrors = {
|
|
168
|
+
[key in keyof PortfolioMarketsData]?: Record<string, string>;
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* What the portfolio fetch could not read and has no `{ error, data }` entry of its own to report it in. A key is
|
|
172
|
+
* present only when something under it failed; {} when everything was read.
|
|
173
|
+
*/
|
|
174
|
+
export interface PortfolioErrors {
|
|
175
|
+
/** Markets missing from `markets`; every position on such a market is an entry with an error. */
|
|
176
|
+
markets?: PortfolioMarketsErrors;
|
|
177
|
+
/** Addresses whose Maker vault list could not be read: their `maker` is {}, which would otherwise read as "no vaults". */
|
|
178
|
+
makerCdps?: Record<EthAddress, string>;
|
|
179
|
+
}
|
|
180
|
+
/** getPortfolioMarketsData's result. */
|
|
181
|
+
export interface PortfolioMarketsResult {
|
|
182
|
+
/** Every market read; one that failed is missing and named in `errors`. */
|
|
183
|
+
markets: PortfolioMarketsData;
|
|
184
|
+
errors: PortfolioMarketsErrors;
|
|
185
|
+
}
|
|
186
|
+
/** getPortfolioUserData's result: what is read per address. */
|
|
187
|
+
export interface PortfolioUserData {
|
|
188
|
+
positions: PortfolioPositionsData;
|
|
189
|
+
stakingPositions: PortfolioStakingPositionsData;
|
|
190
|
+
rewardsData: PortfolioRewardsData;
|
|
191
|
+
errors: Pick<PortfolioErrors, 'makerCdps'>;
|
|
192
|
+
}
|
|
193
|
+
/** getPortfolioData's result. */
|
|
194
|
+
export interface PortfolioData extends Omit<PortfolioUserData, 'errors'> {
|
|
195
|
+
markets: PortfolioMarketsData;
|
|
196
|
+
errors: PortfolioErrors;
|
|
197
|
+
}
|
|
@@ -20,4 +20,12 @@ export interface SavingsVaultData {
|
|
|
20
20
|
asset: string;
|
|
21
21
|
optionType: string;
|
|
22
22
|
}
|
|
23
|
-
|
|
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
|
+
}
|
package/cjs/types/spark.d.ts
CHANGED
|
@@ -46,6 +46,21 @@ 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;
|
|
49
64
|
}
|
|
50
65
|
export interface SparkAssetsData {
|
|
51
66
|
[token: string]: SparkAssetData;
|
|
@@ -101,7 +116,12 @@ export interface SparkAggregatedPositionData {
|
|
|
101
116
|
minHealthRatio: string;
|
|
102
117
|
exposure: string;
|
|
103
118
|
}
|
|
104
|
-
|
|
119
|
+
/**
|
|
120
|
+
* Fields sparkGetAggregatedPositionData adds to every Spark position at runtime, on top of those declared below.
|
|
121
|
+
* Optional, so code that builds a position by hand keeps compiling.
|
|
122
|
+
*/
|
|
123
|
+
export type SparkPositionAggregatedFields = Partial<Omit<SparkAggregatedPositionData, keyof MMPositionData | 'ratio' | 'collRatio' | 'suppliedUsd' | 'borrowedUsd' | 'borrowLimitUsd' | 'suppliedCollateralUsd' | 'incentiveUsd' | 'totalInterestUsd'>>;
|
|
124
|
+
export interface SparkPositionData extends MMPositionData, SparkPositionAggregatedFields {
|
|
105
125
|
ratio: string;
|
|
106
126
|
minRatio: string;
|
|
107
127
|
collRatio: string;
|
package/cjs/umbrella/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
2
|
import { EthAddress, NetworkNumber } from '../types/common';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}>;
|
|
3
|
+
import { UmbrellaStakingData } from '../types/aave';
|
|
4
|
+
export declare const getUmbrellaData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<UmbrellaStakingData>;
|
package/esm/aaveV3/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
|
-
import { AaveMarketInfo, AaveV3MarketData, AaveV3PositionData, AaveV3UsedAssets, EModeCategoryDataMapping } from '../types';
|
|
2
|
+
import { AaveMarketInfo, AaveV3MarketData, AaveV3PositionData, AaveV3UsedAssets, EModeCategoryDataMapping, StakeAaveData } 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';
|
|
@@ -76,17 +76,7 @@ export declare const getAaveV3AccountData: (provider: EthereumProvider, network:
|
|
|
76
76
|
export declare const getAaveV3FullPositionData: (provider: EthereumProvider, network: NetworkNumber, address: EthAddress, market: AaveMarketInfo) => Promise<AaveV3PositionData>;
|
|
77
77
|
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"];
|
|
78
78
|
export declare const fetchYearlyMeritApyForStakingGho: () => Promise<string>;
|
|
79
|
-
export declare const getStakeAaveData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<
|
|
80
|
-
activatedCooldown: string;
|
|
81
|
-
activatedCooldownAmount: string;
|
|
82
|
-
stkAaveRewardsBalance: string;
|
|
83
|
-
aaveRewardsBalance: string;
|
|
84
|
-
stkAaveBalance: string;
|
|
85
|
-
stkGhoBalance: string;
|
|
86
|
-
ghoMeritApy: string;
|
|
87
|
-
stkAaveApy: string;
|
|
88
|
-
sgho: import("./sgho").SghoData;
|
|
89
|
-
}>;
|
|
79
|
+
export declare const getStakeAaveData: (provider: Client, network: NetworkNumber, address: EthAddress) => Promise<StakeAaveData>;
|
|
90
80
|
export { getMeritCampaigns, getMerkleCampaigns, };
|
|
91
81
|
export { getSghoData } from './sgho';
|
|
92
82
|
export type { SghoData, SghoUserData } from './sgho';
|
package/esm/aaveV3/sgho.d.ts
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
1
|
import { EthAddress, NetworkNumber } from '../types/common';
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
}
|
|
2
|
+
import { SghoData } from '../types/aave';
|
|
3
|
+
export type { SghoData, SghoUserData } from '../types/aave';
|
|
18
4
|
export declare const getSghoData: (network: NetworkNumber, address?: EthAddress) => Promise<SghoData>;
|
package/esm/aaveV4/lend.d.ts
CHANGED
|
@@ -1,53 +1,12 @@
|
|
|
1
1
|
import { EthAddress, EthereumProvider, NetworkNumber } from '../types/common';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
assetId: string;
|
|
5
|
-
decimals: number;
|
|
6
|
-
spoke: EthAddress;
|
|
7
|
-
spokeActive: boolean;
|
|
8
|
-
spokeHalted: boolean;
|
|
9
|
-
spokeDepositCap: string;
|
|
10
|
-
spokeTotalAssets: string;
|
|
11
|
-
spokeTotalShares: string;
|
|
12
|
-
hub: EthAddress;
|
|
13
|
-
hubLiquidity: string;
|
|
14
|
-
hubDrawnRate: string;
|
|
15
|
-
convertToShares: string;
|
|
16
|
-
convertToAssets: string;
|
|
17
|
-
user: EthAddress;
|
|
18
|
-
userSuppliedAssets: string;
|
|
19
|
-
userSuppliedShares: string;
|
|
20
|
-
}
|
|
2
|
+
import { AaveV4TokenizationSpokeDataParsed } from '../types/aaveV4';
|
|
3
|
+
export type { AaveV4TokenizationSpokeData, AaveV4TokenizationSpokeDataParsed } from '../types/aaveV4';
|
|
21
4
|
export declare const AAVE_V4_TOKENIZED_SPOKES: Record<string, EthAddress>;
|
|
22
5
|
export declare const AAVE_V4_TOKENIZED_SPOKE_ADDRESSES: Partial<Record<NetworkNumber, EthAddress[]>>;
|
|
23
6
|
export type AaveV4TokenizedHubKey = 'CORE' | 'PLUS' | 'PRIME' | 'PAXOS';
|
|
24
7
|
export declare const aaveV4GetTokenizedHubKey: (hubNameOrKey?: string | null) => AaveV4TokenizedHubKey | null;
|
|
25
8
|
export declare const aaveV4GetTokenizedVaultKey: (symbol: string, hubNameOrKey?: string | null) => string | null;
|
|
26
9
|
export declare const aaveV4GetTokenizedVaultAddress: (network: NetworkNumber, symbol: string, hubNameOrKey?: string | null) => EthAddress | undefined;
|
|
27
|
-
/** Parsed tokenization spoke data with human-readable supplied amounts for display */
|
|
28
|
-
export interface AaveV4TokenizationSpokeDataParsed {
|
|
29
|
-
vaultAddress: EthAddress;
|
|
30
|
-
key: string | null;
|
|
31
|
-
symbol: string;
|
|
32
|
-
hubKey: string;
|
|
33
|
-
spokeActive: boolean;
|
|
34
|
-
spokeHalted: boolean;
|
|
35
|
-
/** Deposit cap in asset units (wei string) */
|
|
36
|
-
spokeDepositCap: string;
|
|
37
|
-
/** Total assets currently in spoke in asset units (wei string) */
|
|
38
|
-
spokeTotalAssets: string;
|
|
39
|
-
/** Available hub liquidity in asset units (wei string) */
|
|
40
|
-
hubLiquidity: string;
|
|
41
|
-
/** The conversion rate from assets to shares expressed in asset units. */
|
|
42
|
-
convertToShares: string;
|
|
43
|
-
userSuppliedAssetsEth: string;
|
|
44
|
-
userSuppliedSharesEth: string;
|
|
45
|
-
userSuppliedAssets: string;
|
|
46
|
-
userSuppliedShares: string;
|
|
47
|
-
underlyingAsset: EthAddress;
|
|
48
|
-
spoke: EthAddress;
|
|
49
|
-
decimals: number;
|
|
50
|
-
}
|
|
51
10
|
/**
|
|
52
11
|
* Fetches tokenization vault data for the given user via getTokenizationSpokesData.
|
|
53
12
|
* Returns parsed data including userSuppliedAssets in human-readable form for each vault.
|
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 { ClaimableToken, MerklRewardsClaimableToken } from '../types/claiming';
|
|
4
|
-
export declare function getUnclaimedRewardsForAllMarkets(provider: Client, network: NetworkNumber, walletAddress: EthAddress, marketAddress: EthAddress): Promise<
|
|
3
|
+
import { AaveRewardsClaimableToken, ClaimableToken, MerklRewardsClaimableToken } from '../types/claiming';
|
|
4
|
+
export declare function getUnclaimedRewardsForAllMarkets(provider: Client, network: NetworkNumber, walletAddress: EthAddress, marketAddress: EthAddress): Promise<AaveRewardsClaimableToken[]>;
|
|
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 } from '../types/claiming';
|
|
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,3 +1,4 @@
|
|
|
1
1
|
import { EthAddress } from '../types/common';
|
|
2
|
+
import { EthenaAirdropClaimableToken } from '../types/claiming';
|
|
2
3
|
export declare const fetchEthenaAirdropReward: (address: EthAddress) => Promise<any>;
|
|
3
|
-
export declare const fetchEthenaAirdropRewards: (walletAddresses: EthAddress[]) => Promise<Record<string,
|
|
4
|
+
export declare const fetchEthenaAirdropRewards: (walletAddresses: EthAddress[]) => Promise<Record<string, EthenaAirdropClaimableToken[]>>;
|
package/esm/claiming/king.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
2
|
import { EthAddress, NetworkNumber } from '../types/common';
|
|
3
|
+
import { KingRewardsClaimableToken } from '../types/claiming';
|
|
3
4
|
export declare const fetchKingRewards: (walletAddress: EthAddress) => Promise<any>;
|
|
4
|
-
export declare const getKingRewards: (provider: Client, network: NetworkNumber, walletAddresses: EthAddress[]) => Promise<Record<string,
|
|
5
|
+
export declare const getKingRewards: (provider: Client, network: NetworkNumber, walletAddresses: EthAddress[]) => Promise<Record<string, KingRewardsClaimableToken[]>>;
|
package/esm/claiming/spark.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Client } from 'viem';
|
|
2
2
|
import { EthAddress, NetworkNumber } from '../types/common';
|
|
3
|
-
import { SparkRewardsClaimableToken } from '../types/claiming';
|
|
3
|
+
import { SparkAirdropClaimableToken, SparkRewardsClaimableToken } from '../types/claiming';
|
|
4
4
|
export declare const fetchSpkAirdropRewards: (walletAddress: EthAddress) => Promise<any>;
|
|
5
|
-
export declare const fetchSparkAirdropRewards: (provider: Client, network: NetworkNumber, walletAddresses: EthAddress[]) => Promise<Record<string,
|
|
5
|
+
export declare const fetchSparkAirdropRewards: (provider: Client, network: NetworkNumber, walletAddresses: EthAddress[]) => Promise<Record<string, SparkAirdropClaimableToken[]>>;
|
|
6
6
|
export declare const fetchSparkRewards: (provider: Client, network: NetworkNumber, walletAddress: EthAddress, marketAddress: EthAddress) => Promise<SparkRewardsClaimableToken[]>;
|
package/esm/claiming/spark.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { assetAmountInEth, getAssetInfoByAddress } from '@defisaver/tokens';
|
|
11
11
|
import Dec from 'decimal.js';
|
|
12
12
|
import { createViemContractFromConfigFunc, SparkIncentiveDataProviderContractViem, SparkRewardsControllerViem, } from '../contracts';
|
|
13
|
-
import { ClaimType, SparkAirdropType } from '../types/claiming';
|
|
13
|
+
import { ClaimType, SparkAirdropType, } from '../types/claiming';
|
|
14
14
|
import { compareAddresses, getEthAmountForDecimals } from '../services/utils';
|
|
15
15
|
const IGNITION_REWARDS = '0xCBA0C0a2a0B6Bb11233ec4EA85C5bFfea33e724d';
|
|
16
16
|
const PFL3_REWARDS = '0x7ac96180C4d6b2A328D3a19ac059D0E7Fc3C6d41';
|