import type CryptoLib from '../interfaces/CryptoLib.mjs'; import type { PlatformProviders } from '../interfaces/PlatformProviders.mjs'; import type { QrCodeLib } from '../interfaces/QrCodeLib.mjs'; import type { OpenPgpLib } from '../interfaces/OpenPgpLib.mjs'; import type { UrlParser } from '../interfaces/UrlParserLib.mjs'; /** * Class responsible for loading various external (big) libraries required by the application. * All libraries (except CryptoLib) are loaded on demand. This helps to reduce the initial bundle size. */ declare class LibraryLoader { private platformProviders; private cryptoLib; private openPgpLib?; private qrGeneratorLib?; private jsQrLib?; private urlParserLib?; private zxcvbn?; private webSocketLib?; /** * Constructs a new instance of LibraryLoader. * @param platformProviders - Platform-specific providers containing CryptoLib and other providers. * @throws {InitializationError} If the provided platform providers are invalid. */ constructor(platformProviders: PlatformProviders); /** * @returns The CryptoLib instance. */ getCryptoLib(): CryptoLib; /** * @returns The PlatformProviders instance. */ getPlatformProviders(): PlatformProviders; /** * Loads and returns the OpenPGP library on demand. * @returns A promise that resolves to the OpenPGP library. */ getOpenPGPLib(): OpenPgpLib; /** * Loads and returns the QR Generator library on demand. * @returns A promise that resolves to the QR Generator library. */ getQrGeneratorLib(): QrCodeLib; /** * Loads and returns the JsQR library on demand. * @returns A promise that resolves to the JsQR library. */ getJsQrLib(): Promise; /** * Loads and returns the platform's URL parser on demand. * @returns The URL parser function. */ getUrlParserLib(): UrlParser; /** * Loads and returns the WebSocket library on demand. * @returns The WebSocket library. */ getWebSocketLib(): { new (url: string | URL, protocols?: string | string[]): WebSocket; prototype: WebSocket; readonly CONNECTING: 0; readonly OPEN: 1; readonly CLOSING: 2; readonly CLOSED: 3; }; /** * Loads and returns the Zxcvbn library on demand. * @returns A promise that resolves to the Zxcvbn library. */ getZxcvbn(): Promise<(password: string, userInputs?: (string | number)[]) => import("@zxcvbn-ts/core").ZxcvbnResult>; } export default LibraryLoader;