import { ChannelConstants, Hashed, SignedStateVarsWithHash, State, SignedState, SignedStateWithHash } from '@statechannels/wallet-core'; import { SignedState as WireSignedState } from '@statechannels/wire-format'; import { Bytes32 } from './type-aliases'; import { Channel } from './models/channel'; export declare const dropNonVariables: (s: SignedStateVarsWithHash) => SignedStateVarsWithHash; export declare const dropNonConstants: (s: State) => ChannelConstants; export declare const addHash: (s: T) => T & Hashed; export declare const addHashes: (c: Channel) => Channel; export declare const addChannelId: (c: T) => T & { channelId: Bytes32; }; /** * Fold a new signed state into an existing list of signed states (variable parts only). * * @param vars - list of signed states * @param signedState - new signed state * * A signed state _may_ be a new signature on an existing signed state, in which case * we want to "fold" it in by adding a signature to the existing signed state object. * * In the other case, it represents a brand new state, so we simply push it to the end * of the list of existing signed states. */ export declare function addState(vars: SignedStateVarsWithHash[], signedState: SignedStateWithHash): SignedStateVarsWithHash[]; /** * Retrieve a list of states that must be stored to ensure future secure protocol execution. * * @param signedStates - list of signed states of arbitrary length * @param support - a support (list of signed states) * * Should remove states in signedStates which are not a part of the support. */ export declare function clearOldStates(signedStates: SignedStateVarsWithHash[], support: SignedStateWithHash[] | undefined): SignedStateVarsWithHash[]; /** * * @param channelId Bytes32 representation of a channel id * @param state a serialized WireSignedState * @returns SignedState with signatures verified * * Deserializes a state but uses the wasm utility method local to the server-wallet * package. This, as opposed to the JS implementation inside wallet-core. * * Throws if any recovered signers are not a participant. */ export declare function fastDeserializeState(channelId: Bytes32, state: WireSignedState): SignedState; //# sourceMappingURL=state-utils.d.ts.map