@metamask-previews/bridge-controller 13.0.0-preview-cf47a367 → 13.0.0-preview-4fb8ceeb

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 (70) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/bridge-controller.cjs +56 -4
  3. package/dist/bridge-controller.cjs.map +1 -1
  4. package/dist/bridge-controller.d.cts +1 -1
  5. package/dist/bridge-controller.d.cts.map +1 -1
  6. package/dist/bridge-controller.d.mts +1 -1
  7. package/dist/bridge-controller.d.mts.map +1 -1
  8. package/dist/bridge-controller.mjs +57 -5
  9. package/dist/bridge-controller.mjs.map +1 -1
  10. package/dist/constants/bridge.cjs +1 -0
  11. package/dist/constants/bridge.cjs.map +1 -1
  12. package/dist/constants/bridge.d.cts.map +1 -1
  13. package/dist/constants/bridge.d.mts.map +1 -1
  14. package/dist/constants/bridge.mjs +1 -0
  15. package/dist/constants/bridge.mjs.map +1 -1
  16. package/dist/index.cjs +5 -1
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +2 -1
  19. package/dist/index.d.cts.map +1 -1
  20. package/dist/index.d.mts +2 -1
  21. package/dist/index.d.mts.map +1 -1
  22. package/dist/index.mjs +2 -1
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/selectors.cjs +210 -0
  25. package/dist/selectors.cjs.map +1 -0
  26. package/dist/selectors.d.cts +1332 -0
  27. package/dist/selectors.d.cts.map +1 -0
  28. package/dist/selectors.d.mts +1332 -0
  29. package/dist/selectors.d.mts.map +1 -0
  30. package/dist/selectors.mjs +206 -0
  31. package/dist/selectors.mjs.map +1 -0
  32. package/dist/types.cjs.map +1 -1
  33. package/dist/types.d.cts +35 -9
  34. package/dist/types.d.cts.map +1 -1
  35. package/dist/types.d.mts +35 -9
  36. package/dist/types.d.mts.map +1 -1
  37. package/dist/types.mjs.map +1 -1
  38. package/dist/utils/assets.cjs +28 -0
  39. package/dist/utils/assets.cjs.map +1 -0
  40. package/dist/utils/assets.d.cts +9 -0
  41. package/dist/utils/assets.d.cts.map +1 -0
  42. package/dist/utils/assets.d.mts +9 -0
  43. package/dist/utils/assets.d.mts.map +1 -0
  44. package/dist/utils/assets.mjs +23 -0
  45. package/dist/utils/assets.mjs.map +1 -0
  46. package/dist/utils/caip-formatters.cjs +25 -1
  47. package/dist/utils/caip-formatters.cjs.map +1 -1
  48. package/dist/utils/caip-formatters.d.cts +10 -0
  49. package/dist/utils/caip-formatters.d.cts.map +1 -1
  50. package/dist/utils/caip-formatters.d.mts +10 -0
  51. package/dist/utils/caip-formatters.d.mts.map +1 -1
  52. package/dist/utils/caip-formatters.mjs +25 -2
  53. package/dist/utils/caip-formatters.mjs.map +1 -1
  54. package/dist/utils/fetch.cjs +61 -1
  55. package/dist/utils/fetch.cjs.map +1 -1
  56. package/dist/utils/fetch.d.cts +21 -1
  57. package/dist/utils/fetch.d.cts.map +1 -1
  58. package/dist/utils/fetch.d.mts +21 -1
  59. package/dist/utils/fetch.d.mts.map +1 -1
  60. package/dist/utils/fetch.mjs +59 -0
  61. package/dist/utils/fetch.mjs.map +1 -1
  62. package/dist/utils/quote.cjs +177 -1
  63. package/dist/utils/quote.cjs.map +1 -1
  64. package/dist/utils/quote.d.cts +62 -1
  65. package/dist/utils/quote.d.cts.map +1 -1
  66. package/dist/utils/quote.d.mts +62 -1
  67. package/dist/utils/quote.d.mts.map +1 -1
  68. package/dist/utils/quote.mjs +164 -0
  69. package/dist/utils/quote.mjs.map +1 -1
  70. package/package.json +8 -3
@@ -0,0 +1,1332 @@
1
+ import type { CurrencyRateState, MultichainAssetsRatesControllerState, TokenRatesControllerState } from "@metamask/assets-controllers";
2
+ import type { BridgeControllerState, BridgeFeatureFlagsKey, ExchangeRate, GenericQuoteRequest, QuoteMetadata, QuoteResponse } from "./types.cjs";
3
+ import { SortOrder } from "./types.cjs";
4
+ /**
5
+ * The controller states that provide exchange rates
6
+ */
7
+ type ExchangeRateControllerState = MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, 'assetExchangeRates'>;
8
+ /**
9
+ * The state of the bridge controller and all its dependency controllers
10
+ */
11
+ export type BridgeAppState = BridgeControllerState & ExchangeRateControllerState & {
12
+ participateInMetaMetrics: boolean;
13
+ };
14
+ /**
15
+ * The merged client transaction and gas controller estimates for gas
16
+ */
17
+ type BridgeFeesPerGas = {
18
+ estimatedBaseFeeInDecGwei: string;
19
+ maxPriorityFeePerGasInDecGwei: string;
20
+ maxFeePerGasInDecGwei: string;
21
+ };
22
+ /**
23
+ * Required parameters that clients must provide for the bridge quotes selector
24
+ */
25
+ type BridgeQuotesClientParams = {
26
+ bridgeFeesPerGas: BridgeFeesPerGas;
27
+ sortOrder: SortOrder;
28
+ selectedQuote: (QuoteResponse & QuoteMetadata) | null;
29
+ featureFlagsKey: BridgeFeatureFlagsKey;
30
+ };
31
+ /**
32
+ * Selects the asset exchange rate for a given chain and address
33
+ *
34
+ * @param state The state of the bridge controller and its dependency controllers
35
+ * @param chainId The chain ID of the asset
36
+ * @param address The address of the asset
37
+ * @returns The asset exchange rate for the given chain and address
38
+ */
39
+ export declare const selectExchangeRateByChainIdAndAddress: (state: BridgeAppState, chainId?: GenericQuoteRequest['srcChainId'], address?: GenericQuoteRequest['srcTokenAddress']) => ExchangeRate;
40
+ /**
41
+ * Checks whether an exchange rate is available for a given chain and address
42
+ *
43
+ * @param params The parameters to pass to {@link getExchangeRateByChainIdAndAddress}
44
+ * @returns Whether an exchange rate is available for the given chain and address
45
+ */
46
+ export declare const selectIsAssetExchangeRateInState: (exchangeRateSources: ExchangeRateControllerState, chainId?: string | number | undefined, address?: string | undefined) => boolean;
47
+ /**
48
+ * Selects sorted cross-chain swap quotes. By default, the quotes are sorted by cost in ascending order.
49
+ *
50
+ * @param state - The state of the bridge controller and its dependency controllers
51
+ * @param bridgeFeesPerGas - The merged client transaction and gas controller estimates for gas
52
+ * @param sortOrder - The sort order of the quotes
53
+ * @param selectedQuote - The quote that is currently selected by the user, should be cleared by clients when the req params change
54
+ * @param featureFlagsKey - The feature flags key for the client (e.g. `BridgeFeatureFlagsKey.EXTENSION_CONFIG`
55
+ * @returns The activeQuote, recommendedQuote, sortedQuotes, and other quote fetching metadata
56
+ *
57
+ * @example
58
+ * ```ts
59
+ * const bridgeFeesPerGas = useSelector(getGasFeeEstimates);
60
+ * const quotes = useSelector(state => selectBridgeQuotes(
61
+ * state.metamask,
62
+ * {
63
+ * bridgeFeesPerGas,
64
+ * sortOrder: state.bridge.sortOrder,
65
+ * selectedQuote: state.bridge.selectedQuote,
66
+ * featureFlagsKey: BridgeFeatureFlagsKey.EXTENSION_CONFIG,
67
+ * }
68
+ * ));
69
+ * ```
70
+ */
71
+ export declare const selectBridgeQuotes: ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
72
+ participateInMetaMetrics: boolean;
73
+ }, params_0: BridgeQuotesClientParams) => {
74
+ sortedQuotes: (QuoteResponse & QuoteMetadata)[];
75
+ recommendedQuote: QuoteResponse & QuoteMetadata;
76
+ activeQuote: QuoteResponse & QuoteMetadata;
77
+ quotesLastFetchedMs: number | null;
78
+ isLoading: boolean;
79
+ quoteFetchError: string | null;
80
+ quotesRefreshCount: number;
81
+ quotesInitialLoadTimeMs: number | null;
82
+ isQuoteGoingToRefresh: boolean;
83
+ isQuoteExpired: boolean;
84
+ }) & {
85
+ clearCache: () => void;
86
+ resultsCount: () => number;
87
+ resetResultsCount: () => void;
88
+ } & {
89
+ resultFunc: (resultFuncArgs_0: string | null, resultFuncArgs_1: number, resultFuncArgs_2: QuoteResponse & QuoteMetadata, resultFuncArgs_3: (QuoteResponse & QuoteMetadata)[], resultFuncArgs_4: QuoteResponse & QuoteMetadata, resultFuncArgs_5: number | null, resultFuncArgs_6: boolean, resultFuncArgs_7: number | null, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean) => {
90
+ sortedQuotes: (QuoteResponse & QuoteMetadata)[];
91
+ recommendedQuote: QuoteResponse & QuoteMetadata;
92
+ activeQuote: QuoteResponse & QuoteMetadata;
93
+ quotesLastFetchedMs: number | null;
94
+ isLoading: boolean;
95
+ quoteFetchError: string | null;
96
+ quotesRefreshCount: number;
97
+ quotesInitialLoadTimeMs: number | null;
98
+ isQuoteGoingToRefresh: boolean;
99
+ isQuoteExpired: boolean;
100
+ };
101
+ memoizedResultFunc: ((resultFuncArgs_0: string | null, resultFuncArgs_1: number, resultFuncArgs_2: QuoteResponse & QuoteMetadata, resultFuncArgs_3: (QuoteResponse & QuoteMetadata)[], resultFuncArgs_4: QuoteResponse & QuoteMetadata, resultFuncArgs_5: number | null, resultFuncArgs_6: boolean, resultFuncArgs_7: number | null, resultFuncArgs_8: boolean, resultFuncArgs_9: boolean) => {
102
+ sortedQuotes: (QuoteResponse & QuoteMetadata)[];
103
+ recommendedQuote: QuoteResponse & QuoteMetadata;
104
+ activeQuote: QuoteResponse & QuoteMetadata;
105
+ quotesLastFetchedMs: number | null;
106
+ isLoading: boolean;
107
+ quoteFetchError: string | null;
108
+ quotesRefreshCount: number;
109
+ quotesInitialLoadTimeMs: number | null;
110
+ isQuoteGoingToRefresh: boolean;
111
+ isQuoteExpired: boolean;
112
+ }) & {
113
+ clearCache: () => void;
114
+ resultsCount: () => number;
115
+ resetResultsCount: () => void;
116
+ };
117
+ lastResult: () => {
118
+ sortedQuotes: (QuoteResponse & QuoteMetadata)[];
119
+ recommendedQuote: QuoteResponse & QuoteMetadata;
120
+ activeQuote: QuoteResponse & QuoteMetadata;
121
+ quotesLastFetchedMs: number | null;
122
+ isLoading: boolean;
123
+ quoteFetchError: string | null;
124
+ quotesRefreshCount: number;
125
+ quotesInitialLoadTimeMs: number | null;
126
+ isQuoteGoingToRefresh: boolean;
127
+ isQuoteExpired: boolean;
128
+ };
129
+ dependencies: [(state: BridgeAppState) => string | null, (state: BridgeAppState) => number, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
130
+ participateInMetaMetrics: boolean;
131
+ }, params_0: BridgeQuotesClientParams) => QuoteResponse & QuoteMetadata) & {
132
+ clearCache: () => void;
133
+ resultsCount: () => number;
134
+ resetResultsCount: () => void;
135
+ } & {
136
+ resultFunc: (resultFuncArgs_0: (QuoteResponse & QuoteMetadata)[]) => QuoteResponse & QuoteMetadata;
137
+ memoizedResultFunc: ((resultFuncArgs_0: (QuoteResponse & QuoteMetadata)[]) => QuoteResponse & QuoteMetadata) & {
138
+ clearCache: () => void;
139
+ resultsCount: () => number;
140
+ resetResultsCount: () => void;
141
+ };
142
+ lastResult: () => QuoteResponse & QuoteMetadata;
143
+ dependencies: [((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
144
+ participateInMetaMetrics: boolean;
145
+ }, params_0: BridgeQuotesClientParams) => (QuoteResponse & QuoteMetadata)[]) & {
146
+ clearCache: () => void;
147
+ resultsCount: () => number;
148
+ resetResultsCount: () => void;
149
+ } & {
150
+ resultFunc: (resultFuncArgs_0: {
151
+ sentAmount: {
152
+ amount: string;
153
+ valueInCurrency: string | null;
154
+ usd: string | null;
155
+ };
156
+ toTokenAmount: {
157
+ amount: string;
158
+ valueInCurrency: string | null;
159
+ usd: string | null;
160
+ };
161
+ swapRate: string;
162
+ totalNetworkFee: {
163
+ amount: string;
164
+ valueInCurrency: string | null;
165
+ usd: string | null;
166
+ };
167
+ totalMaxNetworkFee: {
168
+ amount: string;
169
+ valueInCurrency: string | null;
170
+ usd: string | null;
171
+ };
172
+ gasFee: {
173
+ amount: string;
174
+ valueInCurrency: string | null;
175
+ usd: string | null;
176
+ };
177
+ adjustedReturn: {
178
+ valueInCurrency: string | null;
179
+ usd: string | null;
180
+ };
181
+ cost: {
182
+ valueInCurrency: string | null;
183
+ usd: string | null;
184
+ };
185
+ quote: import("./types.cjs").Quote;
186
+ approval?: import("./types.cjs").TxData | null | undefined;
187
+ trade: import("./types.cjs").TxData;
188
+ estimatedProcessingTimeInSeconds: number;
189
+ l1GasFeesInHexWei?: string | undefined;
190
+ solanaFeesInLamports?: string | undefined;
191
+ }[], resultFuncArgs_1: SortOrder) => (QuoteResponse & QuoteMetadata)[];
192
+ memoizedResultFunc: ((resultFuncArgs_0: {
193
+ sentAmount: {
194
+ amount: string;
195
+ valueInCurrency: string | null;
196
+ usd: string | null;
197
+ };
198
+ toTokenAmount: {
199
+ amount: string;
200
+ valueInCurrency: string | null;
201
+ usd: string | null;
202
+ };
203
+ swapRate: string;
204
+ totalNetworkFee: {
205
+ amount: string;
206
+ valueInCurrency: string | null;
207
+ usd: string | null;
208
+ };
209
+ totalMaxNetworkFee: {
210
+ amount: string;
211
+ valueInCurrency: string | null;
212
+ usd: string | null;
213
+ };
214
+ gasFee: {
215
+ amount: string;
216
+ valueInCurrency: string | null;
217
+ usd: string | null;
218
+ };
219
+ adjustedReturn: {
220
+ valueInCurrency: string | null;
221
+ usd: string | null;
222
+ };
223
+ cost: {
224
+ valueInCurrency: string | null;
225
+ usd: string | null;
226
+ };
227
+ quote: import("./types.cjs").Quote;
228
+ approval?: import("./types.cjs").TxData | null | undefined;
229
+ trade: import("./types.cjs").TxData;
230
+ estimatedProcessingTimeInSeconds: number;
231
+ l1GasFeesInHexWei?: string | undefined;
232
+ solanaFeesInLamports?: string | undefined;
233
+ }[], resultFuncArgs_1: SortOrder) => (QuoteResponse & QuoteMetadata)[]) & {
234
+ clearCache: () => void;
235
+ resultsCount: () => number;
236
+ resetResultsCount: () => void;
237
+ };
238
+ lastResult: () => (QuoteResponse & QuoteMetadata)[];
239
+ dependencies: [((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
240
+ participateInMetaMetrics: boolean;
241
+ }, params_0: BridgeQuotesClientParams) => {
242
+ sentAmount: {
243
+ amount: string;
244
+ valueInCurrency: string | null;
245
+ usd: string | null;
246
+ };
247
+ toTokenAmount: {
248
+ amount: string;
249
+ valueInCurrency: string | null;
250
+ usd: string | null;
251
+ };
252
+ swapRate: string;
253
+ totalNetworkFee: {
254
+ amount: string;
255
+ valueInCurrency: string | null;
256
+ usd: string | null;
257
+ };
258
+ totalMaxNetworkFee: {
259
+ amount: string;
260
+ valueInCurrency: string | null;
261
+ usd: string | null;
262
+ };
263
+ gasFee: {
264
+ amount: string;
265
+ valueInCurrency: string | null;
266
+ usd: string | null;
267
+ };
268
+ adjustedReturn: {
269
+ valueInCurrency: string | null;
270
+ usd: string | null;
271
+ };
272
+ cost: {
273
+ valueInCurrency: string | null;
274
+ usd: string | null;
275
+ };
276
+ quote: import("./types.cjs").Quote;
277
+ approval?: import("./types.cjs").TxData | null | undefined;
278
+ trade: import("./types.cjs").TxData;
279
+ estimatedProcessingTimeInSeconds: number;
280
+ l1GasFeesInHexWei?: string | undefined;
281
+ solanaFeesInLamports?: string | undefined;
282
+ }[]) & {
283
+ clearCache: () => void;
284
+ resultsCount: () => number;
285
+ resetResultsCount: () => void;
286
+ } & {
287
+ resultFunc: (resultFuncArgs_0: (QuoteResponse & import("./types.cjs").L1GasFees & import("./types.cjs").SolanaFees)[], resultFuncArgs_1: BridgeFeesPerGas, resultFuncArgs_2: ExchangeRate, resultFuncArgs_3: ExchangeRate, resultFuncArgs_4: ExchangeRate) => {
288
+ sentAmount: {
289
+ amount: string;
290
+ valueInCurrency: string | null;
291
+ usd: string | null;
292
+ };
293
+ toTokenAmount: {
294
+ amount: string;
295
+ valueInCurrency: string | null;
296
+ usd: string | null;
297
+ };
298
+ swapRate: string;
299
+ totalNetworkFee: {
300
+ amount: string;
301
+ valueInCurrency: string | null;
302
+ usd: string | null;
303
+ };
304
+ totalMaxNetworkFee: {
305
+ amount: string;
306
+ valueInCurrency: string | null;
307
+ usd: string | null;
308
+ };
309
+ gasFee: {
310
+ amount: string;
311
+ valueInCurrency: string | null;
312
+ usd: string | null;
313
+ };
314
+ adjustedReturn: {
315
+ valueInCurrency: string | null;
316
+ usd: string | null;
317
+ };
318
+ cost: {
319
+ valueInCurrency: string | null;
320
+ usd: string | null;
321
+ };
322
+ quote: import("./types.cjs").Quote;
323
+ approval?: import("./types.cjs").TxData | null | undefined;
324
+ trade: import("./types.cjs").TxData;
325
+ estimatedProcessingTimeInSeconds: number;
326
+ l1GasFeesInHexWei?: string | undefined;
327
+ solanaFeesInLamports?: string | undefined;
328
+ }[];
329
+ memoizedResultFunc: ((resultFuncArgs_0: (QuoteResponse & import("./types.cjs").L1GasFees & import("./types.cjs").SolanaFees)[], resultFuncArgs_1: BridgeFeesPerGas, resultFuncArgs_2: ExchangeRate, resultFuncArgs_3: ExchangeRate, resultFuncArgs_4: ExchangeRate) => {
330
+ sentAmount: {
331
+ amount: string;
332
+ valueInCurrency: string | null;
333
+ usd: string | null;
334
+ };
335
+ toTokenAmount: {
336
+ amount: string;
337
+ valueInCurrency: string | null;
338
+ usd: string | null;
339
+ };
340
+ swapRate: string;
341
+ totalNetworkFee: {
342
+ amount: string;
343
+ valueInCurrency: string | null;
344
+ usd: string | null;
345
+ };
346
+ totalMaxNetworkFee: {
347
+ amount: string;
348
+ valueInCurrency: string | null;
349
+ usd: string | null;
350
+ };
351
+ gasFee: {
352
+ amount: string;
353
+ valueInCurrency: string | null;
354
+ usd: string | null;
355
+ };
356
+ adjustedReturn: {
357
+ valueInCurrency: string | null;
358
+ usd: string | null;
359
+ };
360
+ cost: {
361
+ valueInCurrency: string | null;
362
+ usd: string | null;
363
+ };
364
+ quote: import("./types.cjs").Quote;
365
+ approval?: import("./types.cjs").TxData | null | undefined;
366
+ trade: import("./types.cjs").TxData;
367
+ estimatedProcessingTimeInSeconds: number;
368
+ l1GasFeesInHexWei?: string | undefined;
369
+ solanaFeesInLamports?: string | undefined;
370
+ }[]) & {
371
+ clearCache: () => void;
372
+ resultsCount: () => number;
373
+ resetResultsCount: () => void;
374
+ };
375
+ lastResult: () => {
376
+ sentAmount: {
377
+ amount: string;
378
+ valueInCurrency: string | null;
379
+ usd: string | null;
380
+ };
381
+ toTokenAmount: {
382
+ amount: string;
383
+ valueInCurrency: string | null;
384
+ usd: string | null;
385
+ };
386
+ swapRate: string;
387
+ totalNetworkFee: {
388
+ amount: string;
389
+ valueInCurrency: string | null;
390
+ usd: string | null;
391
+ };
392
+ totalMaxNetworkFee: {
393
+ amount: string;
394
+ valueInCurrency: string | null;
395
+ usd: string | null;
396
+ };
397
+ gasFee: {
398
+ amount: string;
399
+ valueInCurrency: string | null;
400
+ usd: string | null;
401
+ };
402
+ adjustedReturn: {
403
+ valueInCurrency: string | null;
404
+ usd: string | null;
405
+ };
406
+ cost: {
407
+ valueInCurrency: string | null;
408
+ usd: string | null;
409
+ };
410
+ quote: import("./types.cjs").Quote;
411
+ approval?: import("./types.cjs").TxData | null | undefined;
412
+ trade: import("./types.cjs").TxData;
413
+ estimatedProcessingTimeInSeconds: number;
414
+ l1GasFeesInHexWei?: string | undefined;
415
+ solanaFeesInLamports?: string | undefined;
416
+ }[];
417
+ dependencies: [({ quotes }: BridgeAppState) => (QuoteResponse & import("./types.cjs").L1GasFees & import("./types.cjs").SolanaFees)[], (_: BridgeAppState, { bridgeFeesPerGas }: BridgeQuotesClientParams) => BridgeFeesPerGas, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
418
+ participateInMetaMetrics: boolean;
419
+ }) => ExchangeRate) & {
420
+ clearCache: () => void;
421
+ resultsCount: () => number;
422
+ resetResultsCount: () => void;
423
+ } & {
424
+ resultFunc: (resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate;
425
+ memoizedResultFunc: ((resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate) & {
426
+ clearCache: () => void;
427
+ resultsCount: () => number;
428
+ resetResultsCount: () => void;
429
+ };
430
+ lastResult: () => ExchangeRate;
431
+ dependencies: [(state: BridgeAppState) => BridgeAppState, ({ quoteRequest: { srcChainId } }: BridgeAppState) => string | number | undefined, ({ quoteRequest: { srcTokenAddress } }: BridgeAppState) => string | undefined];
432
+ recomputations: () => number;
433
+ resetRecomputations: () => void;
434
+ dependencyRecomputations: () => number;
435
+ resetDependencyRecomputations: () => void;
436
+ } & {
437
+ argsMemoize: typeof import("reselect").weakMapMemoize;
438
+ memoize: typeof import("reselect").weakMapMemoize;
439
+ }, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
440
+ participateInMetaMetrics: boolean;
441
+ }) => ExchangeRate) & {
442
+ clearCache: () => void;
443
+ resultsCount: () => number;
444
+ resetResultsCount: () => void;
445
+ } & {
446
+ resultFunc: (resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate;
447
+ memoizedResultFunc: ((resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate) & {
448
+ clearCache: () => void;
449
+ resultsCount: () => number;
450
+ resetResultsCount: () => void;
451
+ };
452
+ lastResult: () => ExchangeRate;
453
+ dependencies: [(state: BridgeAppState) => BridgeAppState, ({ quoteRequest: { destChainId } }: BridgeAppState) => string | number | undefined, ({ quoteRequest: { destTokenAddress } }: BridgeAppState) => string | undefined];
454
+ recomputations: () => number;
455
+ resetRecomputations: () => void;
456
+ dependencyRecomputations: () => number;
457
+ resetDependencyRecomputations: () => void;
458
+ } & {
459
+ argsMemoize: typeof import("reselect").weakMapMemoize;
460
+ memoize: typeof import("reselect").weakMapMemoize;
461
+ }, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
462
+ participateInMetaMetrics: boolean;
463
+ }) => ExchangeRate) & {
464
+ clearCache: () => void;
465
+ resultsCount: () => number;
466
+ resetResultsCount: () => void;
467
+ } & {
468
+ resultFunc: (resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined) => ExchangeRate;
469
+ memoizedResultFunc: ((resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined) => ExchangeRate) & {
470
+ clearCache: () => void;
471
+ resultsCount: () => number;
472
+ resetResultsCount: () => void;
473
+ };
474
+ lastResult: () => ExchangeRate;
475
+ dependencies: [(state: BridgeAppState) => BridgeAppState, ({ quoteRequest: { srcChainId } }: BridgeAppState) => string | number | undefined];
476
+ recomputations: () => number;
477
+ resetRecomputations: () => void;
478
+ dependencyRecomputations: () => number;
479
+ resetDependencyRecomputations: () => void;
480
+ } & {
481
+ argsMemoize: typeof import("reselect").weakMapMemoize;
482
+ memoize: typeof import("reselect").weakMapMemoize;
483
+ }];
484
+ recomputations: () => number;
485
+ resetRecomputations: () => void;
486
+ dependencyRecomputations: () => number;
487
+ resetDependencyRecomputations: () => void;
488
+ } & {
489
+ argsMemoize: typeof import("reselect").weakMapMemoize;
490
+ memoize: typeof import("reselect").weakMapMemoize;
491
+ }, (_: BridgeAppState, { sortOrder }: BridgeQuotesClientParams) => SortOrder];
492
+ recomputations: () => number;
493
+ resetRecomputations: () => void;
494
+ dependencyRecomputations: () => number;
495
+ resetDependencyRecomputations: () => void;
496
+ } & {
497
+ argsMemoize: typeof import("reselect").weakMapMemoize;
498
+ memoize: typeof import("reselect").weakMapMemoize;
499
+ }];
500
+ recomputations: () => number;
501
+ resetRecomputations: () => void;
502
+ dependencyRecomputations: () => number;
503
+ resetDependencyRecomputations: () => void;
504
+ } & {
505
+ argsMemoize: typeof import("reselect").weakMapMemoize;
506
+ memoize: typeof import("reselect").weakMapMemoize;
507
+ }, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
508
+ participateInMetaMetrics: boolean;
509
+ }, params_0: BridgeQuotesClientParams) => (QuoteResponse & QuoteMetadata)[]) & {
510
+ clearCache: () => void;
511
+ resultsCount: () => number;
512
+ resetResultsCount: () => void;
513
+ } & {
514
+ resultFunc: (resultFuncArgs_0: {
515
+ sentAmount: {
516
+ amount: string;
517
+ valueInCurrency: string | null;
518
+ usd: string | null;
519
+ };
520
+ toTokenAmount: {
521
+ amount: string;
522
+ valueInCurrency: string | null;
523
+ usd: string | null;
524
+ };
525
+ swapRate: string;
526
+ totalNetworkFee: {
527
+ amount: string;
528
+ valueInCurrency: string | null;
529
+ usd: string | null;
530
+ };
531
+ totalMaxNetworkFee: {
532
+ amount: string;
533
+ valueInCurrency: string | null;
534
+ usd: string | null;
535
+ };
536
+ gasFee: {
537
+ amount: string;
538
+ valueInCurrency: string | null;
539
+ usd: string | null;
540
+ };
541
+ adjustedReturn: {
542
+ valueInCurrency: string | null;
543
+ usd: string | null;
544
+ };
545
+ cost: {
546
+ valueInCurrency: string | null;
547
+ usd: string | null;
548
+ };
549
+ quote: import("./types.cjs").Quote;
550
+ approval?: import("./types.cjs").TxData | null | undefined;
551
+ trade: import("./types.cjs").TxData;
552
+ estimatedProcessingTimeInSeconds: number;
553
+ l1GasFeesInHexWei?: string | undefined;
554
+ solanaFeesInLamports?: string | undefined;
555
+ }[], resultFuncArgs_1: SortOrder) => (QuoteResponse & QuoteMetadata)[];
556
+ memoizedResultFunc: ((resultFuncArgs_0: {
557
+ sentAmount: {
558
+ amount: string;
559
+ valueInCurrency: string | null;
560
+ usd: string | null;
561
+ };
562
+ toTokenAmount: {
563
+ amount: string;
564
+ valueInCurrency: string | null;
565
+ usd: string | null;
566
+ };
567
+ swapRate: string;
568
+ totalNetworkFee: {
569
+ amount: string;
570
+ valueInCurrency: string | null;
571
+ usd: string | null;
572
+ };
573
+ totalMaxNetworkFee: {
574
+ amount: string;
575
+ valueInCurrency: string | null;
576
+ usd: string | null;
577
+ };
578
+ gasFee: {
579
+ amount: string;
580
+ valueInCurrency: string | null;
581
+ usd: string | null;
582
+ };
583
+ adjustedReturn: {
584
+ valueInCurrency: string | null;
585
+ usd: string | null;
586
+ };
587
+ cost: {
588
+ valueInCurrency: string | null;
589
+ usd: string | null;
590
+ };
591
+ quote: import("./types.cjs").Quote;
592
+ approval?: import("./types.cjs").TxData | null | undefined;
593
+ trade: import("./types.cjs").TxData;
594
+ estimatedProcessingTimeInSeconds: number;
595
+ l1GasFeesInHexWei?: string | undefined;
596
+ solanaFeesInLamports?: string | undefined;
597
+ }[], resultFuncArgs_1: SortOrder) => (QuoteResponse & QuoteMetadata)[]) & {
598
+ clearCache: () => void;
599
+ resultsCount: () => number;
600
+ resetResultsCount: () => void;
601
+ };
602
+ lastResult: () => (QuoteResponse & QuoteMetadata)[];
603
+ dependencies: [((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
604
+ participateInMetaMetrics: boolean;
605
+ }, params_0: BridgeQuotesClientParams) => {
606
+ sentAmount: {
607
+ amount: string;
608
+ valueInCurrency: string | null;
609
+ usd: string | null;
610
+ };
611
+ toTokenAmount: {
612
+ amount: string;
613
+ valueInCurrency: string | null;
614
+ usd: string | null;
615
+ };
616
+ swapRate: string;
617
+ totalNetworkFee: {
618
+ amount: string;
619
+ valueInCurrency: string | null;
620
+ usd: string | null;
621
+ };
622
+ totalMaxNetworkFee: {
623
+ amount: string;
624
+ valueInCurrency: string | null;
625
+ usd: string | null;
626
+ };
627
+ gasFee: {
628
+ amount: string;
629
+ valueInCurrency: string | null;
630
+ usd: string | null;
631
+ };
632
+ adjustedReturn: {
633
+ valueInCurrency: string | null;
634
+ usd: string | null;
635
+ };
636
+ cost: {
637
+ valueInCurrency: string | null;
638
+ usd: string | null;
639
+ };
640
+ quote: import("./types.cjs").Quote;
641
+ approval?: import("./types.cjs").TxData | null | undefined;
642
+ trade: import("./types.cjs").TxData;
643
+ estimatedProcessingTimeInSeconds: number;
644
+ l1GasFeesInHexWei?: string | undefined;
645
+ solanaFeesInLamports?: string | undefined;
646
+ }[]) & {
647
+ clearCache: () => void;
648
+ resultsCount: () => number;
649
+ resetResultsCount: () => void;
650
+ } & {
651
+ resultFunc: (resultFuncArgs_0: (QuoteResponse & import("./types.cjs").L1GasFees & import("./types.cjs").SolanaFees)[], resultFuncArgs_1: BridgeFeesPerGas, resultFuncArgs_2: ExchangeRate, resultFuncArgs_3: ExchangeRate, resultFuncArgs_4: ExchangeRate) => {
652
+ sentAmount: {
653
+ amount: string;
654
+ valueInCurrency: string | null;
655
+ usd: string | null;
656
+ };
657
+ toTokenAmount: {
658
+ amount: string;
659
+ valueInCurrency: string | null;
660
+ usd: string | null;
661
+ };
662
+ swapRate: string;
663
+ totalNetworkFee: {
664
+ amount: string;
665
+ valueInCurrency: string | null;
666
+ usd: string | null;
667
+ };
668
+ totalMaxNetworkFee: {
669
+ amount: string;
670
+ valueInCurrency: string | null;
671
+ usd: string | null;
672
+ };
673
+ gasFee: {
674
+ amount: string;
675
+ valueInCurrency: string | null;
676
+ usd: string | null;
677
+ };
678
+ adjustedReturn: {
679
+ valueInCurrency: string | null;
680
+ usd: string | null;
681
+ };
682
+ cost: {
683
+ valueInCurrency: string | null;
684
+ usd: string | null;
685
+ };
686
+ quote: import("./types.cjs").Quote;
687
+ approval?: import("./types.cjs").TxData | null | undefined;
688
+ trade: import("./types.cjs").TxData;
689
+ estimatedProcessingTimeInSeconds: number;
690
+ l1GasFeesInHexWei?: string | undefined;
691
+ solanaFeesInLamports?: string | undefined;
692
+ }[];
693
+ memoizedResultFunc: ((resultFuncArgs_0: (QuoteResponse & import("./types.cjs").L1GasFees & import("./types.cjs").SolanaFees)[], resultFuncArgs_1: BridgeFeesPerGas, resultFuncArgs_2: ExchangeRate, resultFuncArgs_3: ExchangeRate, resultFuncArgs_4: ExchangeRate) => {
694
+ sentAmount: {
695
+ amount: string;
696
+ valueInCurrency: string | null;
697
+ usd: string | null;
698
+ };
699
+ toTokenAmount: {
700
+ amount: string;
701
+ valueInCurrency: string | null;
702
+ usd: string | null;
703
+ };
704
+ swapRate: string;
705
+ totalNetworkFee: {
706
+ amount: string;
707
+ valueInCurrency: string | null;
708
+ usd: string | null;
709
+ };
710
+ totalMaxNetworkFee: {
711
+ amount: string;
712
+ valueInCurrency: string | null;
713
+ usd: string | null;
714
+ };
715
+ gasFee: {
716
+ amount: string;
717
+ valueInCurrency: string | null;
718
+ usd: string | null;
719
+ };
720
+ adjustedReturn: {
721
+ valueInCurrency: string | null;
722
+ usd: string | null;
723
+ };
724
+ cost: {
725
+ valueInCurrency: string | null;
726
+ usd: string | null;
727
+ };
728
+ quote: import("./types.cjs").Quote;
729
+ approval?: import("./types.cjs").TxData | null | undefined;
730
+ trade: import("./types.cjs").TxData;
731
+ estimatedProcessingTimeInSeconds: number;
732
+ l1GasFeesInHexWei?: string | undefined;
733
+ solanaFeesInLamports?: string | undefined;
734
+ }[]) & {
735
+ clearCache: () => void;
736
+ resultsCount: () => number;
737
+ resetResultsCount: () => void;
738
+ };
739
+ lastResult: () => {
740
+ sentAmount: {
741
+ amount: string;
742
+ valueInCurrency: string | null;
743
+ usd: string | null;
744
+ };
745
+ toTokenAmount: {
746
+ amount: string;
747
+ valueInCurrency: string | null;
748
+ usd: string | null;
749
+ };
750
+ swapRate: string;
751
+ totalNetworkFee: {
752
+ amount: string;
753
+ valueInCurrency: string | null;
754
+ usd: string | null;
755
+ };
756
+ totalMaxNetworkFee: {
757
+ amount: string;
758
+ valueInCurrency: string | null;
759
+ usd: string | null;
760
+ };
761
+ gasFee: {
762
+ amount: string;
763
+ valueInCurrency: string | null;
764
+ usd: string | null;
765
+ };
766
+ adjustedReturn: {
767
+ valueInCurrency: string | null;
768
+ usd: string | null;
769
+ };
770
+ cost: {
771
+ valueInCurrency: string | null;
772
+ usd: string | null;
773
+ };
774
+ quote: import("./types.cjs").Quote;
775
+ approval?: import("./types.cjs").TxData | null | undefined;
776
+ trade: import("./types.cjs").TxData;
777
+ estimatedProcessingTimeInSeconds: number;
778
+ l1GasFeesInHexWei?: string | undefined;
779
+ solanaFeesInLamports?: string | undefined;
780
+ }[];
781
+ dependencies: [({ quotes }: BridgeAppState) => (QuoteResponse & import("./types.cjs").L1GasFees & import("./types.cjs").SolanaFees)[], (_: BridgeAppState, { bridgeFeesPerGas }: BridgeQuotesClientParams) => BridgeFeesPerGas, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
782
+ participateInMetaMetrics: boolean;
783
+ }) => ExchangeRate) & {
784
+ clearCache: () => void;
785
+ resultsCount: () => number;
786
+ resetResultsCount: () => void;
787
+ } & {
788
+ resultFunc: (resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate;
789
+ memoizedResultFunc: ((resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate) & {
790
+ clearCache: () => void;
791
+ resultsCount: () => number;
792
+ resetResultsCount: () => void;
793
+ };
794
+ lastResult: () => ExchangeRate;
795
+ dependencies: [(state: BridgeAppState) => BridgeAppState, ({ quoteRequest: { srcChainId } }: BridgeAppState) => string | number | undefined, ({ quoteRequest: { srcTokenAddress } }: BridgeAppState) => string | undefined];
796
+ recomputations: () => number;
797
+ resetRecomputations: () => void;
798
+ dependencyRecomputations: () => number;
799
+ resetDependencyRecomputations: () => void;
800
+ } & {
801
+ argsMemoize: typeof import("reselect").weakMapMemoize;
802
+ memoize: typeof import("reselect").weakMapMemoize;
803
+ }, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
804
+ participateInMetaMetrics: boolean;
805
+ }) => ExchangeRate) & {
806
+ clearCache: () => void;
807
+ resultsCount: () => number;
808
+ resetResultsCount: () => void;
809
+ } & {
810
+ resultFunc: (resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate;
811
+ memoizedResultFunc: ((resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate) & {
812
+ clearCache: () => void;
813
+ resultsCount: () => number;
814
+ resetResultsCount: () => void;
815
+ };
816
+ lastResult: () => ExchangeRate;
817
+ dependencies: [(state: BridgeAppState) => BridgeAppState, ({ quoteRequest: { destChainId } }: BridgeAppState) => string | number | undefined, ({ quoteRequest: { destTokenAddress } }: BridgeAppState) => string | undefined];
818
+ recomputations: () => number;
819
+ resetRecomputations: () => void;
820
+ dependencyRecomputations: () => number;
821
+ resetDependencyRecomputations: () => void;
822
+ } & {
823
+ argsMemoize: typeof import("reselect").weakMapMemoize;
824
+ memoize: typeof import("reselect").weakMapMemoize;
825
+ }, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
826
+ participateInMetaMetrics: boolean;
827
+ }) => ExchangeRate) & {
828
+ clearCache: () => void;
829
+ resultsCount: () => number;
830
+ resetResultsCount: () => void;
831
+ } & {
832
+ resultFunc: (resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined) => ExchangeRate;
833
+ memoizedResultFunc: ((resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined) => ExchangeRate) & {
834
+ clearCache: () => void;
835
+ resultsCount: () => number;
836
+ resetResultsCount: () => void;
837
+ };
838
+ lastResult: () => ExchangeRate;
839
+ dependencies: [(state: BridgeAppState) => BridgeAppState, ({ quoteRequest: { srcChainId } }: BridgeAppState) => string | number | undefined];
840
+ recomputations: () => number;
841
+ resetRecomputations: () => void;
842
+ dependencyRecomputations: () => number;
843
+ resetDependencyRecomputations: () => void;
844
+ } & {
845
+ argsMemoize: typeof import("reselect").weakMapMemoize;
846
+ memoize: typeof import("reselect").weakMapMemoize;
847
+ }];
848
+ recomputations: () => number;
849
+ resetRecomputations: () => void;
850
+ dependencyRecomputations: () => number;
851
+ resetDependencyRecomputations: () => void;
852
+ } & {
853
+ argsMemoize: typeof import("reselect").weakMapMemoize;
854
+ memoize: typeof import("reselect").weakMapMemoize;
855
+ }, (_: BridgeAppState, { sortOrder }: BridgeQuotesClientParams) => SortOrder];
856
+ recomputations: () => number;
857
+ resetRecomputations: () => void;
858
+ dependencyRecomputations: () => number;
859
+ resetDependencyRecomputations: () => void;
860
+ } & {
861
+ argsMemoize: typeof import("reselect").weakMapMemoize;
862
+ memoize: typeof import("reselect").weakMapMemoize;
863
+ }, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
864
+ participateInMetaMetrics: boolean;
865
+ }, params_0: BridgeQuotesClientParams) => QuoteResponse & QuoteMetadata) & {
866
+ clearCache: () => void;
867
+ resultsCount: () => number;
868
+ resetResultsCount: () => void;
869
+ } & {
870
+ resultFunc: (resultFuncArgs_0: QuoteResponse & QuoteMetadata, resultFuncArgs_1: (QuoteResponse & QuoteMetadata) | null) => QuoteResponse & QuoteMetadata;
871
+ memoizedResultFunc: ((resultFuncArgs_0: QuoteResponse & QuoteMetadata, resultFuncArgs_1: (QuoteResponse & QuoteMetadata) | null) => QuoteResponse & QuoteMetadata) & {
872
+ clearCache: () => void;
873
+ resultsCount: () => number;
874
+ resetResultsCount: () => void;
875
+ };
876
+ lastResult: () => QuoteResponse & QuoteMetadata;
877
+ dependencies: [((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
878
+ participateInMetaMetrics: boolean;
879
+ }, params_0: BridgeQuotesClientParams) => QuoteResponse & QuoteMetadata) & {
880
+ clearCache: () => void;
881
+ resultsCount: () => number;
882
+ resetResultsCount: () => void;
883
+ } & {
884
+ resultFunc: (resultFuncArgs_0: (QuoteResponse & QuoteMetadata)[]) => QuoteResponse & QuoteMetadata;
885
+ memoizedResultFunc: ((resultFuncArgs_0: (QuoteResponse & QuoteMetadata)[]) => QuoteResponse & QuoteMetadata) & {
886
+ clearCache: () => void;
887
+ resultsCount: () => number;
888
+ resetResultsCount: () => void;
889
+ };
890
+ lastResult: () => QuoteResponse & QuoteMetadata;
891
+ dependencies: [((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
892
+ participateInMetaMetrics: boolean;
893
+ }, params_0: BridgeQuotesClientParams) => (QuoteResponse & QuoteMetadata)[]) & {
894
+ clearCache: () => void;
895
+ resultsCount: () => number;
896
+ resetResultsCount: () => void;
897
+ } & {
898
+ resultFunc: (resultFuncArgs_0: {
899
+ sentAmount: {
900
+ amount: string;
901
+ valueInCurrency: string | null;
902
+ usd: string | null;
903
+ };
904
+ toTokenAmount: {
905
+ amount: string;
906
+ valueInCurrency: string | null;
907
+ usd: string | null;
908
+ };
909
+ swapRate: string;
910
+ totalNetworkFee: {
911
+ amount: string;
912
+ valueInCurrency: string | null;
913
+ usd: string | null;
914
+ };
915
+ totalMaxNetworkFee: {
916
+ amount: string;
917
+ valueInCurrency: string | null;
918
+ usd: string | null;
919
+ };
920
+ gasFee: {
921
+ amount: string;
922
+ valueInCurrency: string | null;
923
+ usd: string | null;
924
+ };
925
+ adjustedReturn: {
926
+ valueInCurrency: string | null;
927
+ usd: string | null;
928
+ };
929
+ cost: {
930
+ valueInCurrency: string | null;
931
+ usd: string | null;
932
+ };
933
+ quote: import("./types.cjs").Quote;
934
+ approval?: import("./types.cjs").TxData | null | undefined;
935
+ trade: import("./types.cjs").TxData;
936
+ estimatedProcessingTimeInSeconds: number;
937
+ l1GasFeesInHexWei?: string | undefined;
938
+ solanaFeesInLamports?: string | undefined;
939
+ }[], resultFuncArgs_1: SortOrder) => (QuoteResponse & QuoteMetadata)[];
940
+ memoizedResultFunc: ((resultFuncArgs_0: {
941
+ sentAmount: {
942
+ amount: string;
943
+ valueInCurrency: string | null;
944
+ usd: string | null;
945
+ };
946
+ toTokenAmount: {
947
+ amount: string;
948
+ valueInCurrency: string | null;
949
+ usd: string | null;
950
+ };
951
+ swapRate: string;
952
+ totalNetworkFee: {
953
+ amount: string;
954
+ valueInCurrency: string | null;
955
+ usd: string | null;
956
+ };
957
+ totalMaxNetworkFee: {
958
+ amount: string;
959
+ valueInCurrency: string | null;
960
+ usd: string | null;
961
+ };
962
+ gasFee: {
963
+ amount: string;
964
+ valueInCurrency: string | null;
965
+ usd: string | null;
966
+ };
967
+ adjustedReturn: {
968
+ valueInCurrency: string | null;
969
+ usd: string | null;
970
+ };
971
+ cost: {
972
+ valueInCurrency: string | null;
973
+ usd: string | null;
974
+ };
975
+ quote: import("./types.cjs").Quote;
976
+ approval?: import("./types.cjs").TxData | null | undefined;
977
+ trade: import("./types.cjs").TxData;
978
+ estimatedProcessingTimeInSeconds: number;
979
+ l1GasFeesInHexWei?: string | undefined;
980
+ solanaFeesInLamports?: string | undefined;
981
+ }[], resultFuncArgs_1: SortOrder) => (QuoteResponse & QuoteMetadata)[]) & {
982
+ clearCache: () => void;
983
+ resultsCount: () => number;
984
+ resetResultsCount: () => void;
985
+ };
986
+ lastResult: () => (QuoteResponse & QuoteMetadata)[];
987
+ dependencies: [((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
988
+ participateInMetaMetrics: boolean;
989
+ }, params_0: BridgeQuotesClientParams) => {
990
+ sentAmount: {
991
+ amount: string;
992
+ valueInCurrency: string | null;
993
+ usd: string | null;
994
+ };
995
+ toTokenAmount: {
996
+ amount: string;
997
+ valueInCurrency: string | null;
998
+ usd: string | null;
999
+ };
1000
+ swapRate: string;
1001
+ totalNetworkFee: {
1002
+ amount: string;
1003
+ valueInCurrency: string | null;
1004
+ usd: string | null;
1005
+ };
1006
+ totalMaxNetworkFee: {
1007
+ amount: string;
1008
+ valueInCurrency: string | null;
1009
+ usd: string | null;
1010
+ };
1011
+ gasFee: {
1012
+ amount: string;
1013
+ valueInCurrency: string | null;
1014
+ usd: string | null;
1015
+ };
1016
+ adjustedReturn: {
1017
+ valueInCurrency: string | null;
1018
+ usd: string | null;
1019
+ };
1020
+ cost: {
1021
+ valueInCurrency: string | null;
1022
+ usd: string | null;
1023
+ };
1024
+ quote: import("./types.cjs").Quote;
1025
+ approval?: import("./types.cjs").TxData | null | undefined;
1026
+ trade: import("./types.cjs").TxData;
1027
+ estimatedProcessingTimeInSeconds: number;
1028
+ l1GasFeesInHexWei?: string | undefined;
1029
+ solanaFeesInLamports?: string | undefined;
1030
+ }[]) & {
1031
+ clearCache: () => void;
1032
+ resultsCount: () => number;
1033
+ resetResultsCount: () => void;
1034
+ } & {
1035
+ resultFunc: (resultFuncArgs_0: (QuoteResponse & import("./types.cjs").L1GasFees & import("./types.cjs").SolanaFees)[], resultFuncArgs_1: BridgeFeesPerGas, resultFuncArgs_2: ExchangeRate, resultFuncArgs_3: ExchangeRate, resultFuncArgs_4: ExchangeRate) => {
1036
+ sentAmount: {
1037
+ amount: string;
1038
+ valueInCurrency: string | null;
1039
+ usd: string | null;
1040
+ };
1041
+ toTokenAmount: {
1042
+ amount: string;
1043
+ valueInCurrency: string | null;
1044
+ usd: string | null;
1045
+ };
1046
+ swapRate: string;
1047
+ totalNetworkFee: {
1048
+ amount: string;
1049
+ valueInCurrency: string | null;
1050
+ usd: string | null;
1051
+ };
1052
+ totalMaxNetworkFee: {
1053
+ amount: string;
1054
+ valueInCurrency: string | null;
1055
+ usd: string | null;
1056
+ };
1057
+ gasFee: {
1058
+ amount: string;
1059
+ valueInCurrency: string | null;
1060
+ usd: string | null;
1061
+ };
1062
+ adjustedReturn: {
1063
+ valueInCurrency: string | null;
1064
+ usd: string | null;
1065
+ };
1066
+ cost: {
1067
+ valueInCurrency: string | null;
1068
+ usd: string | null;
1069
+ };
1070
+ quote: import("./types.cjs").Quote;
1071
+ approval?: import("./types.cjs").TxData | null | undefined;
1072
+ trade: import("./types.cjs").TxData;
1073
+ estimatedProcessingTimeInSeconds: number;
1074
+ l1GasFeesInHexWei?: string | undefined;
1075
+ solanaFeesInLamports?: string | undefined;
1076
+ }[];
1077
+ memoizedResultFunc: ((resultFuncArgs_0: (QuoteResponse & import("./types.cjs").L1GasFees & import("./types.cjs").SolanaFees)[], resultFuncArgs_1: BridgeFeesPerGas, resultFuncArgs_2: ExchangeRate, resultFuncArgs_3: ExchangeRate, resultFuncArgs_4: ExchangeRate) => {
1078
+ sentAmount: {
1079
+ amount: string;
1080
+ valueInCurrency: string | null;
1081
+ usd: string | null;
1082
+ };
1083
+ toTokenAmount: {
1084
+ amount: string;
1085
+ valueInCurrency: string | null;
1086
+ usd: string | null;
1087
+ };
1088
+ swapRate: string;
1089
+ totalNetworkFee: {
1090
+ amount: string;
1091
+ valueInCurrency: string | null;
1092
+ usd: string | null;
1093
+ };
1094
+ totalMaxNetworkFee: {
1095
+ amount: string;
1096
+ valueInCurrency: string | null;
1097
+ usd: string | null;
1098
+ };
1099
+ gasFee: {
1100
+ amount: string;
1101
+ valueInCurrency: string | null;
1102
+ usd: string | null;
1103
+ };
1104
+ adjustedReturn: {
1105
+ valueInCurrency: string | null;
1106
+ usd: string | null;
1107
+ };
1108
+ cost: {
1109
+ valueInCurrency: string | null;
1110
+ usd: string | null;
1111
+ };
1112
+ quote: import("./types.cjs").Quote;
1113
+ approval?: import("./types.cjs").TxData | null | undefined;
1114
+ trade: import("./types.cjs").TxData;
1115
+ estimatedProcessingTimeInSeconds: number;
1116
+ l1GasFeesInHexWei?: string | undefined;
1117
+ solanaFeesInLamports?: string | undefined;
1118
+ }[]) & {
1119
+ clearCache: () => void;
1120
+ resultsCount: () => number;
1121
+ resetResultsCount: () => void;
1122
+ };
1123
+ lastResult: () => {
1124
+ sentAmount: {
1125
+ amount: string;
1126
+ valueInCurrency: string | null;
1127
+ usd: string | null;
1128
+ };
1129
+ toTokenAmount: {
1130
+ amount: string;
1131
+ valueInCurrency: string | null;
1132
+ usd: string | null;
1133
+ };
1134
+ swapRate: string;
1135
+ totalNetworkFee: {
1136
+ amount: string;
1137
+ valueInCurrency: string | null;
1138
+ usd: string | null;
1139
+ };
1140
+ totalMaxNetworkFee: {
1141
+ amount: string;
1142
+ valueInCurrency: string | null;
1143
+ usd: string | null;
1144
+ };
1145
+ gasFee: {
1146
+ amount: string;
1147
+ valueInCurrency: string | null;
1148
+ usd: string | null;
1149
+ };
1150
+ adjustedReturn: {
1151
+ valueInCurrency: string | null;
1152
+ usd: string | null;
1153
+ };
1154
+ cost: {
1155
+ valueInCurrency: string | null;
1156
+ usd: string | null;
1157
+ };
1158
+ quote: import("./types.cjs").Quote;
1159
+ approval?: import("./types.cjs").TxData | null | undefined;
1160
+ trade: import("./types.cjs").TxData;
1161
+ estimatedProcessingTimeInSeconds: number;
1162
+ l1GasFeesInHexWei?: string | undefined;
1163
+ solanaFeesInLamports?: string | undefined;
1164
+ }[];
1165
+ dependencies: [({ quotes }: BridgeAppState) => (QuoteResponse & import("./types.cjs").L1GasFees & import("./types.cjs").SolanaFees)[], (_: BridgeAppState, { bridgeFeesPerGas }: BridgeQuotesClientParams) => BridgeFeesPerGas, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
1166
+ participateInMetaMetrics: boolean;
1167
+ }) => ExchangeRate) & {
1168
+ clearCache: () => void;
1169
+ resultsCount: () => number;
1170
+ resetResultsCount: () => void;
1171
+ } & {
1172
+ resultFunc: (resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate;
1173
+ memoizedResultFunc: ((resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate) & {
1174
+ clearCache: () => void;
1175
+ resultsCount: () => number;
1176
+ resetResultsCount: () => void;
1177
+ };
1178
+ lastResult: () => ExchangeRate;
1179
+ dependencies: [(state: BridgeAppState) => BridgeAppState, ({ quoteRequest: { srcChainId } }: BridgeAppState) => string | number | undefined, ({ quoteRequest: { srcTokenAddress } }: BridgeAppState) => string | undefined];
1180
+ recomputations: () => number;
1181
+ resetRecomputations: () => void;
1182
+ dependencyRecomputations: () => number;
1183
+ resetDependencyRecomputations: () => void;
1184
+ } & {
1185
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1186
+ memoize: typeof import("reselect").weakMapMemoize;
1187
+ }, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
1188
+ participateInMetaMetrics: boolean;
1189
+ }) => ExchangeRate) & {
1190
+ clearCache: () => void;
1191
+ resultsCount: () => number;
1192
+ resetResultsCount: () => void;
1193
+ } & {
1194
+ resultFunc: (resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate;
1195
+ memoizedResultFunc: ((resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined, resultFuncArgs_2: string | undefined) => ExchangeRate) & {
1196
+ clearCache: () => void;
1197
+ resultsCount: () => number;
1198
+ resetResultsCount: () => void;
1199
+ };
1200
+ lastResult: () => ExchangeRate;
1201
+ dependencies: [(state: BridgeAppState) => BridgeAppState, ({ quoteRequest: { destChainId } }: BridgeAppState) => string | number | undefined, ({ quoteRequest: { destTokenAddress } }: BridgeAppState) => string | undefined];
1202
+ recomputations: () => number;
1203
+ resetRecomputations: () => void;
1204
+ dependencyRecomputations: () => number;
1205
+ resetDependencyRecomputations: () => void;
1206
+ } & {
1207
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1208
+ memoize: typeof import("reselect").weakMapMemoize;
1209
+ }, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
1210
+ participateInMetaMetrics: boolean;
1211
+ }) => ExchangeRate) & {
1212
+ clearCache: () => void;
1213
+ resultsCount: () => number;
1214
+ resetResultsCount: () => void;
1215
+ } & {
1216
+ resultFunc: (resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined) => ExchangeRate;
1217
+ memoizedResultFunc: ((resultFuncArgs_0: BridgeAppState, resultFuncArgs_1: string | number | undefined) => ExchangeRate) & {
1218
+ clearCache: () => void;
1219
+ resultsCount: () => number;
1220
+ resetResultsCount: () => void;
1221
+ };
1222
+ lastResult: () => ExchangeRate;
1223
+ dependencies: [(state: BridgeAppState) => BridgeAppState, ({ quoteRequest: { srcChainId } }: BridgeAppState) => string | number | undefined];
1224
+ recomputations: () => number;
1225
+ resetRecomputations: () => void;
1226
+ dependencyRecomputations: () => number;
1227
+ resetDependencyRecomputations: () => void;
1228
+ } & {
1229
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1230
+ memoize: typeof import("reselect").weakMapMemoize;
1231
+ }];
1232
+ recomputations: () => number;
1233
+ resetRecomputations: () => void;
1234
+ dependencyRecomputations: () => number;
1235
+ resetDependencyRecomputations: () => void;
1236
+ } & {
1237
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1238
+ memoize: typeof import("reselect").weakMapMemoize;
1239
+ }, (_: BridgeAppState, { sortOrder }: BridgeQuotesClientParams) => SortOrder];
1240
+ recomputations: () => number;
1241
+ resetRecomputations: () => void;
1242
+ dependencyRecomputations: () => number;
1243
+ resetDependencyRecomputations: () => void;
1244
+ } & {
1245
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1246
+ memoize: typeof import("reselect").weakMapMemoize;
1247
+ }];
1248
+ recomputations: () => number;
1249
+ resetRecomputations: () => void;
1250
+ dependencyRecomputations: () => number;
1251
+ resetDependencyRecomputations: () => void;
1252
+ } & {
1253
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1254
+ memoize: typeof import("reselect").weakMapMemoize;
1255
+ }, (_: BridgeAppState, { selectedQuote }: BridgeQuotesClientParams) => (QuoteResponse & QuoteMetadata) | null];
1256
+ recomputations: () => number;
1257
+ resetRecomputations: () => void;
1258
+ dependencyRecomputations: () => number;
1259
+ resetDependencyRecomputations: () => void;
1260
+ } & {
1261
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1262
+ memoize: typeof import("reselect").weakMapMemoize;
1263
+ }, (state: BridgeAppState) => number | null, (state: BridgeAppState) => boolean, (state: BridgeAppState) => number | null, (state: BridgeAppState, { featureFlagsKey }: BridgeQuotesClientParams) => boolean, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
1264
+ participateInMetaMetrics: boolean;
1265
+ }, params_0: BridgeQuotesClientParams) => boolean) & {
1266
+ clearCache: () => void;
1267
+ resultsCount: () => number;
1268
+ resetResultsCount: () => void;
1269
+ } & {
1270
+ resultFunc: (resultFuncArgs_0: boolean, resultFuncArgs_1: number | null, resultFuncArgs_2: number) => boolean;
1271
+ memoizedResultFunc: ((resultFuncArgs_0: boolean, resultFuncArgs_1: number | null, resultFuncArgs_2: number) => boolean) & {
1272
+ clearCache: () => void;
1273
+ resultsCount: () => number;
1274
+ resetResultsCount: () => void;
1275
+ };
1276
+ lastResult: () => boolean;
1277
+ dependencies: [(state: BridgeAppState, { featureFlagsKey }: BridgeQuotesClientParams) => boolean, ({ quotesLastFetched }: BridgeAppState) => number | null, ((state: BridgeControllerState & MultichainAssetsRatesControllerState & TokenRatesControllerState & CurrencyRateState & Pick<BridgeControllerState, "assetExchangeRates"> & {
1278
+ participateInMetaMetrics: boolean;
1279
+ }, params_0: BridgeQuotesClientParams) => number) & {
1280
+ clearCache: () => void;
1281
+ resultsCount: () => number;
1282
+ resetResultsCount: () => void;
1283
+ } & {
1284
+ resultFunc: (resultFuncArgs_0: {
1285
+ refreshRate: number;
1286
+ maxRefreshCount: number;
1287
+ support: boolean;
1288
+ chains: Record<`${string}:${string}`, import("./types.cjs").ChainConfiguration>;
1289
+ }, resultFuncArgs_1: string | number | undefined) => number;
1290
+ memoizedResultFunc: ((resultFuncArgs_0: {
1291
+ refreshRate: number;
1292
+ maxRefreshCount: number;
1293
+ support: boolean;
1294
+ chains: Record<`${string}:${string}`, import("./types.cjs").ChainConfiguration>;
1295
+ }, resultFuncArgs_1: string | number | undefined) => number) & {
1296
+ clearCache: () => void;
1297
+ resultsCount: () => number;
1298
+ resetResultsCount: () => void;
1299
+ };
1300
+ lastResult: () => number;
1301
+ dependencies: [({ bridgeFeatureFlags }: BridgeAppState, { featureFlagsKey }: BridgeQuotesClientParams) => {
1302
+ refreshRate: number;
1303
+ maxRefreshCount: number;
1304
+ support: boolean;
1305
+ chains: Record<`${string}:${string}`, import("./types.cjs").ChainConfiguration>;
1306
+ }, (state: BridgeAppState) => string | number | undefined];
1307
+ recomputations: () => number;
1308
+ resetRecomputations: () => void;
1309
+ dependencyRecomputations: () => number;
1310
+ resetDependencyRecomputations: () => void;
1311
+ } & {
1312
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1313
+ memoize: typeof import("reselect").weakMapMemoize;
1314
+ }];
1315
+ recomputations: () => number;
1316
+ resetRecomputations: () => void;
1317
+ dependencyRecomputations: () => number;
1318
+ resetDependencyRecomputations: () => void;
1319
+ } & {
1320
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1321
+ memoize: typeof import("reselect").weakMapMemoize;
1322
+ }];
1323
+ recomputations: () => number;
1324
+ resetRecomputations: () => void;
1325
+ dependencyRecomputations: () => number;
1326
+ resetDependencyRecomputations: () => void;
1327
+ } & {
1328
+ argsMemoize: typeof import("reselect").weakMapMemoize;
1329
+ memoize: typeof import("reselect").weakMapMemoize;
1330
+ };
1331
+ export {};
1332
+ //# sourceMappingURL=selectors.d.cts.map