import { ChannelResult, Message } from '@statechannels/client-api-schema'; import { Participant, SignedState } from '@statechannels/wallet-core'; import { Message as WireMessage, SignedState as WireState } from '@statechannels/wire-format'; import { Notice, Outgoing } from '../protocols/actions'; import { Channel } from '../models/channel'; import { WalletObjective } from '../models/objective'; import { ChannelState } from '../protocols/state'; import { ChainRequest } from '../chain-service'; import { MultipleChannelOutput, SingleChannelOutput } from './types'; /** * Used internally for constructing the SingleChannelOutput or MultipleChannelOutput * to be returned to the user after a call. */ export declare class EngineResponse { _channelResults: Record; private _messages; objectivesToApprove: WalletObjective[]; createdObjectives: WalletObjective[]; succeededObjectives: WalletObjective[]; requests: string[]; chainRequests: ChainRequest[]; static initialize(): EngineResponse; queueChainRequest(chainRequest: ChainRequest[]): void; /** * Queues channel for notification to user */ queueChannel(channel: Channel): void; /** * Same as channelUpdated but accepts a channelResult instead of a Channel * * Plan to deprecate. */ queueChannelResult(channelResult: ChannelResult): void; /** * Same as queueChannel but accepts a channelState instead of a Channel * * Plan to deprecate. */ queueChannelState(channelState: ChannelState): void; /** * Queues state for sending to opponent */ queueState(state: SignedState, myIndex: number, channelId: string): void; /** * Queues an objective to be sent to the opponent */ queueSendObjective(objective: WalletObjective, myIndex: number, participants: Participant[]): void; /** * Queues objectives for * - sending to opponent * - notifying the app */ queueCreatedObjective(objective: WalletObjective, myIndex: number, participants: Participant[]): void; /** * Queue succeeded objectives, so we can emit events */ queueSucceededObjective(objective: WalletObjective): void; /** * Add a GetChannelRequest to outbox for given channelId */ queueChannelRequest(channelId: string, myIndex: number, participants: Participant[]): void; multipleChannelOutput(): MultipleChannelOutput; /** * Returns a SingleChannelOutput * * @param strict - causes method to throw if > 1 channelResult is found * * Note: we should get rid of strict and return MultipleChannelOutputs * wherever it is used */ singleChannelOutput(strict?: boolean): SingleChannelOutput; updatedChannels(): ChannelResult[]; get channelResults(): ChannelResult[]; get allMessages(): Message[]; get outbox(): Outgoing[]; static mergeOutgoing(outgoing: Notice[]): Notice[]; get _signedStates(): WireState[]; } export declare function mergeMessages(messages: WireMessage[]): WireMessage[]; export declare function mergeOutgoing(outgoing: Notice[]): Notice[]; //# sourceMappingURL=engine-response.d.ts.map