@metamask/bridge-controller 52.0.0 → 53.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/dist/bridge-controller.cjs +5 -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 +6 -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 +1 -1
  13. package/dist/constants/bridge.d.cts.map +1 -1
  14. package/dist/constants/bridge.d.mts +1 -1
  15. package/dist/constants/bridge.d.mts.map +1 -1
  16. package/dist/constants/bridge.mjs +1 -0
  17. package/dist/constants/bridge.mjs.map +1 -1
  18. package/dist/constants/chains.cjs +4 -1
  19. package/dist/constants/chains.cjs.map +1 -1
  20. package/dist/constants/chains.d.cts +3 -0
  21. package/dist/constants/chains.d.cts.map +1 -1
  22. package/dist/constants/chains.d.mts +3 -0
  23. package/dist/constants/chains.d.mts.map +1 -1
  24. package/dist/constants/chains.mjs +3 -0
  25. package/dist/constants/chains.mjs.map +1 -1
  26. package/dist/constants/tokens.cjs +10 -0
  27. package/dist/constants/tokens.cjs.map +1 -1
  28. package/dist/constants/tokens.d.cts +7 -0
  29. package/dist/constants/tokens.d.cts.map +1 -1
  30. package/dist/constants/tokens.d.mts +7 -0
  31. package/dist/constants/tokens.d.mts.map +1 -1
  32. package/dist/constants/tokens.mjs +10 -0
  33. package/dist/constants/tokens.mjs.map +1 -1
  34. package/dist/selectors.cjs +1 -1
  35. package/dist/selectors.cjs.map +1 -1
  36. package/dist/selectors.d.cts +346 -244
  37. package/dist/selectors.d.cts.map +1 -1
  38. package/dist/selectors.d.mts +346 -244
  39. package/dist/selectors.d.mts.map +1 -1
  40. package/dist/selectors.mjs +2 -2
  41. package/dist/selectors.mjs.map +1 -1
  42. package/dist/types.cjs.map +1 -1
  43. package/dist/types.d.cts +3 -2
  44. package/dist/types.d.cts.map +1 -1
  45. package/dist/types.d.mts +3 -2
  46. package/dist/types.d.mts.map +1 -1
  47. package/dist/types.mjs.map +1 -1
  48. package/dist/utils/bridge.cjs +5 -1
  49. package/dist/utils/bridge.cjs.map +1 -1
  50. package/dist/utils/bridge.d.cts +10 -1
  51. package/dist/utils/bridge.d.cts.map +1 -1
  52. package/dist/utils/bridge.d.mts +10 -1
  53. package/dist/utils/bridge.d.mts.map +1 -1
  54. package/dist/utils/bridge.mjs +3 -0
  55. package/dist/utils/bridge.mjs.map +1 -1
  56. package/dist/utils/feature-flags.cjs +24 -1
  57. package/dist/utils/feature-flags.cjs.map +1 -1
  58. package/dist/utils/feature-flags.d.cts +12 -1
  59. package/dist/utils/feature-flags.d.cts.map +1 -1
  60. package/dist/utils/feature-flags.d.mts +12 -1
  61. package/dist/utils/feature-flags.d.mts.map +1 -1
  62. package/dist/utils/feature-flags.mjs +22 -0
  63. package/dist/utils/feature-flags.mjs.map +1 -1
  64. package/dist/utils/fetch-server-events.cjs +61 -0
  65. package/dist/utils/fetch-server-events.cjs.map +1 -0
  66. package/dist/utils/fetch-server-events.d.cts +17 -0
  67. package/dist/utils/fetch-server-events.d.cts.map +1 -0
  68. package/dist/utils/fetch-server-events.d.mts +17 -0
  69. package/dist/utils/fetch-server-events.d.mts.map +1 -0
  70. package/dist/utils/fetch-server-events.mjs +57 -0
  71. package/dist/utils/fetch-server-events.mjs.map +1 -0
  72. package/dist/utils/fetch.cjs +14 -24
  73. package/dist/utils/fetch.cjs.map +1 -1
  74. package/dist/utils/fetch.d.cts.map +1 -1
  75. package/dist/utils/fetch.d.mts.map +1 -1
  76. package/dist/utils/fetch.mjs +15 -25
  77. package/dist/utils/fetch.mjs.map +1 -1
  78. package/dist/utils/quote-fees.cjs.map +1 -1
  79. package/dist/utils/quote-fees.mjs.map +1 -1
  80. package/dist/utils/quote.cjs +2 -1
  81. package/dist/utils/quote.cjs.map +1 -1
  82. package/dist/utils/quote.d.cts +3 -3
  83. package/dist/utils/quote.d.cts.map +1 -1
  84. package/dist/utils/quote.d.mts +3 -3
  85. package/dist/utils/quote.d.mts.map +1 -1
  86. package/dist/utils/quote.mjs +2 -1
  87. package/dist/utils/quote.mjs.map +1 -1
  88. package/dist/utils/validators.cjs +11 -13
  89. package/dist/utils/validators.cjs.map +1 -1
  90. package/dist/utils/validators.d.cts +20 -977
  91. package/dist/utils/validators.d.cts.map +1 -1
  92. package/dist/utils/validators.d.mts +20 -977
  93. package/dist/utils/validators.d.mts.map +1 -1
  94. package/dist/utils/validators.mjs +10 -11
  95. package/dist/utils/validators.mjs.map +1 -1
  96. package/package.json +5 -6
@@ -135,7 +135,10 @@ export declare const PlatformConfigSchema: import("@metamask/superstruct").Struc
135
135
  standard: Record<string, string>;
136
136
  other: Record<string, string>;
137
137
  } | undefined> | undefined;
138
- sseEnabled?: boolean | undefined;
138
+ sse?: {
139
+ enabled: boolean;
140
+ minimumVersion: string;
141
+ } | undefined;
139
142
  }, {
140
143
  priceImpactThreshold: import("@metamask/superstruct").Struct<{
141
144
  normal: number;
@@ -176,7 +179,16 @@ export declare const PlatformConfigSchema: import("@metamask/superstruct").Struc
176
179
  standard: Record<string, string>;
177
180
  other: Record<string, string>;
178
181
  } | undefined> | undefined, null>;
179
- sseEnabled: import("@metamask/superstruct").Struct<boolean | undefined, null>;
182
+ sse: import("@metamask/superstruct").Struct<{
183
+ enabled: boolean;
184
+ minimumVersion: string;
185
+ } | undefined, {
186
+ enabled: import("@metamask/superstruct").Struct<boolean, null>;
187
+ /**
188
+ * The minimum version of the client required to enable SSE, for example 13.8.0
189
+ */
190
+ minimumVersion: import("@metamask/superstruct").Struct<string, null>;
191
+ }>;
180
192
  }>;
181
193
  export declare const validateFeatureFlagsResponse: (data: unknown) => data is {
182
194
  support: boolean;
@@ -211,7 +223,10 @@ export declare const validateFeatureFlagsResponse: (data: unknown) => data is {
211
223
  standard: Record<string, string>;
212
224
  other: Record<string, string>;
213
225
  } | undefined> | undefined;
214
- sseEnabled?: boolean | undefined;
226
+ sse?: {
227
+ enabled: boolean;
228
+ minimumVersion: string;
229
+ } | undefined;
215
230
  };
216
231
  export declare const validateSwapsTokenObject: (data: unknown) => data is {
217
232
  symbol: string;
@@ -1926,7 +1941,7 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
1926
1941
  inputsToSign: {}[] | null;
1927
1942
  }, null>;
1928
1943
  }>;
1929
- export declare const BitcoinQuoteResponseSchema: import("@metamask/superstruct").Struct<{
1944
+ export declare const validateQuoteResponse: (data: unknown) => data is {
1930
1945
  quote: {
1931
1946
  requestId: string;
1932
1947
  srcChainId: number;
@@ -2061,830 +2076,7 @@ export declare const BitcoinQuoteResponseSchema: import("@metamask/superstruct")
2061
2076
  } | undefined;
2062
2077
  };
2063
2078
  estimatedProcessingTimeInSeconds: number;
2064
- trade: {
2065
- unsignedPsbtBase64: string;
2066
- inputsToSign: {}[] | null;
2067
- };
2068
- approval?: {
2069
- data: string;
2070
- value: string;
2071
- to: string;
2072
- from: string;
2073
- gasLimit: number | null;
2074
- chainId: number;
2075
- effectiveGas?: number | undefined;
2076
- } | undefined;
2077
- }, {
2078
- quote: import("@metamask/superstruct").Struct<{
2079
- requestId: string;
2080
- srcChainId: number;
2081
- destChainId: number;
2082
- srcAsset: {
2083
- symbol: string;
2084
- address: string;
2085
- name: string;
2086
- chainId: number;
2087
- decimals: number;
2088
- assetId: `${string}:${string}/${string}:${string}`;
2089
- iconUrl?: string | null | undefined;
2090
- icon?: string | null | undefined;
2091
- };
2092
- destAsset: {
2093
- symbol: string;
2094
- address: string;
2095
- name: string;
2096
- chainId: number;
2097
- decimals: number;
2098
- assetId: `${string}:${string}/${string}:${string}`;
2099
- iconUrl?: string | null | undefined;
2100
- icon?: string | null | undefined;
2101
- };
2102
- srcTokenAmount: string;
2103
- destTokenAmount: string;
2104
- minDestTokenAmount: string;
2105
- feeData: {
2106
- metabridge: {
2107
- amount: string;
2108
- asset: {
2109
- symbol: string;
2110
- address: string;
2111
- name: string;
2112
- chainId: number;
2113
- decimals: number;
2114
- assetId: `${string}:${string}/${string}:${string}`;
2115
- iconUrl?: string | null | undefined;
2116
- icon?: string | null | undefined;
2117
- };
2118
- };
2119
- txFee?: ({
2120
- amount: string;
2121
- asset: {
2122
- symbol: string;
2123
- address: string;
2124
- name: string;
2125
- chainId: number;
2126
- decimals: number;
2127
- assetId: `${string}:${string}/${string}:${string}`;
2128
- iconUrl?: string | null | undefined;
2129
- icon?: string | null | undefined;
2130
- };
2131
- } & {
2132
- maxPriorityFeePerGas: string;
2133
- maxFeePerGas: string;
2134
- }) | undefined;
2135
- };
2136
- bridgeId: string;
2137
- bridges: string[];
2138
- steps: {
2139
- action: ActionTypes;
2140
- protocol: {
2141
- name: string;
2142
- displayName?: string | undefined;
2143
- icon?: string | undefined;
2144
- };
2145
- srcChainId: number;
2146
- srcAsset: {
2147
- symbol: string;
2148
- address: string;
2149
- name: string;
2150
- chainId: number;
2151
- decimals: number;
2152
- assetId: `${string}:${string}/${string}:${string}`;
2153
- iconUrl?: string | null | undefined;
2154
- icon?: string | null | undefined;
2155
- };
2156
- destAsset: {
2157
- symbol: string;
2158
- address: string;
2159
- name: string;
2160
- chainId: number;
2161
- decimals: number;
2162
- assetId: `${string}:${string}/${string}:${string}`;
2163
- iconUrl?: string | null | undefined;
2164
- icon?: string | null | undefined;
2165
- };
2166
- srcAmount: string;
2167
- destAmount: string;
2168
- destChainId?: number | undefined;
2169
- }[];
2170
- refuel?: {
2171
- action: ActionTypes;
2172
- protocol: {
2173
- name: string;
2174
- displayName?: string | undefined;
2175
- icon?: string | undefined;
2176
- };
2177
- srcChainId: number;
2178
- srcAsset: {
2179
- symbol: string;
2180
- address: string;
2181
- name: string;
2182
- chainId: number;
2183
- decimals: number;
2184
- assetId: `${string}:${string}/${string}:${string}`;
2185
- iconUrl?: string | null | undefined;
2186
- icon?: string | null | undefined;
2187
- };
2188
- destAsset: {
2189
- symbol: string;
2190
- address: string;
2191
- name: string;
2192
- chainId: number;
2193
- decimals: number;
2194
- assetId: `${string}:${string}/${string}:${string}`;
2195
- iconUrl?: string | null | undefined;
2196
- icon?: string | null | undefined;
2197
- };
2198
- srcAmount: string;
2199
- destAmount: string;
2200
- destChainId?: number | undefined;
2201
- } | undefined;
2202
- gasIncluded?: boolean | undefined;
2203
- gasIncluded7702?: boolean | undefined;
2204
- priceData?: {
2205
- totalFromAmountUsd?: string | undefined;
2206
- totalToAmountUsd?: string | undefined;
2207
- priceImpact?: string | undefined;
2208
- totalFeeAmountUsd?: string | undefined;
2209
- } | undefined;
2210
- }, {
2211
- requestId: import("@metamask/superstruct").Struct<string, null>;
2212
- srcChainId: import("@metamask/superstruct").Struct<number, null>;
2213
- srcAsset: import("@metamask/superstruct").Struct<{
2214
- symbol: string;
2215
- address: string;
2216
- name: string;
2217
- chainId: number;
2218
- decimals: number;
2219
- assetId: `${string}:${string}/${string}:${string}`;
2220
- iconUrl?: string | null | undefined;
2221
- icon?: string | null | undefined;
2222
- }, {
2223
- /**
2224
- * The chainId of the token
2225
- */
2226
- chainId: import("@metamask/superstruct").Struct<number, null>;
2227
- /**
2228
- * An address that the metaswap-api recognizes as the default token
2229
- */
2230
- address: import("@metamask/superstruct").Struct<string, null>;
2231
- /**
2232
- * The assetId of the token
2233
- */
2234
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2235
- /**
2236
- * The symbol of token object
2237
- */
2238
- symbol: import("@metamask/superstruct").Struct<string, null>;
2239
- /**
2240
- * The name for the network
2241
- */
2242
- name: import("@metamask/superstruct").Struct<string, null>;
2243
- decimals: import("@metamask/superstruct").Struct<number, null>;
2244
- /**
2245
- * URL for token icon
2246
- */
2247
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2248
- /**
2249
- * URL for token icon
2250
- */
2251
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2252
- }>;
2253
- /**
2254
- * The amount sent, in atomic amount: amount sent - fees
2255
- * Some tokens have a fee of 0, so sometimes it's equal to amount sent
2256
- */
2257
- srcTokenAmount: import("@metamask/superstruct").Struct<string, null>;
2258
- destChainId: import("@metamask/superstruct").Struct<number, null>;
2259
- destAsset: import("@metamask/superstruct").Struct<{
2260
- symbol: string;
2261
- address: string;
2262
- name: string;
2263
- chainId: number;
2264
- decimals: number;
2265
- assetId: `${string}:${string}/${string}:${string}`;
2266
- iconUrl?: string | null | undefined;
2267
- icon?: string | null | undefined;
2268
- }, {
2269
- /**
2270
- * The chainId of the token
2271
- */
2272
- chainId: import("@metamask/superstruct").Struct<number, null>;
2273
- /**
2274
- * An address that the metaswap-api recognizes as the default token
2275
- */
2276
- address: import("@metamask/superstruct").Struct<string, null>;
2277
- /**
2278
- * The assetId of the token
2279
- */
2280
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2281
- /**
2282
- * The symbol of token object
2283
- */
2284
- symbol: import("@metamask/superstruct").Struct<string, null>;
2285
- /**
2286
- * The name for the network
2287
- */
2288
- name: import("@metamask/superstruct").Struct<string, null>;
2289
- decimals: import("@metamask/superstruct").Struct<number, null>;
2290
- /**
2291
- * URL for token icon
2292
- */
2293
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2294
- /**
2295
- * URL for token icon
2296
- */
2297
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2298
- }>;
2299
- /**
2300
- * The amount received, in atomic amount
2301
- */
2302
- destTokenAmount: import("@metamask/superstruct").Struct<string, null>;
2303
- /**
2304
- * The minimum amount that will be received, in atomic amount
2305
- */
2306
- minDestTokenAmount: import("@metamask/superstruct").Struct<string, null>;
2307
- feeData: import("@metamask/superstruct").Struct<{
2308
- metabridge: {
2309
- amount: string;
2310
- asset: {
2311
- symbol: string;
2312
- address: string;
2313
- name: string;
2314
- chainId: number;
2315
- decimals: number;
2316
- assetId: `${string}:${string}/${string}:${string}`;
2317
- iconUrl?: string | null | undefined;
2318
- icon?: string | null | undefined;
2319
- };
2320
- };
2321
- txFee?: ({
2322
- amount: string;
2323
- asset: {
2324
- symbol: string;
2325
- address: string;
2326
- name: string;
2327
- chainId: number;
2328
- decimals: number;
2329
- assetId: `${string}:${string}/${string}:${string}`;
2330
- iconUrl?: string | null | undefined;
2331
- icon?: string | null | undefined;
2332
- };
2333
- } & {
2334
- maxPriorityFeePerGas: string;
2335
- maxFeePerGas: string;
2336
- }) | undefined;
2337
- }, {
2338
- metabridge: import("@metamask/superstruct").Struct<{
2339
- amount: string;
2340
- asset: {
2341
- symbol: string;
2342
- address: string;
2343
- name: string;
2344
- chainId: number;
2345
- decimals: number;
2346
- assetId: `${string}:${string}/${string}:${string}`;
2347
- iconUrl?: string | null | undefined;
2348
- icon?: string | null | undefined;
2349
- };
2350
- }, {
2351
- amount: import("@metamask/superstruct").Struct<string, null>;
2352
- asset: import("@metamask/superstruct").Struct<{
2353
- symbol: string;
2354
- address: string;
2355
- name: string;
2356
- chainId: number;
2357
- decimals: number;
2358
- assetId: `${string}:${string}/${string}:${string}`;
2359
- iconUrl?: string | null | undefined;
2360
- icon?: string | null | undefined;
2361
- }, {
2362
- /**
2363
- * The chainId of the token
2364
- */
2365
- chainId: import("@metamask/superstruct").Struct<number, null>;
2366
- /**
2367
- * An address that the metaswap-api recognizes as the default token
2368
- */
2369
- address: import("@metamask/superstruct").Struct<string, null>;
2370
- /**
2371
- * The assetId of the token
2372
- */
2373
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2374
- /**
2375
- * The symbol of token object
2376
- */
2377
- symbol: import("@metamask/superstruct").Struct<string, null>;
2378
- /**
2379
- * The name for the network
2380
- */
2381
- name: import("@metamask/superstruct").Struct<string, null>;
2382
- decimals: import("@metamask/superstruct").Struct<number, null>;
2383
- /**
2384
- * URL for token icon
2385
- */
2386
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2387
- /**
2388
- * URL for token icon
2389
- */
2390
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2391
- }>;
2392
- }>;
2393
- /**
2394
- * This is the fee for the swap transaction taken from either the
2395
- * src or dest token if the quote has gas fees included or "gasless"
2396
- */
2397
- txFee: import("@metamask/superstruct").Struct<({
2398
- amount: string;
2399
- asset: {
2400
- symbol: string;
2401
- address: string;
2402
- name: string;
2403
- chainId: number;
2404
- decimals: number;
2405
- assetId: `${string}:${string}/${string}:${string}`;
2406
- iconUrl?: string | null | undefined;
2407
- icon?: string | null | undefined;
2408
- };
2409
- } & {
2410
- maxPriorityFeePerGas: string;
2411
- maxFeePerGas: string;
2412
- }) | undefined, null>;
2413
- }>;
2414
- gasIncluded: import("@metamask/superstruct").Struct<boolean | undefined, null>;
2415
- /**
2416
- * Whether the quote can use EIP-7702 delegated gasless execution
2417
- */
2418
- gasIncluded7702: import("@metamask/superstruct").Struct<boolean | undefined, null>;
2419
- bridgeId: import("@metamask/superstruct").Struct<string, null>;
2420
- bridges: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
2421
- steps: import("@metamask/superstruct").Struct<{
2422
- action: ActionTypes;
2423
- protocol: {
2424
- name: string;
2425
- displayName?: string | undefined;
2426
- icon?: string | undefined;
2427
- };
2428
- srcChainId: number;
2429
- srcAsset: {
2430
- symbol: string;
2431
- address: string;
2432
- name: string;
2433
- chainId: number;
2434
- decimals: number;
2435
- assetId: `${string}:${string}/${string}:${string}`;
2436
- iconUrl?: string | null | undefined;
2437
- icon?: string | null | undefined;
2438
- };
2439
- destAsset: {
2440
- symbol: string;
2441
- address: string;
2442
- name: string;
2443
- chainId: number;
2444
- decimals: number;
2445
- assetId: `${string}:${string}/${string}:${string}`;
2446
- iconUrl?: string | null | undefined;
2447
- icon?: string | null | undefined;
2448
- };
2449
- srcAmount: string;
2450
- destAmount: string;
2451
- destChainId?: number | undefined;
2452
- }[], import("@metamask/superstruct").Struct<{
2453
- action: ActionTypes;
2454
- protocol: {
2455
- name: string;
2456
- displayName?: string | undefined;
2457
- icon?: string | undefined;
2458
- };
2459
- srcChainId: number;
2460
- srcAsset: {
2461
- symbol: string;
2462
- address: string;
2463
- name: string;
2464
- chainId: number;
2465
- decimals: number;
2466
- assetId: `${string}:${string}/${string}:${string}`;
2467
- iconUrl?: string | null | undefined;
2468
- icon?: string | null | undefined;
2469
- };
2470
- destAsset: {
2471
- symbol: string;
2472
- address: string;
2473
- name: string;
2474
- chainId: number;
2475
- decimals: number;
2476
- assetId: `${string}:${string}/${string}:${string}`;
2477
- iconUrl?: string | null | undefined;
2478
- icon?: string | null | undefined;
2479
- };
2480
- srcAmount: string;
2481
- destAmount: string;
2482
- destChainId?: number | undefined;
2483
- }, {
2484
- action: import("@metamask/superstruct").Struct<ActionTypes, {
2485
- bridge: ActionTypes.BRIDGE;
2486
- swap: ActionTypes.SWAP;
2487
- refuel: ActionTypes.REFUEL;
2488
- }>;
2489
- srcChainId: import("@metamask/superstruct").Struct<number, null>;
2490
- destChainId: import("@metamask/superstruct").Struct<number | undefined, null>;
2491
- srcAsset: import("@metamask/superstruct").Struct<{
2492
- symbol: string;
2493
- address: string;
2494
- name: string;
2495
- chainId: number;
2496
- decimals: number;
2497
- assetId: `${string}:${string}/${string}:${string}`;
2498
- iconUrl?: string | null | undefined;
2499
- icon?: string | null | undefined;
2500
- }, {
2501
- /**
2502
- * The chainId of the token
2503
- */
2504
- chainId: import("@metamask/superstruct").Struct<number, null>;
2505
- /**
2506
- * An address that the metaswap-api recognizes as the default token
2507
- */
2508
- address: import("@metamask/superstruct").Struct<string, null>;
2509
- /**
2510
- * The assetId of the token
2511
- */
2512
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2513
- /**
2514
- * The symbol of token object
2515
- */
2516
- symbol: import("@metamask/superstruct").Struct<string, null>;
2517
- /**
2518
- * The name for the network
2519
- */
2520
- name: import("@metamask/superstruct").Struct<string, null>;
2521
- decimals: import("@metamask/superstruct").Struct<number, null>;
2522
- /**
2523
- * URL for token icon
2524
- */
2525
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2526
- /**
2527
- * URL for token icon
2528
- */
2529
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2530
- }>;
2531
- destAsset: import("@metamask/superstruct").Struct<{
2532
- symbol: string;
2533
- address: string;
2534
- name: string;
2535
- chainId: number;
2536
- decimals: number;
2537
- assetId: `${string}:${string}/${string}:${string}`;
2538
- iconUrl?: string | null | undefined;
2539
- icon?: string | null | undefined;
2540
- }, {
2541
- /**
2542
- * The chainId of the token
2543
- */
2544
- chainId: import("@metamask/superstruct").Struct<number, null>;
2545
- /**
2546
- * An address that the metaswap-api recognizes as the default token
2547
- */
2548
- address: import("@metamask/superstruct").Struct<string, null>;
2549
- /**
2550
- * The assetId of the token
2551
- */
2552
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2553
- /**
2554
- * The symbol of token object
2555
- */
2556
- symbol: import("@metamask/superstruct").Struct<string, null>;
2557
- /**
2558
- * The name for the network
2559
- */
2560
- name: import("@metamask/superstruct").Struct<string, null>;
2561
- decimals: import("@metamask/superstruct").Struct<number, null>;
2562
- /**
2563
- * URL for token icon
2564
- */
2565
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2566
- /**
2567
- * URL for token icon
2568
- */
2569
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2570
- }>;
2571
- srcAmount: import("@metamask/superstruct").Struct<string, null>;
2572
- destAmount: import("@metamask/superstruct").Struct<string, null>;
2573
- protocol: import("@metamask/superstruct").Struct<{
2574
- name: string;
2575
- displayName?: string | undefined;
2576
- icon?: string | undefined;
2577
- }, {
2578
- name: import("@metamask/superstruct").Struct<string, null>;
2579
- displayName: import("@metamask/superstruct").Struct<string | undefined, null>;
2580
- icon: import("@metamask/superstruct").Struct<string | undefined, null>;
2581
- }>;
2582
- }>>;
2583
- refuel: import("@metamask/superstruct").Struct<{
2584
- action: ActionTypes;
2585
- protocol: {
2586
- name: string;
2587
- displayName?: string | undefined;
2588
- icon?: string | undefined;
2589
- };
2590
- srcChainId: number;
2591
- srcAsset: {
2592
- symbol: string;
2593
- address: string;
2594
- name: string;
2595
- chainId: number;
2596
- decimals: number;
2597
- assetId: `${string}:${string}/${string}:${string}`;
2598
- iconUrl?: string | null | undefined;
2599
- icon?: string | null | undefined;
2600
- };
2601
- destAsset: {
2602
- symbol: string;
2603
- address: string;
2604
- name: string;
2605
- chainId: number;
2606
- decimals: number;
2607
- assetId: `${string}:${string}/${string}:${string}`;
2608
- iconUrl?: string | null | undefined;
2609
- icon?: string | null | undefined;
2610
- };
2611
- srcAmount: string;
2612
- destAmount: string;
2613
- destChainId?: number | undefined;
2614
- } | undefined, {
2615
- action: import("@metamask/superstruct").Struct<ActionTypes, {
2616
- bridge: ActionTypes.BRIDGE;
2617
- swap: ActionTypes.SWAP;
2618
- refuel: ActionTypes.REFUEL;
2619
- }>;
2620
- srcChainId: import("@metamask/superstruct").Struct<number, null>;
2621
- destChainId: import("@metamask/superstruct").Struct<number | undefined, null>;
2622
- srcAsset: import("@metamask/superstruct").Struct<{
2623
- symbol: string;
2624
- address: string;
2625
- name: string;
2626
- chainId: number;
2627
- decimals: number;
2628
- assetId: `${string}:${string}/${string}:${string}`;
2629
- iconUrl?: string | null | undefined;
2630
- icon?: string | null | undefined;
2631
- }, {
2632
- /**
2633
- * The chainId of the token
2634
- */
2635
- chainId: import("@metamask/superstruct").Struct<number, null>;
2636
- /**
2637
- * An address that the metaswap-api recognizes as the default token
2638
- */
2639
- address: import("@metamask/superstruct").Struct<string, null>;
2640
- /**
2641
- * The assetId of the token
2642
- */
2643
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2644
- /**
2645
- * The symbol of token object
2646
- */
2647
- symbol: import("@metamask/superstruct").Struct<string, null>;
2648
- /**
2649
- * The name for the network
2650
- */
2651
- name: import("@metamask/superstruct").Struct<string, null>;
2652
- decimals: import("@metamask/superstruct").Struct<number, null>;
2653
- /**
2654
- * URL for token icon
2655
- */
2656
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2657
- /**
2658
- * URL for token icon
2659
- */
2660
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2661
- }>;
2662
- destAsset: import("@metamask/superstruct").Struct<{
2663
- symbol: string;
2664
- address: string;
2665
- name: string;
2666
- chainId: number;
2667
- decimals: number;
2668
- assetId: `${string}:${string}/${string}:${string}`;
2669
- iconUrl?: string | null | undefined;
2670
- icon?: string | null | undefined;
2671
- }, {
2672
- /**
2673
- * The chainId of the token
2674
- */
2675
- chainId: import("@metamask/superstruct").Struct<number, null>;
2676
- /**
2677
- * An address that the metaswap-api recognizes as the default token
2678
- */
2679
- address: import("@metamask/superstruct").Struct<string, null>;
2680
- /**
2681
- * The assetId of the token
2682
- */
2683
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2684
- /**
2685
- * The symbol of token object
2686
- */
2687
- symbol: import("@metamask/superstruct").Struct<string, null>;
2688
- /**
2689
- * The name for the network
2690
- */
2691
- name: import("@metamask/superstruct").Struct<string, null>;
2692
- decimals: import("@metamask/superstruct").Struct<number, null>;
2693
- /**
2694
- * URL for token icon
2695
- */
2696
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2697
- /**
2698
- * URL for token icon
2699
- */
2700
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2701
- }>;
2702
- srcAmount: import("@metamask/superstruct").Struct<string, null>;
2703
- destAmount: import("@metamask/superstruct").Struct<string, null>;
2704
- protocol: import("@metamask/superstruct").Struct<{
2705
- name: string;
2706
- displayName?: string | undefined;
2707
- icon?: string | undefined;
2708
- }, {
2709
- name: import("@metamask/superstruct").Struct<string, null>;
2710
- displayName: import("@metamask/superstruct").Struct<string | undefined, null>;
2711
- icon: import("@metamask/superstruct").Struct<string | undefined, null>;
2712
- }>;
2713
- }>;
2714
- priceData: import("@metamask/superstruct").Struct<{
2715
- totalFromAmountUsd?: string | undefined;
2716
- totalToAmountUsd?: string | undefined;
2717
- priceImpact?: string | undefined;
2718
- totalFeeAmountUsd?: string | undefined;
2719
- } | undefined, {
2720
- totalFromAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
2721
- totalToAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
2722
- priceImpact: import("@metamask/superstruct").Struct<string | undefined, null>;
2723
- totalFeeAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
2724
- }>;
2725
- }>;
2726
- estimatedProcessingTimeInSeconds: import("@metamask/superstruct").Struct<number, null>;
2727
- approval: import("@metamask/superstruct").Struct<{
2728
- data: string;
2729
- value: string;
2730
- to: string;
2731
- from: string;
2732
- gasLimit: number | null;
2733
- chainId: number;
2734
- effectiveGas?: number | undefined;
2735
- } | undefined, {
2736
- chainId: import("@metamask/superstruct").Struct<number, null>;
2737
- to: import("@metamask/superstruct").Struct<string, null>;
2738
- from: import("@metamask/superstruct").Struct<string, null>;
2739
- value: import("@metamask/superstruct").Struct<string, null>;
2740
- data: import("@metamask/superstruct").Struct<string, null>;
2741
- gasLimit: import("@metamask/superstruct").Struct<number | null, null>;
2742
- effectiveGas: import("@metamask/superstruct").Struct<number | undefined, null>;
2743
- }>;
2744
- trade: import("@metamask/superstruct").Struct<{
2745
- unsignedPsbtBase64: string;
2746
- inputsToSign: {}[] | null;
2747
- }, {
2748
- unsignedPsbtBase64: import("@metamask/superstruct").Struct<string, null>;
2749
- inputsToSign: import("@metamask/superstruct").Struct<{}[] | null, import("@metamask/superstruct").Struct<{}, {}>>;
2750
- }>;
2751
- }>;
2752
- export declare const validateQuoteResponse: (data: unknown) => data is {
2753
- quote: {
2754
- requestId: string;
2755
- srcChainId: number;
2756
- destChainId: number;
2757
- srcAsset: {
2758
- symbol: string;
2759
- address: string;
2760
- name: string;
2761
- chainId: number;
2762
- decimals: number;
2763
- assetId: `${string}:${string}/${string}:${string}`;
2764
- iconUrl?: string | null | undefined;
2765
- icon?: string | null | undefined;
2766
- };
2767
- destAsset: {
2768
- symbol: string;
2769
- address: string;
2770
- name: string;
2771
- chainId: number;
2772
- decimals: number;
2773
- assetId: `${string}:${string}/${string}:${string}`;
2774
- iconUrl?: string | null | undefined;
2775
- icon?: string | null | undefined;
2776
- };
2777
- srcTokenAmount: string;
2778
- destTokenAmount: string;
2779
- minDestTokenAmount: string;
2780
- feeData: {
2781
- metabridge: {
2782
- amount: string;
2783
- asset: {
2784
- symbol: string;
2785
- address: string;
2786
- name: string;
2787
- chainId: number;
2788
- decimals: number;
2789
- assetId: `${string}:${string}/${string}:${string}`;
2790
- iconUrl?: string | null | undefined;
2791
- icon?: string | null | undefined;
2792
- };
2793
- };
2794
- txFee?: ({
2795
- amount: string;
2796
- asset: {
2797
- symbol: string;
2798
- address: string;
2799
- name: string;
2800
- chainId: number;
2801
- decimals: number;
2802
- assetId: `${string}:${string}/${string}:${string}`;
2803
- iconUrl?: string | null | undefined;
2804
- icon?: string | null | undefined;
2805
- };
2806
- } & {
2807
- maxPriorityFeePerGas: string;
2808
- maxFeePerGas: string;
2809
- }) | undefined;
2810
- };
2811
- bridgeId: string;
2812
- bridges: string[];
2813
- steps: {
2814
- action: ActionTypes;
2815
- protocol: {
2816
- name: string;
2817
- displayName?: string | undefined;
2818
- icon?: string | undefined;
2819
- };
2820
- srcChainId: number;
2821
- srcAsset: {
2822
- symbol: string;
2823
- address: string;
2824
- name: string;
2825
- chainId: number;
2826
- decimals: number;
2827
- assetId: `${string}:${string}/${string}:${string}`;
2828
- iconUrl?: string | null | undefined;
2829
- icon?: string | null | undefined;
2830
- };
2831
- destAsset: {
2832
- symbol: string;
2833
- address: string;
2834
- name: string;
2835
- chainId: number;
2836
- decimals: number;
2837
- assetId: `${string}:${string}/${string}:${string}`;
2838
- iconUrl?: string | null | undefined;
2839
- icon?: string | null | undefined;
2840
- };
2841
- srcAmount: string;
2842
- destAmount: string;
2843
- destChainId?: number | undefined;
2844
- }[];
2845
- refuel?: {
2846
- action: ActionTypes;
2847
- protocol: {
2848
- name: string;
2849
- displayName?: string | undefined;
2850
- icon?: string | undefined;
2851
- };
2852
- srcChainId: number;
2853
- srcAsset: {
2854
- symbol: string;
2855
- address: string;
2856
- name: string;
2857
- chainId: number;
2858
- decimals: number;
2859
- assetId: `${string}:${string}/${string}:${string}`;
2860
- iconUrl?: string | null | undefined;
2861
- icon?: string | null | undefined;
2862
- };
2863
- destAsset: {
2864
- symbol: string;
2865
- address: string;
2866
- name: string;
2867
- chainId: number;
2868
- decimals: number;
2869
- assetId: `${string}:${string}/${string}:${string}`;
2870
- iconUrl?: string | null | undefined;
2871
- icon?: string | null | undefined;
2872
- };
2873
- srcAmount: string;
2874
- destAmount: string;
2875
- destChainId?: number | undefined;
2876
- } | undefined;
2877
- gasIncluded?: boolean | undefined;
2878
- gasIncluded7702?: boolean | undefined;
2879
- priceData?: {
2880
- totalFromAmountUsd?: string | undefined;
2881
- totalToAmountUsd?: string | undefined;
2882
- priceImpact?: string | undefined;
2883
- totalFeeAmountUsd?: string | undefined;
2884
- } | undefined;
2885
- };
2886
- estimatedProcessingTimeInSeconds: number;
2887
- trade: string | {
2079
+ trade: string | {
2888
2080
  data: string;
2889
2081
  value: string;
2890
2082
  to: string;
@@ -2906,153 +2098,4 @@ export declare const validateQuoteResponse: (data: unknown) => data is {
2906
2098
  effectiveGas?: number | undefined;
2907
2099
  } | undefined;
2908
2100
  };
2909
- export declare const validateBitcoinQuoteResponse: (data: unknown) => data is {
2910
- quote: {
2911
- requestId: string;
2912
- srcChainId: number;
2913
- destChainId: number;
2914
- srcAsset: {
2915
- symbol: string;
2916
- address: string;
2917
- name: string;
2918
- chainId: number;
2919
- decimals: number;
2920
- assetId: `${string}:${string}/${string}:${string}`;
2921
- iconUrl?: string | null | undefined;
2922
- icon?: string | null | undefined;
2923
- };
2924
- destAsset: {
2925
- symbol: string;
2926
- address: string;
2927
- name: string;
2928
- chainId: number;
2929
- decimals: number;
2930
- assetId: `${string}:${string}/${string}:${string}`;
2931
- iconUrl?: string | null | undefined;
2932
- icon?: string | null | undefined;
2933
- };
2934
- srcTokenAmount: string;
2935
- destTokenAmount: string;
2936
- minDestTokenAmount: string;
2937
- feeData: {
2938
- metabridge: {
2939
- amount: string;
2940
- asset: {
2941
- symbol: string;
2942
- address: string;
2943
- name: string;
2944
- chainId: number;
2945
- decimals: number;
2946
- assetId: `${string}:${string}/${string}:${string}`;
2947
- iconUrl?: string | null | undefined;
2948
- icon?: string | null | undefined;
2949
- };
2950
- };
2951
- txFee?: ({
2952
- amount: string;
2953
- asset: {
2954
- symbol: string;
2955
- address: string;
2956
- name: string;
2957
- chainId: number;
2958
- decimals: number;
2959
- assetId: `${string}:${string}/${string}:${string}`;
2960
- iconUrl?: string | null | undefined;
2961
- icon?: string | null | undefined;
2962
- };
2963
- } & {
2964
- maxPriorityFeePerGas: string;
2965
- maxFeePerGas: string;
2966
- }) | undefined;
2967
- };
2968
- bridgeId: string;
2969
- bridges: string[];
2970
- steps: {
2971
- action: ActionTypes;
2972
- protocol: {
2973
- name: string;
2974
- displayName?: string | undefined;
2975
- icon?: string | undefined;
2976
- };
2977
- srcChainId: number;
2978
- srcAsset: {
2979
- symbol: string;
2980
- address: string;
2981
- name: string;
2982
- chainId: number;
2983
- decimals: number;
2984
- assetId: `${string}:${string}/${string}:${string}`;
2985
- iconUrl?: string | null | undefined;
2986
- icon?: string | null | undefined;
2987
- };
2988
- destAsset: {
2989
- symbol: string;
2990
- address: string;
2991
- name: string;
2992
- chainId: number;
2993
- decimals: number;
2994
- assetId: `${string}:${string}/${string}:${string}`;
2995
- iconUrl?: string | null | undefined;
2996
- icon?: string | null | undefined;
2997
- };
2998
- srcAmount: string;
2999
- destAmount: string;
3000
- destChainId?: number | undefined;
3001
- }[];
3002
- refuel?: {
3003
- action: ActionTypes;
3004
- protocol: {
3005
- name: string;
3006
- displayName?: string | undefined;
3007
- icon?: string | undefined;
3008
- };
3009
- srcChainId: number;
3010
- srcAsset: {
3011
- symbol: string;
3012
- address: string;
3013
- name: string;
3014
- chainId: number;
3015
- decimals: number;
3016
- assetId: `${string}:${string}/${string}:${string}`;
3017
- iconUrl?: string | null | undefined;
3018
- icon?: string | null | undefined;
3019
- };
3020
- destAsset: {
3021
- symbol: string;
3022
- address: string;
3023
- name: string;
3024
- chainId: number;
3025
- decimals: number;
3026
- assetId: `${string}:${string}/${string}:${string}`;
3027
- iconUrl?: string | null | undefined;
3028
- icon?: string | null | undefined;
3029
- };
3030
- srcAmount: string;
3031
- destAmount: string;
3032
- destChainId?: number | undefined;
3033
- } | undefined;
3034
- gasIncluded?: boolean | undefined;
3035
- gasIncluded7702?: boolean | undefined;
3036
- priceData?: {
3037
- totalFromAmountUsd?: string | undefined;
3038
- totalToAmountUsd?: string | undefined;
3039
- priceImpact?: string | undefined;
3040
- totalFeeAmountUsd?: string | undefined;
3041
- } | undefined;
3042
- };
3043
- estimatedProcessingTimeInSeconds: number;
3044
- trade: {
3045
- unsignedPsbtBase64: string;
3046
- inputsToSign: {}[] | null;
3047
- };
3048
- approval?: {
3049
- data: string;
3050
- value: string;
3051
- to: string;
3052
- from: string;
3053
- gasLimit: number | null;
3054
- chainId: number;
3055
- effectiveGas?: number | undefined;
3056
- } | undefined;
3057
- };
3058
2101
  //# sourceMappingURL=validators.d.mts.map