/// import { CreateTxOptions, SignMode } from '@xpla/xpla.js'; import { WalletApp } from '@xpla/wallet-types'; import { IPushServerOptions, IWalletConnectOptions } from '@walletconnect/types'; import { Observable } from 'rxjs'; import { WalletConnectSession, WalletConnectTxResult } from './types'; import { WebExtensionSignPayload, WebExtensionSignBytesPayload } from '@xpla/web-extension-interface'; export interface WalletConnectControllerOptions { /** * Configuration parameter that `new WalletConnect(connectorOpts)` * * @default * ```js * { * bridge: 'https://walletconnect.xpla.io/', * qrcodeModal: new XplaWalletconnectQrcodeModal(), * } * ``` */ connectorOpts?: IWalletConnectOptions; /** * Configuration parameter that `new WalletConnect(_, pushServerOpts)` * * @default undefined */ pushServerOpts?: IPushServerOptions; } export interface WalletConnectController { session: () => Observable; getLatestSession: () => WalletConnectSession; post: (tx: CreateTxOptions, _walletApp?: WalletApp | boolean) => Promise; sign: (tx: CreateTxOptions & { sequence?: number; accountNumber?: number; signMode?: SignMode; }, _walletApp?: WalletApp | boolean) => Promise; signBytes: (bytes: Buffer, _walletApp?: WalletApp | boolean) => Promise; disconnect: () => void; } export declare function connectIfSessionExists(options?: WalletConnectControllerOptions): WalletConnectController | null; export declare function connect(options?: WalletConnectControllerOptions, useCachedSession?: boolean, walletApp?: WalletApp | boolean): WalletConnectController;