import { APIClient } from '@wireapp/api-client'; import { Ciphersuite, CoreCrypto } from './E2EIService.types'; import { InitialData } from './Storage/E2EIStorage.schema'; import { CoreDatabase } from '../../../storage/CoreDB'; export type getTokenCallback = (challengesData?: { challenge: any; keyAuth: string; }) => Promise; export type getAllConversationsCallback = () => Promise<{ group_id: string; }[]>; export declare class E2EIServiceInternal { private readonly coreCryptoClient; private readonly apiClient; /** number of seconds the certificate should be valid */ private readonly certificateTtl; private readonly keyPackagesAmount; private readonly initialData; private readonly logger; private acmeService; private enrollmentStorage; constructor(coreDb: CoreDatabase, coreCryptoClient: CoreCrypto, apiClient: APIClient, /** number of seconds the certificate should be valid */ certificateTtl: number, keyPackagesAmount: number, initialData: InitialData); /** * Will get a certificate for the user * @param getOAuthToken function called when the process needs an oauth token * @param refresh should the process refresh the current certificate or get a new one */ generateCertificate(getOAuthToken: getTokenCallback, refresh: boolean, getAllConversations: getAllConversationsCallback, ciphersuite: Ciphersuite): Promise<{ newCrlDistributionPoints: import("@wireapp/core-crypto").NewCrlDistributionPoints; keyPackages: Uint8Array[]; }>; private continueCertificateGeneration; private initIdentity; private getDirectory; private getInitialNonce; /** * Start of the ACME enrollment flow * Stores the received data in local storage for later use (e.g. in the continue flow) * * @returns authData */ private getEnrollmentChallenges; /** * Continuation of the ACME enrollment flow * Needs to be called after the user has authenticated with the OIDC provider * Stores the received certificate data in local storage for later use * * @param oAuthIdToken * @returns KeyPackages */ private getKeyPackages; } //# sourceMappingURL=E2EIServiceInternal.d.ts.map