import { KeyDescription, Key } from "./common"; import type { Storage } from "../storage/idb/Storage"; import type { Transaction } from "../storage/idb/Transaction"; import type { Platform } from "../../platform/web/Platform.js"; import type * as OlmNamespace from "@matrix-org/olm"; type Olm = typeof OlmNamespace; export declare enum KeyType { "RecoveryKey" = 0, "Passphrase" = 1 } export declare function writeKey(key: Key, keyBackupVersion: number, txn: Transaction): Promise; export declare function readKey(txn: Transaction): Promise; export declare function removeKey(txn: Transaction): Promise; export declare function keyFromCredential(type: KeyType, credential: string, storage: Storage, platform: Platform, olm: Olm): Promise; export declare function keyFromCredentialAndDescription(type: KeyType, credential: string, keyDescription: KeyDescription, platform: Platform, olm: Olm): Promise; export declare function keyFromDehydratedDeviceKey(key: Key, storage: Storage, platform: Platform): Promise; export {};