/** * Rehydration Helpers — shared utilities for restoring in-memory state * from persisted storage during service initialization. * * Used by ConversationService, GroupService, ChannelService, and ServerService * to reconstruct key epoch states and group/sort messages after a restart. * * Requirements: 6.1, 6.2, 6.3, 2.5, 3.4, 4.6 */ import { ICommunicationMessage } from '../../interfaces/communication'; import { IKeyEpochState } from './keyEpochManager'; /** * Reconstruct an IKeyEpochState from a persisted encryptedSharedKey map. * * Sets `currentEpoch` to the highest epoch number present, populates * `encryptedEpochKeys` with the input map, and leaves `epochKeys` empty * (raw symmetric keys are never persisted). * * Returns `undefined` and logs a warning if the input is null, undefined, * or not a Map instance. * * Requirements: 6.1, 6.2, 6.3 */ export declare function reconstructKeyEpochState(encryptedSharedKey: Map> | null | undefined): IKeyEpochState | undefined; /** * Group an array of messages by `contextId` and sort each group * by `createdAt` in ascending (chronological) order. * * Requirements: 2.5, 3.4, 4.6 */ export declare function groupAndSortMessages(messages: ICommunicationMessage[]): Map; //# sourceMappingURL=rehydrationHelpers.d.ts.map