import { WebSocket } from 'ws'; import type { Client } from '../../../types/remote/protocol'; import { IDiagnosticReporter } from '../../utils/diagnostic'; interface IDispatcherState { transfer?: { kind: Client.TransferKind; id: string; }; } interface IDispatchOptions { attachTransfer?: boolean; } type Dispatch = Omit; export declare const createDispatcher: (ws: WebSocket, retryMessageOptions?: { retryMessageMaxRetries: number; retryMessageTimeout: number; }, reportInfo?: (message: string) => void) => { readonly transferID: string | undefined; readonly transferKind: any; setTransferProperties: (properties: Exclude) => void; dispatch: (message: Dispatch, options?: IDispatchOptions) => Promise; dispatchCommand: (payload: { command: U_1; } & ([Client.GetCommandParams] extends [never] ? unknown : { params?: Client.GetCommandParams | undefined; })) => Promise; dispatchTransferAction: (action: Client.Action['action']) => Promise; dispatchTransferStep: (payload: { step: S; action: A; } & (A extends 'stream' ? { data: Client.GetTransferPushStreamData; } : unknown)) => Promise; }; type WebsocketParams = ConstructorParameters; type Address = WebsocketParams[0]; type Options = WebsocketParams[2]; export declare const connectToWebsocket: (address: Address, options?: Options, diagnostics?: IDiagnosticReporter) => Promise; export declare const trimTrailingSlash: (input: string) => string; export declare const wait: (ms: number) => Promise; export declare const waitUntil: (test: () => boolean, interval: number) => Promise; export {}; //# sourceMappingURL=utils.d.ts.map