Skip to content

Function: init() ​

init(options?): Promise<void>

Defined in: runtime.ts:36

Initialises the WASM module. Idempotent and safe to call concurrently.

  • Node.js (import 'quantum-safe-ts'): initialises automatically; init() is a no-op.
  • Browsers, Deno, Bun, edge runtimes: call await init() once before using the library.
  • Cloudflare Workers (which forbid compiling WASM from bytes): pass the precompiled module: await init({ wasm: (await import('quantum-safe-ts/quantum_safe_wasm_bg.wasm')).default }).

Parameters ​

options? ​

wasm? ​

InitSource

Optional custom source: bytes, a WebAssembly.Module, a Response, or a URL.

Returns ​

Promise<void>

Apache-2.0.