import { WalletConnectModal } from "@walletconnect/modal"; import type { CoreTypes, SessionTypes } from "@walletconnect/types"; import UniversalProvider from "@walletconnect/universal-provider"; import { XrplConnector, XrplEvents, XrplNetwork, XrplTransaction, XrplTxStatus } from "../../../core/types/xrpl"; interface XrplWalletConnectProps { projectId: string; metadata?: CoreTypes.Metadata; recommendedWalletId?: string; } export declare class XrplWalletConnect implements XrplConnector { provider: UniversalProvider | null; session: SessionTypes.Struct | null; modal: WalletConnectModal | null; projectId: XrplWalletConnectProps["projectId"]; metadata: XrplWalletConnectProps["metadata"]; recommendedWalletId: XrplWalletConnectProps["recommendedWalletId"]; readonly listeners: { [E in keyof XrplEvents]?: Array<(event: XrplEvents[E]) => void>; }; constructor({ projectId, metadata, recommendedWalletId, }: XrplWalletConnectProps); private validateInitialized; /** * Sets up providers and event listeners, must be called before connecting * * - initializes WalletConnect UniversalProvider * - initializes WalletConnectModal * - attaches event listeners */ initialize(): Promise; /** * Initializes WalletConnect and silently connects to the last session if it exists */ autoConnect(): Promise; /** * Initializes WalletConnect and prompts the user to connect to a new session */ connect(): Promise; /** * Disconnects from the current session */ disconnect(): Promise; /** * Prompts the user to sign and submit a transaction */ signAndSubmit({ network, tx, }: { network: XrplNetwork; tx: XrplTransaction; }): Promise<{ hash: any; status: XrplTxStatus; }>; /** * Maps the given network to the WalletConnect chain ID format */ private getWcChainId; /** * Stores the provided session and returns the user's address */ onSessionConnected(session: SessionTypes.Struct): Promise; on(event: E, listener: (event: XrplEvents[E]) => void): () => void; private emit; private off; } export {};