interface RpcRequest { method: string; params: unknown[]; } export declare class RpcError extends Error { readonly code: number; readonly message: string; constructor(code: number, message: string); static userRejectedRequest(message: string): RpcError; static unauthorized(message: string): RpcError; } declare class LocalRpcHandler { private readonly args; constructor(args: RpcRequest); handle(): Promise; private handleRequestAccounts; } declare class MasterIframeRpcHandler { private readonly args; private readonly DEFAULT_RPC_CALL_TIMEOUT; private readonly DEFAULT_RPC_SIGN_TIMEOUT; constructor(args: RpcRequest); handle(): Promise<{} | null>; } /** * A handler for rpc request in case intersection observer is not supported * Note: It's build in a way to work with safari popup blocker in mind where popups are blocked if they are happen in a Promise */ declare class PopupModalRpcHandler { private readonly args; readonly APPROVAL_REQUIRED_TIMEOUT = 300; constructor(args: RpcRequest); handle(): Promise; } export declare function getRpcRequestHandler(args: RpcRequest): LocalRpcHandler | MasterIframeRpcHandler | PopupModalRpcHandler; export {};