Minimal
One P2TR output per state update. Key-path spends only. No scripts.
Blocktrails let you anchor evolving state to Bitcoin using nothing but keys and hashes. Each state update creates a new output. Bitcoin's UTXO model guarantees only one valid history exists. No extra tokens. No sidechains. No new consensus rules. A primitive you extend — define tokens, voting, audit trails through Profiles.
Each state transition adds a tweak to the previous key, forming a cryptographic chain that mirrors the spend chain. Anyone with the state history can verify the chain.
import { Blocktrail } from 'blocktrails'; // Create a trail with your Nostr key const trail = new Blocktrail(privateKey); // Commit state → get P2TR address const genesis = trail.genesis('{"balance": 1000}'); console.log(genesis.p2trAddress); // bc1p... // Advance state → new address trail.advance('{"balance": 900}');
Blocktrails use full secp256k1 keys internally — the same keys Nostr uses. Your existing Nostr identity can control a Blocktrail directly. No awkward key conversions. No parity headaches. The x-only encoding required by Taproot is handled only at the Bitcoin boundary.
One P2TR output per state update. Key-path spends only. No scripts.
Verify with merkle proofs. No full node required.
A primitive, not a protocol. Define your own state format and rules.
Just Bitcoin. No wrapped assets, no bridges, no new consensus.
How Blocktrails compares to other Bitcoin state protocols:
| Blocktrails | RGB | Taproot Assets | |
|---|---|---|---|
| Complexity | Minimal | High | Medium |
| Validation | Client-side | Client-side | Client-side (proof data via Universes) |
| State model | Linear chain | DAG | Asset tree |
| On-chain footprint | 1 P2TR output | 1 output + commitment | 1 output + witness |
| Key model | Nostr-native | Custom | Custom |
| Best for | Simple state machines | Complex contracts | Asset issuance |
Blocktrails are a building block. Applications define what state means:
Application-layer profiles define state formats and validation rules:
npm install blocktrails — JavaScript/Node.js with full test suite. See the GitHub repo.