@metamask-previews/bridge-controller 13.0.0-preview-5867b015 → 13.0.0-preview-493eed9

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