import { FC, ReactNode } from "react"; import { LayerSwapSettings } from "../Models/LayerSwapSettings"; import type { WidgetConfig } from "@layerswap/widget-types"; import AppSettings from "../lib/AppSettings"; import { CallbacksContextType } from "./callbackProvider"; import { InitialSettings } from "../Models/InitialSettings"; import type { WalletProvider, WalletProviderDescriptor, WalletWrapper } from "@layerswap/wallet-core/types"; /** * Internal config — a refinement of the public `WidgetConfig` contract * (`@layerswap/widget-types`): the open `settings`/`initialValues` fields are * narrowed to their precise model types here. Because this intersects the * contract, the two can never structurally diverge — a drift would fail to * compile. */ export type LayerswapWidgetConfig = WidgetConfig & { settings?: LayerSwapSettings; initialValues?: InitialSettings; /** Skeleton shown while settings are being fetched (i.e. when `settings` * isn't supplied). Defaults to the swap-shaped `WidgetLoading`; deposit * integrations can pass `` so the init state matches their * layout. */ loadingComponent?: ReactNode; } & WalletsConfigs; export type LayerswapContextProps = { children?: ReactNode; callbacks?: CallbacksContextType; config?: LayerswapWidgetConfig; /** * Accepts a mix of eager `WalletProvider`/`WalletWrapper` instances and * lightweight `WalletProviderDescriptor`s. Descriptors carry only static * capability metadata and a `loadProvider()` thunk that lazy-imports the * real provider on demand (typically when the connect modal opens). */ walletProviders?: (WalletProvider | WalletWrapper | WalletProviderDescriptor)[]; }; declare const LayerswapProviderComponent: FC; export declare const LayerswapProvider: typeof LayerswapProviderComponent; /** * @deprecated Pass wallet configurations directly to the wallet provider factories instead. * - For walletConnect: use `createEVMProvider({ walletConnectConfigs })`, `createSVMProvider({ walletConnectConfigs })`, etc. * - For imtblPassport: use `createImmutablePassportProvider({ imtblPassportConfig })` * - For tonConfigs: use `createTONProvider({ tonConfigs })` * This type will be removed in a future version. */ type WalletsConfigs = { /** * @deprecated Pass `walletConnectConfigs` directly to wallet provider factories */ walletConnect?: typeof AppSettings.WalletConnectConfig; /** * @deprecated Pass `imtblPassportConfig` to `createImmutablePassportProvider({ imtblPassportConfig })` */ imtblPassport?: typeof AppSettings.ImtblPassportConfig; /** * @deprecated Pass `tonConfigs` to `createTONProvider({ tonConfigs })` */ tonConfigs?: typeof AppSettings.TonClientConfig; }; export {}; //# sourceMappingURL=LayerswapProvider.d.ts.map