import { SignedStateWithHash, Participant, Address, Destination, SignedStateVarsWithHash } from '@statechannels/wallet-core'; import { ChannelResult, ChannelStatus, FundingStatus, FundingStrategy } from '@statechannels/client-api-schema'; import { Bytes32, Uint256 } from '../type-aliases'; import { ChainServiceRequest } from '../models/chain-service-request'; import { AdjudicatorStatus } from '../models/adjudicator-status'; export declare type ChannelStateFunding = { amount: Uint256; transferredOut: { toAddress: Destination; amount: Uint256; }[]; }; export declare type ChannelState = { channelId: string; myIndex: 0 | 1; participants: Participant[]; support?: SignedStateWithHash[]; supported?: SignedStateWithHash; latest: SignedStateWithHash; latestSignedByMe?: SignedStateWithHash; funding: (address: Address) => ChannelStateFunding | undefined; chainServiceRequests: ChainServiceRequest[]; fundingStrategy: FundingStrategy; fundingLedgerChannelId?: Bytes32; directFundingStatus?: FundingStatus; adjudicatorStatus: AdjudicatorStatus['channelMode']; }; declare type WithSupported = { supported: SignedStateWithHash; }; declare type SignedByMe = { latestSignedByMe: SignedStateWithHash; }; export declare type ChannelStateWithMe = ChannelState & SignedByMe; export declare type ChannelStateWithSupported = ChannelState & SignedByMe & WithSupported; /** * The definition of a ChannelStatus is still under debate, but for now * this is what we have settled on. Future changes should include 'funding', * 'defunding', and state related to challenging, probably. See this issue * for more: https://github.com/statechannels/statechannels/issues/2509 */ export declare const status: (channelState: ChannelState) => ChannelStatus; export declare const toChannelResult: (channelState: ChannelState) => ChannelResult; export declare function directFundingStatus(supported: SignedStateVarsWithHash | undefined, fundingFn: (address: Address) => ChannelStateFunding | undefined, myParticipant: Participant, fundingStrategy: FundingStrategy): FundingStatus | undefined; export {}; //# sourceMappingURL=state.d.ts.map