import { KeyDerivationConfigParams } from "encryption/low-level/key-derivation"; import { KeyEncryptionConfigParams } from "encryption/low-level/symmetric/aes/key"; import { DataEncryptorI } from "encryption/data/data-encryptor"; import { EncryptedKeyPair, ExportedKeyPair } from "./util/encrypt-key-pair"; export interface UserDoc { kek_derivation_config: KeyDerivationConfigParams; private_key_encryption_config: KeyEncryptionConfigParams; encryption_key_pair: EncryptedKeyPair; signing_key_pair: EncryptedKeyPair; } export interface ResolvedNewUserResponse { encryptor: DataEncryptorI; userDoc: UserDoc; } export interface ImportedKeys { encryptionKeyPair: CryptoKeyPair; signingKeyPair: CryptoKeyPair; } export interface ExportedKeys { encryption_key_pair: ExportedKeyPair; signing_key_pair: ExportedKeyPair; } export declare function newUser(password: string): Promise; export declare function encryptorFromExistingUser(userDoc: UserDoc, password: string): Promise; export declare function changePassword(oldUserDoc: UserDoc, oldPassword: string, newPassword: string): Promise; export declare function exportKeys(userDoc: UserDoc, password: string): Promise; export declare function importKeys(exportedKeys: ExportedKeys, newPassword: string): Promise;