@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.
@@ -1,336 +0,0 @@
1
- import type { LendingMarket } from "@metamask/stake-sdk";
2
- import { type Selector } from "reselect";
3
- import type { EarnControllerState, LendingMarketWithPosition, LendingPositionWithMarket } from "./EarnController.cjs";
4
- export declare const selectLendingMarkets: (state: EarnControllerState) => LendingMarket[];
5
- export declare const selectLendingPositions: (state: EarnControllerState) => import("./EarnController.cjs").LendingPositionWithMarketReference[];
6
- export declare const selectLendingMarketsByProtocolAndId: ((state: EarnControllerState) => Record<string, Record<string, LendingMarket>>) & {
7
- clearCache: () => void;
8
- resultsCount: () => number;
9
- resetResultsCount: () => void;
10
- } & {
11
- resultFunc: (resultFuncArgs_0: LendingMarket[]) => Record<string, Record<string, LendingMarket>>;
12
- memoizedResultFunc: ((resultFuncArgs_0: LendingMarket[]) => Record<string, Record<string, LendingMarket>>) & {
13
- clearCache: () => void;
14
- resultsCount: () => number;
15
- resetResultsCount: () => void;
16
- };
17
- lastResult: () => Record<string, Record<string, LendingMarket>>;
18
- dependencies: [(state: EarnControllerState) => LendingMarket[]];
19
- recomputations: () => number;
20
- resetRecomputations: () => void;
21
- dependencyRecomputations: () => number;
22
- resetDependencyRecomputations: () => void;
23
- } & {
24
- argsMemoize: typeof import("reselect").weakMapMemoize;
25
- memoize: typeof import("reselect").weakMapMemoize;
26
- };
27
- export declare const selectLendingMarketForProtocolAndId: ((state: EarnControllerState) => (protocol: string, id: string) => LendingMarket) & {
28
- clearCache: () => void;
29
- resultsCount: () => number;
30
- resetResultsCount: () => void;
31
- } & {
32
- resultFunc: (resultFuncArgs_0: Record<string, Record<string, LendingMarket>>) => (protocol: string, id: string) => LendingMarket;
33
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, Record<string, LendingMarket>>) => (protocol: string, id: string) => LendingMarket) & {
34
- clearCache: () => void;
35
- resultsCount: () => number;
36
- resetResultsCount: () => void;
37
- };
38
- lastResult: () => (protocol: string, id: string) => LendingMarket;
39
- dependencies: [((state: EarnControllerState) => Record<string, Record<string, LendingMarket>>) & {
40
- clearCache: () => void;
41
- resultsCount: () => number;
42
- resetResultsCount: () => void;
43
- } & {
44
- resultFunc: (resultFuncArgs_0: LendingMarket[]) => Record<string, Record<string, LendingMarket>>;
45
- memoizedResultFunc: ((resultFuncArgs_0: LendingMarket[]) => Record<string, Record<string, LendingMarket>>) & {
46
- clearCache: () => void;
47
- resultsCount: () => number;
48
- resetResultsCount: () => void;
49
- };
50
- lastResult: () => Record<string, Record<string, LendingMarket>>;
51
- dependencies: [(state: EarnControllerState) => LendingMarket[]];
52
- recomputations: () => number;
53
- resetRecomputations: () => void;
54
- dependencyRecomputations: () => number;
55
- resetDependencyRecomputations: () => void;
56
- } & {
57
- argsMemoize: typeof import("reselect").weakMapMemoize;
58
- memoize: typeof import("reselect").weakMapMemoize;
59
- }];
60
- recomputations: () => number;
61
- resetRecomputations: () => void;
62
- dependencyRecomputations: () => number;
63
- resetDependencyRecomputations: () => void;
64
- } & {
65
- argsMemoize: typeof import("reselect").weakMapMemoize;
66
- memoize: typeof import("reselect").weakMapMemoize;
67
- };
68
- export declare const selectLendingMarketsForChainId: ((state: EarnControllerState) => (chainId: number) => LendingMarket[]) & {
69
- clearCache: () => void;
70
- resultsCount: () => number;
71
- resetResultsCount: () => void;
72
- } & {
73
- resultFunc: (resultFuncArgs_0: LendingMarket[]) => (chainId: number) => LendingMarket[];
74
- memoizedResultFunc: ((resultFuncArgs_0: LendingMarket[]) => (chainId: number) => LendingMarket[]) & {
75
- clearCache: () => void;
76
- resultsCount: () => number;
77
- resetResultsCount: () => void;
78
- };
79
- lastResult: () => (chainId: number) => LendingMarket[];
80
- dependencies: [(state: EarnControllerState) => LendingMarket[]];
81
- recomputations: () => number;
82
- resetRecomputations: () => void;
83
- dependencyRecomputations: () => number;
84
- resetDependencyRecomputations: () => void;
85
- } & {
86
- argsMemoize: typeof import("reselect").weakMapMemoize;
87
- memoize: typeof import("reselect").weakMapMemoize;
88
- };
89
- export declare const selectLendingMarketsByChainId: ((state: EarnControllerState) => Record<number, LendingMarket[]>) & {
90
- clearCache: () => void;
91
- resultsCount: () => number;
92
- resetResultsCount: () => void;
93
- } & {
94
- resultFunc: (resultFuncArgs_0: LendingMarket[]) => Record<number, LendingMarket[]>;
95
- memoizedResultFunc: ((resultFuncArgs_0: LendingMarket[]) => Record<number, LendingMarket[]>) & {
96
- clearCache: () => void;
97
- resultsCount: () => number;
98
- resetResultsCount: () => void;
99
- };
100
- lastResult: () => Record<number, LendingMarket[]>;
101
- dependencies: [(state: EarnControllerState) => LendingMarket[]];
102
- recomputations: () => number;
103
- resetRecomputations: () => void;
104
- dependencyRecomputations: () => number;
105
- resetDependencyRecomputations: () => void;
106
- } & {
107
- argsMemoize: typeof import("reselect").weakMapMemoize;
108
- memoize: typeof import("reselect").weakMapMemoize;
109
- };
110
- export declare const selectLendingPositionsWithMarket: ((state: EarnControllerState) => LendingPositionWithMarket[]) & {
111
- clearCache: () => void;
112
- resultsCount: () => number;
113
- resetResultsCount: () => void;
114
- } & {
115
- resultFunc: (resultFuncArgs_0: import("./EarnController.cjs").LendingPositionWithMarketReference[], resultFuncArgs_1: Record<string, Record<string, LendingMarket>>) => LendingPositionWithMarket[];
116
- memoizedResultFunc: ((resultFuncArgs_0: import("./EarnController.cjs").LendingPositionWithMarketReference[], resultFuncArgs_1: Record<string, Record<string, LendingMarket>>) => LendingPositionWithMarket[]) & {
117
- clearCache: () => void;
118
- resultsCount: () => number;
119
- resetResultsCount: () => void;
120
- };
121
- lastResult: () => LendingPositionWithMarket[];
122
- dependencies: [(state: EarnControllerState) => import("./EarnController.cjs").LendingPositionWithMarketReference[], ((state: EarnControllerState) => Record<string, Record<string, LendingMarket>>) & {
123
- clearCache: () => void;
124
- resultsCount: () => number;
125
- resetResultsCount: () => void;
126
- } & {
127
- resultFunc: (resultFuncArgs_0: LendingMarket[]) => Record<string, Record<string, LendingMarket>>;
128
- memoizedResultFunc: ((resultFuncArgs_0: LendingMarket[]) => Record<string, Record<string, LendingMarket>>) & {
129
- clearCache: () => void;
130
- resultsCount: () => number;
131
- resetResultsCount: () => void;
132
- };
133
- lastResult: () => Record<string, Record<string, LendingMarket>>;
134
- dependencies: [(state: EarnControllerState) => LendingMarket[]];
135
- recomputations: () => number;
136
- resetRecomputations: () => void;
137
- dependencyRecomputations: () => number;
138
- resetDependencyRecomputations: () => void;
139
- } & {
140
- argsMemoize: typeof import("reselect").weakMapMemoize;
141
- memoize: typeof import("reselect").weakMapMemoize;
142
- }];
143
- recomputations: () => number;
144
- resetRecomputations: () => void;
145
- dependencyRecomputations: () => number;
146
- resetDependencyRecomputations: () => void;
147
- } & {
148
- argsMemoize: typeof import("reselect").weakMapMemoize;
149
- memoize: typeof import("reselect").weakMapMemoize;
150
- };
151
- export declare const selectLendingPositionsByChainId: ((state: EarnControllerState) => Record<number, LendingPositionWithMarket[]>) & {
152
- clearCache: () => void;
153
- resultsCount: () => number;
154
- resetResultsCount: () => void;
155
- } & {
156
- resultFunc: (resultFuncArgs_0: LendingPositionWithMarket[]) => Record<number, LendingPositionWithMarket[]>;
157
- memoizedResultFunc: ((resultFuncArgs_0: LendingPositionWithMarket[]) => Record<number, LendingPositionWithMarket[]>) & {
158
- clearCache: () => void;
159
- resultsCount: () => number;
160
- resetResultsCount: () => void;
161
- };
162
- lastResult: () => Record<number, LendingPositionWithMarket[]>;
163
- dependencies: [((state: EarnControllerState) => LendingPositionWithMarket[]) & {
164
- clearCache: () => void;
165
- resultsCount: () => number;
166
- resetResultsCount: () => void;
167
- } & {
168
- resultFunc: (resultFuncArgs_0: import("./EarnController.cjs").LendingPositionWithMarketReference[], resultFuncArgs_1: Record<string, Record<string, LendingMarket>>) => LendingPositionWithMarket[];
169
- memoizedResultFunc: ((resultFuncArgs_0: import("./EarnController.cjs").LendingPositionWithMarketReference[], resultFuncArgs_1: Record<string, Record<string, LendingMarket>>) => LendingPositionWithMarket[]) & {
170
- clearCache: () => void;
171
- resultsCount: () => number;
172
- resetResultsCount: () => void;
173
- };
174
- lastResult: () => LendingPositionWithMarket[];
175
- dependencies: [(state: EarnControllerState) => import("./EarnController.cjs").LendingPositionWithMarketReference[], ((state: EarnControllerState) => Record<string, Record<string, LendingMarket>>) & {
176
- clearCache: () => void;
177
- resultsCount: () => number;
178
- resetResultsCount: () => void;
179
- } & {
180
- resultFunc: (resultFuncArgs_0: LendingMarket[]) => Record<string, Record<string, LendingMarket>>;
181
- memoizedResultFunc: ((resultFuncArgs_0: LendingMarket[]) => Record<string, Record<string, LendingMarket>>) & {
182
- clearCache: () => void;
183
- resultsCount: () => number;
184
- resetResultsCount: () => void;
185
- };
186
- lastResult: () => Record<string, Record<string, LendingMarket>>;
187
- dependencies: [(state: EarnControllerState) => LendingMarket[]];
188
- recomputations: () => number;
189
- resetRecomputations: () => void;
190
- dependencyRecomputations: () => number;
191
- resetDependencyRecomputations: () => void;
192
- } & {
193
- argsMemoize: typeof import("reselect").weakMapMemoize;
194
- memoize: typeof import("reselect").weakMapMemoize;
195
- }];
196
- recomputations: () => number;
197
- resetRecomputations: () => void;
198
- dependencyRecomputations: () => number;
199
- resetDependencyRecomputations: () => void;
200
- } & {
201
- argsMemoize: typeof import("reselect").weakMapMemoize;
202
- memoize: typeof import("reselect").weakMapMemoize;
203
- }];
204
- recomputations: () => number;
205
- resetRecomputations: () => void;
206
- dependencyRecomputations: () => number;
207
- resetDependencyRecomputations: () => void;
208
- } & {
209
- argsMemoize: typeof import("reselect").weakMapMemoize;
210
- memoize: typeof import("reselect").weakMapMemoize;
211
- };
212
- export declare const selectLendingMarketsWithPosition: Selector<EarnControllerState, LendingMarketWithPosition[]>;
213
- export declare const selectLendingPositionsByProtocol: ((state: EarnControllerState) => Record<string, LendingPositionWithMarket[]>) & {
214
- clearCache: () => void;
215
- resultsCount: () => number;
216
- resetResultsCount: () => void;
217
- } & {
218
- resultFunc: (resultFuncArgs_0: LendingPositionWithMarket[]) => Record<string, LendingPositionWithMarket[]>;
219
- memoizedResultFunc: ((resultFuncArgs_0: LendingPositionWithMarket[]) => Record<string, LendingPositionWithMarket[]>) & {
220
- clearCache: () => void;
221
- resultsCount: () => number;
222
- resetResultsCount: () => void;
223
- };
224
- lastResult: () => Record<string, LendingPositionWithMarket[]>;
225
- dependencies: [((state: EarnControllerState) => LendingPositionWithMarket[]) & {
226
- clearCache: () => void;
227
- resultsCount: () => number;
228
- resetResultsCount: () => void;
229
- } & {
230
- resultFunc: (resultFuncArgs_0: import("./EarnController.cjs").LendingPositionWithMarketReference[], resultFuncArgs_1: Record<string, Record<string, LendingMarket>>) => LendingPositionWithMarket[];
231
- memoizedResultFunc: ((resultFuncArgs_0: import("./EarnController.cjs").LendingPositionWithMarketReference[], resultFuncArgs_1: Record<string, Record<string, LendingMarket>>) => LendingPositionWithMarket[]) & {
232
- clearCache: () => void;
233
- resultsCount: () => number;
234
- resetResultsCount: () => void;
235
- };
236
- lastResult: () => LendingPositionWithMarket[];
237
- dependencies: [(state: EarnControllerState) => import("./EarnController.cjs").LendingPositionWithMarketReference[], ((state: EarnControllerState) => Record<string, Record<string, LendingMarket>>) & {
238
- clearCache: () => void;
239
- resultsCount: () => number;
240
- resetResultsCount: () => void;
241
- } & {
242
- resultFunc: (resultFuncArgs_0: LendingMarket[]) => Record<string, Record<string, LendingMarket>>;
243
- memoizedResultFunc: ((resultFuncArgs_0: LendingMarket[]) => Record<string, Record<string, LendingMarket>>) & {
244
- clearCache: () => void;
245
- resultsCount: () => number;
246
- resetResultsCount: () => void;
247
- };
248
- lastResult: () => Record<string, Record<string, LendingMarket>>;
249
- dependencies: [(state: EarnControllerState) => LendingMarket[]];
250
- recomputations: () => number;
251
- resetRecomputations: () => void;
252
- dependencyRecomputations: () => number;
253
- resetDependencyRecomputations: () => void;
254
- } & {
255
- argsMemoize: typeof import("reselect").weakMapMemoize;
256
- memoize: typeof import("reselect").weakMapMemoize;
257
- }];
258
- recomputations: () => number;
259
- resetRecomputations: () => void;
260
- dependencyRecomputations: () => number;
261
- resetDependencyRecomputations: () => void;
262
- } & {
263
- argsMemoize: typeof import("reselect").weakMapMemoize;
264
- memoize: typeof import("reselect").weakMapMemoize;
265
- }];
266
- recomputations: () => number;
267
- resetRecomputations: () => void;
268
- dependencyRecomputations: () => number;
269
- resetDependencyRecomputations: () => void;
270
- } & {
271
- argsMemoize: typeof import("reselect").weakMapMemoize;
272
- memoize: typeof import("reselect").weakMapMemoize;
273
- };
274
- export declare const selectLendingMarketByProtocolAndTokenAddress: ((state: EarnControllerState, ...params: unknown[]) => Record<string, Record<string, LendingMarketWithPosition>>) & {
275
- clearCache: () => void;
276
- resultsCount: () => number;
277
- resetResultsCount: () => void;
278
- } & {
279
- resultFunc: (resultFuncArgs_0: LendingMarketWithPosition[]) => Record<string, Record<string, LendingMarketWithPosition>>;
280
- memoizedResultFunc: ((resultFuncArgs_0: LendingMarketWithPosition[]) => Record<string, Record<string, LendingMarketWithPosition>>) & {
281
- clearCache: () => void;
282
- resultsCount: () => number;
283
- resetResultsCount: () => void;
284
- };
285
- lastResult: () => Record<string, Record<string, LendingMarketWithPosition>>;
286
- dependencies: [Selector<EarnControllerState, LendingMarketWithPosition[]>];
287
- recomputations: () => number;
288
- resetRecomputations: () => void;
289
- dependencyRecomputations: () => number;
290
- resetDependencyRecomputations: () => void;
291
- } & {
292
- argsMemoize: typeof import("reselect").weakMapMemoize;
293
- memoize: typeof import("reselect").weakMapMemoize;
294
- };
295
- export declare const selectLendingMarketForProtocolAndTokenAddress: ((state: EarnControllerState, ...params: unknown[]) => (protocol: string, tokenAddress: string) => LendingMarketWithPosition) & {
296
- clearCache: () => void;
297
- resultsCount: () => number;
298
- resetResultsCount: () => void;
299
- } & {
300
- resultFunc: (resultFuncArgs_0: Record<string, Record<string, LendingMarketWithPosition>>) => (protocol: string, tokenAddress: string) => LendingMarketWithPosition;
301
- memoizedResultFunc: ((resultFuncArgs_0: Record<string, Record<string, LendingMarketWithPosition>>) => (protocol: string, tokenAddress: string) => LendingMarketWithPosition) & {
302
- clearCache: () => void;
303
- resultsCount: () => number;
304
- resetResultsCount: () => void;
305
- };
306
- lastResult: () => (protocol: string, tokenAddress: string) => LendingMarketWithPosition;
307
- dependencies: [((state: EarnControllerState, ...params: unknown[]) => Record<string, Record<string, LendingMarketWithPosition>>) & {
308
- clearCache: () => void;
309
- resultsCount: () => number;
310
- resetResultsCount: () => void;
311
- } & {
312
- resultFunc: (resultFuncArgs_0: LendingMarketWithPosition[]) => Record<string, Record<string, LendingMarketWithPosition>>;
313
- memoizedResultFunc: ((resultFuncArgs_0: LendingMarketWithPosition[]) => Record<string, Record<string, LendingMarketWithPosition>>) & {
314
- clearCache: () => void;
315
- resultsCount: () => number;
316
- resetResultsCount: () => void;
317
- };
318
- lastResult: () => Record<string, Record<string, LendingMarketWithPosition>>;
319
- dependencies: [Selector<EarnControllerState, LendingMarketWithPosition[]>];
320
- recomputations: () => number;
321
- resetRecomputations: () => void;
322
- dependencyRecomputations: () => number;
323
- resetDependencyRecomputations: () => void;
324
- } & {
325
- argsMemoize: typeof import("reselect").weakMapMemoize;
326
- memoize: typeof import("reselect").weakMapMemoize;
327
- }];
328
- recomputations: () => number;
329
- resetRecomputations: () => void;
330
- dependencyRecomputations: () => number;
331
- resetDependencyRecomputations: () => void;
332
- } & {
333
- argsMemoize: typeof import("reselect").weakMapMemoize;
334
- memoize: typeof import("reselect").weakMapMemoize;
335
- };
336
- //# sourceMappingURL=selectors.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"selectors.d.cts","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,4BAA4B;AACzD,OAAO,EAAkB,KAAK,QAAQ,EAAE,iBAAiB;AAEzD,OAAO,KAAK,EACV,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EAC1B,6BAAyB;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