import { Message } from '@multiversx/sdk-core/out/core/message'; import { Transaction } from '@multiversx/sdk-core/out/core/transaction'; import { WindowProviderRequestEnums } from '@multiversx/sdk-web-wallet-cross-window-provider/out/enums'; import { PostMessageParamsType, PostMessageReturnType } from '@multiversx/sdk-web-wallet-cross-window-provider/out/types'; interface IWebviewProviderOptions { resetStateCallback?: () => void; } export interface IProviderAccount { address: string; signature?: string; accessToken?: string; } export declare class WebviewProvider { private static _instance; private initialized; private account; private handshakeResponseTimeout; private allowedOrigin; private resetStateCallback?; static getInstance(options?: IWebviewProviderOptions): WebviewProvider; constructor(options?: IWebviewProviderOptions); private setupResetStateListener; private disconnect; /** * Initiates a handshake request with a window provider and waits for a response. * * This function sends a `finalizeHandshakeRequest` message and races it against a timeout. * If the handshake does not complete within the specified `HANDSHAKE_RESPONSE_TIMEOUT`, * the promise is rejected with a timeout error. */ private initiateHandshake; init: (version?: string) => Promise; login: (options?: { token?: string; }) => Promise; logout: () => Promise; relogin: () => Promise; signTransactions: (transactionsToSign: Transaction[]) => Promise; signTransaction: (transaction: Transaction) => Promise; signMessage: (messageToSign: Message) => Promise; cancelAction: () => Promise>; finalizeResetState: () => Promise>; setHandshakeResponseTimeout(timeout: number): void; isInitialized(): boolean; isConnected(): boolean; getAccount(): IProviderAccount | null; setAccount(account: IProviderAccount): void; sendPostMessage: (message: PostMessageParamsType) => Promise>; private waitingForResponse; } export {};