summaryrefslogtreecommitdiff
path: root/includes/external/matrix/node_modules/matrix-js-sdk/lib/crypto/dehydration.d.ts
blob: 2087b6ae28d75737842456457b6f7880c6183a28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { Crypto } from "./index";
import { SecretStorageKeyDescription } from "../secret-storage";
export interface IDehydratedDevice {
    device_id: string;
    device_data: SecretStorageKeyDescription & {
        algorithm: string;
        account: string;
    };
}
export interface IDehydratedDeviceKeyInfo {
    passphrase?: string;
}
export declare const DEHYDRATION_ALGORITHM = "org.matrix.msc2697.v1.olm.libolm_pickle";
export declare class DehydrationManager {
    private readonly crypto;
    private inProgress;
    private timeoutId;
    private key?;
    private keyInfo?;
    private deviceDisplayName?;
    constructor(crypto: Crypto);
    getDehydrationKeyFromCache(): Promise<void>;
    /** set the key, and queue periodic dehydration to the server in the background */
    setKeyAndQueueDehydration(key: Uint8Array, keyInfo?: {
        [props: string]: any;
    }, deviceDisplayName?: string): Promise<void>;
    setKey(key: Uint8Array, keyInfo?: {
        [props: string]: any;
    }, deviceDisplayName?: string): Promise<boolean | undefined>;
    /** returns the device id of the newly created dehydrated device */
    dehydrateDevice(): Promise<string | undefined>;
    stop(): void;
}
//# sourceMappingURL=dehydration.d.ts.map