@bsv/verifast is the optional BSV BDK WebAssembly verification backend for
@bsv/sdk. It supports Node ESM and CommonJS, browser and worker ESM, and a
classic-script/UMD integration.
npm install @bsv/verifast @bsv/sdkThe validated WASM assets ship inside the package. Consumers do not run a native compiler or post-install build.
import { Transaction } from '@bsv/sdk'
import { BdkVerifier } from '@bsv/verifast'
const verifier = new BdkVerifier()
await verifier.preload()
const transaction = Transaction.fromEF(extendedFormatBytes)
const valid = await transaction.verify('scripts only', undefined, undefined, verifier)The default adaptive mode uses the SDK interpreter while a cold WASM module warms and routes eligible verification work to WASM afterward. Use explicit consensus or policy context when establishing transaction validity. Batch and worker APIs are bounded and can be preloaded for latency-sensitive workloads.
Build and package checks install exact tarballs and exercise real WASM verification in Node, browser bundlers, workers, CommonJS, strict-CSP browser pages, streaming fallback, and the classic browser payload. Raw, gzip, and Brotli budgets guard both browser bundles and the complete UMD loaders-plus-WASM composition. See the package README for routing, network, batch, resource, and UMD details.
Open BSV License Version 6. See the package license.