| id | architecture-conformance | |||
|---|---|---|---|---|
| title | Conformance Pipeline | |||
| kind | meta | |||
| version | n/a | |||
| last_updated | 2026-04-30 | |||
| last_verified | 2026-04-30 | |||
| review_cadence_days | 30 | |||
| status | stable | |||
| tags |
|
The TypeScript stack is the reference implementation for this repository's portable SDK and wallet behavior. Conformance vectors are the bridge from that implementation to other languages.
A behavior becomes portable when it is captured as a deterministic JSON vector. Each vector contains inputs, expected outputs, BRC metadata, and stable IDs. A new SDK implementation can read the same file and prove that it produces the same result.
This is most useful for behavior that must match byte-for-byte:
- key derivation and public key generation
- hashes, HMACs, signatures, encryption outputs
- transaction and MerklePath serialization
- BRC-29 payment derivation
- BRC-100 wallet crypto method behavior
TypeScript reference behavior
|
| captured as deterministic fixtures
v
conformance/vectors/*.json
|
+--> Node structural runner
| conformance/runner/src/runner.js
| validates JSON shape and writes reports
|
+--> TypeScript/Jest behavior runner
| conformance/runner/ts/runner.test.ts
| dispatches supported vectors into @bsv/sdk
|
+--> Other language runners
consume the same JSON corpus and compare outputs
The corpus metadata is in conformance/META.json: file count, vector count, BRC coverage, and regression index.
The current corpus has 260 vectors across 33 files:
sdk/crypto/— 99 vectorssdk/keys/— 43 vectorssdk/transactions/— 31 vectorssdk/scripts/— 20 vectorssdk/compat/— 9 vectorswallet/brc100/— 15 vectorswallet/brc29/— 3 vectorsmessaging/brc31/— 4 vectorsregressions/— 36 vectors
Run structural validation and report generation:
pnpm conformanceRun only structural validation:
pnpm conformance --validate-onlyRun a subset directory:
pnpm conformance --vectors conformance/vectors/wallet/brc100Run the TypeScript/Jest dispatcher:
pnpm --filter @bsv/conformance-runner-ts testWhen a protocol behavior is added or clarified, add a vector in the same PR as the behavior change. When a bug is fixed, add a regression vector that would have failed before the fix.
See Contributing Vectors for the file format and review checklist.