btcutil-js - v0.2.0
    Preparing search index...

    Function init

    • Initialize the WASM module and return the synchronous API.

      Called automatically on first async namespace call. You can call it explicitly to pre-load the module, provide a custom WASM source, or to obtain the sync API:

      const btcutil = await init();
      btcutil.base58.encode('deadbeef'); // sync — no await needed

      The loader is CSP-friendly: only 'wasm-unsafe-eval' is required (for WebAssembly.instantiate*). No 'unsafe-eval' is needed.

      Parameters

      • OptionalwasmSource: string | ArrayBuffer | Response

        Optional: a URL string, ArrayBuffer, or fetch Response. If omitted, btcutil.wasm is loaded from alongside this file.

      Returns Promise<BtcutilSync>

      The synchronous API object with all namespaces.