mirror of
https://github.com/pezkuwichain/pezkuwi-wasm.git
synced 2026-04-21 23:48:00 +00:00
24 lines
649 B
TypeScript
24 lines
649 B
TypeScript
// Copyright 2019-2026 @pezkuwi/wasm-crypto authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import { createWasm } from '@pezkuwi/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 (): Promise<void> {
|
|
await initBridge(createWasm);
|
|
}
|
|
|
|
initWasm().catch((): void => {
|
|
// cannot happen, initWasm doesn't throw
|
|
});
|