BCTS - Blockchain Commons for TypeScript
July 1, 2026 ยท View on GitHub
๐ท Community Implementation: This is a TypeScript port of the Blockchain Commons' open specifications and implementations.
โ ๏ธ Disclaimer: This is a project in active development. It has not been audited, APIs and interfaces are subject to change.
Overview
This repository includes 20 packages covering deterministic CBOR encoding (dCBOR), Gordian Envelope for privacy-preserving data containers, Uniform Resources (URs) and Multipart URs for QR code transport, cryptographic primitives, secret sharing (Shamir/SSKR), decentralized identity (XID), provenance verification, visual hashing (LifeHash), and distributed infrastructure for threshold signatures (FROST/Hubert). The suite also provides 5 CLI tools and an interactive web IDE. All implementations follow the Rust reference implementations as the source of truth.
๐ Resources
- CBOR Book - Comprehensive guide to CBOR, dCBOR, and Gordian Envelope
- BC YouTube Channel - A YouTube channel with many lectures and tutorials
- BC Developer Docs - BC's developer documentation
- JSON vs CBOR - Comparison of JSON and CBOR formats
- Deterministic Data: Intro to dCBOR - Introduction to deterministic CBOR
- dCBOR Deep Dive - Why "almost" deterministic isn't enough
- AI-Assisted development - Check this out if you're using an AI tool
๐ฎ Applications
BCTS IDE
An interactive web application for experimenting with dCBOR encoding, Uniform Resources decoding, and Gordian Envelope visualization.
Features:
- Data Playground - Parse and visualize data with multiple input formats (Hex, UR, Bytewords) and output views (JSON, dCBOR, Diagnostic, Envelope tree)
- Envelope Builder - Visual tree builder for creating Gordian Envelopes with signing, encryption, compression, elision, and salting transformations
- Registry Browser - Browse CBOR tags, Known Values, and live IANA registry with category filtering and search
- QR Code Support - Generate QR codes from UR output, scan via camera (including animated/fountain codes), and upload QR images
- Key Management - Create and manage signing keys, encryption keys, and multi-recipient public keys
- Selective Disclosure - Elide assertions while maintaining cryptographic integrity for privacy-preserving data sharing
- Templates & Examples - Pre-built envelope patterns and example data for common use cases
Try it locally:
bun playground
Live Demo: https://bcts.dev
๐ฆ Packages
| Package | Description |
|---|---|
| components | Shared component utilities and helpers for the Blockchain Commons ecosystem. ๐ Docs | ๐ฆ Rust |
| crypto | Cryptographic primitives including symmetric encryption, hashing, and key derivation (HKDF, PBKDF2). ๐ Docs | ๐ฆ Rust |
| dcbor | Deterministic CBOR encoding - a specification for serializing data in a canonical, reproducible format. Ensures identical byte sequences for cryptographic operations and blockchain applications. ๐ Docs | ๐ฆ Rust |
| dcbor-parse | dCBOR Diagnostic Parser - parse and compose CBOR diagnostic notation into dCBOR data items. Supports booleans, numbers, strings, byte strings (hex/base64), tagged values, arrays, maps, URs, known values, and date literals. ๐ Docs | ๐ฆ Rust |
| dcbor-pattern | Pattern matching for dCBOR - a powerful query language for matching and extracting data from dCBOR structures. Supports value, structure, and meta patterns with named captures and VM-based execution. ๐ Docs | ๐ฆ Rust |
| envelope | Gordian Envelope - structured, privacy-focused data containers for secure information exchange. Supports encryption, elision, and cryptographic assertions. ๐ Docs | ๐ฆ Rust |
| envelope-pattern | Pattern matching for Gordian Envelope - query and extract data from Envelope structures. Supports leaf, structure, and meta patterns with subject/predicate/object matching and tree traversal. ๐ Docs | ๐ฆ Rust |
| frost-hubert | FROST DKG and signing using Hubert as the distributed substrate. Implements threshold signatures with distributed key generation for secure multiparty cryptographic operations. ๐ Docs | ๐ฆ Rust |
| gstp | Gordian Sealed Transaction Protocol - a secure, authenticated, transport-agnostic data exchange protocol with distributed state management via Encrypted State Continuations (ESC). ๐ Docs | ๐ฆ Rust |
| hubert | Hubert - Distributed infrastructure for secure multiparty transactions using Gordian Envelope. Supports IPFS, Mainline DHT, server, and hybrid storage modes. ๐ Docs | ๐ฆ Rust |
| known-values | Known Values - compact, deterministic identifiers for ontological concepts. More efficient than URIs for representing predicates and relationships. ๐ Docs | ๐ฆ Rust |
| lifehash | LifeHash - visual hash algorithm that generates beautiful, deterministic icons from data using cellular automata. Useful for visual verification of cryptographic hashes and identities. ๐ Docs | ๐ฆ Rust |
| multipart-ur | Multipart Uniform Resources - render Uniform Resources as animated QR-code sequences (PNG/JPEG/SVG/Mermaid) with optional embedded logos. Wraps uniform-resources fountain encoding for visual transport of arbitrary-sized payloads. ๐ Docs | ๐ฆ Rust |
| provenance-mark | Provenance Marks - cryptographically-secured system for establishing authenticity and provenance of digital works. Generates verifiable mark chains with configurable resolution levels. ๐ Docs | ๐ฆ Rust |
| rand | Cryptographically secure random number generation utilities. Provides a consistent interface for random operations across all packages. ๐ Docs | ๐ฆ Rust |
| shamir | Shamir's Secret Sharing - split secrets into shares where any threshold can reconstruct the original. Implements GF(256) arithmetic for secure secret splitting. ๐ Docs | ๐ฆ Rust |
| sskr | Sharded Secret Key Reconstruction (SSKR) - hierarchical secret sharing with groups and thresholds. Encodes shares in Bytewords for human-friendly backup. ๐ Docs | ๐ฆ Rust |
| tags | CBOR tag registry for Blockchain Commons specifications. Provides type-safe tag definitions for use across all packages. ๐ Docs | ๐ฆ Rust |
| uniform-resources | Uniform Resources (UR) - a method for encoding binary data as URIs for transport in QR codes and other text-based channels. Includes Bytewords encoding and fountain codes for multi-part transmission. ๐ Docs | ๐ฆ Rust |
| xid | Extensible Identifiers (XID) - decentralized digital identity documents supporting keys, delegates, services, and provenance. Enables self-sovereign identity management with cryptographic verification. ๐ Docs | ๐ฆ Rust |
๐ป CLI Tools
| CLI | Description |
|---|---|
| dcbor-cli | Command-line tool for working with dCBOR data. Parse, encode, and convert between hex, diagnostic notation, and other formats. ๐ Docs | ๐ฆ Rust |
| envelope-cli | Command-line tool for creating and manipulating Gordian Envelopes. Supports encryption, signing, elision, and format conversion. ๐ Docs | ๐ฆ Rust |
| lifehash-cli | Command-line tool for generating LifeHash visual hash images as PNG files. Create deterministic icons from any input data. ๐ Docs | ๐ฆ Rust |
| provenance-mark-cli | Command-line tool for generating and verifying Provenance Marks. Create mark chains for establishing authenticity of digital works. ๐ Docs | ๐ฆ Rust |
| seedtool-cli | Command-line tool for generating and managing cryptographic seeds. Supports multiple output formats including hex, Bytewords, SSKR shares, and Gordian Envelope. ๐ Docs | ๐ฆ Rust |
๐ค AI-Assisted Development
BCTS ships a hosted Model Context Protocol (MCP) server, so any MCP-aware AI tool (Claude Code, Cursor, Claude Desktop, Windsurf, etc.) can navigate the API surface of every package without you installing anything per-project.
Endpoint: https://mcp.bcts.dev/mcp (Streamable HTTP, stateless JSON-RPC 2.0)
Tools exposed:
| Tool | Purpose |
|---|---|
list_packages | Enumerate all BCTS packages with descriptions and symbol counts |
search_symbols | Search exported symbols (functions, classes, types) globally or scoped to one package |
get_symbol | Fetch full details (kind, doc comment, members, source link) for a specific symbol |
get_guide | Read the README / hand-written guide for a package |
find_examples | Find code examples whose doc comments match a query |
Add it to your client
Claude Code โ one command:
claude mcp add --transport http bcts https://mcp.bcts.dev/mcp
Cursor / Windsurf โ add to .cursor/mcp.json (or the equivalent project config):
{
"mcpServers": {
"bcts": {
"url": "https://mcp.bcts.dev/mcp"
}
}
}
Claude Desktop โ claude_desktop_config.json (uses mcp-remote to bridge HTTP into stdio):
{
"mcpServers": {
"bcts": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.bcts.dev/mcp"]
}
}
}
Lightweight alternative: llms.txt
If your tool doesn't speak MCP, every package also publishes a flat Markdown reference following the llms.txt convention:
- Top-level index: https://docs.bcts.dev/llms.txt
- Per-package full reference:
https://docs.bcts.dev/api/<package>/llms-full.txt
Drop those URLs into your AI tool's context to give it the full API surface for one or more packages without any tool wiring.
๐ฅ Credits
This TypeScript implementation is a direct port from the work of @ChristopherA, @WolfMcNally and @shannona.
Consider visiting Blockchain Commons to learn more about the organization and their mission.
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
๐ Security Disclosure
Found a vulnerability? We'd really appreciate you letting us know privately at security@parity.io - please avoid opening public issues for security concerns.
๐ License
This project is licensed under the BSD-2-Clause-Patent License.