@metamask-previews/earn-controller 0.14.0-preview-37f78da → 0.14.0-preview-d20538b

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.
@@ -2,64 +2,36 @@ import type { AccountsControllerGetSelectedAccountAction, AccountsControllerSele
2
2
  import type { ControllerGetStateAction, ControllerStateChangeEvent, RestrictedMessenger } from "@metamask/base-controller";
3
3
  import { BaseController } from "@metamask/base-controller";
4
4
  import type { NetworkControllerGetNetworkClientByIdAction, NetworkControllerGetStateAction, NetworkControllerStateChangeEvent } from "@metamask/network-controller";
5
- import { type LendingMarket, type PooledStake, type VaultData, type VaultDailyApy, type VaultApyAverages, type LendingPosition, type GasLimitParams } from "@metamask/stake-sdk";
6
- import { type TransactionController, type TransactionControllerTransactionConfirmedEvent } from "@metamask/transaction-controller";
7
- import type { RefreshLendingEligibilityOptions, RefreshLendingPositionsOptions, RefreshPooledStakesOptions, RefreshPooledStakingDataOptions, RefreshStakingEligibilityOptions } from "./types.mjs";
5
+ import { type PooledStake, type VaultData, type VaultDailyApy, type VaultApyAverages } from "@metamask/stake-sdk";
6
+ import { type TransactionControllerTransactionConfirmedEvent } from "@metamask/transaction-controller";
7
+ import type { RefreshPooledStakesOptions, RefreshPooledStakingDataOptions, RefreshStakingEligibilityOptions } from "./types.mjs";
8
8
  export declare const controllerName = "EarnController";
9
9
  export type PooledStakingState = {
10
- [chainId: number]: {
11
- pooledStakes: PooledStake;
12
- exchangeRate: string;
13
- vaultMetadata: VaultData;
14
- vaultDailyApys: VaultDailyApy[];
15
- vaultApyAverages: VaultApyAverages;
16
- };
10
+ pooledStakes: PooledStake;
11
+ exchangeRate: string;
12
+ vaultMetadata: VaultData;
13
+ vaultDailyApys: VaultDailyApy[];
14
+ vaultApyAverages: VaultApyAverages;
17
15
  isEligible: boolean;
18
16
  };
19
- export type LendingPositionWithMarket = LendingPosition & {
20
- marketId: string;
21
- marketAddress: string;
22
- protocol: string;
17
+ export type StablecoinLendingState = {
18
+ vaults: StablecoinVault[];
23
19
  };
24
- export type LendingPositionWithMarketReference = Omit<LendingPosition, 'market'> & {
25
- marketId: string;
26
- marketAddress: string;
27
- protocol: string;
28
- };
29
- export type LendingMarketWithPosition = LendingMarket & {
30
- position: LendingPositionWithMarketReference;
31
- };
32
- export type LendingState = {
33
- markets: LendingMarket[];
34
- positions: LendingPositionWithMarketReference[];
35
- isEligible: boolean;
20
+ export type StablecoinVault = {
21
+ symbol: string;
22
+ name: string;
23
+ chainId: number;
24
+ tokenAddress: string;
25
+ vaultAddress: string;
26
+ currentAPY: string;
27
+ supply: string;
28
+ liquidity: string;
36
29
  };
37
30
  export type EarnControllerState = {
38
31
  pooled_staking: PooledStakingState;
39
- lending: LendingState;
32
+ stablecoin_lending?: StablecoinLendingState;
40
33
  lastUpdated: number;
41
34
  };
42
- export declare const DEFAULT_LENDING_MARKET: LendingMarket;
43
- export declare const DEFAULT_LENDING_POSITION: LendingPositionWithMarketReference;
44
- export declare const DEFAULT_POOLED_STAKING_VAULT_APY_AVERAGES: VaultApyAverages;
45
- export declare const DEFAULT_POOLED_STAKING_CHAIN_STATE: {
46
- pooledStakes: {
47
- account: string;
48
- lifetimeRewards: string;
49
- assets: string;
50
- exitRequests: never[];
51
- };
52
- exchangeRate: string;
53
- vaultMetadata: {
54
- apy: string;
55
- capacity: string;
56
- feePercent: number;
57
- totalAssets: string;
58
- vaultAddress: string;
59
- };
60
- vaultDailyApys: never[];
61
- vaultApyAverages: VaultApyAverages;
62
- };
63
35
  /**
64
36
  * Gets the default state for the EarnController.
65
37
  *
@@ -100,10 +72,9 @@ export type EarnControllerMessenger = RestrictedMessenger<typeof controllerName,
100
72
  */
101
73
  export declare class EarnController extends BaseController<typeof controllerName, EarnControllerState, EarnControllerMessenger> {
102
74
  #private;
103
- constructor({ messenger, state, addTransactionFn, }: {
75
+ constructor({ messenger, state, }: {
104
76
  messenger: EarnControllerMessenger;
105
77
  state?: Partial<EarnControllerState>;
106
- addTransactionFn: typeof TransactionController.prototype.addTransaction;
107
78
  });
108
79
  /**
109
80
  * Refreshes the pooled stakes data for the current account.
@@ -113,10 +84,9 @@ export declare class EarnController extends BaseController<typeof controllerName
113
84
  * @param options - Optional arguments
114
85
  * @param [options.resetCache] - Control whether the BE cache should be invalidated (optional).
115
86
  * @param [options.address] - The address to refresh pooled stakes for (optional).
116
- * @param [options.chainId] - The chain id to refresh pooled stakes for (optional).
117
87
  * @returns A promise that resolves when the stakes data has been updated
118
88
  */
119
- refreshPooledStakes({ resetCache, address, chainId, }?: RefreshPooledStakesOptions): Promise<void>;
89
+ refreshPooledStakes({ resetCache, address, }?: RefreshPooledStakesOptions): Promise<void>;
120
90
  /**
121
91
  * Refreshes the staking eligibility status for the current account.
122
92
  * Updates the eligibility status in the controller state based on the location and address blocklist for compliance.
@@ -131,28 +101,25 @@ export declare class EarnController extends BaseController<typeof controllerName
131
101
  * Updates the vault metadata in the controller state including APY, capacity,
132
102
  * fee percentage, total assets, and vault address.
133
103
  *
134
- * @param chainId - The chain id to refresh pooled staking vault metadata for (optional).
135
104
  * @returns A promise that resolves when the vault metadata has been updated
136
105
  */
137
- refreshPooledStakingVaultMetadata(chainId?: number): Promise<void>;
106
+ refreshPooledStakingVaultMetadata(): Promise<void>;
138
107
  /**
139
108
  * Refreshes pooled staking vault daily apys for the current chain.
140
109
  * Updates the pooled staking vault daily apys controller state.
141
110
  *
142
- * @param chainId - The chain id to refresh pooled staking vault daily apys for (optional).
143
111
  * @param days - The number of days to fetch pooled staking vault daily apys for (defaults to 365).
144
112
  * @param order - The order in which to fetch pooled staking vault daily apys. Descending order fetches the latest N days (latest working backwards). Ascending order fetches the oldest N days (oldest working forwards) (defaults to 'desc').
145
113
  * @returns A promise that resolves when the pooled staking vault daily apys have been updated.
146
114
  */
147
- refreshPooledStakingVaultDailyApys(chainId?: number, days?: number, order?: 'asc' | 'desc'): Promise<void>;
115
+ refreshPooledStakingVaultDailyApys(days?: number, order?: 'asc' | 'desc'): Promise<void>;
148
116
  /**
149
117
  * Refreshes pooled staking vault apy averages for the current chain.
150
118
  * Updates the pooled staking vault apy averages controller state.
151
119
  *
152
- * @param chainId - The chain id to refresh pooled staking vault apy averages for (optional).
153
120
  * @returns A promise that resolves when the pooled staking vault apy averages have been updated.
154
121
  */
155
- refreshPooledStakingVaultApyAverages(chainId?: number): Promise<void>;
122
+ refreshPooledStakingVaultApyAverages(): Promise<void>;
156
123
  /**
157
124
  * Refreshes all pooled staking related data including stakes, eligibility, and vault data.
158
125
  * This method allows partial success, meaning some data may update while other requests fail.
@@ -165,170 +132,5 @@ export declare class EarnController extends BaseController<typeof controllerName
165
132
  * @throws {Error} If any of the refresh operations fail, with concatenated error messages
166
133
  */
167
134
  refreshPooledStakingData({ resetCache, address, }?: RefreshPooledStakingDataOptions): Promise<void>;
168
- /**
169
- * Refreshes the lending markets data for all chains.
170
- * Updates the lending markets in the controller state.
171
- *
172
- * @returns A promise that resolves when the lending markets have been updated
173
- */
174
- refreshLendingMarkets(): Promise<void>;
175
- /**
176
- * Refreshes the lending positions for the current account.
177
- * Updates the lending positions in the controller state.
178
- *
179
- * @param options - Optional arguments
180
- * @param [options.address] - The address to refresh lending positions for (optional).
181
- * @returns A promise that resolves when the lending positions have been updated
182
- */
183
- refreshLendingPositions({ address, }?: RefreshLendingPositionsOptions): Promise<void>;
184
- /**
185
- * Refreshes the lending eligibility status for the current account.
186
- * Updates the eligibility status in the controller state based on the location and address blocklist for compliance.
187
- *
188
- * @param options - Optional arguments
189
- * @param [options.address] - The address to refresh lending eligibility for (optional).
190
- * @returns A promise that resolves when the eligibility status has been updated
191
- */
192
- refreshLendingEligibility({ address, }?: RefreshLendingEligibilityOptions): Promise<void>;
193
- /**
194
- * Refreshes all lending related data including markets, positions, and eligibility.
195
- * This method allows partial success, meaning some data may update while other requests fail.
196
- * All errors are collected and thrown as a single error message.
197
- *
198
- * @returns A promise that resolves when all possible data has been updated
199
- * @throws {Error} If any of the refresh operations fail, with concatenated error messages
200
- */
201
- refreshLendingData(): Promise<void>;
202
- /**
203
- * Gets the lending position history for the current account.
204
- *
205
- * @param options - Optional arguments
206
- * @param [options.address] - The address to get lending position history for (optional).
207
- * @param [options.chainId] - The chain id to get lending position history for (optional).
208
- * @param [options.positionId] - The position id to get lending position history for.
209
- * @param [options.marketId] - The market id to get lending position history for.
210
- * @param [options.marketAddress] - The market address to get lending position history for.
211
- * @param [options.protocol] - The protocol to get lending position history for.
212
- * @param [options.days] - The number of days to get lending position history for (optional).
213
- * @returns A promise that resolves when the lending position history has been updated
214
- */
215
- getLendingPositionHistory({ address, chainId, positionId, marketId, marketAddress, protocol, days, }: {
216
- address?: string;
217
- chainId?: number;
218
- positionId: string;
219
- marketId: string;
220
- marketAddress: string;
221
- protocol: string;
222
- days?: number;
223
- }): Promise<import("@metamask/stake-sdk").LendingPositionHistory[]>;
224
- /**
225
- * Gets the lending market daily apys and averages for the current chain.
226
- *
227
- * @param options - Optional arguments
228
- * @param [options.chainId] - The chain id to get lending market daily apys and averages for (optional).
229
- * @param [options.protocol] - The protocol to get lending market daily apys and averages for.
230
- * @param [options.marketId] - The market id to get lending market daily apys and averages for.
231
- * @param [options.days] - The number of days to get lending market daily apys and averages for (optional).
232
- * @returns A promise that resolves when the lending market daily apys and averages have been updated
233
- */
234
- getLendingMarketDailyApysAndAverages({ chainId, protocol, marketId, days, }: {
235
- chainId?: number;
236
- protocol: string;
237
- marketId: string;
238
- days?: number;
239
- }): Promise<import("@metamask/stake-sdk").HistoricLendingMarketApys>;
240
- /**
241
- * Executes a lending deposit transaction.
242
- *
243
- * @param options - The options for the lending deposit transaction.
244
- * @param options.amount - The amount to deposit.
245
- * @param options.protocol - The protocol of the lending market.
246
- * @param options.underlyingTokenAddress - The address of the underlying token.
247
- * @param options.gasOptions - The gas options for the transaction.
248
- * @param options.gasOptions.gasLimit - The gas limit for the transaction.
249
- * @param options.gasOptions.gasBufferPct - The gas buffer percentage for the transaction.
250
- * @param options.txOptions - The transaction options for the transaction.
251
- * @returns A promise that resolves to the transaction hash.
252
- */
253
- executeLendingDeposit({ amount, protocol, underlyingTokenAddress, gasOptions, txOptions, }: {
254
- amount: string;
255
- protocol: LendingMarket['protocol'];
256
- underlyingTokenAddress: string;
257
- gasOptions: {
258
- gasLimit?: GasLimitParams;
259
- gasBufferPct?: number;
260
- };
261
- txOptions: Parameters<typeof TransactionController.prototype.addTransaction>[1];
262
- }): Promise<import("@metamask/transaction-controller").Result>;
263
- /**
264
- * Executes a lending withdraw transaction.
265
- *
266
- * @param options - The options for the lending withdraw transaction.
267
- * @param options.amount - The amount to withdraw.
268
- * @param options.protocol - The protocol of the lending market.
269
- * @param options.underlyingTokenAddress - The address of the underlying token.
270
- * @param options.gasOptions - The gas options for the transaction.
271
- * @param options.gasOptions.gasLimit - The gas limit for the transaction.
272
- * @param options.gasOptions.gasBufferPct - The gas buffer percentage for the transaction.
273
- * @param options.txOptions - The transaction options for the transaction.
274
- * @returns A promise that resolves to the transaction hash.
275
- */
276
- executeLendingWithdraw({ amount, protocol, underlyingTokenAddress, gasOptions, txOptions, }: {
277
- amount: string;
278
- protocol: LendingMarket['protocol'];
279
- underlyingTokenAddress: string;
280
- gasOptions: {
281
- gasLimit?: GasLimitParams;
282
- gasBufferPct?: number;
283
- };
284
- txOptions: Parameters<typeof TransactionController.prototype.addTransaction>[1];
285
- }): Promise<import("@metamask/transaction-controller").Result>;
286
- /**
287
- * Executes a lending token approve transaction.
288
- *
289
- * @param options - The options for the lending token approve transaction.
290
- * @param options.amount - The amount to approve.
291
- * @param options.protocol - The protocol of the lending market.
292
- * @param options.underlyingTokenAddress - The address of the underlying token.
293
- * @param options.gasOptions - The gas options for the transaction.
294
- * @param options.gasOptions.gasLimit - The gas limit for the transaction.
295
- * @param options.gasOptions.gasBufferPct - The gas buffer percentage for the transaction.
296
- * @param options.txOptions - The transaction options for the transaction.
297
- * @returns A promise that resolves to the transaction hash.
298
- */
299
- executeLendingTokenApprove({ protocol, amount, underlyingTokenAddress, gasOptions, txOptions, }: {
300
- protocol: LendingMarket['protocol'];
301
- amount: string;
302
- underlyingTokenAddress: string;
303
- gasOptions: {
304
- gasLimit?: GasLimitParams;
305
- gasBufferPct?: number;
306
- };
307
- txOptions: Parameters<typeof TransactionController.prototype.addTransaction>[1];
308
- }): Promise<import("@metamask/transaction-controller").Result>;
309
- /**
310
- * Gets the allowance for a lending token.
311
- *
312
- * @param protocol - The protocol of the lending market.
313
- * @param underlyingTokenAddress - The address of the underlying token.
314
- * @returns A promise that resolves to the allowance.
315
- */
316
- getLendingTokenAllowance(protocol: LendingMarket['protocol'], underlyingTokenAddress: string): Promise<import("@ethersproject/bignumber").BigNumber | undefined>;
317
- /**
318
- * Gets the maximum withdraw amount for a lending token's output token or shares if no output token.
319
- *
320
- * @param protocol - The protocol of the lending market.
321
- * @param underlyingTokenAddress - The address of the underlying token.
322
- * @returns A promise that resolves to the maximum withdraw amount.
323
- */
324
- getLendingTokenMaxWithdraw(protocol: LendingMarket['protocol'], underlyingTokenAddress: string): Promise<import("@ethersproject/bignumber").BigNumber | undefined>;
325
- /**
326
- * Gets the maximum deposit amount for a lending token.
327
- *
328
- * @param protocol - The protocol of the lending market.
329
- * @param underlyingTokenAddress - The address of the underlying token.
330
- * @returns A promise that resolves to the maximum deposit amount.
331
- */
332
- getLendingTokenMaxDeposit(protocol: LendingMarket['protocol'], underlyingTokenAddress: string): Promise<import("@ethersproject/bignumber").BigNumber | undefined>;
333
135
  }
334
136
  //# sourceMappingURL=EarnController.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EarnController.d.mts","sourceRoot":"","sources":["../src/EarnController.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,0CAA0C,EAC1C,4CAA4C,EAC7C,sCAAsC;AACvC,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,mBAAmB,EAEpB,kCAAkC;AACnC,OAAO,EAAE,cAAc,EAAE,kCAAkC;AAE3D,OAAO,KAAK,EACV,2CAA2C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