Inspiration

Bitcoin has a sovereign self-custody problem — not a technology problem, but an accessibility problem.

The primitives exist: Taproot MAST scripts, Schnorr signatures, Nostr Wallet Connect, multi-sig timelocks. But wiring them together requires reading BIPs, running nodes, and writing code that most people will never touch. The result? The people who most need financial sovereignty — families in inflation-wrecked economies, activists, the unbanked — are locked out of the very tools built to free them.

The MIT Bitcoin Expo 2026 theme, Freedom for All, made the challenge clear: what if setting up a family Bitcoin vault was as intuitive as snapping LEGO blocks together?


What we built

BitLEGO is a drag-and-drop canvas where anyone can compose real Bitcoin sovereignty setups from pre-built "Freedom Blocks" — no code, no command line, no prior Bitcoin knowledge required.

Blocks have typed ports (UTXO, address, BOLT11, identity, script, trigger) and connect via animated wires. The canvas enforces type-safe wiring at drag time, so you can't accidentally plug a Lightning invoice into a UTXO input.

The core block — the Family Vault — is a real BIP-341 Taproot MAST script:

$$ \text{scriptTree} = \begin{cases} \text{Leaf}_0: & \texttt{OP_CHECKSIGADD} \text{ (2-of-3 multisig)} \ \text{Leaf}_1: & \texttt{OP_CSV} + \texttt{OP_CHECKSIG} \text{ (timelock fallback)} \end{cases} $$

We use an unspendable NUMS internal key so every spend is forced through the script path, demonstrating real MAST leaf selection. The witness on-chain shows 3 BIP-340 Schnorr signatures, the script, and the Taproot control block — verifiable on mutinynet.com.


How we built it

Backend — Express + TypeScript

  • taproot.ts: BIP-341 MAST script builder using bitcoinjs-lib + tiny-secp256k1
  • taproot-spend.ts: BIP-340 Schnorr script-path spend with full witness construction
  • signet.ts: Mutinynet API client for UTXO queries and faucet funding (30-second block times made iteration fast)
  • lightning.ts: @getalby/sdk Nostr Wallet Connect client for real Lightning balance, invoices, and payments
  • nostr.ts: nostr-tools relay connection, NIP-19 keypair generation, NIP-57 zap support

Frontend — React 19 + Vite + Tailwind v4

The canvas is built entirely with custom mouse handlers — no React Flow, no Konva. We own the pan, zoom, snap-to-grid, and wire rendering logic from scratch. SVG wires animate flowing particles on funded connections to give live visual feedback that real sats

Built With

Share this project:

Updates