UNPKG

matrix-js-sdk

Version:
24 lines 862 B
import { MatrixClient } from "../client"; import { ICryptoCallbacks } from "./index"; import { MatrixEvent } from "../models/event"; export interface ISecretRequest { requestId: string; promise: Promise<string>; cancel: (reason: string) => void; } export declare class SecretSharing { private readonly baseApis; private readonly cryptoCallbacks; private requests; constructor(baseApis: MatrixClient, cryptoCallbacks: ICryptoCallbacks); /** * Request a secret from another device * * @param name - the name of the secret to request * @param devices - the devices to request the secret from */ request(name: string, devices: string[]): ISecretRequest; onRequestReceived(event: MatrixEvent): Promise<void>; onSecretReceived(event: MatrixEvent): void; } //# sourceMappingURL=SecretSharing.d.ts.map