import { Transaction } from 'knex'; import { Bytes32 } from '../type-aliases'; import { WaitingFor as ChannelOpenerWaitingFor } from '../protocols/channel-opener'; import { WaitingFor as ChannelCloserWaitingFor } from '../protocols/channel-closer'; import { EngineResponse } from '../engine/engine-response'; import { WaitingFor as ChallengeSubmitterWaitingFor } from '../protocols/challenge-submitter'; import { WaitingFor as DefundChannelWaitingFor } from '../protocols/defund-channel'; import { WalletObjective } from '../models/objective'; import { ObjectiveManagerParams } from './types'; export declare enum Nothing { ToWaitFor = "" } export declare type WaitingFor = 'approval' | ChannelOpenerWaitingFor | ChannelCloserWaitingFor | ChallengeSubmitterWaitingFor | DefundChannelWaitingFor | Nothing; export interface Cranker { crank: (objective: O, response: EngineResponse, tx: Transaction) => Promise; } export declare class ObjectiveManager { private store; private logger; private timingMetrics; static create(params: ObjectiveManagerParams): ObjectiveManager; private constructor(); /** * Attempts to advance the given objective * * Swallows (and logs) any errors * * @param objectiveId - id of objective to try to advance * @param response - response builder; will be modified by the method */ crank(objectiveId: string, response: EngineResponse): Promise; private get channelDefunder(); private get challengeSubmitter(); private get channelOpener(); private get channelCloser(); commenceCloseChannel(channelId: Bytes32, response: EngineResponse): Promise; } //# sourceMappingURL=objective-manager.d.ts.map