@metamask-previews/assets-controllers 73.0.1-preview-bf50b46b → 73.0.1-preview-e4e5ca5c

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 (96) hide show
  1. package/CHANGELOG.md +1 -13
  2. package/dist/AccountTrackerController.cjs +5 -167
  3. package/dist/AccountTrackerController.cjs.map +1 -1
  4. package/dist/AccountTrackerController.d.cts +2 -14
  5. package/dist/AccountTrackerController.d.cts.map +1 -1
  6. package/dist/AccountTrackerController.d.mts +2 -14
  7. package/dist/AccountTrackerController.d.mts.map +1 -1
  8. package/dist/AccountTrackerController.mjs +5 -167
  9. package/dist/AccountTrackerController.mjs.map +1 -1
  10. package/dist/TokenBalancesController.cjs +321 -267
  11. package/dist/TokenBalancesController.cjs.map +1 -1
  12. package/dist/TokenBalancesController.d.cts +93 -51
  13. package/dist/TokenBalancesController.d.cts.map +1 -1
  14. package/dist/TokenBalancesController.d.mts +93 -51
  15. package/dist/TokenBalancesController.d.mts.map +1 -1
  16. package/dist/TokenBalancesController.mjs +320 -270
  17. package/dist/TokenBalancesController.mjs.map +1 -1
  18. package/dist/assetsUtil.cjs +1 -13
  19. package/dist/assetsUtil.cjs.map +1 -1
  20. package/dist/assetsUtil.d.cts +0 -8
  21. package/dist/assetsUtil.d.cts.map +1 -1
  22. package/dist/assetsUtil.d.mts +0 -8
  23. package/dist/assetsUtil.d.mts.map +1 -1
  24. package/dist/assetsUtil.mjs +1 -12
  25. package/dist/assetsUtil.mjs.map +1 -1
  26. package/dist/constants.cjs +1 -12
  27. package/dist/constants.cjs.map +1 -1
  28. package/dist/constants.d.cts +0 -1
  29. package/dist/constants.d.cts.map +1 -1
  30. package/dist/constants.d.mts +0 -1
  31. package/dist/constants.d.mts.map +1 -1
  32. package/dist/constants.mjs +0 -11
  33. package/dist/constants.mjs.map +1 -1
  34. package/dist/index.cjs +3 -3
  35. package/dist/index.cjs.map +1 -1
  36. package/dist/index.d.cts +3 -2
  37. package/dist/index.d.cts.map +1 -1
  38. package/dist/index.d.mts +3 -2
  39. package/dist/index.d.mts.map +1 -1
  40. package/dist/index.mjs +1 -1
  41. package/dist/index.mjs.map +1 -1
  42. package/dist/multi-chain-accounts-service/multi-chain-accounts.cjs +1 -35
  43. package/dist/multi-chain-accounts-service/multi-chain-accounts.cjs.map +1 -1
  44. package/dist/multi-chain-accounts-service/multi-chain-accounts.d.cts +0 -16
  45. package/dist/multi-chain-accounts-service/multi-chain-accounts.d.cts.map +1 -1
  46. package/dist/multi-chain-accounts-service/multi-chain-accounts.d.mts +0 -16
  47. package/dist/multi-chain-accounts-service/multi-chain-accounts.d.mts.map +1 -1
  48. package/dist/multi-chain-accounts-service/multi-chain-accounts.mjs +0 -33
  49. package/dist/multi-chain-accounts-service/multi-chain-accounts.mjs.map +1 -1
  50. package/dist/multi-chain-accounts-service/types.cjs.map +1 -1
  51. package/dist/multi-chain-accounts-service/types.d.cts +0 -8
  52. package/dist/multi-chain-accounts-service/types.d.cts.map +1 -1
  53. package/dist/multi-chain-accounts-service/types.d.mts +0 -8
  54. package/dist/multi-chain-accounts-service/types.d.mts.map +1 -1
  55. package/dist/multi-chain-accounts-service/types.mjs.map +1 -1
  56. package/dist/multicall.cjs +22 -397
  57. package/dist/multicall.cjs.map +1 -1
  58. package/dist/multicall.d.cts +0 -39
  59. package/dist/multicall.d.cts.map +1 -1
  60. package/dist/multicall.d.mts +0 -39
  61. package/dist/multicall.d.mts.map +1 -1
  62. package/dist/multicall.mjs +21 -398
  63. package/dist/multicall.mjs.map +1 -1
  64. package/dist/selectors/balanceSelectors.cjs +275 -0
  65. package/dist/selectors/balanceSelectors.cjs.map +1 -0
  66. package/dist/selectors/balanceSelectors.d.cts +248 -0
  67. package/dist/selectors/balanceSelectors.d.cts.map +1 -0
  68. package/dist/selectors/balanceSelectors.d.mts +248 -0
  69. package/dist/selectors/balanceSelectors.d.mts.map +1 -0
  70. package/dist/selectors/balanceSelectors.mjs +268 -0
  71. package/dist/selectors/balanceSelectors.mjs.map +1 -0
  72. package/package.json +6 -3
  73. package/dist/multi-chain-accounts-service/api-balance-fetcher.cjs +0 -98
  74. package/dist/multi-chain-accounts-service/api-balance-fetcher.cjs.map +0 -1
  75. package/dist/multi-chain-accounts-service/api-balance-fetcher.d.cts +0 -28
  76. package/dist/multi-chain-accounts-service/api-balance-fetcher.d.cts.map +0 -1
  77. package/dist/multi-chain-accounts-service/api-balance-fetcher.d.mts +0 -28
  78. package/dist/multi-chain-accounts-service/api-balance-fetcher.d.mts.map +0 -1
  79. package/dist/multi-chain-accounts-service/api-balance-fetcher.mjs +0 -98
  80. package/dist/multi-chain-accounts-service/api-balance-fetcher.mjs.map +0 -1
  81. package/dist/rpc-service/rpc-balance-fetcher.cjs +0 -128
  82. package/dist/rpc-service/rpc-balance-fetcher.cjs.map +0 -1
  83. package/dist/rpc-service/rpc-balance-fetcher.d.cts +0 -34
  84. package/dist/rpc-service/rpc-balance-fetcher.d.cts.map +0 -1
  85. package/dist/rpc-service/rpc-balance-fetcher.d.mts +0 -34
  86. package/dist/rpc-service/rpc-balance-fetcher.d.mts.map +0 -1
  87. package/dist/rpc-service/rpc-balance-fetcher.mjs +0 -124
  88. package/dist/rpc-service/rpc-balance-fetcher.mjs.map +0 -1
  89. package/dist/selectors.cjs +0 -64
  90. package/dist/selectors.cjs.map +0 -1
  91. package/dist/selectors.d.cts +0 -51
  92. package/dist/selectors.d.cts.map +0 -1
  93. package/dist/selectors.d.mts +0 -51
  94. package/dist/selectors.d.mts.map +0 -1
  95. package/dist/selectors.mjs +0 -61
  96. package/dist/selectors.mjs.map +0 -1
@@ -0,0 +1,248 @@
1
+ import type { AccountTreeControllerState } from "@metamask/account-tree-controller";
2
+ import type { AccountsControllerState } from "@metamask/accounts-controller";
3
+ import type { EntropySourceId } from "@metamask/keyring-api";
4
+ import type { CurrencyRateState } from "../CurrencyRateController.cjs";
5
+ import type { MultichainAssetsRatesControllerState } from "../MultichainAssetsRatesController/index.cjs";
6
+ import type { MultichainBalancesControllerState } from "../MultichainBalancesController/index.cjs";
7
+ import type { TokenBalancesControllerState } from "../TokenBalancesController.cjs";
8
+ import type { TokenRatesControllerState } from "../TokenRatesController.cjs";
9
+ import type { TokensControllerState } from "../TokensController.cjs";
10
+ /**
11
+ * Root state type for all controllers used in selectors
12
+ */
13
+ export type RootState = {
14
+ TokenBalancesController: TokenBalancesControllerState;
15
+ CurrencyRateController: CurrencyRateState;
16
+ TokenRatesController: TokenRatesControllerState;
17
+ MultichainAssetsRatesController: MultichainAssetsRatesControllerState;
18
+ MultichainBalancesController: MultichainBalancesControllerState;
19
+ TokensController: TokensControllerState;
20
+ AccountsController: AccountsControllerState;
21
+ AccountTreeController: AccountTreeControllerState;
22
+ };
23
+ /**
24
+ * Selector to get aggregated balances for a specific account group.
25
+ * Returns total balance in user's selected currency, aggregating all tokens across accounts in the group.
26
+ *
27
+ * @param groupId - The account group ID (format: "walletId/groupIndex", e.g., "entropy:entropy-source-1/0")
28
+ * @returns Aggregated balance for the account group
29
+ */
30
+ export declare const selectBalanceByAccountGroup: (groupId: string) => ((state: RootState) => AccountGroupBalance) & {
31
+ clearCache: () => void;
32
+ resultsCount: () => number;
33
+ resetResultsCount: () => void;
34
+ } & {
35
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance;
36
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance) & {
37
+ clearCache: () => void;
38
+ resultsCount: () => number;
39
+ resetResultsCount: () => void;
40
+ };
41
+ lastResult: () => AccountGroupBalance;
42
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
43
+ recomputations: () => number;
44
+ resetRecomputations: () => void;
45
+ dependencyRecomputations: () => number;
46
+ resetDependencyRecomputations: () => void;
47
+ } & {
48
+ argsMemoize: typeof import("reselect").weakMapMemoize;
49
+ memoize: typeof import("reselect").weakMapMemoize;
50
+ };
51
+ /**
52
+ * Aggregated balance for an account group
53
+ */
54
+ export type AccountGroupBalance = {
55
+ walletId: string;
56
+ groupId: string;
57
+ totalBalanceInUserCurrency: number;
58
+ userCurrency: string;
59
+ };
60
+ /**
61
+ * Aggregated balance for a wallet (all groups)
62
+ */
63
+ export type WalletBalance = {
64
+ walletId: string;
65
+ groups: Record<string, AccountGroupBalance>;
66
+ totalBalanceInUserCurrency: number;
67
+ userCurrency: string;
68
+ };
69
+ /**
70
+ * Aggregated balance for all wallets
71
+ */
72
+ export type AllWalletsBalance = {
73
+ wallets: Record<string, WalletBalance>;
74
+ totalBalanceInUserCurrency: number;
75
+ userCurrency: string;
76
+ };
77
+ /**
78
+ * Selector to get aggregated balances for all account groups in a wallet.
79
+ * Returns total balance in user's selected currency, aggregating all tokens across all groups in the wallet.
80
+ *
81
+ * @param walletId - The wallet ID (entropy source)
82
+ * @returns Aggregated balance for all groups in the wallet
83
+ */
84
+ export declare const selectBalanceByWallet: (walletId: EntropySourceId) => ((state: RootState) => WalletBalance) & {
85
+ clearCache: () => void;
86
+ resultsCount: () => number;
87
+ resetResultsCount: () => void;
88
+ } & {
89
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => WalletBalance;
90
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => WalletBalance) & {
91
+ clearCache: () => void;
92
+ resultsCount: () => number;
93
+ resetResultsCount: () => void;
94
+ };
95
+ lastResult: () => WalletBalance;
96
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
97
+ recomputations: () => number;
98
+ resetRecomputations: () => void;
99
+ dependencyRecomputations: () => number;
100
+ resetDependencyRecomputations: () => void;
101
+ } & {
102
+ argsMemoize: typeof import("reselect").weakMapMemoize;
103
+ memoize: typeof import("reselect").weakMapMemoize;
104
+ };
105
+ /**
106
+ * Selector to get aggregated balances for all wallets and their account groups.
107
+ * Returns total balance in user's selected currency, aggregating all tokens across all wallets.
108
+ *
109
+ * @returns Aggregated balance for all wallets
110
+ */
111
+ export declare const selectBalanceForAllWallets: () => ((state: RootState) => AllWalletsBalance) & {
112
+ clearCache: () => void;
113
+ resultsCount: () => number;
114
+ resetResultsCount: () => void;
115
+ } & {
116
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AllWalletsBalance;
117
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AllWalletsBalance) & {
118
+ clearCache: () => void;
119
+ resultsCount: () => number;
120
+ resetResultsCount: () => void;
121
+ };
122
+ lastResult: () => AllWalletsBalance;
123
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
124
+ recomputations: () => number;
125
+ resetRecomputations: () => void;
126
+ dependencyRecomputations: () => number;
127
+ resetDependencyRecomputations: () => void;
128
+ } & {
129
+ argsMemoize: typeof import("reselect").weakMapMemoize;
130
+ memoize: typeof import("reselect").weakMapMemoize;
131
+ };
132
+ /**
133
+ * Selector to get aggregated balances for the currently selected account group.
134
+ * Returns total balance in user's selected currency, aggregating all tokens in the selected group.
135
+ *
136
+ * @returns Aggregated balance for the currently selected group
137
+ */
138
+ export declare const selectBalanceForSelectedAccountGroup: () => ((state: RootState) => AccountGroupBalance | null) & {
139
+ clearCache: () => void;
140
+ resultsCount: () => number;
141
+ resetResultsCount: () => void;
142
+ } & {
143
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance | null;
144
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance | null) & {
145
+ clearCache: () => void;
146
+ resultsCount: () => number;
147
+ resetResultsCount: () => void;
148
+ };
149
+ lastResult: () => AccountGroupBalance | null;
150
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
151
+ recomputations: () => number;
152
+ resetRecomputations: () => void;
153
+ dependencyRecomputations: () => number;
154
+ resetDependencyRecomputations: () => void;
155
+ } & {
156
+ argsMemoize: typeof import("reselect").weakMapMemoize;
157
+ memoize: typeof import("reselect").weakMapMemoize;
158
+ };
159
+ /**
160
+ * Collection of balance-related selectors for assets controllers
161
+ */
162
+ export declare const balanceSelectors: {
163
+ selectBalanceByAccountGroup: (groupId: string) => ((state: RootState) => AccountGroupBalance) & {
164
+ clearCache: () => void;
165
+ resultsCount: () => number;
166
+ resetResultsCount: () => void;
167
+ } & {
168
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance;
169
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance) & {
170
+ clearCache: () => void;
171
+ resultsCount: () => number;
172
+ resetResultsCount: () => void;
173
+ };
174
+ lastResult: () => AccountGroupBalance;
175
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
176
+ recomputations: () => number;
177
+ resetRecomputations: () => void;
178
+ dependencyRecomputations: () => number;
179
+ resetDependencyRecomputations: () => void;
180
+ } & {
181
+ argsMemoize: typeof import("reselect").weakMapMemoize;
182
+ memoize: typeof import("reselect").weakMapMemoize;
183
+ };
184
+ selectBalanceByWallet: (walletId: EntropySourceId) => ((state: RootState) => WalletBalance) & {
185
+ clearCache: () => void;
186
+ resultsCount: () => number;
187
+ resetResultsCount: () => void;
188
+ } & {
189
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => WalletBalance;
190
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => WalletBalance) & {
191
+ clearCache: () => void;
192
+ resultsCount: () => number;
193
+ resetResultsCount: () => void;
194
+ };
195
+ lastResult: () => WalletBalance;
196
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
197
+ recomputations: () => number;
198
+ resetRecomputations: () => void;
199
+ dependencyRecomputations: () => number;
200
+ resetDependencyRecomputations: () => void;
201
+ } & {
202
+ argsMemoize: typeof import("reselect").weakMapMemoize;
203
+ memoize: typeof import("reselect").weakMapMemoize;
204
+ };
205
+ selectBalanceForAllWallets: () => ((state: RootState) => AllWalletsBalance) & {
206
+ clearCache: () => void;
207
+ resultsCount: () => number;
208
+ resetResultsCount: () => void;
209
+ } & {
210
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AllWalletsBalance;
211
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AllWalletsBalance) & {
212
+ clearCache: () => void;
213
+ resultsCount: () => number;
214
+ resetResultsCount: () => void;
215
+ };
216
+ lastResult: () => AllWalletsBalance;
217
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
218
+ recomputations: () => number;
219
+ resetRecomputations: () => void;
220
+ dependencyRecomputations: () => number;
221
+ resetDependencyRecomputations: () => void;
222
+ } & {
223
+ argsMemoize: typeof import("reselect").weakMapMemoize;
224
+ memoize: typeof import("reselect").weakMapMemoize;
225
+ };
226
+ selectBalanceForSelectedAccountGroup: () => ((state: RootState) => AccountGroupBalance | null) & {
227
+ clearCache: () => void;
228
+ resultsCount: () => number;
229
+ resetResultsCount: () => void;
230
+ } & {
231
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance | null;
232
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance | null) & {
233
+ clearCache: () => void;
234
+ resultsCount: () => number;
235
+ resetResultsCount: () => void;
236
+ };
237
+ lastResult: () => AccountGroupBalance | null;
238
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
239
+ recomputations: () => number;
240
+ resetRecomputations: () => void;
241
+ dependencyRecomputations: () => number;
242
+ resetDependencyRecomputations: () => void;
243
+ } & {
244
+ argsMemoize: typeof import("reselect").weakMapMemoize;
245
+ memoize: typeof import("reselect").weakMapMemoize;
246
+ };
247
+ };
248
+ //# sourceMappingURL=balanceSelectors.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"balanceSelectors.d.cts","sourceRoot":"","sources":["../../src/selectors/balanceSelectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,0CAA0C;AAGpF,OAAO,KAAK,EAAE,uBAAuB,EAAE,sCAAsC;AAC7E,OAAO,KAAK,EAAE,eAAe,EAAE,8BAA8B;AAM7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,sCAAkC;AACnE,OAAO,KAAK,EAAE,oCAAoC,EAAE,qDAA2C;AAC/F,OAAO,KAAK,EAAE,iCAAiC,EAAE,kDAAwC;AACzF,OAAO,KAAK,EAAE,4BAA4B,EAAE,uCAAmC;AAC/E,OAAO,KAAK,EAAE,yBAAyB,EAAE,oCAAgC;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,gCAA4B;AAEjE;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB,uBAAuB,EAAE,4BAA4B,CAAC;IACtD,sBAAsB,EAAE,iBAAiB,CAAC;IAC1C,oBAAoB,EAAE,yBAAyB,CAAC;IAChD,+BAA+B,EAAE,oCAAoC,CAAC;IACtE,4BAA4B,EAAE,iCAAiC,CAAC;IAChE,gBAAgB,EAAE,qBAAqB,CAAC;IACxC,kBAAkB,EAAE,uBAAuB,CAAC;IAC5C,qBAAqB,EAAE,0BAA0B,CAAC;CACnD,CAAC;AAuCF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,YAAa,MAAM;;;;;;;;;;;;2BAG7C,SAAS,yCACT,S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EG;AACH,eAAO,MAAM,gBAAgB;2CAvWwB,MAAM;;;;;;;;;;;;+BAG7C,SAAS,yCACT,SAAS,sCACT,SAAS,2CACT,SAAS,wCACT,SAAS,mDACT,SAAS,gDACT,SAAS,oCACT,SAAS;;;;;;;;;sCA2KyB,eAAe;;;;;;;;;;;;+BAGjD,SAAS,yCACT,SAAS,sCACT,SAAS,2CACT,SAAS,wCACT,SAAS,mDACT,SAAS,gDACT,SAAS,oCACT,SAAS;;;;;;;;;;;;;;;;;;;;;+BA8DT,SAAS,yCACT,SAAS,sCACT,SAAS,2CACT,SAAS,wCACT,SAAS,mDACT,SAAS,gDACT,SAAS,oCACT,SAAS;;;;;;;;;;;;;;;;;;;;;+BAoDT,SAAS,yCACT,SAAS,sCACT,SAAS,2CACT,SAAS,wCACT,SAAS,mDACT,SAAS,gDACT,SAAS,oCACT,SAAS;;;;;;;;;CA6CtB,CAAC"}
@@ -0,0 +1,248 @@
1
+ import type { AccountTreeControllerState } from "@metamask/account-tree-controller";
2
+ import type { AccountsControllerState } from "@metamask/accounts-controller";
3
+ import type { EntropySourceId } from "@metamask/keyring-api";
4
+ import type { CurrencyRateState } from "../CurrencyRateController.mjs";
5
+ import type { MultichainAssetsRatesControllerState } from "../MultichainAssetsRatesController/index.mjs";
6
+ import type { MultichainBalancesControllerState } from "../MultichainBalancesController/index.mjs";
7
+ import type { TokenBalancesControllerState } from "../TokenBalancesController.mjs";
8
+ import type { TokenRatesControllerState } from "../TokenRatesController.mjs";
9
+ import type { TokensControllerState } from "../TokensController.mjs";
10
+ /**
11
+ * Root state type for all controllers used in selectors
12
+ */
13
+ export type RootState = {
14
+ TokenBalancesController: TokenBalancesControllerState;
15
+ CurrencyRateController: CurrencyRateState;
16
+ TokenRatesController: TokenRatesControllerState;
17
+ MultichainAssetsRatesController: MultichainAssetsRatesControllerState;
18
+ MultichainBalancesController: MultichainBalancesControllerState;
19
+ TokensController: TokensControllerState;
20
+ AccountsController: AccountsControllerState;
21
+ AccountTreeController: AccountTreeControllerState;
22
+ };
23
+ /**
24
+ * Selector to get aggregated balances for a specific account group.
25
+ * Returns total balance in user's selected currency, aggregating all tokens across accounts in the group.
26
+ *
27
+ * @param groupId - The account group ID (format: "walletId/groupIndex", e.g., "entropy:entropy-source-1/0")
28
+ * @returns Aggregated balance for the account group
29
+ */
30
+ export declare const selectBalanceByAccountGroup: (groupId: string) => ((state: RootState) => AccountGroupBalance) & {
31
+ clearCache: () => void;
32
+ resultsCount: () => number;
33
+ resetResultsCount: () => void;
34
+ } & {
35
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance;
36
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance) & {
37
+ clearCache: () => void;
38
+ resultsCount: () => number;
39
+ resetResultsCount: () => void;
40
+ };
41
+ lastResult: () => AccountGroupBalance;
42
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
43
+ recomputations: () => number;
44
+ resetRecomputations: () => void;
45
+ dependencyRecomputations: () => number;
46
+ resetDependencyRecomputations: () => void;
47
+ } & {
48
+ argsMemoize: typeof import("reselect").weakMapMemoize;
49
+ memoize: typeof import("reselect").weakMapMemoize;
50
+ };
51
+ /**
52
+ * Aggregated balance for an account group
53
+ */
54
+ export type AccountGroupBalance = {
55
+ walletId: string;
56
+ groupId: string;
57
+ totalBalanceInUserCurrency: number;
58
+ userCurrency: string;
59
+ };
60
+ /**
61
+ * Aggregated balance for a wallet (all groups)
62
+ */
63
+ export type WalletBalance = {
64
+ walletId: string;
65
+ groups: Record<string, AccountGroupBalance>;
66
+ totalBalanceInUserCurrency: number;
67
+ userCurrency: string;
68
+ };
69
+ /**
70
+ * Aggregated balance for all wallets
71
+ */
72
+ export type AllWalletsBalance = {
73
+ wallets: Record<string, WalletBalance>;
74
+ totalBalanceInUserCurrency: number;
75
+ userCurrency: string;
76
+ };
77
+ /**
78
+ * Selector to get aggregated balances for all account groups in a wallet.
79
+ * Returns total balance in user's selected currency, aggregating all tokens across all groups in the wallet.
80
+ *
81
+ * @param walletId - The wallet ID (entropy source)
82
+ * @returns Aggregated balance for all groups in the wallet
83
+ */
84
+ export declare const selectBalanceByWallet: (walletId: EntropySourceId) => ((state: RootState) => WalletBalance) & {
85
+ clearCache: () => void;
86
+ resultsCount: () => number;
87
+ resetResultsCount: () => void;
88
+ } & {
89
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => WalletBalance;
90
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => WalletBalance) & {
91
+ clearCache: () => void;
92
+ resultsCount: () => number;
93
+ resetResultsCount: () => void;
94
+ };
95
+ lastResult: () => WalletBalance;
96
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
97
+ recomputations: () => number;
98
+ resetRecomputations: () => void;
99
+ dependencyRecomputations: () => number;
100
+ resetDependencyRecomputations: () => void;
101
+ } & {
102
+ argsMemoize: typeof import("reselect").weakMapMemoize;
103
+ memoize: typeof import("reselect").weakMapMemoize;
104
+ };
105
+ /**
106
+ * Selector to get aggregated balances for all wallets and their account groups.
107
+ * Returns total balance in user's selected currency, aggregating all tokens across all wallets.
108
+ *
109
+ * @returns Aggregated balance for all wallets
110
+ */
111
+ export declare const selectBalanceForAllWallets: () => ((state: RootState) => AllWalletsBalance) & {
112
+ clearCache: () => void;
113
+ resultsCount: () => number;
114
+ resetResultsCount: () => void;
115
+ } & {
116
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AllWalletsBalance;
117
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AllWalletsBalance) & {
118
+ clearCache: () => void;
119
+ resultsCount: () => number;
120
+ resetResultsCount: () => void;
121
+ };
122
+ lastResult: () => AllWalletsBalance;
123
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
124
+ recomputations: () => number;
125
+ resetRecomputations: () => void;
126
+ dependencyRecomputations: () => number;
127
+ resetDependencyRecomputations: () => void;
128
+ } & {
129
+ argsMemoize: typeof import("reselect").weakMapMemoize;
130
+ memoize: typeof import("reselect").weakMapMemoize;
131
+ };
132
+ /**
133
+ * Selector to get aggregated balances for the currently selected account group.
134
+ * Returns total balance in user's selected currency, aggregating all tokens in the selected group.
135
+ *
136
+ * @returns Aggregated balance for the currently selected group
137
+ */
138
+ export declare const selectBalanceForSelectedAccountGroup: () => ((state: RootState) => AccountGroupBalance | null) & {
139
+ clearCache: () => void;
140
+ resultsCount: () => number;
141
+ resetResultsCount: () => void;
142
+ } & {
143
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance | null;
144
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance | null) & {
145
+ clearCache: () => void;
146
+ resultsCount: () => number;
147
+ resetResultsCount: () => void;
148
+ };
149
+ lastResult: () => AccountGroupBalance | null;
150
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
151
+ recomputations: () => number;
152
+ resetRecomputations: () => void;
153
+ dependencyRecomputations: () => number;
154
+ resetDependencyRecomputations: () => void;
155
+ } & {
156
+ argsMemoize: typeof import("reselect").weakMapMemoize;
157
+ memoize: typeof import("reselect").weakMapMemoize;
158
+ };
159
+ /**
160
+ * Collection of balance-related selectors for assets controllers
161
+ */
162
+ export declare const balanceSelectors: {
163
+ selectBalanceByAccountGroup: (groupId: string) => ((state: RootState) => AccountGroupBalance) & {
164
+ clearCache: () => void;
165
+ resultsCount: () => number;
166
+ resetResultsCount: () => void;
167
+ } & {
168
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance;
169
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance) & {
170
+ clearCache: () => void;
171
+ resultsCount: () => number;
172
+ resetResultsCount: () => void;
173
+ };
174
+ lastResult: () => AccountGroupBalance;
175
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
176
+ recomputations: () => number;
177
+ resetRecomputations: () => void;
178
+ dependencyRecomputations: () => number;
179
+ resetDependencyRecomputations: () => void;
180
+ } & {
181
+ argsMemoize: typeof import("reselect").weakMapMemoize;
182
+ memoize: typeof import("reselect").weakMapMemoize;
183
+ };
184
+ selectBalanceByWallet: (walletId: EntropySourceId) => ((state: RootState) => WalletBalance) & {
185
+ clearCache: () => void;
186
+ resultsCount: () => number;
187
+ resetResultsCount: () => void;
188
+ } & {
189
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => WalletBalance;
190
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => WalletBalance) & {
191
+ clearCache: () => void;
192
+ resultsCount: () => number;
193
+ resetResultsCount: () => void;
194
+ };
195
+ lastResult: () => WalletBalance;
196
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
197
+ recomputations: () => number;
198
+ resetRecomputations: () => void;
199
+ dependencyRecomputations: () => number;
200
+ resetDependencyRecomputations: () => void;
201
+ } & {
202
+ argsMemoize: typeof import("reselect").weakMapMemoize;
203
+ memoize: typeof import("reselect").weakMapMemoize;
204
+ };
205
+ selectBalanceForAllWallets: () => ((state: RootState) => AllWalletsBalance) & {
206
+ clearCache: () => void;
207
+ resultsCount: () => number;
208
+ resetResultsCount: () => void;
209
+ } & {
210
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AllWalletsBalance;
211
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AllWalletsBalance) & {
212
+ clearCache: () => void;
213
+ resultsCount: () => number;
214
+ resetResultsCount: () => void;
215
+ };
216
+ lastResult: () => AllWalletsBalance;
217
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
218
+ recomputations: () => number;
219
+ resetRecomputations: () => void;
220
+ dependencyRecomputations: () => number;
221
+ resetDependencyRecomputations: () => void;
222
+ } & {
223
+ argsMemoize: typeof import("reselect").weakMapMemoize;
224
+ memoize: typeof import("reselect").weakMapMemoize;
225
+ };
226
+ selectBalanceForSelectedAccountGroup: () => ((state: RootState) => AccountGroupBalance | null) & {
227
+ clearCache: () => void;
228
+ resultsCount: () => number;
229
+ resetResultsCount: () => void;
230
+ } & {
231
+ resultFunc: (resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance | null;
232
+ memoizedResultFunc: ((resultFuncArgs_0: AccountTreeControllerState, resultFuncArgs_1: AccountsControllerState, resultFuncArgs_2: TokenBalancesControllerState, resultFuncArgs_3: TokenRatesControllerState, resultFuncArgs_4: MultichainAssetsRatesControllerState, resultFuncArgs_5: MultichainBalancesControllerState, resultFuncArgs_6: TokensControllerState, resultFuncArgs_7: CurrencyRateState) => AccountGroupBalance | null) & {
233
+ clearCache: () => void;
234
+ resultsCount: () => number;
235
+ resetResultsCount: () => void;
236
+ };
237
+ lastResult: () => AccountGroupBalance | null;
238
+ dependencies: [(state: RootState) => AccountTreeControllerState, (state: RootState) => AccountsControllerState, (state: RootState) => TokenBalancesControllerState, (state: RootState) => TokenRatesControllerState, (state: RootState) => MultichainAssetsRatesControllerState, (state: RootState) => MultichainBalancesControllerState, (state: RootState) => TokensControllerState, (state: RootState) => CurrencyRateState];
239
+ recomputations: () => number;
240
+ resetRecomputations: () => void;
241
+ dependencyRecomputations: () => number;
242
+ resetDependencyRecomputations: () => void;
243
+ } & {
244
+ argsMemoize: typeof import("reselect").weakMapMemoize;
245
+ memoize: typeof import("reselect").weakMapMemoize;
246
+ };
247
+ };
248
+ //# sourceMappingURL=balanceSelectors.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"balanceSelectors.d.mts","sourceRoot":"","sources":["../../src/selectors/balanceSelectors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,0CAA0C;AAGpF,OAAO,KAAK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