@sebastianp265/safe-server-side-storage-client
Version:
Library for Confidential Server-Side Message Storage Using the Labyrinth Protocol
26 lines • 1.46 kB
TypeScript
import { DevicePublicKeyBundleSerialized } from "../device/key-bundles/DeviceKeyBundle";
import { ThisDevice } from "../device/ThisDevice";
import { VirtualDevice } from "../device/virtual-device/VirtualDevice";
import { EpochStorage } from "../EpochStorage";
import { AuthenticateDeviceToEpochServerClient } from "./authenticate-device-to-epoch";
export type GetNewerEpochJoinDataResponse = {
epochId: string;
encryptedEpochEntropy: string;
senderDevicePublicKeyBundle: DevicePublicKeyBundleSerialized;
};
export type GetOlderEpochJoinDataResponse = {
epochId: string;
encryptedEpochSequenceId: string;
encryptedEpochRootKey: string;
};
export type GetNewestEpochSequenceIdResponse = {
newestEpochSequenceId: string;
};
export type JoinEpochServerClient = {
getNewerEpochJoinDataForDevice: (newerEpochSequenceId: string, deviceId: string) => Promise<GetNewerEpochJoinDataResponse>;
getNewerEpochJoinDataForVirtualDevice: (newerEpochSequenceId: string) => Promise<GetNewerEpochJoinDataResponse>;
getOlderEpochJoinData: (olderEpochSequenceId: string) => Promise<GetOlderEpochJoinDataResponse>;
getNewestEpochSequenceId: () => Promise<GetNewestEpochSequenceIdResponse>;
};
export declare function joinAllEpochs(device: ThisDevice | VirtualDevice, epochStorage: EpochStorage, joinEpochServerClient: JoinEpochServerClient & AuthenticateDeviceToEpochServerClient): Promise<void>;
//# sourceMappingURL=join-epoch.d.ts.map