UNPKG

@sebastianp265/safe-server-side-storage-client

Version:

Library for Confidential Server-Side Message Storage Using the Labyrinth Protocol

39 lines 1.93 kB
import { PrivateKey, PublicKey } from "../../crypto/keys"; import { CommonPrivateKeyBundle, CommonPublicKeyBundle, CommonPublicKeyBundleSerialized } from "./DeviceAndVirtualDeviceCommonKeyBundle"; export type DeviceKeyBundleSerialized = { priv: DevicePrivateKeyBundleSerialized; pub: DevicePublicKeyBundleSerialized; }; export declare class DeviceKeyBundle { readonly priv: DevicePrivateKeyBundle; readonly pub: DevicePublicKeyBundle; private constructor(); static generate(): DeviceKeyBundle; serialize(): DeviceKeyBundleSerialized; static deserialize(serialized: DeviceKeyBundleSerialized): DeviceKeyBundle; } export type DevicePrivateKeyBundleSerialized = { deviceKeyPriv: string; epochStorageKeyPriv: string; epochStorageAuthKeyPriv: string; }; export declare class DevicePrivateKeyBundle extends CommonPrivateKeyBundle { readonly epochStorageAuthKeyPriv: PrivateKey; private constructor(); static generate(): DevicePrivateKeyBundle; serialize(): DevicePrivateKeyBundleSerialized; static deserialize(devicePrivateKeyBundleSerialized: DevicePrivateKeyBundleSerialized): DevicePrivateKeyBundle; getPublicKeyBundle(): DevicePublicKeyBundle; } export type DevicePublicKeyBundleSerialized = CommonPublicKeyBundleSerialized & { epochStorageAuthKeyPub: string; epochStorageAuthKeySig: string; }; export declare class DevicePublicKeyBundle extends CommonPublicKeyBundle { readonly epochStorageAuthKeyPub: PublicKey; readonly epochStorageAuthKeySig: Uint8Array; constructor(deviceKeyPub: PublicKey, epochStorageKeyPub: PublicKey, epochStorageKeySig: Uint8Array, epochStorageAuthKeyPub: PublicKey, epochStorageAuthKeySig: Uint8Array); serialize(): DevicePublicKeyBundleSerialized; static deserialize(devicePublicKeyBundleSerialized: DevicePublicKeyBundleSerialized): DevicePublicKeyBundle; } //# sourceMappingURL=DeviceKeyBundle.d.ts.map