Packages
ts-stack contains packages organized into 7 domains. Each domain serves a specific part of the stack — from core crypto to business logic. See the top-level README.md for the current package map.
Seven Domains
SDK
Core cryptographic and transaction primitives. Every application starts here.
- @bsv/sdk — Keys, signatures, transactions, BEEF, SPV
Wallet
Key management, balance tracking, signing — local or via wallet service.
- @bsv/wallet-toolbox — BRC-100 wallet client library
- @bsv/btms — Basic Token Management System for token issuance, transfer, receiving, burning, and ownership proofs
- @bsv/btms-permission-module — Token permission checking
- @bsv/wallet-relay — Mobile-to-desktop wallet pairing via QR codes + encrypted WebSocket relay
Network
P2P Real-time Event Listener for Teranode
- @bsv/teranode-listener — Subscribe to Teranode P2P topics (blocks, subtrees, mining) with callbacks (see specs/sync for related)
Overlays
Run and consume overlay services that index on-chain data.
- @bsv/overlay — Core overlay framework and transaction validation
- @bsv/overlay-express — HTTP server for the Overlay spec
- @bsv/overlay-topics — Topic managers (UHRP, BTMS, custom)
- @bsv/overlay-discovery-services — Discover overlays by service type
- @bsv/gasp — Graph Aware Sync Protocol (GASP) for incremental ancestry/descendancy graph sync
- @bsv/btms-backend — Backend for running a token overlay
Messaging
Authenticated messages between identities using cryptographic signatures.
- @bsv/message-box-client — Send and retrieve messages from a message box service
- @bsv/authsocket — WebSocket protocol for authenticated messaging
- @bsv/authsocket-client — Client library for Authsocket
- @bsv/paymail — Paymail protocol (payment address discovery)
Middleware
HTTP authentication and payment-gating packages.
Authenticated Express middleware stack:
- @bsv/auth-express-middleware — Verify identity signatures in Express
- @bsv/payment-express-middleware — Gate authenticated Express routes behind payment requirements; requires
@bsv/auth-express-middleware
Independent HTTP 402 flow:
- @bsv/402-pay — HTTP 402 payment handler designed to work without auth middleware
Helpers
Shared utilities, codecs, templates, and adapters.
- @bsv/templates — Predefined
ScriptTemplateexamples for protocol engineers;OpReturnis one template among several - @bsv/did — SD-JWT VC and optional
did:keyhelpers for BSV SDK identity keys - @bsv/did-client — DID resolver (Decentralized Identifiers)
- @bsv/simple — Simplified API for common operations
- @bsv/wallet-helper — Wallet utility functions
- @bsv/amountinator — Satoshi/BSV conversion and formatting
- @bsv/fund-wallet — Faucet integration for testnet/devnet
Package Relationships
Choosing Packages
See Choose Your Stack for a decision guide based on what you're building.
Installation
Most projects start with the SDK:
npm install @bsv/sdkThen add packages as needed:
npm install @bsv/wallet-toolbox @bsv/overlay @bsv/authsocketFor monorepo development, see Install.
Package Stability
All packages in ts-stack are production-ready and versioned according to Semantic Versioning.
- Stable — API is locked, no breaking changes
- Beta — API may change, breaking changes possible
- Experimental — Early development, expect significant changes
- Deprecated — Sunset path defined, do not use in new projects
Check each package's documentation for its stability status.