26 lines
1.1 KiB
TypeScript
26 lines
1.1 KiB
TypeScript
import { type CallMembershipIdentityParts } from "./EncryptionManager.ts";
|
|
import type { InboundEncryptionSession, SlotDescription } from "./types.ts";
|
|
/**
|
|
* Detects when a key for a given index is outdated.
|
|
*/
|
|
export declare class OutdatedKeyFilter {
|
|
private tsBuffer;
|
|
/**
|
|
* Check if there is a recent key with the same keyId (index) and then use the creationTS to decide what to
|
|
* do with the key. If the key received is older than the one already in the buffer, it is ignored.
|
|
* @param participantId
|
|
* @param item
|
|
*/
|
|
isOutdated(membership: CallMembershipIdentityParts, item: InboundEncryptionSession): boolean;
|
|
}
|
|
/**
|
|
* Converts a slot ID into it's component application and ID portions.
|
|
* @param slotId e.g. `m.call#call_id`
|
|
* @throws If the format of `slotId` is invalid.
|
|
*/
|
|
export declare function slotIdToDescription(slotId: string): SlotDescription;
|
|
/**
|
|
* Converts a SlotDescription into it's slot ID format.
|
|
*/
|
|
export declare function computeSlotId(slotDescription: SlotDescription): string;
|
|
//# sourceMappingURL=utils.d.ts.map
|