import { SecureCellSeal } from "./secure_cell_seal"; import { SecureCellTokenProtect } from "./secure_cell_token_protect"; import { SecureCellContextImprint } from "./secure_cell_context_imprint"; import { ThemisError, ThemisErrorCode } from "./themis_error"; import { SecureMessageSign, SecureMessage, SecureMessageVerify } from "./secure_message"; import { SecureSession } from "./secure_session"; import { KeyPair, PrivateKey, PublicKey, SymmetricKey } from "./secure_keygen"; import { SecureComparator } from "./secure_comparator"; /** * Initialize WasmThemis. * * This function **must** be called and awaited before using any WasmThemis interfaces. * It will download and compile WebAssembly code of WasmThemis. * * If you are hosting `libthemis.wasm` on a CDN or at a non-standard location, * pass URL to `libthemis.wasm` as an argument. * If URL is omitted, `libthemis.wasm` is expected to be located in the same directory * as the executing script. * * @param wasmPath URL of `libthemis.wasm` to download. * * @throws {ThemisError} is thrown if this function is called more than once, * or if WasmThemis has been already initialized via `initialized`. * * @since WasmThemis 0.14.0 */ export declare const initialize: (wasmPath?: string | undefined) => Promise; declare class InitializedPromise { private initialized; private readonly promise; constructor(executor: (resolve: (value: void | PromiseLike) => void, reject: (reason?: any) => void) => void); private initialize; then(fulfilled?: ((value: any) => T | PromiseLike) | null | undefined, rejected?: ((reason: any) => E | PromiseLike) | null | undefined): Promise; catch(rejected?: ((reason: any) => T | PromiseLike) | undefined | null): Promise; } /** * Await WasmThemis initialization. * * This promise is resolved once WebAssembly code has been downloaded and compiled * and WasmThemis is ready to use. * * You **must** await either this promise or `initialize()` to use WasmThemis. * * WebAssembly code is expected to be located in `libthemis.wasm` file * in the same directory as the executing script. * If you need to use a custom location, call `initialize()`. * * Note that you cannot use `initialize()` after WasmThemis has been initialized * using this promise. * * @see initialize */ export declare const initialized: InitializedPromise; declare const _default: { initialize: (wasmPath?: string | undefined) => Promise; initialized: InitializedPromise; SecureCellSeal: typeof SecureCellSeal; SecureCellTokenProtect: typeof SecureCellTokenProtect; SecureCellContextImprint: typeof SecureCellContextImprint; SecureMessage: typeof SecureMessage; SecureMessageSign: typeof SecureMessageSign; SecureMessageVerify: typeof SecureMessageVerify; SecureSession: typeof SecureSession; SecureComparator: typeof SecureComparator; ThemisError: typeof ThemisError; ThemisErrorCode: typeof ThemisErrorCode; SymmetricKey: typeof SymmetricKey; KeyPair: typeof KeyPair; PrivateKey: typeof PrivateKey; PublicKey: typeof PublicKey; }; export default _default; export { SecureCellSeal, SecureCellTokenProtect, SecureCellContextImprint, SecureMessage, SecureMessageSign, SecureMessageVerify, SecureSession, SecureComparator, ThemisError, ThemisErrorCode, SymmetricKey, KeyPair, PrivateKey, PublicKey, };