<>ts-stack
Get StartedArchitecturePackagesSpecsGuides
⌘K
Reference
Home
Get StartedOverviewInstallChoose your stackKey concepts
ArchitectureOverviewStack layersBEEF (BRC-62)BRC-100 Wallet InterfaceIdentity & AuthConformance pipeline
PackagesOverviewSDKWalletNetworkOverlaysMessagingMiddlewareHelpers
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
Loading…
Edit this page on GitHub
© 2026 BSV Blockchain. ts-stack is open-source.
GitHubContributingVersioning

Conformance Testing

The TypeScript stack is the reference source for portable BSV behavior. The conformance corpus turns that behavior into language-neutral JSON fixtures that SDKs, wallets, and infrastructure clients can reuse.

The current corpus totals are generated from conformance/META.json and the parity matrix on the Generated Stack Facts page. CI rejects drift between those sources and the 74 JSON vector files.

How It Works

  1. A protocol behavior is captured as a JSON vector under conformance/vectors/.
  2. The vector records deterministic inputs and expected outputs.
  3. The structural runner validates that vector files are well formed and emits reports.
  4. The TypeScript/Jest runner dispatches supported vectors into @bsv/sdk behavior.
  5. Other implementations can read the same JSON files and compare their outputs.

Runner Entry Points

CommandWhat It Does
pnpm conformanceRuns conformance/runner/src/runner.js; validates vector structure and writes reports
pnpm conformance --validate-onlyValidates vector JSON only
pnpm conformance --vectors conformance/vectors/wallet/brc100Runs the structural runner against a subset directory
pnpm --filter @bsv/conformance-runner-ts testRuns the TypeScript/Jest dispatcher for SDK categories it recognizes

Reports from the structural runner land in conformance/runner/reports/.

Coverage

DomainBRCs CoveredVector Path
SDK keys + cryptoBRC-42 + general primitives (AES, ECDSA, ECIES, hashes, HMAC, signatures)conformance/vectors/sdk/{keys,crypto}/ (8 files)
SDK transactionsBRC-74 MerklePath + BRC-62 serialization / BEEF / EFconformance/vectors/sdk/transactions/
SDK scriptsBRC-14 Script parsing, encoding, sighash, evaluation (SV Node + Teranode fixtures)conformance/vectors/sdk/scripts/evaluation.json (5,116 vectors)
SDK compatBRC-77 BSM compatibilityconformance/vectors/sdk/compat/bsm.json
Wallet BRC-100Full WalletInterface (27 method files, ~950 vectors)conformance/vectors/wallet/brc100/
Wallet BRC-29Payment key derivationconformance/vectors/wallet/brc29/payment-derivation.json
Messaging BRC-31Authrite signature format + authsocketconformance/vectors/messaging/{brc31,authsocket}.json
Auth / Overlay / Broadcast / Payments / Storage / SyncBRC-31 handshake, BRC-62/20/22, BRC-29/121, BRC-26 UHRP, GASP, etc.Multiple files under each domain
RegressionsHistorical cross-SDK bug reproductions (go-sdk#306, ts-sdk#31, etc.)conformance/vectors/regressions/

Vector Format

Each vector file uses one metadata envelope with a vectors array:

json
{
  "$schema": "../../../schema/vector.schema.json",
  "id": "wallet.brc100.getpublickey",
  "name": "BRC-100 WalletInterface.getPublicKey",
  "brc": ["BRC-100"],
  "version": "1.0.0",
  "reference_impl": "ts-sdk@2.0.14",
  "parity_class": "required",
  "vectors": [
    {
      "id": "wallet.brc100.getpublickey.1",
      "input": {
        "args": { "identityKey": true }
      },
      "expected": {
        "publicKey": "0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"
      },
      "tags": ["happy-path", "brc-100"]
    }
  ]
}

See conformance/VECTOR-FORMAT.md and Contributing Vectors before adding new fixtures.

Testing Another Implementation

For a non-TypeScript SDK or wallet:

  1. Read vector files directly from conformance/vectors/.
  2. Preserve file IDs and vector IDs in your runner output.
  3. Start with deterministic SDK vectors (sdk/crypto, sdk/keys) before stateful wallet vectors.
  4. Compare your actual output to each vector's expected object.
  5. Track unsupported categories explicitly rather than silently ignoring them.

Maintained contracts

  • pnpm conformance --validate-only validates the complete structural corpus.
  • pnpm docs:facts:check verifies metadata, parity classifications, and generated totals.
  • pnpm test:governance owns every intended or skipped behavior with a reason, owner, review date, and removal condition.
  • The TypeScript/Jest behavior runner and package suites provide executable implementation assertions; a structural pass must not be described as a behavioral pass.

Next Steps

  • Vector Catalog — Current vector files and method coverage
  • TypeScript Runner — Runner commands and limitations
  • Contributing Vectors — Add or refine fixtures
  • Architecture View — High-level overview for port planning teams
  • Porting Guide — Practical guide for aligning Go, Rust, Python, or other language implementations (including known deviations and conformance tiers)