import { Token, NetworkWithTokens } from "@layerswap/widget-types"; import { ExtendedRouteRecord } from "../stores/extendedRoutesStore"; import { SwapBasicData, SwapQuote } from "../lib/apiClients/layerSwapApiClient"; export type ExtendedSwapDisplay = { /** Source the swap should show: the REAL network in every blockchain-functional * respect (name, type, chain_id, explorer templates, …) skinned with the * extended source's display identity (display_name/logo). Consumers use it * directly — no real-vs-extended reconciliation needed. */ network: NetworkWithTokens; /** Source token, real-functional with the extended source's display logo. */ token: Token; /** Persisted record for this swap (raw extended/real identity). */ record: ExtendedRouteRecord; }; /** * For a given swapId, return the extended source skin if this device recorded an * extended-route flow for it (e.g. Hyperliquid → backend via Base). The returned * `network`/`token` are the REAL route wearing the extended source's display name * and logo, so every consumer (explorer links, status queries, summaries) stays * blind to the extended/real split. Returns undefined when no record exists (other * device, or non-extended swap), or when either side can't be resolved from * settings — callers fall back to the swap's real source unchanged. */ export declare function useExtendedSwapDisplay(swapId: string | undefined): ExtendedSwapDisplay | undefined; export type ExtendedSwapData = { sourceProvider: string; /** Swap basic data with the source side re-pointed at the extended network/token * and `requested_amount` set to A (the amount that leaves the extended source). */ swapBasicData: SwapBasicData & { refuel: boolean; }; /** Backend quote re-denominated to the extended source (requested_amount = A, * fee += flat fee, completion += extra time), or the backend quote unchanged * when no mapping resolves. */ quote: SwapQuote | undefined; }; /** * Apply the extended-route (e.g. Hyperliquid) display transforms to a loaded * swap's basic data and quote, keeping that provider-specific field remapping out * of `SwapDataProvider`. Returns undefined when this swap isn't an extended route * on this device — the caller then uses the real (backend) values unchanged. */ export declare function useExtendedSwapData(swapId: string | undefined, base: (SwapBasicData & { refuel: boolean; }) | undefined, backendQuote: SwapQuote | undefined): ExtendedSwapData | undefined; //# sourceMappingURL=useExtendedSwapDisplay.d.ts.map