/// <reference types="steem-js-alpha" />
import * as steem from "steem";
import { Api } from "../api/Api";
import { Protocol } from "../protocol/Protocol";
import { SteemOperationNumber } from "../blockchain/SteemOperationNumber";
import { SendVoteorder } from "../protocol/SendVoteorder";
import { ValidationException } from "../validation/ValidationException";
export declare class LegacySynchronizer {
    private timeoutMs;
    private protocol;
    private api;
    private delegator;
    private notifier;
    private isRunning;
    private rules;
    private lastProcessedOperationNum;
    constructor(api: Api, protocol: Protocol, delegator: string, notifier: Synchronizer.NotifierCallback);
    setTimeout(timeoutMs: number): void;
    start(since: SteemOperationNumber): LegacySynchronizer;
    stop(): void;
    private processBlock;
    private processOperation;
    private updateRulesArray;
    private processVoteorder;
    private determineRules;
    private voteAndConfirm;
    private rejectVoteorder;
    private notify;
    private continueIfRunning;
}
export declare namespace Synchronizer {
    interface NotifierCallback {
        (error: Error | undefined, event: Synchronizer.Event): void;
    }
    enum EventType {
        StartBlockProcessing = "start-block-processing",
        EndBlockProcessing = "end-block-processing",
        OperarionsPushed = "operations-pushed",
        VoteorderRejected = "voteorder-rejected",
        VoteorderPassed = "voteorder-passed",
        ReversibleError = "reversible-error",
        UnhandledError = "unhandled-error",
        SynchronizationStop = "synchronization-stop",
        RulesUpdated = "rules-updated"
    }
    type Event = StartBlockProcessingEvent | EndBlockProcessingEvent | OperarionsPushedEvent | VoteorderRejected | VoteorderPassed | RulesUpdatedEvent | ReversibleErrorEvent | UnhandledErrorEvent | SynchronizationStopEvent;
    interface StartBlockProcessingEvent {
        type: EventType.StartBlockProcessing;
        blockNum: number;
        message: string;
    }
    interface EndBlockProcessingEvent {
        type: EventType.EndBlockProcessing;
        blockNum: number;
        message: string;
    }
    interface OperarionsPushedEvent {
        type: EventType.OperarionsPushed;
        operations: steem.OperationWithDescriptor[];
        moment: SteemOperationNumber;
        message: string;
    }
    interface RulesUpdatedEvent {
        type: EventType.RulesUpdated;
        moment: SteemOperationNumber;
        message: string;
    }
    interface VoteorderRejected {
        type: EventType.VoteorderRejected;
        voteorder: SendVoteorder;
        voteorderTxId: string;
        voter: string;
        moment: SteemOperationNumber;
        validationException: ValidationException | undefined;
        message: string;
    }
    interface VoteorderPassed {
        type: EventType.VoteorderPassed;
        voteorder: SendVoteorder;
        voteorderTxId: string;
        voter: string;
        moment: SteemOperationNumber;
        message: string;
    }
    interface ReversibleErrorEvent {
        type: EventType.ReversibleError;
        moment: SteemOperationNumber;
        error: Error;
        message: string;
    }
    interface UnhandledErrorEvent {
        type: EventType.UnhandledError;
        moment: SteemOperationNumber;
        error: Error;
        message: string;
    }
    interface SynchronizationStopEvent {
        type: EventType.SynchronizationStop;
        moment: SteemOperationNumber;
        message: string;
    }
}
