import type { Network, Connector, ConnectorConnectOptions, ConnectorResult, SwitchNetworkResult, WalletConnectConfig, WalletConnectProvider, TransactionRequest, TransactionResult, NetworkRpcMap, SignatureResult, EIP712TypedData, WalletLifecycleEvent, WalletLifecycleContext } from '@meshconnect/uwc-types'; import { type WalletConnectTelemetryObserver } from './services/walletconnect-client'; export declare class WalletConnectConnector implements Connector { private walletConnectClient; private connectionService; private networkSwitchService; private signatureService; private transactionService; private networkRpcMap; constructor(config: WalletConnectConfig, networkRpcMap?: NetworkRpcMap, telemetryObserver?: WalletConnectTelemetryObserver); /** * @deprecated Pass a {@link WalletConnectTelemetryObserver}. The positional * `(onRelayError, onInitError)` form is retained for backward compatibility * with the published 0.8.x signature and will be removed in a future major. */ constructor(config: WalletConnectConfig, networkRpcMap?: NetworkRpcMap, onRelayError?: (error: unknown) => void, onInitError?: (error: unknown) => void); connect(network: Network, provider?: WalletConnectProvider, options?: ConnectorConnectOptions): Promise; /** * Generate a pairing URI ahead of wallet selection (warms the relay; a later * `connect()` adopts the same pairing). Pass the UNION of the session's * WalletConnect wallets' networks so one pairing works for any wallet later * selected. See `ConnectionService.beginPairing`. */ beginPairing(provider: Pick): Promise; getConnectionURI(): string; disconnect(): Promise; clearSession(): void; switchNetwork(network: Network): Promise; signMessage(message: string): Promise; signTypedData(typedData: EIP712TypedData): Promise; sendTransaction(request: TransactionRequest): Promise; /** * Sign a Solana transaction over WalletConnect without broadcasting. * Mirrors InjectedConnector.signSolanaTransactionBytes so the core router can branch on * connection mode without the call sites caring which connector backs the active wallet. * * Used by fee-payer relay flows (Mesh BE owns broadcast); never broadcasts via the wallet. */ signSolanaTransactionBytes(serializedTx: Uint8Array): Promise; /** * Observe post-connect lifecycle from the WalletConnect SignClient. Unlike the * injected path, the SignClient lives IN this context (its own relay, not the * iframe bridge), so this works in the production iframe too — no bridge needed. * * Maps the verified SignClient events (`@walletconnect/types`): `session_delete` * → disconnect, `session_expire` → sessionExpired, and `session_event` (CAIP * `accountsChanged` / `chainChanged`, the latter normalized to CAIP-2 from * `event.data` — see `toCaipChainId`). The account address in the event * payload is never forwarded. Returns undefined before a session exists so * the core reports lifecycle unavailable. * * TOPIC FILTER: SignClient events are client-global and WC v2 persists old * sessions in storage, so a stale session expiring would otherwise surface as a * phantom disconnect/expiry of the live one. Every payload carries a `topic` * (`@walletconnect/types` BaseEventArgs); only the ACTIVE session's topic is * forwarded, resolved per event so a restore/re-connect is honoured live. */ onLifecycleEvent(listener: (event: WalletLifecycleEvent) => void, _context: WalletLifecycleContext): (() => void) | undefined; /** * Real account-sync counterpart to `onLifecycleEvent` (session_event * `accountsChanged`). Unlike the telemetry stream, this re-reads the * CURRENT session's account list for the affected namespace via * `ConnectionService.getAccountsForNamespace` rather than trying to parse * the event's own (wallet-defined, non-standardized) `event.data` shape — * see the design spec's "open risk" note if this needs revisiting against * a specific wallet found not to update `session.namespaces` before firing * the event. */ onAccountsChanged(listener: (accounts: string[]) => void, context: WalletLifecycleContext): (() => void) | undefined; } //# sourceMappingURL=wallet-connect-connector.d.ts.map