import { Methods } from '../communication/methods'; import { SafeInfo, ChainInfo, SendTransactionsResponse, EnvironmentInfo } from './sdk'; import { GatewayTransactionDetails, SafeBalances } from './gateway'; export declare type RequestId = string; export declare type InterfaceMessageEvent = MessageEvent; export interface MethodToResponse { [Methods.sendTransactions]: SendTransactionsResponse; [Methods.rpcCall]: unknown; [Methods.getSafeInfo]: SafeInfo; [Methods.getChainInfo]: ChainInfo; [Methods.getTxBySafeTxHash]: GatewayTransactionDetails; [Methods.getSafeBalances]: SafeBalances[]; [Methods.signMessage]: SendTransactionsResponse; [Methods.getEnvironmentInfo]: EnvironmentInfo; } export declare type SDKRequestData = { id: RequestId; params: P; env: { sdkVersion: string; }; method: M; }; export declare type SDKMessageEvent = MessageEvent; export declare type ErrorResponse = { id: RequestId; success: false; error: string; version?: string; }; export declare type SuccessResponse = { id: RequestId; data: T; version?: string; success: true; }; export declare type Response = ErrorResponse | SuccessResponse; export interface Communicator { send(method: M, params: P): Promise>; }