UNPKG

@polkadot/wasm-crypto

Version:

A wasm interface layer for use by @polkadot/util-crypto

18 lines (17 loc) 522 B
import { createWasm } from '@polkadot/wasm-crypto-init/asm'; import { initBridge } from './init.js'; /** * @name initWasm * @description * For historic purposes and for tighter control on init, specifically performing * a WASM initialization with only ASM.js * * Generally should not be used unless you want explicit control over which * interfaces are initialized. */ export async function initWasm() { await initBridge(createWasm); } initWasm().catch(() => { // cannot happen, initWasm doesn't throw });