@metamask/bridge-controller 45.0.0 → 46.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -1
- package/dist/bridge-controller.cjs +28 -15
- package/dist/bridge-controller.cjs.map +1 -1
- package/dist/bridge-controller.d.cts.map +1 -1
- package/dist/bridge-controller.d.mts.map +1 -1
- package/dist/bridge-controller.mjs +30 -17
- package/dist/bridge-controller.mjs.map +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/selectors.cjs +23 -20
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +315 -81
- package/dist/selectors.d.cts.map +1 -1
- package/dist/selectors.d.mts +315 -81
- package/dist/selectors.d.mts.map +1 -1
- package/dist/selectors.mjs +25 -22
- package/dist/selectors.mjs.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +3 -3
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +3 -3
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs.map +1 -1
- package/dist/utils/bridge.cjs +12 -1
- package/dist/utils/bridge.cjs.map +1 -1
- package/dist/utils/bridge.d.cts +8 -0
- package/dist/utils/bridge.d.cts.map +1 -1
- package/dist/utils/bridge.d.mts +8 -0
- package/dist/utils/bridge.d.mts.map +1 -1
- package/dist/utils/bridge.mjs +10 -0
- package/dist/utils/bridge.mjs.map +1 -1
- package/dist/utils/fetch.cjs +5 -0
- package/dist/utils/fetch.cjs.map +1 -1
- package/dist/utils/fetch.d.cts.map +1 -1
- package/dist/utils/fetch.d.mts.map +1 -1
- package/dist/utils/fetch.mjs +6 -1
- package/dist/utils/fetch.mjs.map +1 -1
- package/dist/utils/quote.cjs +19 -13
- package/dist/utils/quote.cjs.map +1 -1
- package/dist/utils/quote.d.cts +2 -2
- package/dist/utils/quote.d.cts.map +1 -1
- package/dist/utils/quote.d.mts +2 -2
- package/dist/utils/quote.d.mts.map +1 -1
- package/dist/utils/quote.mjs +18 -12
- package/dist/utils/quote.mjs.map +1 -1
- package/dist/utils/snaps.cjs +20 -6
- package/dist/utils/snaps.cjs.map +1 -1
- package/dist/utils/snaps.d.cts +16 -2
- package/dist/utils/snaps.d.cts.map +1 -1
- package/dist/utils/snaps.d.mts +16 -2
- package/dist/utils/snaps.d.mts.map +1 -1
- package/dist/utils/snaps.mjs +18 -4
- package/dist/utils/snaps.mjs.map +1 -1
- package/dist/utils/validators.cjs +17 -2
- package/dist/utils/validators.cjs.map +1 -1
- package/dist/utils/validators.d.cts +990 -2
- package/dist/utils/validators.d.cts.map +1 -1
- package/dist/utils/validators.d.mts +990 -2
- package/dist/utils/validators.d.mts.map +1 -1
- package/dist/utils/validators.mjs +15 -1
- package/dist/utils/validators.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1033,6 +1033,13 @@ export declare const TxDataSchema: import("@metamask/superstruct").Struct<{
|
|
|
1033
1033
|
gasLimit: import("@metamask/superstruct").Struct<number | null, null>;
|
|
1034
1034
|
effectiveGas: import("@metamask/superstruct").Struct<number | undefined, null>;
|
|
1035
1035
|
}>;
|
|
1036
|
+
export declare const BitcoinTradeDataSchema: import("@metamask/superstruct").Struct<{
|
|
1037
|
+
unsignedPsbtBase64: string;
|
|
1038
|
+
inputsToSign: {}[] | null;
|
|
1039
|
+
}, {
|
|
1040
|
+
unsignedPsbtBase64: import("@metamask/superstruct").Struct<string, null>;
|
|
1041
|
+
inputsToSign: import("@metamask/superstruct").Struct<{}[] | null, import("@metamask/superstruct").Struct<{}, {}>>;
|
|
1042
|
+
}>;
|
|
1036
1043
|
export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct<{
|
|
1037
1044
|
quote: {
|
|
1038
1045
|
srcChainId: number;
|
|
@@ -1176,6 +1183,9 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
|
|
|
1176
1183
|
gasLimit: number | null;
|
|
1177
1184
|
chainId: number;
|
|
1178
1185
|
effectiveGas?: number | undefined;
|
|
1186
|
+
} | {
|
|
1187
|
+
unsignedPsbtBase64: string;
|
|
1188
|
+
inputsToSign: {}[] | null;
|
|
1179
1189
|
};
|
|
1180
1190
|
approval?: {
|
|
1181
1191
|
data: string;
|
|
@@ -1861,9 +1871,12 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
|
|
|
1861
1871
|
gasLimit: number | null;
|
|
1862
1872
|
chainId: number;
|
|
1863
1873
|
effectiveGas?: number | undefined;
|
|
1874
|
+
} | {
|
|
1875
|
+
unsignedPsbtBase64: string;
|
|
1876
|
+
inputsToSign: {}[] | null;
|
|
1864
1877
|
}, null>;
|
|
1865
1878
|
}>;
|
|
1866
|
-
export declare const
|
|
1879
|
+
export declare const BitcoinQuoteResponseSchema: import("@metamask/superstruct").Struct<{
|
|
1867
1880
|
quote: {
|
|
1868
1881
|
srcChainId: number;
|
|
1869
1882
|
destChainId: number;
|
|
@@ -1998,7 +2011,11 @@ export declare const validateQuoteResponse: (data: unknown) => data is {
|
|
|
1998
2011
|
} | undefined;
|
|
1999
2012
|
};
|
|
2000
2013
|
estimatedProcessingTimeInSeconds: number;
|
|
2001
|
-
trade:
|
|
2014
|
+
trade: {
|
|
2015
|
+
unsignedPsbtBase64: string;
|
|
2016
|
+
inputsToSign: {}[] | null;
|
|
2017
|
+
};
|
|
2018
|
+
approval?: {
|
|
2002
2019
|
data: string;
|
|
2003
2020
|
value: string;
|
|
2004
2021
|
to: string;
|
|
@@ -2006,6 +2023,977 @@ export declare const validateQuoteResponse: (data: unknown) => data is {
|
|
|
2006
2023
|
gasLimit: number | null;
|
|
2007
2024
|
chainId: number;
|
|
2008
2025
|
effectiveGas?: number | undefined;
|
|
2026
|
+
} | undefined;
|
|
2027
|
+
}, {
|
|
2028
|
+
quote: import("@metamask/superstruct").Struct<{
|
|
2029
|
+
srcChainId: number;
|
|
2030
|
+
destChainId: number;
|
|
2031
|
+
srcAsset: {
|
|
2032
|
+
symbol: string;
|
|
2033
|
+
address: string;
|
|
2034
|
+
name: string;
|
|
2035
|
+
chainId: number;
|
|
2036
|
+
decimals: number;
|
|
2037
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2038
|
+
iconUrl?: string | null | undefined;
|
|
2039
|
+
icon?: string | null | undefined;
|
|
2040
|
+
};
|
|
2041
|
+
destAsset: {
|
|
2042
|
+
symbol: string;
|
|
2043
|
+
address: string;
|
|
2044
|
+
name: string;
|
|
2045
|
+
chainId: number;
|
|
2046
|
+
decimals: number;
|
|
2047
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2048
|
+
iconUrl?: string | null | undefined;
|
|
2049
|
+
icon?: string | null | undefined;
|
|
2050
|
+
};
|
|
2051
|
+
requestId: string;
|
|
2052
|
+
srcTokenAmount: string;
|
|
2053
|
+
destTokenAmount: string;
|
|
2054
|
+
minDestTokenAmount: string;
|
|
2055
|
+
feeData: {
|
|
2056
|
+
metabridge: {
|
|
2057
|
+
amount: string;
|
|
2058
|
+
asset: {
|
|
2059
|
+
symbol: string;
|
|
2060
|
+
address: string;
|
|
2061
|
+
name: string;
|
|
2062
|
+
chainId: number;
|
|
2063
|
+
decimals: number;
|
|
2064
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2065
|
+
iconUrl?: string | null | undefined;
|
|
2066
|
+
icon?: string | null | undefined;
|
|
2067
|
+
};
|
|
2068
|
+
};
|
|
2069
|
+
txFee?: ({
|
|
2070
|
+
amount: string;
|
|
2071
|
+
asset: {
|
|
2072
|
+
symbol: string;
|
|
2073
|
+
address: string;
|
|
2074
|
+
name: string;
|
|
2075
|
+
chainId: number;
|
|
2076
|
+
decimals: number;
|
|
2077
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2078
|
+
iconUrl?: string | null | undefined;
|
|
2079
|
+
icon?: string | null | undefined;
|
|
2080
|
+
};
|
|
2081
|
+
} & {
|
|
2082
|
+
maxPriorityFeePerGas: string;
|
|
2083
|
+
maxFeePerGas: string;
|
|
2084
|
+
}) | undefined;
|
|
2085
|
+
};
|
|
2086
|
+
bridgeId: string;
|
|
2087
|
+
bridges: string[];
|
|
2088
|
+
steps: {
|
|
2089
|
+
action: ActionTypes;
|
|
2090
|
+
protocol: {
|
|
2091
|
+
name: string;
|
|
2092
|
+
displayName?: string | undefined;
|
|
2093
|
+
icon?: string | undefined;
|
|
2094
|
+
};
|
|
2095
|
+
srcChainId: number;
|
|
2096
|
+
srcAsset: {
|
|
2097
|
+
symbol: string;
|
|
2098
|
+
address: string;
|
|
2099
|
+
name: string;
|
|
2100
|
+
chainId: number;
|
|
2101
|
+
decimals: number;
|
|
2102
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2103
|
+
iconUrl?: string | null | undefined;
|
|
2104
|
+
icon?: string | null | undefined;
|
|
2105
|
+
};
|
|
2106
|
+
destAsset: {
|
|
2107
|
+
symbol: string;
|
|
2108
|
+
address: string;
|
|
2109
|
+
name: string;
|
|
2110
|
+
chainId: number;
|
|
2111
|
+
decimals: number;
|
|
2112
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2113
|
+
iconUrl?: string | null | undefined;
|
|
2114
|
+
icon?: string | null | undefined;
|
|
2115
|
+
};
|
|
2116
|
+
srcAmount: string;
|
|
2117
|
+
destAmount: string;
|
|
2118
|
+
destChainId?: number | undefined;
|
|
2119
|
+
}[];
|
|
2120
|
+
refuel?: {
|
|
2121
|
+
action: ActionTypes;
|
|
2122
|
+
protocol: {
|
|
2123
|
+
name: string;
|
|
2124
|
+
displayName?: string | undefined;
|
|
2125
|
+
icon?: string | undefined;
|
|
2126
|
+
};
|
|
2127
|
+
srcChainId: number;
|
|
2128
|
+
srcAsset: {
|
|
2129
|
+
symbol: string;
|
|
2130
|
+
address: string;
|
|
2131
|
+
name: string;
|
|
2132
|
+
chainId: number;
|
|
2133
|
+
decimals: number;
|
|
2134
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2135
|
+
iconUrl?: string | null | undefined;
|
|
2136
|
+
icon?: string | null | undefined;
|
|
2137
|
+
};
|
|
2138
|
+
destAsset: {
|
|
2139
|
+
symbol: string;
|
|
2140
|
+
address: string;
|
|
2141
|
+
name: string;
|
|
2142
|
+
chainId: number;
|
|
2143
|
+
decimals: number;
|
|
2144
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2145
|
+
iconUrl?: string | null | undefined;
|
|
2146
|
+
icon?: string | null | undefined;
|
|
2147
|
+
};
|
|
2148
|
+
srcAmount: string;
|
|
2149
|
+
destAmount: string;
|
|
2150
|
+
destChainId?: number | undefined;
|
|
2151
|
+
} | undefined;
|
|
2152
|
+
gasIncluded?: boolean | undefined;
|
|
2153
|
+
gasIncluded7702?: boolean | undefined;
|
|
2154
|
+
priceData?: {
|
|
2155
|
+
totalFromAmountUsd?: string | undefined;
|
|
2156
|
+
totalToAmountUsd?: string | undefined;
|
|
2157
|
+
priceImpact?: string | undefined;
|
|
2158
|
+
totalFeeAmountUsd?: string | undefined;
|
|
2159
|
+
} | undefined;
|
|
2160
|
+
}, {
|
|
2161
|
+
requestId: import("@metamask/superstruct").Struct<string, null>;
|
|
2162
|
+
srcChainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2163
|
+
srcAsset: import("@metamask/superstruct").Struct<{
|
|
2164
|
+
symbol: string;
|
|
2165
|
+
address: string;
|
|
2166
|
+
name: string;
|
|
2167
|
+
chainId: number;
|
|
2168
|
+
decimals: number;
|
|
2169
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2170
|
+
iconUrl?: string | null | undefined;
|
|
2171
|
+
icon?: string | null | undefined;
|
|
2172
|
+
}, {
|
|
2173
|
+
/**
|
|
2174
|
+
* The chainId of the token
|
|
2175
|
+
*/
|
|
2176
|
+
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2177
|
+
/**
|
|
2178
|
+
* An address that the metaswap-api recognizes as the default token
|
|
2179
|
+
*/
|
|
2180
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
2181
|
+
/**
|
|
2182
|
+
* The assetId of the token
|
|
2183
|
+
*/
|
|
2184
|
+
assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
|
|
2185
|
+
/**
|
|
2186
|
+
* The symbol of token object
|
|
2187
|
+
*/
|
|
2188
|
+
symbol: import("@metamask/superstruct").Struct<string, null>;
|
|
2189
|
+
/**
|
|
2190
|
+
* The name for the network
|
|
2191
|
+
*/
|
|
2192
|
+
name: import("@metamask/superstruct").Struct<string, null>;
|
|
2193
|
+
decimals: import("@metamask/superstruct").Struct<number, null>;
|
|
2194
|
+
/**
|
|
2195
|
+
* URL for token icon
|
|
2196
|
+
*/
|
|
2197
|
+
icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2198
|
+
/**
|
|
2199
|
+
* URL for token icon
|
|
2200
|
+
*/
|
|
2201
|
+
iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2202
|
+
}>;
|
|
2203
|
+
/**
|
|
2204
|
+
* The amount sent, in atomic amount: amount sent - fees
|
|
2205
|
+
* Some tokens have a fee of 0, so sometimes it's equal to amount sent
|
|
2206
|
+
*/
|
|
2207
|
+
srcTokenAmount: import("@metamask/superstruct").Struct<string, null>;
|
|
2208
|
+
destChainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2209
|
+
destAsset: import("@metamask/superstruct").Struct<{
|
|
2210
|
+
symbol: string;
|
|
2211
|
+
address: string;
|
|
2212
|
+
name: string;
|
|
2213
|
+
chainId: number;
|
|
2214
|
+
decimals: number;
|
|
2215
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2216
|
+
iconUrl?: string | null | undefined;
|
|
2217
|
+
icon?: string | null | undefined;
|
|
2218
|
+
}, {
|
|
2219
|
+
/**
|
|
2220
|
+
* The chainId of the token
|
|
2221
|
+
*/
|
|
2222
|
+
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2223
|
+
/**
|
|
2224
|
+
* An address that the metaswap-api recognizes as the default token
|
|
2225
|
+
*/
|
|
2226
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
2227
|
+
/**
|
|
2228
|
+
* The assetId of the token
|
|
2229
|
+
*/
|
|
2230
|
+
assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
|
|
2231
|
+
/**
|
|
2232
|
+
* The symbol of token object
|
|
2233
|
+
*/
|
|
2234
|
+
symbol: import("@metamask/superstruct").Struct<string, null>;
|
|
2235
|
+
/**
|
|
2236
|
+
* The name for the network
|
|
2237
|
+
*/
|
|
2238
|
+
name: import("@metamask/superstruct").Struct<string, null>;
|
|
2239
|
+
decimals: import("@metamask/superstruct").Struct<number, null>;
|
|
2240
|
+
/**
|
|
2241
|
+
* URL for token icon
|
|
2242
|
+
*/
|
|
2243
|
+
icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2244
|
+
/**
|
|
2245
|
+
* URL for token icon
|
|
2246
|
+
*/
|
|
2247
|
+
iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2248
|
+
}>;
|
|
2249
|
+
/**
|
|
2250
|
+
* The amount received, in atomic amount
|
|
2251
|
+
*/
|
|
2252
|
+
destTokenAmount: import("@metamask/superstruct").Struct<string, null>;
|
|
2253
|
+
/**
|
|
2254
|
+
* The minimum amount that will be received, in atomic amount
|
|
2255
|
+
*/
|
|
2256
|
+
minDestTokenAmount: import("@metamask/superstruct").Struct<string, null>;
|
|
2257
|
+
feeData: import("@metamask/superstruct").Struct<{
|
|
2258
|
+
metabridge: {
|
|
2259
|
+
amount: string;
|
|
2260
|
+
asset: {
|
|
2261
|
+
symbol: string;
|
|
2262
|
+
address: string;
|
|
2263
|
+
name: string;
|
|
2264
|
+
chainId: number;
|
|
2265
|
+
decimals: number;
|
|
2266
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2267
|
+
iconUrl?: string | null | undefined;
|
|
2268
|
+
icon?: string | null | undefined;
|
|
2269
|
+
};
|
|
2270
|
+
};
|
|
2271
|
+
txFee?: ({
|
|
2272
|
+
amount: string;
|
|
2273
|
+
asset: {
|
|
2274
|
+
symbol: string;
|
|
2275
|
+
address: string;
|
|
2276
|
+
name: string;
|
|
2277
|
+
chainId: number;
|
|
2278
|
+
decimals: number;
|
|
2279
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2280
|
+
iconUrl?: string | null | undefined;
|
|
2281
|
+
icon?: string | null | undefined;
|
|
2282
|
+
};
|
|
2283
|
+
} & {
|
|
2284
|
+
maxPriorityFeePerGas: string;
|
|
2285
|
+
maxFeePerGas: string;
|
|
2286
|
+
}) | undefined;
|
|
2287
|
+
}, {
|
|
2288
|
+
metabridge: import("@metamask/superstruct").Struct<{
|
|
2289
|
+
amount: string;
|
|
2290
|
+
asset: {
|
|
2291
|
+
symbol: string;
|
|
2292
|
+
address: string;
|
|
2293
|
+
name: string;
|
|
2294
|
+
chainId: number;
|
|
2295
|
+
decimals: number;
|
|
2296
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2297
|
+
iconUrl?: string | null | undefined;
|
|
2298
|
+
icon?: string | null | undefined;
|
|
2299
|
+
};
|
|
2300
|
+
}, {
|
|
2301
|
+
amount: import("@metamask/superstruct").Struct<string, null>;
|
|
2302
|
+
asset: import("@metamask/superstruct").Struct<{
|
|
2303
|
+
symbol: string;
|
|
2304
|
+
address: string;
|
|
2305
|
+
name: string;
|
|
2306
|
+
chainId: number;
|
|
2307
|
+
decimals: number;
|
|
2308
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2309
|
+
iconUrl?: string | null | undefined;
|
|
2310
|
+
icon?: string | null | undefined;
|
|
2311
|
+
}, {
|
|
2312
|
+
/**
|
|
2313
|
+
* The chainId of the token
|
|
2314
|
+
*/
|
|
2315
|
+
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2316
|
+
/**
|
|
2317
|
+
* An address that the metaswap-api recognizes as the default token
|
|
2318
|
+
*/
|
|
2319
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
2320
|
+
/**
|
|
2321
|
+
* The assetId of the token
|
|
2322
|
+
*/
|
|
2323
|
+
assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
|
|
2324
|
+
/**
|
|
2325
|
+
* The symbol of token object
|
|
2326
|
+
*/
|
|
2327
|
+
symbol: import("@metamask/superstruct").Struct<string, null>;
|
|
2328
|
+
/**
|
|
2329
|
+
* The name for the network
|
|
2330
|
+
*/
|
|
2331
|
+
name: import("@metamask/superstruct").Struct<string, null>;
|
|
2332
|
+
decimals: import("@metamask/superstruct").Struct<number, null>;
|
|
2333
|
+
/**
|
|
2334
|
+
* URL for token icon
|
|
2335
|
+
*/
|
|
2336
|
+
icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2337
|
+
/**
|
|
2338
|
+
* URL for token icon
|
|
2339
|
+
*/
|
|
2340
|
+
iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2341
|
+
}>;
|
|
2342
|
+
}>;
|
|
2343
|
+
/**
|
|
2344
|
+
* This is the fee for the swap transaction taken from either the
|
|
2345
|
+
* src or dest token if the quote has gas fees included or "gasless"
|
|
2346
|
+
*/
|
|
2347
|
+
txFee: import("@metamask/superstruct").Struct<({
|
|
2348
|
+
amount: string;
|
|
2349
|
+
asset: {
|
|
2350
|
+
symbol: string;
|
|
2351
|
+
address: string;
|
|
2352
|
+
name: string;
|
|
2353
|
+
chainId: number;
|
|
2354
|
+
decimals: number;
|
|
2355
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2356
|
+
iconUrl?: string | null | undefined;
|
|
2357
|
+
icon?: string | null | undefined;
|
|
2358
|
+
};
|
|
2359
|
+
} & {
|
|
2360
|
+
maxPriorityFeePerGas: string;
|
|
2361
|
+
maxFeePerGas: string;
|
|
2362
|
+
}) | undefined, null>;
|
|
2363
|
+
}>;
|
|
2364
|
+
gasIncluded: import("@metamask/superstruct").Struct<boolean | undefined, null>;
|
|
2365
|
+
/**
|
|
2366
|
+
* Whether the quote can use EIP-7702 delegated gasless execution
|
|
2367
|
+
*/
|
|
2368
|
+
gasIncluded7702: import("@metamask/superstruct").Struct<boolean | undefined, null>;
|
|
2369
|
+
bridgeId: import("@metamask/superstruct").Struct<string, null>;
|
|
2370
|
+
bridges: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
|
|
2371
|
+
steps: import("@metamask/superstruct").Struct<{
|
|
2372
|
+
action: ActionTypes;
|
|
2373
|
+
protocol: {
|
|
2374
|
+
name: string;
|
|
2375
|
+
displayName?: string | undefined;
|
|
2376
|
+
icon?: string | undefined;
|
|
2377
|
+
};
|
|
2378
|
+
srcChainId: number;
|
|
2379
|
+
srcAsset: {
|
|
2380
|
+
symbol: string;
|
|
2381
|
+
address: string;
|
|
2382
|
+
name: string;
|
|
2383
|
+
chainId: number;
|
|
2384
|
+
decimals: number;
|
|
2385
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2386
|
+
iconUrl?: string | null | undefined;
|
|
2387
|
+
icon?: string | null | undefined;
|
|
2388
|
+
};
|
|
2389
|
+
destAsset: {
|
|
2390
|
+
symbol: string;
|
|
2391
|
+
address: string;
|
|
2392
|
+
name: string;
|
|
2393
|
+
chainId: number;
|
|
2394
|
+
decimals: number;
|
|
2395
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2396
|
+
iconUrl?: string | null | undefined;
|
|
2397
|
+
icon?: string | null | undefined;
|
|
2398
|
+
};
|
|
2399
|
+
srcAmount: string;
|
|
2400
|
+
destAmount: string;
|
|
2401
|
+
destChainId?: number | undefined;
|
|
2402
|
+
}[], import("@metamask/superstruct").Struct<{
|
|
2403
|
+
action: ActionTypes;
|
|
2404
|
+
protocol: {
|
|
2405
|
+
name: string;
|
|
2406
|
+
displayName?: string | undefined;
|
|
2407
|
+
icon?: string | undefined;
|
|
2408
|
+
};
|
|
2409
|
+
srcChainId: number;
|
|
2410
|
+
srcAsset: {
|
|
2411
|
+
symbol: string;
|
|
2412
|
+
address: string;
|
|
2413
|
+
name: string;
|
|
2414
|
+
chainId: number;
|
|
2415
|
+
decimals: number;
|
|
2416
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2417
|
+
iconUrl?: string | null | undefined;
|
|
2418
|
+
icon?: string | null | undefined;
|
|
2419
|
+
};
|
|
2420
|
+
destAsset: {
|
|
2421
|
+
symbol: string;
|
|
2422
|
+
address: string;
|
|
2423
|
+
name: string;
|
|
2424
|
+
chainId: number;
|
|
2425
|
+
decimals: number;
|
|
2426
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2427
|
+
iconUrl?: string | null | undefined;
|
|
2428
|
+
icon?: string | null | undefined;
|
|
2429
|
+
};
|
|
2430
|
+
srcAmount: string;
|
|
2431
|
+
destAmount: string;
|
|
2432
|
+
destChainId?: number | undefined;
|
|
2433
|
+
}, {
|
|
2434
|
+
action: import("@metamask/superstruct").Struct<ActionTypes, {
|
|
2435
|
+
bridge: ActionTypes.BRIDGE;
|
|
2436
|
+
swap: ActionTypes.SWAP;
|
|
2437
|
+
refuel: ActionTypes.REFUEL;
|
|
2438
|
+
}>;
|
|
2439
|
+
srcChainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2440
|
+
destChainId: import("@metamask/superstruct").Struct<number | undefined, null>;
|
|
2441
|
+
srcAsset: import("@metamask/superstruct").Struct<{
|
|
2442
|
+
symbol: string;
|
|
2443
|
+
address: string;
|
|
2444
|
+
name: string;
|
|
2445
|
+
chainId: number;
|
|
2446
|
+
decimals: number;
|
|
2447
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2448
|
+
iconUrl?: string | null | undefined;
|
|
2449
|
+
icon?: string | null | undefined;
|
|
2450
|
+
}, {
|
|
2451
|
+
/**
|
|
2452
|
+
* The chainId of the token
|
|
2453
|
+
*/
|
|
2454
|
+
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2455
|
+
/**
|
|
2456
|
+
* An address that the metaswap-api recognizes as the default token
|
|
2457
|
+
*/
|
|
2458
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
2459
|
+
/**
|
|
2460
|
+
* The assetId of the token
|
|
2461
|
+
*/
|
|
2462
|
+
assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
|
|
2463
|
+
/**
|
|
2464
|
+
* The symbol of token object
|
|
2465
|
+
*/
|
|
2466
|
+
symbol: import("@metamask/superstruct").Struct<string, null>;
|
|
2467
|
+
/**
|
|
2468
|
+
* The name for the network
|
|
2469
|
+
*/
|
|
2470
|
+
name: import("@metamask/superstruct").Struct<string, null>;
|
|
2471
|
+
decimals: import("@metamask/superstruct").Struct<number, null>;
|
|
2472
|
+
/**
|
|
2473
|
+
* URL for token icon
|
|
2474
|
+
*/
|
|
2475
|
+
icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2476
|
+
/**
|
|
2477
|
+
* URL for token icon
|
|
2478
|
+
*/
|
|
2479
|
+
iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2480
|
+
}>;
|
|
2481
|
+
destAsset: import("@metamask/superstruct").Struct<{
|
|
2482
|
+
symbol: string;
|
|
2483
|
+
address: string;
|
|
2484
|
+
name: string;
|
|
2485
|
+
chainId: number;
|
|
2486
|
+
decimals: number;
|
|
2487
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2488
|
+
iconUrl?: string | null | undefined;
|
|
2489
|
+
icon?: string | null | undefined;
|
|
2490
|
+
}, {
|
|
2491
|
+
/**
|
|
2492
|
+
* The chainId of the token
|
|
2493
|
+
*/
|
|
2494
|
+
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2495
|
+
/**
|
|
2496
|
+
* An address that the metaswap-api recognizes as the default token
|
|
2497
|
+
*/
|
|
2498
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
2499
|
+
/**
|
|
2500
|
+
* The assetId of the token
|
|
2501
|
+
*/
|
|
2502
|
+
assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
|
|
2503
|
+
/**
|
|
2504
|
+
* The symbol of token object
|
|
2505
|
+
*/
|
|
2506
|
+
symbol: import("@metamask/superstruct").Struct<string, null>;
|
|
2507
|
+
/**
|
|
2508
|
+
* The name for the network
|
|
2509
|
+
*/
|
|
2510
|
+
name: import("@metamask/superstruct").Struct<string, null>;
|
|
2511
|
+
decimals: import("@metamask/superstruct").Struct<number, null>;
|
|
2512
|
+
/**
|
|
2513
|
+
* URL for token icon
|
|
2514
|
+
*/
|
|
2515
|
+
icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2516
|
+
/**
|
|
2517
|
+
* URL for token icon
|
|
2518
|
+
*/
|
|
2519
|
+
iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2520
|
+
}>;
|
|
2521
|
+
srcAmount: import("@metamask/superstruct").Struct<string, null>;
|
|
2522
|
+
destAmount: import("@metamask/superstruct").Struct<string, null>;
|
|
2523
|
+
protocol: import("@metamask/superstruct").Struct<{
|
|
2524
|
+
name: string;
|
|
2525
|
+
displayName?: string | undefined;
|
|
2526
|
+
icon?: string | undefined;
|
|
2527
|
+
}, {
|
|
2528
|
+
name: import("@metamask/superstruct").Struct<string, null>;
|
|
2529
|
+
displayName: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
2530
|
+
icon: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
2531
|
+
}>;
|
|
2532
|
+
}>>;
|
|
2533
|
+
refuel: import("@metamask/superstruct").Struct<{
|
|
2534
|
+
action: ActionTypes;
|
|
2535
|
+
protocol: {
|
|
2536
|
+
name: string;
|
|
2537
|
+
displayName?: string | undefined;
|
|
2538
|
+
icon?: string | undefined;
|
|
2539
|
+
};
|
|
2540
|
+
srcChainId: number;
|
|
2541
|
+
srcAsset: {
|
|
2542
|
+
symbol: string;
|
|
2543
|
+
address: string;
|
|
2544
|
+
name: string;
|
|
2545
|
+
chainId: number;
|
|
2546
|
+
decimals: number;
|
|
2547
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2548
|
+
iconUrl?: string | null | undefined;
|
|
2549
|
+
icon?: string | null | undefined;
|
|
2550
|
+
};
|
|
2551
|
+
destAsset: {
|
|
2552
|
+
symbol: string;
|
|
2553
|
+
address: string;
|
|
2554
|
+
name: string;
|
|
2555
|
+
chainId: number;
|
|
2556
|
+
decimals: number;
|
|
2557
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2558
|
+
iconUrl?: string | null | undefined;
|
|
2559
|
+
icon?: string | null | undefined;
|
|
2560
|
+
};
|
|
2561
|
+
srcAmount: string;
|
|
2562
|
+
destAmount: string;
|
|
2563
|
+
destChainId?: number | undefined;
|
|
2564
|
+
} | undefined, {
|
|
2565
|
+
action: import("@metamask/superstruct").Struct<ActionTypes, {
|
|
2566
|
+
bridge: ActionTypes.BRIDGE;
|
|
2567
|
+
swap: ActionTypes.SWAP;
|
|
2568
|
+
refuel: ActionTypes.REFUEL;
|
|
2569
|
+
}>;
|
|
2570
|
+
srcChainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2571
|
+
destChainId: import("@metamask/superstruct").Struct<number | undefined, null>;
|
|
2572
|
+
srcAsset: import("@metamask/superstruct").Struct<{
|
|
2573
|
+
symbol: string;
|
|
2574
|
+
address: string;
|
|
2575
|
+
name: string;
|
|
2576
|
+
chainId: number;
|
|
2577
|
+
decimals: number;
|
|
2578
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2579
|
+
iconUrl?: string | null | undefined;
|
|
2580
|
+
icon?: string | null | undefined;
|
|
2581
|
+
}, {
|
|
2582
|
+
/**
|
|
2583
|
+
* The chainId of the token
|
|
2584
|
+
*/
|
|
2585
|
+
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2586
|
+
/**
|
|
2587
|
+
* An address that the metaswap-api recognizes as the default token
|
|
2588
|
+
*/
|
|
2589
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
2590
|
+
/**
|
|
2591
|
+
* The assetId of the token
|
|
2592
|
+
*/
|
|
2593
|
+
assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
|
|
2594
|
+
/**
|
|
2595
|
+
* The symbol of token object
|
|
2596
|
+
*/
|
|
2597
|
+
symbol: import("@metamask/superstruct").Struct<string, null>;
|
|
2598
|
+
/**
|
|
2599
|
+
* The name for the network
|
|
2600
|
+
*/
|
|
2601
|
+
name: import("@metamask/superstruct").Struct<string, null>;
|
|
2602
|
+
decimals: import("@metamask/superstruct").Struct<number, null>;
|
|
2603
|
+
/**
|
|
2604
|
+
* URL for token icon
|
|
2605
|
+
*/
|
|
2606
|
+
icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2607
|
+
/**
|
|
2608
|
+
* URL for token icon
|
|
2609
|
+
*/
|
|
2610
|
+
iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2611
|
+
}>;
|
|
2612
|
+
destAsset: import("@metamask/superstruct").Struct<{
|
|
2613
|
+
symbol: string;
|
|
2614
|
+
address: string;
|
|
2615
|
+
name: string;
|
|
2616
|
+
chainId: number;
|
|
2617
|
+
decimals: number;
|
|
2618
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2619
|
+
iconUrl?: string | null | undefined;
|
|
2620
|
+
icon?: string | null | undefined;
|
|
2621
|
+
}, {
|
|
2622
|
+
/**
|
|
2623
|
+
* The chainId of the token
|
|
2624
|
+
*/
|
|
2625
|
+
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2626
|
+
/**
|
|
2627
|
+
* An address that the metaswap-api recognizes as the default token
|
|
2628
|
+
*/
|
|
2629
|
+
address: import("@metamask/superstruct").Struct<string, null>;
|
|
2630
|
+
/**
|
|
2631
|
+
* The assetId of the token
|
|
2632
|
+
*/
|
|
2633
|
+
assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
|
|
2634
|
+
/**
|
|
2635
|
+
* The symbol of token object
|
|
2636
|
+
*/
|
|
2637
|
+
symbol: import("@metamask/superstruct").Struct<string, null>;
|
|
2638
|
+
/**
|
|
2639
|
+
* The name for the network
|
|
2640
|
+
*/
|
|
2641
|
+
name: import("@metamask/superstruct").Struct<string, null>;
|
|
2642
|
+
decimals: import("@metamask/superstruct").Struct<number, null>;
|
|
2643
|
+
/**
|
|
2644
|
+
* URL for token icon
|
|
2645
|
+
*/
|
|
2646
|
+
icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2647
|
+
/**
|
|
2648
|
+
* URL for token icon
|
|
2649
|
+
*/
|
|
2650
|
+
iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
|
|
2651
|
+
}>;
|
|
2652
|
+
srcAmount: import("@metamask/superstruct").Struct<string, null>;
|
|
2653
|
+
destAmount: import("@metamask/superstruct").Struct<string, null>;
|
|
2654
|
+
protocol: import("@metamask/superstruct").Struct<{
|
|
2655
|
+
name: string;
|
|
2656
|
+
displayName?: string | undefined;
|
|
2657
|
+
icon?: string | undefined;
|
|
2658
|
+
}, {
|
|
2659
|
+
name: import("@metamask/superstruct").Struct<string, null>;
|
|
2660
|
+
displayName: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
2661
|
+
icon: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
2662
|
+
}>;
|
|
2663
|
+
}>;
|
|
2664
|
+
priceData: import("@metamask/superstruct").Struct<{
|
|
2665
|
+
totalFromAmountUsd?: string | undefined;
|
|
2666
|
+
totalToAmountUsd?: string | undefined;
|
|
2667
|
+
priceImpact?: string | undefined;
|
|
2668
|
+
totalFeeAmountUsd?: string | undefined;
|
|
2669
|
+
} | undefined, {
|
|
2670
|
+
totalFromAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
2671
|
+
totalToAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
2672
|
+
priceImpact: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
2673
|
+
totalFeeAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
|
|
2674
|
+
}>;
|
|
2675
|
+
}>;
|
|
2676
|
+
estimatedProcessingTimeInSeconds: import("@metamask/superstruct").Struct<number, null>;
|
|
2677
|
+
approval: import("@metamask/superstruct").Struct<{
|
|
2678
|
+
data: string;
|
|
2679
|
+
value: string;
|
|
2680
|
+
to: string;
|
|
2681
|
+
from: string;
|
|
2682
|
+
gasLimit: number | null;
|
|
2683
|
+
chainId: number;
|
|
2684
|
+
effectiveGas?: number | undefined;
|
|
2685
|
+
} | undefined, {
|
|
2686
|
+
chainId: import("@metamask/superstruct").Struct<number, null>;
|
|
2687
|
+
to: import("@metamask/superstruct").Struct<string, null>;
|
|
2688
|
+
from: import("@metamask/superstruct").Struct<string, null>;
|
|
2689
|
+
value: import("@metamask/superstruct").Struct<string, null>;
|
|
2690
|
+
data: import("@metamask/superstruct").Struct<string, null>;
|
|
2691
|
+
gasLimit: import("@metamask/superstruct").Struct<number | null, null>;
|
|
2692
|
+
effectiveGas: import("@metamask/superstruct").Struct<number | undefined, null>;
|
|
2693
|
+
}>;
|
|
2694
|
+
trade: import("@metamask/superstruct").Struct<{
|
|
2695
|
+
unsignedPsbtBase64: string;
|
|
2696
|
+
inputsToSign: {}[] | null;
|
|
2697
|
+
}, {
|
|
2698
|
+
unsignedPsbtBase64: import("@metamask/superstruct").Struct<string, null>;
|
|
2699
|
+
inputsToSign: import("@metamask/superstruct").Struct<{}[] | null, import("@metamask/superstruct").Struct<{}, {}>>;
|
|
2700
|
+
}>;
|
|
2701
|
+
}>;
|
|
2702
|
+
export declare const validateQuoteResponse: (data: unknown) => data is {
|
|
2703
|
+
quote: {
|
|
2704
|
+
srcChainId: number;
|
|
2705
|
+
destChainId: number;
|
|
2706
|
+
srcAsset: {
|
|
2707
|
+
symbol: string;
|
|
2708
|
+
address: string;
|
|
2709
|
+
name: string;
|
|
2710
|
+
chainId: number;
|
|
2711
|
+
decimals: number;
|
|
2712
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2713
|
+
iconUrl?: string | null | undefined;
|
|
2714
|
+
icon?: string | null | undefined;
|
|
2715
|
+
};
|
|
2716
|
+
destAsset: {
|
|
2717
|
+
symbol: string;
|
|
2718
|
+
address: string;
|
|
2719
|
+
name: string;
|
|
2720
|
+
chainId: number;
|
|
2721
|
+
decimals: number;
|
|
2722
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2723
|
+
iconUrl?: string | null | undefined;
|
|
2724
|
+
icon?: string | null | undefined;
|
|
2725
|
+
};
|
|
2726
|
+
requestId: string;
|
|
2727
|
+
srcTokenAmount: string;
|
|
2728
|
+
destTokenAmount: string;
|
|
2729
|
+
minDestTokenAmount: string;
|
|
2730
|
+
feeData: {
|
|
2731
|
+
metabridge: {
|
|
2732
|
+
amount: string;
|
|
2733
|
+
asset: {
|
|
2734
|
+
symbol: string;
|
|
2735
|
+
address: string;
|
|
2736
|
+
name: string;
|
|
2737
|
+
chainId: number;
|
|
2738
|
+
decimals: number;
|
|
2739
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2740
|
+
iconUrl?: string | null | undefined;
|
|
2741
|
+
icon?: string | null | undefined;
|
|
2742
|
+
};
|
|
2743
|
+
};
|
|
2744
|
+
txFee?: ({
|
|
2745
|
+
amount: string;
|
|
2746
|
+
asset: {
|
|
2747
|
+
symbol: string;
|
|
2748
|
+
address: string;
|
|
2749
|
+
name: string;
|
|
2750
|
+
chainId: number;
|
|
2751
|
+
decimals: number;
|
|
2752
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2753
|
+
iconUrl?: string | null | undefined;
|
|
2754
|
+
icon?: string | null | undefined;
|
|
2755
|
+
};
|
|
2756
|
+
} & {
|
|
2757
|
+
maxPriorityFeePerGas: string;
|
|
2758
|
+
maxFeePerGas: string;
|
|
2759
|
+
}) | undefined;
|
|
2760
|
+
};
|
|
2761
|
+
bridgeId: string;
|
|
2762
|
+
bridges: string[];
|
|
2763
|
+
steps: {
|
|
2764
|
+
action: ActionTypes;
|
|
2765
|
+
protocol: {
|
|
2766
|
+
name: string;
|
|
2767
|
+
displayName?: string | undefined;
|
|
2768
|
+
icon?: string | undefined;
|
|
2769
|
+
};
|
|
2770
|
+
srcChainId: number;
|
|
2771
|
+
srcAsset: {
|
|
2772
|
+
symbol: string;
|
|
2773
|
+
address: string;
|
|
2774
|
+
name: string;
|
|
2775
|
+
chainId: number;
|
|
2776
|
+
decimals: number;
|
|
2777
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2778
|
+
iconUrl?: string | null | undefined;
|
|
2779
|
+
icon?: string | null | undefined;
|
|
2780
|
+
};
|
|
2781
|
+
destAsset: {
|
|
2782
|
+
symbol: string;
|
|
2783
|
+
address: string;
|
|
2784
|
+
name: string;
|
|
2785
|
+
chainId: number;
|
|
2786
|
+
decimals: number;
|
|
2787
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2788
|
+
iconUrl?: string | null | undefined;
|
|
2789
|
+
icon?: string | null | undefined;
|
|
2790
|
+
};
|
|
2791
|
+
srcAmount: string;
|
|
2792
|
+
destAmount: string;
|
|
2793
|
+
destChainId?: number | undefined;
|
|
2794
|
+
}[];
|
|
2795
|
+
refuel?: {
|
|
2796
|
+
action: ActionTypes;
|
|
2797
|
+
protocol: {
|
|
2798
|
+
name: string;
|
|
2799
|
+
displayName?: string | undefined;
|
|
2800
|
+
icon?: string | undefined;
|
|
2801
|
+
};
|
|
2802
|
+
srcChainId: number;
|
|
2803
|
+
srcAsset: {
|
|
2804
|
+
symbol: string;
|
|
2805
|
+
address: string;
|
|
2806
|
+
name: string;
|
|
2807
|
+
chainId: number;
|
|
2808
|
+
decimals: number;
|
|
2809
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2810
|
+
iconUrl?: string | null | undefined;
|
|
2811
|
+
icon?: string | null | undefined;
|
|
2812
|
+
};
|
|
2813
|
+
destAsset: {
|
|
2814
|
+
symbol: string;
|
|
2815
|
+
address: string;
|
|
2816
|
+
name: string;
|
|
2817
|
+
chainId: number;
|
|
2818
|
+
decimals: number;
|
|
2819
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2820
|
+
iconUrl?: string | null | undefined;
|
|
2821
|
+
icon?: string | null | undefined;
|
|
2822
|
+
};
|
|
2823
|
+
srcAmount: string;
|
|
2824
|
+
destAmount: string;
|
|
2825
|
+
destChainId?: number | undefined;
|
|
2826
|
+
} | undefined;
|
|
2827
|
+
gasIncluded?: boolean | undefined;
|
|
2828
|
+
gasIncluded7702?: boolean | undefined;
|
|
2829
|
+
priceData?: {
|
|
2830
|
+
totalFromAmountUsd?: string | undefined;
|
|
2831
|
+
totalToAmountUsd?: string | undefined;
|
|
2832
|
+
priceImpact?: string | undefined;
|
|
2833
|
+
totalFeeAmountUsd?: string | undefined;
|
|
2834
|
+
} | undefined;
|
|
2835
|
+
};
|
|
2836
|
+
estimatedProcessingTimeInSeconds: number;
|
|
2837
|
+
trade: string | {
|
|
2838
|
+
data: string;
|
|
2839
|
+
value: string;
|
|
2840
|
+
to: string;
|
|
2841
|
+
from: string;
|
|
2842
|
+
gasLimit: number | null;
|
|
2843
|
+
chainId: number;
|
|
2844
|
+
effectiveGas?: number | undefined;
|
|
2845
|
+
} | {
|
|
2846
|
+
unsignedPsbtBase64: string;
|
|
2847
|
+
inputsToSign: {}[] | null;
|
|
2848
|
+
};
|
|
2849
|
+
approval?: {
|
|
2850
|
+
data: string;
|
|
2851
|
+
value: string;
|
|
2852
|
+
to: string;
|
|
2853
|
+
from: string;
|
|
2854
|
+
gasLimit: number | null;
|
|
2855
|
+
chainId: number;
|
|
2856
|
+
effectiveGas?: number | undefined;
|
|
2857
|
+
} | undefined;
|
|
2858
|
+
};
|
|
2859
|
+
export declare const validateBitcoinQuoteResponse: (data: unknown) => data is {
|
|
2860
|
+
quote: {
|
|
2861
|
+
srcChainId: number;
|
|
2862
|
+
destChainId: number;
|
|
2863
|
+
srcAsset: {
|
|
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
|
+
destAsset: {
|
|
2874
|
+
symbol: string;
|
|
2875
|
+
address: string;
|
|
2876
|
+
name: string;
|
|
2877
|
+
chainId: number;
|
|
2878
|
+
decimals: number;
|
|
2879
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2880
|
+
iconUrl?: string | null | undefined;
|
|
2881
|
+
icon?: string | null | undefined;
|
|
2882
|
+
};
|
|
2883
|
+
requestId: string;
|
|
2884
|
+
srcTokenAmount: string;
|
|
2885
|
+
destTokenAmount: string;
|
|
2886
|
+
minDestTokenAmount: string;
|
|
2887
|
+
feeData: {
|
|
2888
|
+
metabridge: {
|
|
2889
|
+
amount: string;
|
|
2890
|
+
asset: {
|
|
2891
|
+
symbol: string;
|
|
2892
|
+
address: string;
|
|
2893
|
+
name: string;
|
|
2894
|
+
chainId: number;
|
|
2895
|
+
decimals: number;
|
|
2896
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2897
|
+
iconUrl?: string | null | undefined;
|
|
2898
|
+
icon?: string | null | undefined;
|
|
2899
|
+
};
|
|
2900
|
+
};
|
|
2901
|
+
txFee?: ({
|
|
2902
|
+
amount: string;
|
|
2903
|
+
asset: {
|
|
2904
|
+
symbol: string;
|
|
2905
|
+
address: string;
|
|
2906
|
+
name: string;
|
|
2907
|
+
chainId: number;
|
|
2908
|
+
decimals: number;
|
|
2909
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2910
|
+
iconUrl?: string | null | undefined;
|
|
2911
|
+
icon?: string | null | undefined;
|
|
2912
|
+
};
|
|
2913
|
+
} & {
|
|
2914
|
+
maxPriorityFeePerGas: string;
|
|
2915
|
+
maxFeePerGas: string;
|
|
2916
|
+
}) | undefined;
|
|
2917
|
+
};
|
|
2918
|
+
bridgeId: string;
|
|
2919
|
+
bridges: string[];
|
|
2920
|
+
steps: {
|
|
2921
|
+
action: ActionTypes;
|
|
2922
|
+
protocol: {
|
|
2923
|
+
name: string;
|
|
2924
|
+
displayName?: string | undefined;
|
|
2925
|
+
icon?: string | undefined;
|
|
2926
|
+
};
|
|
2927
|
+
srcChainId: number;
|
|
2928
|
+
srcAsset: {
|
|
2929
|
+
symbol: string;
|
|
2930
|
+
address: string;
|
|
2931
|
+
name: string;
|
|
2932
|
+
chainId: number;
|
|
2933
|
+
decimals: number;
|
|
2934
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2935
|
+
iconUrl?: string | null | undefined;
|
|
2936
|
+
icon?: string | null | undefined;
|
|
2937
|
+
};
|
|
2938
|
+
destAsset: {
|
|
2939
|
+
symbol: string;
|
|
2940
|
+
address: string;
|
|
2941
|
+
name: string;
|
|
2942
|
+
chainId: number;
|
|
2943
|
+
decimals: number;
|
|
2944
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2945
|
+
iconUrl?: string | null | undefined;
|
|
2946
|
+
icon?: string | null | undefined;
|
|
2947
|
+
};
|
|
2948
|
+
srcAmount: string;
|
|
2949
|
+
destAmount: string;
|
|
2950
|
+
destChainId?: number | undefined;
|
|
2951
|
+
}[];
|
|
2952
|
+
refuel?: {
|
|
2953
|
+
action: ActionTypes;
|
|
2954
|
+
protocol: {
|
|
2955
|
+
name: string;
|
|
2956
|
+
displayName?: string | undefined;
|
|
2957
|
+
icon?: string | undefined;
|
|
2958
|
+
};
|
|
2959
|
+
srcChainId: number;
|
|
2960
|
+
srcAsset: {
|
|
2961
|
+
symbol: string;
|
|
2962
|
+
address: string;
|
|
2963
|
+
name: string;
|
|
2964
|
+
chainId: number;
|
|
2965
|
+
decimals: number;
|
|
2966
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2967
|
+
iconUrl?: string | null | undefined;
|
|
2968
|
+
icon?: string | null | undefined;
|
|
2969
|
+
};
|
|
2970
|
+
destAsset: {
|
|
2971
|
+
symbol: string;
|
|
2972
|
+
address: string;
|
|
2973
|
+
name: string;
|
|
2974
|
+
chainId: number;
|
|
2975
|
+
decimals: number;
|
|
2976
|
+
assetId: `${string}:${string}/${string}:${string}`;
|
|
2977
|
+
iconUrl?: string | null | undefined;
|
|
2978
|
+
icon?: string | null | undefined;
|
|
2979
|
+
};
|
|
2980
|
+
srcAmount: string;
|
|
2981
|
+
destAmount: string;
|
|
2982
|
+
destChainId?: number | undefined;
|
|
2983
|
+
} | undefined;
|
|
2984
|
+
gasIncluded?: boolean | undefined;
|
|
2985
|
+
gasIncluded7702?: boolean | undefined;
|
|
2986
|
+
priceData?: {
|
|
2987
|
+
totalFromAmountUsd?: string | undefined;
|
|
2988
|
+
totalToAmountUsd?: string | undefined;
|
|
2989
|
+
priceImpact?: string | undefined;
|
|
2990
|
+
totalFeeAmountUsd?: string | undefined;
|
|
2991
|
+
} | undefined;
|
|
2992
|
+
};
|
|
2993
|
+
estimatedProcessingTimeInSeconds: number;
|
|
2994
|
+
trade: {
|
|
2995
|
+
unsignedPsbtBase64: string;
|
|
2996
|
+
inputsToSign: {}[] | null;
|
|
2009
2997
|
};
|
|
2010
2998
|
approval?: {
|
|
2011
2999
|
data: string;
|