import { LegacyRendezvousFailureReason as RendezvousFailureReason, RendezvousChannel, RendezvousCode, RendezvousIntent, RendezvousTransport, RendezvousTransportDetails } from ".."; import { UnstableValue } from "../../NamespacedValue"; declare const ECDH_V2: UnstableValue<"m.rendezvous.v2.curve25519-aes-sha256", "org.matrix.msc3903.rendezvous.v2.curve25519-aes-sha256">; export interface ECDHv2RendezvousCode extends RendezvousCode { rendezvous: { transport: RendezvousTransportDetails; algorithm: typeof ECDH_V2.name | typeof ECDH_V2.altName; key: string; }; } export type MSC3903ECDHPayload = PlainTextPayload | EncryptedPayload; export interface PlainTextPayload { algorithm: typeof ECDH_V2.name | typeof ECDH_V2.altName; key?: string; } export interface EncryptedPayload { iv: string; ciphertext: string; } /** * Implementation of the unstable [MSC3903](https://github.com/matrix-org/matrix-spec-proposals/pull/3903) * X25519/ECDH key agreement based secure rendezvous channel. * Note that this is UNSTABLE and may have breaking changes without notice. * MSC3886/MSC3903/MSC3906 are now closed and so this functionality will be removed in future. * However, we want to keep this implementation around for some time. * TODO: define an end-of-life date for this implementation. */ export declare class MSC3903ECDHv2RendezvousChannel implements RendezvousChannel { private transport; private theirPublicKey?; onFailure?: ((reason: RendezvousFailureReason) => void) | undefined; private olmSAS?; private ourPublicKey; private aesKey?; private connected; constructor(transport: RendezvousTransport, theirPublicKey?: Uint8Array | undefined, onFailure?: ((reason: RendezvousFailureReason) => void) | undefined); generateCode(intent: RendezvousIntent): Promise; connect(): Promise; private encrypt; send(payload: T): Promise; private decrypt; receive(): Promise | undefined>; close(): Promise; cancel(reason: RendezvousFailureReason): Promise; } export {}; //# sourceMappingURL=MSC3903ECDHv2RendezvousChannel.d.ts.map