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.

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.

Messaging

Authenticated messages between identities using cryptographic signatures.

Middleware

HTTP authentication and payment-gating packages.

Authenticated Express middleware stack:

Independent HTTP 402 flow:

  • @bsv/402-pay — HTTP 402 payment handler designed to work without auth middleware

Helpers

Shared utilities, codecs, templates, and adapters.

Package Relationships

Package relationships diagram showing an inward dependency flow from application packages to wallet, infrastructure, and core SDK layers, with helpers shown as cross-cutting dashed dependencies

Choosing Packages

See Choose Your Stack for a decision guide based on what you're building.

Installation

Most projects start with the SDK:

bash
npm install @bsv/sdk

Then add packages as needed:

bash
npm install @bsv/wallet-toolbox @bsv/overlay @bsv/authsocket

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

Next Steps