import { ICryptoStorageProvider } from "./ICryptoStorageProvider"; import { EncryptionEventContent } from "../models/events/EncryptionEvent"; import { IInboundGroupSession, IOlmSession, IOutboundGroupSession, StoredUserDevice, UserDevice } from "../models/Crypto"; /** * Sqlite crypto storage provider. Requires `better-sqlite3` package to be installed. * @category Storage providers */ export declare class SqliteCryptoStorageProvider implements ICryptoStorageProvider { private db; private kvUpsert; private kvSelect; private roomUpsert; private roomSelect; private userUpsert; private userSelect; private userDeviceUpsert; private userDevicesDelete; private userDevicesSelect; private userActiveDevicesSelect; private userActiveDeviceSelect; private obGroupSessionUpsert; private obGroupSessionSelect; private obGroupCurrentSessionSelect; private obGroupSessionMarkAllInactive; private obSentGroupSessionUpsert; private obSentSelectLastSent; private olmSessionUpsert; private olmSessionCurrentSelect; private olmSessionSelect; private ibGroupSessionUpsert; private ibGroupSessionSelect; private deMetadataUpsert; private deMetadataSelect; /** * Creates a new Sqlite storage provider. * @param {string} path The file path to store the database at. Use ":memory:" to * store the database entirely in memory, or an empty string to do the equivalent * on the disk. */ constructor(path: string); setDeviceId(deviceId: string): Promise; getDeviceId(): Promise; setPickleKey(pickleKey: string): Promise; getPickleKey(): Promise; setPickledAccount(pickled: string): Promise; getPickledAccount(): Promise; storeRoom(roomId: string, config: Partial): Promise; getRoom(roomId: string): Promise>; setActiveUserDevices(userId: string, devices: UserDevice[]): Promise; getActiveUserDevices(userId: string): Promise; getActiveUserDevice(userId: string, deviceId: string): Promise; getAllUserDevices(userId: string): Promise; flagUsersOutdated(userIds: string[]): Promise; isUserOutdated(userId: string): Promise; storeOutboundGroupSession(session: IOutboundGroupSession): Promise; getOutboundGroupSession(sessionId: string, roomId: string): Promise; getCurrentOutboundGroupSession(roomId: string): Promise; storeSentOutboundGroupSession(session: IOutboundGroupSession, index: number, device: UserDevice): Promise; getLastSentOutboundGroupSession(userId: string, deviceId: string, roomId: string): Promise<{ sessionId: string; index: number; }>; storeOlmSession(userId: string, deviceId: string, session: IOlmSession): Promise; getCurrentOlmSession(userId: string, deviceId: string): Promise; getOlmSessions(userId: string, deviceId: string): Promise; storeInboundGroupSession(session: IInboundGroupSession): Promise; getInboundGroupSession(senderUserId: string, senderDeviceId: string, roomId: string, sessionId: string): Promise; setMessageIndexForEvent(roomId: string, eventId: string, sessionId: string, messageIndex: number): Promise; getEventForMessageIndex(roomId: string, sessionId: string, messageIndex: number): Promise; /** * Closes the crypto store. Primarily for testing purposes. */ close(): Promise; }