import { EnumChains, EnumWalletName, EnumWalletType } from "../types"; import BaseWallet from "./BaseWallet"; import Web3 from "web3"; import { AppKit } from '@reown/appkit'; declare const DEFAULT_METADATA: { name: string; description: string; url: string; icons: string[]; }; interface WalletConnectConfig { projectId?: string; metadata?: typeof DEFAULT_METADATA; } declare class WalletConnect extends BaseWallet { name: EnumWalletName; icon: any; supportChains: EnumChains[]; type: EnumWalletType; sdk: Web3 | null; infuraId?: string; modal: AppKit | null; modalIsClosed: boolean; disconnected: boolean; wcProvider: any; modalIsClose: boolean; networks: any[]; /** * Check if running in a wallet WebView (iOS wallet apps) */ private isInWalletWebView; /** * Connect via WalletConnect v2 (used in wallet WebViews like Zerion/OKX/Trust iOS) */ private connectViaWalletConnectV2; /** * Switch network using WalletConnect provider */ private switchNetworkViaWC; /** * Add network using WalletConnect provider */ private addNetworkViaWC; initModal(chainId: number, config?: WalletConnectConfig): void; /** * Connect via AppKit (used in browser environments) */ connectViaAppKit(chainId: number, config?: WalletConnectConfig): Promise; getModalClose(): boolean; /** * Connect wallet - automatically chooses WalletConnect v2 for wallet WebViews or AppKit for browsers */ requestConnect(chainId?: number, config?: WalletConnectConfig): Promise; /** * Switch to a different network * Supports both AppKit modal and WalletConnect v2 provider */ switchNetworkModal(chainId: number): Promise; /** * Disconnect wallet */ disconnect(): Promise; } export default WalletConnect;