@metamask/assets-controllers 94.1.0 → 95.0.0

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 (68) hide show
  1. package/CHANGELOG.md +36 -1
  2. package/dist/AccountTrackerController.cjs +25 -10
  3. package/dist/AccountTrackerController.cjs.map +1 -1
  4. package/dist/AccountTrackerController.d.cts +12 -5
  5. package/dist/AccountTrackerController.d.cts.map +1 -1
  6. package/dist/AccountTrackerController.d.mts +12 -5
  7. package/dist/AccountTrackerController.d.mts.map +1 -1
  8. package/dist/AccountTrackerController.mjs +25 -10
  9. package/dist/AccountTrackerController.mjs.map +1 -1
  10. package/dist/CurrencyRateController.d.cts +2 -2
  11. package/dist/CurrencyRateController.d.mts +2 -2
  12. package/dist/DeFiPositionsController/DeFiPositionsController.d.cts +2 -2
  13. package/dist/DeFiPositionsController/DeFiPositionsController.d.mts +2 -2
  14. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.cjs +8 -2
  15. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.cjs.map +1 -1
  16. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.d.cts +2 -2
  17. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.d.cts.map +1 -1
  18. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.d.mts +2 -2
  19. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.d.mts.map +1 -1
  20. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.mjs +8 -2
  21. package/dist/MultichainAssetsRatesController/MultichainAssetsRatesController.mjs.map +1 -1
  22. package/dist/TokenBalancesController.d.cts +2 -2
  23. package/dist/TokenBalancesController.d.mts +2 -2
  24. package/dist/TokenDetectionController.d.cts +2 -2
  25. package/dist/TokenDetectionController.d.mts +2 -2
  26. package/dist/TokenListController.d.cts +2 -2
  27. package/dist/TokenListController.d.mts +2 -2
  28. package/dist/TokenRatesController.d.cts +2 -2
  29. package/dist/TokenRatesController.d.mts +2 -2
  30. package/dist/index.cjs +2 -1
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +2 -2
  33. package/dist/index.d.cts.map +1 -1
  34. package/dist/index.d.mts +2 -2
  35. package/dist/index.d.mts.map +1 -1
  36. package/dist/index.mjs +1 -1
  37. package/dist/index.mjs.map +1 -1
  38. package/dist/multicall.cjs +5 -0
  39. package/dist/multicall.cjs.map +1 -1
  40. package/dist/multicall.d.cts.map +1 -1
  41. package/dist/multicall.d.mts.map +1 -1
  42. package/dist/multicall.mjs +5 -0
  43. package/dist/multicall.mjs.map +1 -1
  44. package/dist/selectors/token-selectors.cjs +3 -3
  45. package/dist/selectors/token-selectors.cjs.map +1 -1
  46. package/dist/selectors/token-selectors.d.cts +711 -0
  47. package/dist/selectors/token-selectors.d.cts.map +1 -1
  48. package/dist/selectors/token-selectors.d.mts +711 -0
  49. package/dist/selectors/token-selectors.d.mts.map +1 -1
  50. package/dist/selectors/token-selectors.mjs +1 -1
  51. package/dist/selectors/token-selectors.mjs.map +1 -1
  52. package/dist/token-prices-service/codefi-v2.cjs +77 -101
  53. package/dist/token-prices-service/codefi-v2.cjs.map +1 -1
  54. package/dist/token-prices-service/codefi-v2.d.cts +39 -26
  55. package/dist/token-prices-service/codefi-v2.d.cts.map +1 -1
  56. package/dist/token-prices-service/codefi-v2.d.mts +39 -26
  57. package/dist/token-prices-service/codefi-v2.d.mts.map +1 -1
  58. package/dist/token-prices-service/codefi-v2.mjs +77 -101
  59. package/dist/token-prices-service/codefi-v2.mjs.map +1 -1
  60. package/dist/token-service.cjs +33 -12
  61. package/dist/token-service.cjs.map +1 -1
  62. package/dist/token-service.d.cts +37 -9
  63. package/dist/token-service.d.cts.map +1 -1
  64. package/dist/token-service.d.mts +37 -9
  65. package/dist/token-service.d.mts.map +1 -1
  66. package/dist/token-service.mjs +33 -12
  67. package/dist/token-service.mjs.map +1 -1
  68. package/package.json +10 -10
@@ -74,6 +74,717 @@ export type AssetListState = {
74
74
  balance: Hex | null;
75
75
  }>>;
76
76
  };
77
+ export declare const selectAllAssets: ((state: AssetListState) => AssetsByAccountGroup) & {
78
+ clearCache: () => void;
79
+ resultsCount: () => number;
80
+ resetResultsCount: () => void;
81
+ } & {
82
+ resultFunc: (resultFuncArgs_0: AssetsByAccountGroup, resultFuncArgs_1: AssetsByAccountGroup, resultFuncArgs_2: AssetsByAccountGroup) => AssetsByAccountGroup;
83
+ memoizedResultFunc: ((resultFuncArgs_0: AssetsByAccountGroup, resultFuncArgs_1: AssetsByAccountGroup, resultFuncArgs_2: AssetsByAccountGroup) => AssetsByAccountGroup) & {
84
+ clearCache: () => void;
85
+ resultsCount: () => number;
86
+ resetResultsCount: () => void;
87
+ };
88
+ lastResult: () => AssetsByAccountGroup;
89
+ dependencies: [((state: AssetListState) => AssetsByAccountGroup) & {
90
+ clearCache: () => void;
91
+ resultsCount: () => number;
92
+ resetResultsCount: () => void;
93
+ } & {
94
+ resultFunc: (resultFuncArgs_0: Record<string, {
95
+ accountGroupId: AccountGroupId;
96
+ type: InternalAccount['type'];
97
+ accountId: string;
98
+ }>, resultFuncArgs_1: {
99
+ [chainId: `0x${string}`]: {
100
+ [key: string]: Token[];
101
+ };
102
+ }, resultFuncArgs_2: {
103
+ [chainId: `0x${string}`]: {
104
+ [key: string]: string[];
105
+ };
106
+ }, resultFuncArgs_3: import("../TokenBalancesController.mjs").TokenBalances, resultFuncArgs_4: Record<`0x${string}`, Record<`0x${string}`, import("../TokenRatesController.mjs").MarketDataDetails>>, resultFuncArgs_5: Record<string, {
107
+ conversionDate: number | null;
108
+ conversionRate: number | null;
109
+ usdConversionRate: number | null;
110
+ }>, resultFuncArgs_6: string) => AssetsByAccountGroup;
111
+ memoizedResultFunc: ((resultFuncArgs_0: Record<string, {
112
+ accountGroupId: AccountGroupId;
113
+ type: InternalAccount['type'];
114
+ accountId: string;
115
+ }>, resultFuncArgs_1: {
116
+ [chainId: `0x${string}`]: {
117
+ [key: string]: Token[];
118
+ };
119
+ }, resultFuncArgs_2: {
120
+ [chainId: `0x${string}`]: {
121
+ [key: string]: string[];
122
+ };
123
+ }, resultFuncArgs_3: import("../TokenBalancesController.mjs").TokenBalances, resultFuncArgs_4: Record<`0x${string}`, Record<`0x${string}`, import("../TokenRatesController.mjs").MarketDataDetails>>, resultFuncArgs_5: Record<string, {
124
+ conversionDate: number | null;
125
+ conversionRate: number | null;
126
+ usdConversionRate: number | null;
127
+ }>, resultFuncArgs_6: string) => AssetsByAccountGroup) & {
128
+ clearCache: () => void;
129
+ resultsCount: () => number;
130
+ resetResultsCount: () => void;
131
+ };
132
+ lastResult: () => AssetsByAccountGroup;
133
+ dependencies: [((state: AssetListState) => Record<string, {
134
+ accountGroupId: AccountGroupId;
135
+ type: InternalAccount['type'];
136
+ accountId: string;
137
+ }>) & {
138
+ clearCache: () => void;
139
+ resultsCount: () => number;
140
+ resetResultsCount: () => void;
141
+ } & {
142
+ resultFunc: (resultFuncArgs_0: {
143
+ wallets: {
144
+ [walletId: `entropy:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
145
+ [walletId: `keyring:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
146
+ [walletId: `snap:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
147
+ };
148
+ selectedAccountGroup: "" | `entropy:${string}/${string}` | `keyring:${string}/${string}` | `snap:${string}/${string}`;
149
+ }, resultFuncArgs_1: {
150
+ accounts: Record<string, {
151
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
152
+ id: string;
153
+ options: Record<string, import("@metamask/utils").Json> & {
154
+ entropy?: {
155
+ type: "mnemonic";
156
+ id: string;
157
+ derivationPath: string;
158
+ groupIndex: number;
159
+ } | {
160
+ type: "private-key";
161
+ } | undefined;
162
+ exportable?: boolean | undefined;
163
+ };
164
+ metadata: {
165
+ name: string;
166
+ importTime: number;
167
+ keyring: {
168
+ type: string;
169
+ };
170
+ nameLastUpdatedAt?: number | undefined;
171
+ snap?: {
172
+ name: string;
173
+ id: string;
174
+ enabled: boolean;
175
+ } | undefined;
176
+ lastSelected?: number | undefined;
177
+ };
178
+ address: string;
179
+ scopes: `${string}:${string}`[];
180
+ methods: string[];
181
+ }>;
182
+ selectedAccount: string;
183
+ }) => Record<string, {
184
+ accountGroupId: AccountGroupId;
185
+ type: InternalAccount['type'];
186
+ accountId: string;
187
+ }>;
188
+ memoizedResultFunc: ((resultFuncArgs_0: {
189
+ wallets: {
190
+ [walletId: `entropy:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
191
+ [walletId: `keyring:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
192
+ [walletId: `snap:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
193
+ };
194
+ selectedAccountGroup: "" | `entropy:${string}/${string}` | `keyring:${string}/${string}` | `snap:${string}/${string}`;
195
+ }, resultFuncArgs_1: {
196
+ accounts: Record<string, {
197
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
198
+ id: string;
199
+ options: Record<string, import("@metamask/utils").Json> & {
200
+ entropy?: {
201
+ type: "mnemonic";
202
+ id: string;
203
+ derivationPath: string;
204
+ groupIndex: number;
205
+ } | {
206
+ type: "private-key";
207
+ } | undefined;
208
+ exportable?: boolean | undefined;
209
+ };
210
+ metadata: {
211
+ name: string;
212
+ importTime: number;
213
+ keyring: {
214
+ type: string;
215
+ };
216
+ nameLastUpdatedAt?: number | undefined;
217
+ snap?: {
218
+ name: string;
219
+ id: string;
220
+ enabled: boolean;
221
+ } | undefined;
222
+ lastSelected?: number | undefined;
223
+ };
224
+ address: string;
225
+ scopes: `${string}:${string}`[];
226
+ methods: string[];
227
+ }>;
228
+ selectedAccount: string;
229
+ }) => Record<string, {
230
+ accountGroupId: AccountGroupId;
231
+ type: InternalAccount['type'];
232
+ accountId: string;
233
+ }>) & {
234
+ clearCache: () => void;
235
+ resultsCount: () => number;
236
+ resetResultsCount: () => void;
237
+ };
238
+ lastResult: () => Record<string, {
239
+ accountGroupId: AccountGroupId;
240
+ type: InternalAccount['type'];
241
+ accountId: string;
242
+ }>;
243
+ dependencies: [(state: AssetListState) => {
244
+ wallets: {
245
+ [walletId: `entropy:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
246
+ [walletId: `keyring:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
247
+ [walletId: `snap:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
248
+ };
249
+ selectedAccountGroup: "" | `entropy:${string}/${string}` | `keyring:${string}/${string}` | `snap:${string}/${string}`;
250
+ }, (state: AssetListState) => {
251
+ accounts: Record<string, {
252
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
253
+ id: string;
254
+ options: Record<string, import("@metamask/utils").Json> & {
255
+ entropy?: {
256
+ type: "mnemonic";
257
+ id: string;
258
+ derivationPath: string;
259
+ groupIndex: number;
260
+ } | {
261
+ type: "private-key";
262
+ } | undefined;
263
+ exportable?: boolean | undefined;
264
+ };
265
+ metadata: {
266
+ name: string;
267
+ importTime: number;
268
+ keyring: {
269
+ type: string;
270
+ };
271
+ nameLastUpdatedAt?: number | undefined;
272
+ snap?: {
273
+ name: string;
274
+ id: string;
275
+ enabled: boolean;
276
+ } | undefined;
277
+ lastSelected?: number | undefined;
278
+ };
279
+ address: string;
280
+ scopes: `${string}:${string}`[];
281
+ methods: string[];
282
+ }>;
283
+ selectedAccount: string;
284
+ }];
285
+ recomputations: () => number;
286
+ resetRecomputations: () => void;
287
+ dependencyRecomputations: () => number;
288
+ resetDependencyRecomputations: () => void;
289
+ } & {
290
+ memoize: typeof weakMapMemoize;
291
+ argsMemoize: typeof weakMapMemoize;
292
+ }, (state: AssetListState) => {
293
+ [chainId: `0x${string}`]: {
294
+ [key: string]: Token[];
295
+ };
296
+ }, (state: AssetListState) => {
297
+ [chainId: `0x${string}`]: {
298
+ [key: string]: string[];
299
+ };
300
+ }, (state: AssetListState) => import("../TokenBalancesController.mjs").TokenBalances, (state: AssetListState) => Record<`0x${string}`, Record<`0x${string}`, import("../TokenRatesController.mjs").MarketDataDetails>>, (state: AssetListState) => Record<string, {
301
+ conversionDate: number | null;
302
+ conversionRate: number | null;
303
+ usdConversionRate: number | null;
304
+ }>, (state: AssetListState) => string];
305
+ recomputations: () => number;
306
+ resetRecomputations: () => void;
307
+ dependencyRecomputations: () => number;
308
+ resetDependencyRecomputations: () => void;
309
+ } & {
310
+ memoize: typeof weakMapMemoize;
311
+ argsMemoize: typeof weakMapMemoize;
312
+ }, ((state: AssetListState) => AssetsByAccountGroup) & {
313
+ clearCache: () => void;
314
+ resultsCount: () => number;
315
+ resetResultsCount: () => void;
316
+ } & {
317
+ resultFunc: (resultFuncArgs_0: Record<string, {
318
+ accountGroupId: AccountGroupId;
319
+ type: InternalAccount['type'];
320
+ accountId: string;
321
+ }>, resultFuncArgs_1: {
322
+ [account: string]: `${string}:${string}/${string}:${string}`[];
323
+ }, resultFuncArgs_2: {
324
+ [account: string]: `${string}:${string}/${string}:${string}`[];
325
+ }, resultFuncArgs_3: {
326
+ [asset: `${string}:${string}/${string}:${string}`]: {
327
+ fungible: true;
328
+ iconUrl: string;
329
+ units: {
330
+ decimals: number;
331
+ symbol?: string | undefined;
332
+ name?: string | undefined;
333
+ }[];
334
+ symbol?: string | undefined;
335
+ name?: string | undefined;
336
+ };
337
+ }, resultFuncArgs_4: {
338
+ [account: string]: {
339
+ [asset: string]: {
340
+ amount: string;
341
+ unit: string;
342
+ };
343
+ };
344
+ }, resultFuncArgs_5: Record<`${string}:${string}/${string}:${string}`, import("@metamask/snaps-sdk").AssetConversion & {
345
+ marketData?: import("@metamask/snaps-sdk").FungibleAssetMarketData | undefined;
346
+ }>, resultFuncArgs_6: string) => AssetsByAccountGroup;
347
+ memoizedResultFunc: ((resultFuncArgs_0: Record<string, {
348
+ accountGroupId: AccountGroupId;
349
+ type: InternalAccount['type'];
350
+ accountId: string;
351
+ }>, resultFuncArgs_1: {
352
+ [account: string]: `${string}:${string}/${string}:${string}`[];
353
+ }, resultFuncArgs_2: {
354
+ [account: string]: `${string}:${string}/${string}:${string}`[];
355
+ }, resultFuncArgs_3: {
356
+ [asset: `${string}:${string}/${string}:${string}`]: {
357
+ fungible: true;
358
+ iconUrl: string;
359
+ units: {
360
+ decimals: number;
361
+ symbol?: string | undefined;
362
+ name?: string | undefined;
363
+ }[];
364
+ symbol?: string | undefined;
365
+ name?: string | undefined;
366
+ };
367
+ }, resultFuncArgs_4: {
368
+ [account: string]: {
369
+ [asset: string]: {
370
+ amount: string;
371
+ unit: string;
372
+ };
373
+ };
374
+ }, resultFuncArgs_5: Record<`${string}:${string}/${string}:${string}`, import("@metamask/snaps-sdk").AssetConversion & {
375
+ marketData?: import("@metamask/snaps-sdk").FungibleAssetMarketData | undefined;
376
+ }>, resultFuncArgs_6: string) => AssetsByAccountGroup) & {
377
+ clearCache: () => void;
378
+ resultsCount: () => number;
379
+ resetResultsCount: () => void;
380
+ };
381
+ lastResult: () => AssetsByAccountGroup;
382
+ dependencies: [((state: AssetListState) => Record<string, {
383
+ accountGroupId: AccountGroupId;
384
+ type: InternalAccount['type'];
385
+ accountId: string;
386
+ }>) & {
387
+ clearCache: () => void;
388
+ resultsCount: () => number;
389
+ resetResultsCount: () => void;
390
+ } & {
391
+ resultFunc: (resultFuncArgs_0: {
392
+ wallets: {
393
+ [walletId: `entropy:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
394
+ [walletId: `keyring:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
395
+ [walletId: `snap:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
396
+ };
397
+ selectedAccountGroup: "" | `entropy:${string}/${string}` | `keyring:${string}/${string}` | `snap:${string}/${string}`;
398
+ }, resultFuncArgs_1: {
399
+ accounts: Record<string, {
400
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
401
+ id: string;
402
+ options: Record<string, import("@metamask/utils").Json> & {
403
+ entropy?: {
404
+ type: "mnemonic";
405
+ id: string;
406
+ derivationPath: string;
407
+ groupIndex: number;
408
+ } | {
409
+ type: "private-key";
410
+ } | undefined;
411
+ exportable?: boolean | undefined;
412
+ };
413
+ metadata: {
414
+ name: string;
415
+ importTime: number;
416
+ keyring: {
417
+ type: string;
418
+ };
419
+ nameLastUpdatedAt?: number | undefined;
420
+ snap?: {
421
+ name: string;
422
+ id: string;
423
+ enabled: boolean;
424
+ } | undefined;
425
+ lastSelected?: number | undefined;
426
+ };
427
+ address: string;
428
+ scopes: `${string}:${string}`[];
429
+ methods: string[];
430
+ }>;
431
+ selectedAccount: string;
432
+ }) => Record<string, {
433
+ accountGroupId: AccountGroupId;
434
+ type: InternalAccount['type'];
435
+ accountId: string;
436
+ }>;
437
+ memoizedResultFunc: ((resultFuncArgs_0: {
438
+ wallets: {
439
+ [walletId: `entropy:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
440
+ [walletId: `keyring:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
441
+ [walletId: `snap:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
442
+ };
443
+ selectedAccountGroup: "" | `entropy:${string}/${string}` | `keyring:${string}/${string}` | `snap:${string}/${string}`;
444
+ }, resultFuncArgs_1: {
445
+ accounts: Record<string, {
446
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
447
+ id: string;
448
+ options: Record<string, import("@metamask/utils").Json> & {
449
+ entropy?: {
450
+ type: "mnemonic";
451
+ id: string;
452
+ derivationPath: string;
453
+ groupIndex: number;
454
+ } | {
455
+ type: "private-key";
456
+ } | undefined;
457
+ exportable?: boolean | undefined;
458
+ };
459
+ metadata: {
460
+ name: string;
461
+ importTime: number;
462
+ keyring: {
463
+ type: string;
464
+ };
465
+ nameLastUpdatedAt?: number | undefined;
466
+ snap?: {
467
+ name: string;
468
+ id: string;
469
+ enabled: boolean;
470
+ } | undefined;
471
+ lastSelected?: number | undefined;
472
+ };
473
+ address: string;
474
+ scopes: `${string}:${string}`[];
475
+ methods: string[];
476
+ }>;
477
+ selectedAccount: string;
478
+ }) => Record<string, {
479
+ accountGroupId: AccountGroupId;
480
+ type: InternalAccount['type'];
481
+ accountId: string;
482
+ }>) & {
483
+ clearCache: () => void;
484
+ resultsCount: () => number;
485
+ resetResultsCount: () => void;
486
+ };
487
+ lastResult: () => Record<string, {
488
+ accountGroupId: AccountGroupId;
489
+ type: InternalAccount['type'];
490
+ accountId: string;
491
+ }>;
492
+ dependencies: [(state: AssetListState) => {
493
+ wallets: {
494
+ [walletId: `entropy:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
495
+ [walletId: `keyring:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
496
+ [walletId: `snap:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
497
+ };
498
+ selectedAccountGroup: "" | `entropy:${string}/${string}` | `keyring:${string}/${string}` | `snap:${string}/${string}`;
499
+ }, (state: AssetListState) => {
500
+ accounts: Record<string, {
501
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
502
+ id: string;
503
+ options: Record<string, import("@metamask/utils").Json> & {
504
+ entropy?: {
505
+ type: "mnemonic";
506
+ id: string;
507
+ derivationPath: string;
508
+ groupIndex: number;
509
+ } | {
510
+ type: "private-key";
511
+ } | undefined;
512
+ exportable?: boolean | undefined;
513
+ };
514
+ metadata: {
515
+ name: string;
516
+ importTime: number;
517
+ keyring: {
518
+ type: string;
519
+ };
520
+ nameLastUpdatedAt?: number | undefined;
521
+ snap?: {
522
+ name: string;
523
+ id: string;
524
+ enabled: boolean;
525
+ } | undefined;
526
+ lastSelected?: number | undefined;
527
+ };
528
+ address: string;
529
+ scopes: `${string}:${string}`[];
530
+ methods: string[];
531
+ }>;
532
+ selectedAccount: string;
533
+ }];
534
+ recomputations: () => number;
535
+ resetRecomputations: () => void;
536
+ dependencyRecomputations: () => number;
537
+ resetDependencyRecomputations: () => void;
538
+ } & {
539
+ memoize: typeof weakMapMemoize;
540
+ argsMemoize: typeof weakMapMemoize;
541
+ }, (state: AssetListState) => {
542
+ [account: string]: `${string}:${string}/${string}:${string}`[];
543
+ }, (state: AssetListState) => {
544
+ [account: string]: `${string}:${string}/${string}:${string}`[];
545
+ }, (state: AssetListState) => {
546
+ [asset: `${string}:${string}/${string}:${string}`]: {
547
+ fungible: true;
548
+ iconUrl: string;
549
+ units: {
550
+ decimals: number;
551
+ symbol?: string | undefined;
552
+ name?: string | undefined;
553
+ }[];
554
+ symbol?: string | undefined;
555
+ name?: string | undefined;
556
+ };
557
+ }, (state: AssetListState) => {
558
+ [account: string]: {
559
+ [asset: string]: {
560
+ amount: string;
561
+ unit: string;
562
+ };
563
+ };
564
+ }, (state: AssetListState) => Record<`${string}:${string}/${string}:${string}`, import("@metamask/snaps-sdk").AssetConversion & {
565
+ marketData?: import("@metamask/snaps-sdk").FungibleAssetMarketData | undefined;
566
+ }>, (state: AssetListState) => string];
567
+ recomputations: () => number;
568
+ resetRecomputations: () => void;
569
+ dependencyRecomputations: () => number;
570
+ resetDependencyRecomputations: () => void;
571
+ } & {
572
+ memoize: typeof weakMapMemoize;
573
+ argsMemoize: typeof weakMapMemoize;
574
+ }, ((state: AssetListState) => AssetsByAccountGroup) & {
575
+ clearCache: () => void;
576
+ resultsCount: () => number;
577
+ resetResultsCount: () => void;
578
+ } & {
579
+ resultFunc: (resultFuncArgs_0: Record<string, {
580
+ accountGroupId: AccountGroupId;
581
+ type: InternalAccount['type'];
582
+ accountId: string;
583
+ }>, resultFuncArgs_1: Record<`0x${string}`, Record<`0x${string}`, {
584
+ balance: Hex | null;
585
+ }>>, resultFuncArgs_2: Record<`0x${string}`, Record<`0x${string}`, import("../TokenRatesController.mjs").MarketDataDetails>>, resultFuncArgs_3: Record<string, {
586
+ conversionDate: number | null;
587
+ conversionRate: number | null;
588
+ usdConversionRate: number | null;
589
+ }>, resultFuncArgs_4: string, resultFuncArgs_5: Record<`0x${string}`, import("@metamask/network-controller").NetworkConfiguration>) => AssetsByAccountGroup;
590
+ memoizedResultFunc: ((resultFuncArgs_0: Record<string, {
591
+ accountGroupId: AccountGroupId;
592
+ type: InternalAccount['type'];
593
+ accountId: string;
594
+ }>, resultFuncArgs_1: Record<`0x${string}`, Record<`0x${string}`, {
595
+ balance: Hex | null;
596
+ }>>, resultFuncArgs_2: Record<`0x${string}`, Record<`0x${string}`, import("../TokenRatesController.mjs").MarketDataDetails>>, resultFuncArgs_3: Record<string, {
597
+ conversionDate: number | null;
598
+ conversionRate: number | null;
599
+ usdConversionRate: number | null;
600
+ }>, resultFuncArgs_4: string, resultFuncArgs_5: Record<`0x${string}`, import("@metamask/network-controller").NetworkConfiguration>) => AssetsByAccountGroup) & {
601
+ clearCache: () => void;
602
+ resultsCount: () => number;
603
+ resetResultsCount: () => void;
604
+ };
605
+ lastResult: () => AssetsByAccountGroup;
606
+ dependencies: [((state: AssetListState) => Record<string, {
607
+ accountGroupId: AccountGroupId;
608
+ type: InternalAccount['type'];
609
+ accountId: string;
610
+ }>) & {
611
+ clearCache: () => void;
612
+ resultsCount: () => number;
613
+ resetResultsCount: () => void;
614
+ } & {
615
+ resultFunc: (resultFuncArgs_0: {
616
+ wallets: {
617
+ [walletId: `entropy:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
618
+ [walletId: `keyring:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
619
+ [walletId: `snap:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
620
+ };
621
+ selectedAccountGroup: "" | `entropy:${string}/${string}` | `keyring:${string}/${string}` | `snap:${string}/${string}`;
622
+ }, resultFuncArgs_1: {
623
+ accounts: Record<string, {
624
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
625
+ id: string;
626
+ options: Record<string, import("@metamask/utils").Json> & {
627
+ entropy?: {
628
+ type: "mnemonic";
629
+ id: string;
630
+ derivationPath: string;
631
+ groupIndex: number;
632
+ } | {
633
+ type: "private-key";
634
+ } | undefined;
635
+ exportable?: boolean | undefined;
636
+ };
637
+ metadata: {
638
+ name: string;
639
+ importTime: number;
640
+ keyring: {
641
+ type: string;
642
+ };
643
+ nameLastUpdatedAt?: number | undefined;
644
+ snap?: {
645
+ name: string;
646
+ id: string;
647
+ enabled: boolean;
648
+ } | undefined;
649
+ lastSelected?: number | undefined;
650
+ };
651
+ address: string;
652
+ scopes: `${string}:${string}`[];
653
+ methods: string[];
654
+ }>;
655
+ selectedAccount: string;
656
+ }) => Record<string, {
657
+ accountGroupId: AccountGroupId;
658
+ type: InternalAccount['type'];
659
+ accountId: string;
660
+ }>;
661
+ memoizedResultFunc: ((resultFuncArgs_0: {
662
+ wallets: {
663
+ [walletId: `entropy:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
664
+ [walletId: `keyring:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
665
+ [walletId: `snap:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
666
+ };
667
+ selectedAccountGroup: "" | `entropy:${string}/${string}` | `keyring:${string}/${string}` | `snap:${string}/${string}`;
668
+ }, resultFuncArgs_1: {
669
+ accounts: Record<string, {
670
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
671
+ id: string;
672
+ options: Record<string, import("@metamask/utils").Json> & {
673
+ entropy?: {
674
+ type: "mnemonic";
675
+ id: string;
676
+ derivationPath: string;
677
+ groupIndex: number;
678
+ } | {
679
+ type: "private-key";
680
+ } | undefined;
681
+ exportable?: boolean | undefined;
682
+ };
683
+ metadata: {
684
+ name: string;
685
+ importTime: number;
686
+ keyring: {
687
+ type: string;
688
+ };
689
+ nameLastUpdatedAt?: number | undefined;
690
+ snap?: {
691
+ name: string;
692
+ id: string;
693
+ enabled: boolean;
694
+ } | undefined;
695
+ lastSelected?: number | undefined;
696
+ };
697
+ address: string;
698
+ scopes: `${string}:${string}`[];
699
+ methods: string[];
700
+ }>;
701
+ selectedAccount: string;
702
+ }) => Record<string, {
703
+ accountGroupId: AccountGroupId;
704
+ type: InternalAccount['type'];
705
+ accountId: string;
706
+ }>) & {
707
+ clearCache: () => void;
708
+ resultsCount: () => number;
709
+ resetResultsCount: () => void;
710
+ };
711
+ lastResult: () => Record<string, {
712
+ accountGroupId: AccountGroupId;
713
+ type: InternalAccount['type'];
714
+ accountId: string;
715
+ }>;
716
+ dependencies: [(state: AssetListState) => {
717
+ wallets: {
718
+ [walletId: `entropy:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
719
+ [walletId: `keyring:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
720
+ [walletId: `snap:${string}`]: import("../../../account-tree-controller/src/wallet.mjs").AccountWalletEntropyObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletSnapObject | import("../../../account-tree-controller/src/wallet.mjs").AccountWalletKeyringObject;
721
+ };
722
+ selectedAccountGroup: "" | `entropy:${string}/${string}` | `keyring:${string}/${string}` | `snap:${string}/${string}`;
723
+ }, (state: AssetListState) => {
724
+ accounts: Record<string, {
725
+ type: "eip155:eoa" | "eip155:erc4337" | "bip122:p2pkh" | "bip122:p2sh" | "bip122:p2wpkh" | "bip122:p2tr" | "solana:data-account" | "tron:eoa" | "any:account";
726
+ id: string;
727
+ options: Record<string, import("@metamask/utils").Json> & {
728
+ entropy?: {
729
+ type: "mnemonic";
730
+ id: string;
731
+ derivationPath: string;
732
+ groupIndex: number;
733
+ } | {
734
+ type: "private-key";
735
+ } | undefined;
736
+ exportable?: boolean | undefined;
737
+ };
738
+ metadata: {
739
+ name: string;
740
+ importTime: number;
741
+ keyring: {
742
+ type: string;
743
+ };
744
+ nameLastUpdatedAt?: number | undefined;
745
+ snap?: {
746
+ name: string;
747
+ id: string;
748
+ enabled: boolean;
749
+ } | undefined;
750
+ lastSelected?: number | undefined;
751
+ };
752
+ address: string;
753
+ scopes: `${string}:${string}`[];
754
+ methods: string[];
755
+ }>;
756
+ selectedAccount: string;
757
+ }];
758
+ recomputations: () => number;
759
+ resetRecomputations: () => void;
760
+ dependencyRecomputations: () => number;
761
+ resetDependencyRecomputations: () => void;
762
+ } & {
763
+ memoize: typeof weakMapMemoize;
764
+ argsMemoize: typeof weakMapMemoize;
765
+ }, (state: AssetListState) => Record<`0x${string}`, Record<`0x${string}`, {
766
+ balance: Hex | null;
767
+ }>>, (state: AssetListState) => Record<`0x${string}`, Record<`0x${string}`, import("../TokenRatesController.mjs").MarketDataDetails>>, (state: AssetListState) => Record<string, {
768
+ conversionDate: number | null;
769
+ conversionRate: number | null;
770
+ usdConversionRate: number | null;
771
+ }>, (state: AssetListState) => string, (state: AssetListState) => Record<`0x${string}`, import("@metamask/network-controller").NetworkConfiguration>];
772
+ recomputations: () => number;
773
+ resetRecomputations: () => void;
774
+ dependencyRecomputations: () => number;
775
+ resetDependencyRecomputations: () => void;
776
+ } & {
777
+ memoize: typeof weakMapMemoize;
778
+ argsMemoize: typeof weakMapMemoize;
779
+ }];
780
+ recomputations: () => number;
781
+ resetRecomputations: () => void;
782
+ dependencyRecomputations: () => number;
783
+ resetDependencyRecomputations: () => void;
784
+ } & {
785
+ memoize: typeof weakMapMemoize;
786
+ argsMemoize: typeof weakMapMemoize;
787
+ };
77
788
  export type SelectAccountGroupAssetOpts = {
78
789
  filterTronStakedTokens: boolean;
79
790
  };