Whitepaper · 2026

GitBCH

Code as CashTokens NFTs on Bitcoin Cash mainnet. A specification of the protocol primitives, with the on-chain receipts that prove the model works.

Mainnet-proven
01

Overview

GitBCH is a code repository protocol that uses CashTokens NFTs on Bitcoin Cash mainnet to anchor source code and its history. A Repo is a minting NFT. Each file commit is a child mutable NFT under that Repo’s category. File content is encoded into the same transaction as the mint, anchored by a BCMR-v2 hash registry. This document specifies the primitives and presents the on-chain receipts that prove the model works.

The protocol is small on purpose. Five composable patterns — documented in §4 — produce the rest: atomic repo creation, file lineage, tamper-evident metadata, and an authority model in which holdership of an NFT is the permission to write.

02

Protocol grammar

Every object on the network is identified by the first byte of its NFT commitment: the type tag. Resolvers dispatch on a single byte; wallets render the right detail sheet by tag; new tokens can be added without colliding with the registry.

Tag
Token
Capability
Status
0x00
Repo
minting
Live
0x01
CashBit (File)
mutable
Live
0x02
Identity
mutable
Spec’d
0x03
Reply
mutable
Live
0x04
Thread (Issue)
minting
Live
0x05
Bounty
covenant
Live

Each token, in one sentence

  • Repo — a minting NFT whose holder is the project owner. Every commit, edit, fork, and merge under the repo is authorized by spending or minting under this category.
  • CashBit (File) — a mutable child NFT of a Repo whose commitment encodes the file path and content hash. Editing the file is a spend that produces a new mutable NFT under the same category, preserving lineage.
  • Identity — a transferable mutable NFT representing a contributor profile. The NFT carries the profile, not the address.
  • Reply — a mutable NFT representing a single message in a discussion. Cheap to mint, scoped to a parent reference, edited by spending.
  • Thread (Issue) — a minting NFT representing an issue with a state machine: Open, In Progress, Resolved, Closed. Its mints are the state transitions.
  • Bounty — a CashScript covenant, not an NFT, with time-locked cancellation. Lives under an Issue; pays out on owner approval.
  • Pull Request — a CashBit (0x01) minted under a fork’s category with BCMR metadata flag type: 'pr'. Owner merge is a re-mint into the target Repo’s category by the holder of the target’s minting NFT. No new tag needed.
03

Mainnet proofs

Every claim that follows is grounded in a transaction you can fetch and verify. The receipts are public.

V1 era — ChunkDrip CashBits

Before the Repo + child-NFT model, GitBCH proved code-on-chain via the ChunkDrip covenant: a Mecenas-pattern non-custodial escrow that served raw OP_RETURN bytes paid for by anonymous QR. Two historic CashBits anchor the V1 era.

CashBit #1
First content-on-chain CashBit (V1 ChunkDrip era)
TXID
c1bafcf3a05c1bb7710e41d59d44c804bedb873a1cacd117912e6387b3209da1
Block
948,385
Content
console.log("first cashbit");
CashBit #2
Second ChunkDrip CashBit, raw covenant flow
TXID
8f717ca2cd49ac8cf399a0ff702595dd2fa4376c7715e596bca0bdb2113243c0
Bytes
333
Content
console.log("second cashbit");

V2 era — the CashTokens NFT model

The V2 model promotes every project artifact to a CashTokens NFT. A Repo is a minting NFT; every CashBit is a mutable child of that minting authority. Three milestones land the model on mainnet end to end.

Milestone 1 · 2026-05-03
First GitBCH Repo on mainnet
Repo
Test-1
TXID
c170a0abc48f2e1dbdba7a387d794c2e842ac88de91c5f4d3e3e0bdcd89f4e2e
Category
f5c05e9acc2e603ed0d5d3536b208dc1a26368c497ae569af78dd2707c64f52b
Block
949,373
Capability
minting (authorizes future child mints forever)
Fee
589 sats
Milestone 2 · 2026-05-03
First child CashBit minted as a mutable NFT
File
src/hello.js
TXID
2d0f5f809a238ac42fe31ad6a6d7724b5888d1b382b0b59c912be4e03adef726
Parent
f5c05e9acc2e603e… (Test-1)
Capability
mutable (editable per Token Standard §6)
Commitment
0x01 + sha256(path)[0..20] + sha256(content)[0..19]
BCMR anchor
Atomic, same TX
Milestone 3 · 2026-05-04
First atomic Repo + README in one transaction
Repo
hello bch
TXID
29f7b5f3512453d70c7bd4b3f24e6131edbdc5e901ebdf3d67d44a029e88801f
Category
ea4da7be92ba65cfa062d26b954b57ce969683edfecc787d049ebec071a45bc9
Block
949,634
Signed size
614 bytes · one signature, one broadcast
Outputs
minting NFT (Repo) · mutable NFT (README) · GCP-1 chunks · BCMR-v2 anchor · change

A repository and its first commit, including the file content, were created and confirmed in a single signature. There is no separate “init” step. The repo and its first byte exist together or not at all.

First Reply — the sign-only architecture, end to end

Reply #1 · 2026-05-07
First Reply NFT minted under the new sign-only / dApp-broadcast architecture
Parent Repo
hello bch
TXID
53acc0da5db4666fc354b4da54b90be1bd01532f5c06597bf311a4573172f338
Category
ea4da7be92ba65cfa062d26b954b57ce969683edfecc787d049ebec071a45bc9
Author
bitcoincash:qzc8uver670lc738uhcuunqkjhnwpkcvtvh23x63ks
Capability
mutable · commitment type tag 0x03
Path
server-built TX · CashNect signed · server-broadcast

The dashboard built the unsigned transaction server-side, the wallet signed it (and only signed — broadcast was no longer the wallet’s job), the dashboard posted the signed bytes to the server, and the server broadcast through its own Fulcrum proxy. Browser-side chain queries played no role in the mint flow. This is the first transaction proving Pattern F (below) end to end on mainnet.

Bounty release — covenant unlock via BCH-WalletConnect

Bounty release · 2026-05-10
BountyEscrow covenant input spent via wallet-signed unlock
Contract
bitcoincash:prdnv2rrfahuelfptarv5nxkyym9599hzyqe4t6uth
Release TXID
42639ef2d86835e186c69b854fa9e28668752cd384ba38208e26f8e030d43410
Funded
101,572 sats
Outputs
contributor P2PKH (99%) · service-fee P2PKH (1%)
Miner fee
1,000 sats — contract self-funds
Sighash
0x61 (SIGHASH_ALL | SIGHASH_UTXOS | FORKID), Schnorr

The release transaction spends a P2SH-20 covenant input. The dApp builds the unsigned transaction with cashscript’s TransactionBuilder.generateWcTransactionObject({}) per CHIP-2024-09 / BCH-WalletConnect; the sourceOutputs[i].contract hint on the contract input carries { abiFunction, redeemScript, artifact } so the wallet can re-derive the unlock script with the owner’s real pubkey and signature. The wallet signs the contract input with Schnorr and sighash 0x61. The covenant enforces the two-output structure on chain.

04

Architecture

Six patterns underlie everything above. They are deliberately small; the system gets its power from how cleanly they compose.

Pattern A — Genesis-with-child-mint

A CashTokens genesis transaction may emit any number of token outputs of the freshly-derived category. GitBCH uses this to mint the Repo’s minting NFT and the first file’s mutable NFT in the same transaction. The simultaneously-minted minting NFT establishes authority for the mutable NFT. One wallet signature creates the entire repo.

Pattern B — Chain-verified sidecar

The canonical metadata for a Repo is a BCMR-v2 registry hash-anchored on chain. Adding mint TXIDs to it after the fact would break the anchor. GitBCH uses a sidecar: a fast-lookup index alongside the BCMR, populated only by an endpoint that independently fetches the transaction, verifies the commitment matches, and only then writes the index. The client supplies a TXID as an optimization, never as truth.

Pattern C — ["$self"] chunks sentinel

File content lives as GCP-1 OP_RETURN chunks in the same transaction as the NFT mint. The BCMR records chunks: ["$self"] — a sentinel meaning “the resolver should substitute this transaction’s own ID at read-time.” This resolves the chicken-and-egg of needing the mint TXID to write a BCMR that gets anchored inside that mint. Any “mint-and-content in one TX” protocol can adopt this trick.

Pattern D — BCMR-v2 hash-anchored registry

Every Repo carries a tamper-evident registry that maps logical paths to content hashes, lineage, and metadata. The registry hash is committed to chain in the same transaction as the mint. Edits are verifiable. Rewrites are detectable.

Pattern E — Owner-as-minting-NFT-holder

Authority over a Repo is exactly the holdership of its minting NFT. To merge a pull request into a Repo, you spend the Repo’s minting NFT to mint the new child. To transfer the Repo, you transfer the NFT. There is no separate access-control system; the cryptography is the permission model.

Pattern F — Sign-only wallet, server broadcast

Holding keys and reaching the chain are different responsibilities with different failure modes. Wallets hold keys and sign. The dApp builds the transaction, broadcasts it, and tells the wallet what txid landed. When the chain-query layer is unreliable on either side, only one role is affected at a time, and the architecture absorbs it.

Concretely: a sign request reaches the wallet via CashNect, the wallet signs and returns { signedTransaction: hex }, the dApp posts that to its own broadcast endpoint, the dApp’s server submits to chain through a server-side Fulcrum proxy. A one-way broadcast_completed notification flows back so the wallet’s history can render the entry. Old wallets that still self-broadcast keep working unchanged — the protocol carries either a signed-transaction hex, a txid, or both.

GitBCH is live on Bitcoin Cash mainnet. The primitives in this document are the foundation.