import EthereumProvider from '@walletconnect/ethereum-provider'; import type { EthereumProviderOptions } from '@walletconnect/ethereum-provider/dist/types/EthereumProvider'; import { type Chain, type EVMProvider } from '../../types'; import { EVMConnector } from './base'; export type WalletConnectOptions = { /** * WalletConnect Cloud Project ID. * @link https://cloud.walletconnect.com/sign-in. */ projectId: EthereumProviderOptions['projectId']; /** * Metadata for your app. * @link https://docs.walletconnect.com/2.0/javascript/providers/ethereum#initialization */ metadata?: EthereumProviderOptions['metadata']; /** * Whether or not to show the QR code modal. * @default true * @link https://docs.walletconnect.com/2.0/javascript/providers/ethereum#initialization */ showQrModal?: EthereumProviderOptions['showQrModal']; /** * Options of QR code modal. * @link https://docs.walletconnect.com/2.0/web3modal/options */ qrModalOptions?: EthereumProviderOptions['qrModalOptions']; chains?: Chain[]; /** * @default true */ isNewChainsStale?: boolean; }; export default class WalletConnectV2Connector extends EVMConnector { #private; readonly options: WalletConnectOptions; constructor(options: WalletConnectOptions); connect(): Promise; disconnect(): Promise; switchChain: (chainId: number) => Promise; getProvider(): Promise; private onAccountsChanged; private onChainChanged; private onDisconnect; private onDisplayUri; }