/// import * as steem from "steem"; import { Api } from "../api/Api"; import { Protocol } from "../protocol/Protocol"; import { SteemOperationNumber } from "steem-efficient-stream"; import { SendVoteorder } from "../protocol/SendVoteorder"; import { ValidationException } from "../validation/ValidationException"; export declare class SingleDaemon { private api; private protocol; private universalSynchronizer; private delegator; private notifier; private rules; constructor(api: Api, protocol: Protocol, delegator: string, notifier: SingleDaemon.NotifierCallback); start(since: SteemOperationNumber): SingleDaemon; stop(): void; private onStart; private onFinished; private onBlockProcessingStart; private onBlockProcessingFinished; private onError; private onSetRules; private onVoteorder; private determineRules; private voteAndConfirm; private rejectVoteorder; private notify; } export declare namespace SingleDaemon { interface NotifierCallback { (error: Error | undefined, event: SingleDaemon.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; } }