import { Result } from "@gnuxie/typescript-result";
import { StringRoomID, StringServerName, StringUserID } from "@the-draupnir-project/matrix-basic-types";
import { HashedLiteralPolicyRule, LiteralPolicyRule, RoomHashRecord, HashedRoomDetails, SHA256HashStore, UserHashRecord } from "matrix-protection-suite";
import { Database } from "better-sqlite3";
import EventEmitter from "events";
export declare class SqliteHashReversalStore extends EventEmitter implements SHA256HashStore {
    private readonly db;
    private readonly baseStore;
    constructor(db: Database);
    findUserHash(hash: string): Promise<Result<StringUserID | undefined>>;
    findServerHash(hash: string): Promise<Result<string | undefined>>;
    static readonly StoreName = "hash-store.db";
    static createToplevel(storagePath: string): SqliteHashReversalStore;
    findRoomHash(hash: string): Promise<Result<StringRoomID | undefined>>;
    private reversePolicies;
    private reverseRoomPolicies;
    private reverseUserPolicies;
    private reverseServerPolicies;
    reverseHashedPolicies(policies: HashedLiteralPolicyRule[]): Promise<Result<LiteralPolicyRule[]>>;
    private storeUndiscoveredEntities;
    storeUndiscoveredRooms(roomIDs: StringRoomID[]): Promise<Result<RoomHashRecord[]>>;
    storeUndiscoveredUsers(userIDs: StringUserID[]): Promise<Result<UserHashRecord[]>>;
    storeRoomIdentification(roomDetails: HashedRoomDetails): Promise<Result<void>>;
    findRoomsByServer(server: StringServerName): Promise<Result<StringRoomID[]>>;
    findRoomsByCreator(creator: StringUserID): Promise<Result<StringRoomID[]>>;
    destroy(): void;
}
//# sourceMappingURL=HashStore.d.ts.map