import type { IncomingRoomKey } from "./decryption/RoomKey"; import type { KeyLoader } from "./decryption/KeyLoader"; import type { OlmWorker } from "../OlmWorker"; import type { Transaction } from "../../storage/idb/Transaction"; import type { TimelineEvent } from "../../storage/types"; import type { DecryptionResult } from "../DecryptionResult"; import type { ILogItem } from "../../../logging/types"; export declare class Decryption { private keyLoader; private olmWorker?; constructor(keyLoader: KeyLoader, olmWorker: OlmWorker | undefined); addMissingKeyEventIds(roomId: any, senderKey: any, sessionId: any, eventIds: any, txn: any): Promise; getEventIdsForMissingKey(roomId: any, senderKey: any, sessionId: any, txn: any): Promise; hasSession(roomId: any, senderKey: any, sessionId: any, txn: any): Promise; /** * Reads all the state from storage to be able to decrypt the given events. * Decryption can then happen outside of a storage transaction. * @param {[type]} roomId [description] * @param {[type]} events [description] * @param {RoomKey[]?} newKeys keys as returned from extractRoomKeys, but not yet committed to storage. May be undefined. * @param {[type]} sessionCache [description] * @param {[type]} txn [description] * @return {DecryptionPreparation} */ prepareDecryptAll(roomId: string, events: TimelineEvent[], newKeys: IncomingRoomKey[] | undefined, txn: Transaction): Promise; private getRoomKey; /** * Writes the key as an inbound group session if there is not already a better key in the store */ writeRoomKey(key: IncomingRoomKey, txn: Transaction): Promise; /** * Extracts room keys from decrypted device messages. * The key won't be persisted yet, you need to call RoomKey.write for that. */ roomKeysFromDeviceMessages(decryptionResults: DecryptionResult[], log: ILogItem): IncomingRoomKey[]; roomKeyFromBackup(roomId: string, sessionId: string, sessionInfo: string): IncomingRoomKey | undefined; dispose(): void; }