@@ -33,7 +33,6 @@ import type { BRIDGE_CONTROLLER_NAME } from './constants/bridge';
3333import type { SimulatedGasFeeLimitsSchema } from './validators/batch-sell' ;
3434import type { BatchSellTradesResponseSchema } from './validators/batch-sell' ;
3535import type { BridgeAssetSchema } from './validators/bridge-asset' ;
36- import type { FeatureId } from './validators/feature-flags' ;
3736import type {
3837 ChainConfigurationSchema ,
3938 ChainRankingSchema ,
@@ -43,20 +42,13 @@ import type {
4342 FeeDataSchema ,
4443 IntentSchema ,
4544 ProtocolSchema ,
46- QuoteResponseSchema ,
47- QuoteSchema ,
48- StepSchema ,
4945 GaslessPropertiesSchema ,
5046 TxFeeGasLimitsSchema ,
51- } from './validators/quote-response' ;
47+ QuoteResponseV1 ,
48+ StepSchema ,
49+ } from './validators/quote-response-v1' ;
5250import type { QuoteStreamCompleteSchema } from './validators/quote-stream-complete' ;
5351import type { TokenFeatureSchema } from './validators/token-feature' ;
54- import type {
55- BitcoinTradeData ,
56- StellarTradeData ,
57- TronTradeData ,
58- TxData ,
59- } from './validators/trade' ;
6052
6153export type FetchFunction = (
6254 input : RequestInfo | URL | string ,
@@ -85,10 +77,16 @@ export type ChainConfiguration = Infer<typeof ChainConfigurationSchema>;
8577
8678export type ChainRanking = Infer < typeof ChainRankingSchema > ;
8779
80+ /**
81+ * @deprecated Avoid introducing new usages and use the QuoteResponseV2 feeData.network value instead
82+ */
8883export type L1GasFees = {
89- l1GasFeesInHexWei ?: string ; // l1 fees for approval and trade in hex wei, appended by BridgeController.#appendL1GasFees
84+ l1GasFeesInHexWei ?: Hex ; // l1 fees for approval and trade in hex wei, appended by BridgeController.#appendL1GasFees
9085} ;
9186
87+ /**
88+ * @deprecated Avoid introducing new usages and use the QuoteResponseV2 feeData.network value instead
89+ */
9290export type NonEvmFees = {
9391 nonEvmFeesInNative ?: string ; // Non-EVM chain fees in native units (SOL for Solana, BTC for Bitcoin)
9492} ;
@@ -126,6 +124,8 @@ export type ExchangeRate = { exchangeRate?: string; usdExchangeRate?: string };
126124
127125/**
128126 * Values derived from the quote response
127+ *
128+ * @deprecated Avoid introducing new usages and use the QuoteResponse V2 type instead
129129 */
130130export type QuoteMetadata = {
131131 /**
@@ -284,43 +284,9 @@ export type RefuelData = Step;
284284
285285export type FeeData = Infer < typeof FeeDataSchema > ;
286286
287- export type Quote = Infer < typeof QuoteSchema > ;
288-
289287export type Intent = Infer < typeof IntentSchema > ;
290288export type IntentOrderLike = Intent [ 'order' ] ;
291289
292- /**
293- * This is the type for the quote response from the bridge-api
294- * TxDataType can be overriden to be a string when the quote is non-evm
295- * ApprovalType can be overriden when you know the specific approval type (e.g., TxData for EVM-only contexts)
296- */
297- export type QuoteResponseV1 <
298- TxDataType =
299- | TxData
300- | string
301- | BitcoinTradeData
302- | TronTradeData
303- | StellarTradeData ,
304- ApprovalType = TxData | TronTradeData ,
305- > = Infer < typeof QuoteResponseSchema > & {
306- trade : TxDataType ;
307- approval ?: ApprovalType ;
308- /**
309- * Appended to the quote response based on the quote request
310- */
311- featureId ?: FeatureId ;
312- /**
313- * Appended to the quote response based on the quote request resetApproval flag
314- * If defined, the quote's total network fee will include the reset approval's gas limit.
315- */
316- resetApproval ?: TxData ;
317- /**
318- * Appended to the quote if there are multiple quote requests in a batch. This
319- * indicates which quoteRequest the quote is for
320- */
321- quoteRequestIndex ?: number ;
322- } ;
323-
324290export type BatchSellTradesRequest = {
325291 quotes : QuoteResponseV1 [ ] ;
326292 stxEnabled : boolean ;
0 commit comments