<>ts-stack
Get StartedArchitecturePackagesSpecsGuides
⌘K
Reference
Home
Get StartedOverviewInstallChoose your stackKey concepts
ArchitectureOverviewStack layersBEEF (BRC-62)BRC-100 Wallet InterfaceIdentity & AuthConformance pipeline
PackagesOverviewSDK
@bsv/sdk
WalletNetworkOverlaysMessagingMiddlewareHelpers
InfrastructureOverviewmessage-box-serveroverlay-serveruhrp-server-basicuhrp-server-cloud-bucketwabwallet-infrachaintracks-server
SpecsOverviewBRC-100 Wallet InterfaceOverlay HTTPMessage-box HTTPAuthsocket (WebSocket)BRC-31 Auth HandshakeBRC-29 Peer PaymentBRC-121 / HTTP 402ARC BroadcastMerkle ServiceStorage AdapterGASP SyncUHRPAir-Gap Optical (BRC-141)
ConformanceOverviewVector catalogTS runnerContributing vectors
GuidesOverviewBuild a wallet-aware appRun an overlay nodePeer-to-peer messagingHTTP 402 payments
ReferenceOverviewBRC indexRepository health
AboutVersioningContributingDoc agentDocumentation sources
npmhttps://www.npmjs.com/package/@bsv/verifastv0.3.4betaAPI reference (TypeDoc) ↗
Loading…
Edit this page on GitHub
© 2026 BSV Blockchain. ts-stack is open-source.
GitHubContributingVersioning

@bsv/verifast

@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.

Install

bash
npm install @bsv/verifast @bsv/sdk

The validated WASM assets ship inside the package. Consumers do not run a native compiler or post-install build.

Use

ts
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.

License

Open BSV License Version 6. See the package license.