import type { UseSwitchNetworkReturn } from '@meshconnect/uwc-types'; /** * Hook for switching networks on the connected wallet * @returns Network switching function and loading states * @throws Error if used outside of ConnectionProvider * @example * ```tsx * const { switchNetwork, isLoading, isWaitingForUserApproval } = useSwitchNetwork() * * const handleSwitch = async () => { * try { * await switchNetwork('eip155:8453') // Switch to Base * } catch (error) { * console.error('Network switch failed:', error) * } * } * * // Show loading UI * if (isWaitingForUserApproval) { * return
Please approve in your wallet...
* } * if (isLoading) { * return
Switching network...
* } * ``` */ export declare function useSwitchNetwork(): UseSwitchNetworkReturn; //# sourceMappingURL=useSwitchNetwork.d.ts.map