BSV application infrastructure in TypeScript

Reference packages, protocol specs, infrastructure contracts, and conformance vectors for building wallet-aware BSV applications. Use it as an app developer, a wallet implementer, or the baseline another language implementation must match.

Choose your entry point

ts-stack

This repository is the TypeScript reference stack for BSV application development. It contains:

  • Packages: @bsv/sdk, wallet tooling, overlays, messaging, middleware, and helper APIs.
  • Infrastructure specs: deployable services such as Wallet Infra, Message Box, overlays, UHRP, WAB, and Chaintracks.
  • Protocol references: human-readable pages backed by JSON Schema, OpenAPI, and AsyncAPI artifacts in specs/.
  • Conformance assets: vectors in conformance/vectors/ that other implementations can run to prove compatibility.

BRC-100 desktop and mobile request flows

Start Here

You areUse firstWhy
Web application developer@bsv/simple/browserConnects to a local BRC-100 wallet without putting keys in app code.
Developer coming from another chain@bsv/wallet-helperBuilds explicit transactions with a fluent builder while the wallet keeps keys and signing.
Backend or automation developer@bsv/simple/serverRuns a self-custodial server wallet from a private key and storage endpoint.
Wallet developer@bsv/wallet-toolboxReference components for building a BRC-100 wallet.
Protocol engineer@bsv/sdkCore crypto, scripts, transactions, BEEF, BUMP, and wallet interface types.
Technical evaluatorArchitecture and ConformanceShows boundaries, current coverage, and what other implementations must match.

Minimal App Example

typescript
import { createWallet } from '@bsv/simple/browser'

const wallet = await createWallet()
const recipientIdentityKey = '025706528f0f6894b2ba505007267ccff1133e004452a1f6b72ac716f246216366'
const result = await wallet.pay({
  to: recipientIdentityKey,
  satoshis: 1000
})

console.log(result.txid)

For raw BRC-100 work, use WalletClient from @bsv/sdk and call methods such as createAction, signAction, and listOutputs directly.

Package Domains

DomainPackagesWhat they cover
SDK@bsv/sdkCrypto, scripts, transactions, BEEF/BUMP, BRC-100 types, wallet substrates.
Wallet@bsv/wallet-toolbox, BTMS, permission module, wallet relayWallet implementation, storage, signing, permissions, token flows, mobile pairing.
Overlays@bsv/overlay, @bsv/overlay-express, topics, discovery, GASPShared on-chain context, topic validation, lookup services, sync.
MessagingMessage Box, Authsocket, PaymailStore-and-forward messages, live authenticated channels, identity-based addressing.
MiddlewareAuth, HTTP 402, payment expressExpress middleware for identity and payment-gated APIs.
Helpers@bsv/simple, @bsv/wallet-helper, templates, DID, amount utilitiesHigher-level developer ergonomics, including wallet-aware app helpers and fluent transaction building.

Important References

Source Discipline

Examples in this docs tree should be backed by one of:

  • packages/*/*/docs/ package documentation.
  • packages/sdk/src/wallet/Wallet.interfaces.ts and specs/sdk/brc-100-wallet.json.
  • packages/wallet/wallet-toolbox-examples/src/ for wallet action flows.
  • conformance/META.json and conformance/vectors/ for compatibility claims.
  • bsva-infra-flux deployment manifests for public infrastructure endpoint names.