import { Sender } from 'xstate';
import { SyncMachineContext, SyncMachinEvent } from '../types';

export declare const syncMachineServices: {
    connectSocket: (context: SyncMachineContext) => (send: Sender<SyncMachinEvent>) => Promise<void>;
    disconnectSocket: (context: SyncMachineContext) => () => Promise<void>;
    processNextUpdate: (context: SyncMachineContext) => () => Promise<{
        updateId: string | undefined;
        queueOffset: number;
    } | undefined>;
    processCommit: (context: SyncMachineContext) => (send: Sender<SyncMachinEvent>) => Promise<void>;
    syncLatestCommitFromIpfs: (context: SyncMachineContext) => (send: Sender<SyncMachinEvent>) => Promise<{
        ids: string[];
        unbroadcastedUpdate: string | null;
    }>;
    broadcastLocalContents: (context: SyncMachineContext, event: SyncMachinEvent) => () => Promise<boolean>;
    commitLocalContents: (context: SyncMachineContext, event: SyncMachinEvent) => (send: Sender<SyncMachinEvent>) => Promise<string | undefined>;
    verifyConnectionState: (context: SyncMachineContext) => (send: Sender<SyncMachinEvent>) => Promise<void>;
};
