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:
constbtcutil = awaitinit(); 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.
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:
The loader is CSP-friendly: only
'wasm-unsafe-eval'is required (forWebAssembly.instantiate*). No'unsafe-eval'is needed.