Synchronous API object returned by init(). All methods are sync — the WASM module is already loaded, so no await is needed.
init()
await
import { init } from 'btcutil-js';const btcutil = await init();const encoded = btcutil.base58.encode('deadbeef'); // sync!const info = btcutil.address.decode('bc1q...'); // sync!const sig = btcutil.btcec.schnorrSign(privKey, hash); // sync! Copy
import { init } from 'btcutil-js';const btcutil = await init();const encoded = btcutil.base58.encode('deadbeef'); // sync!const info = btcutil.address.decode('bc1q...'); // sync!const sig = btcutil.btcec.schnorrSign(privKey, hash); // sync!
Synchronous API object returned by
init(). All methods are sync — the WASM module is already loaded, so noawaitis needed.Example