π create, prove & verify Bitcoin handles off-chain
Basic principle
-
Add handles to a Merkle tree & commit the 32-byte root to Bitcoin.
-
New handles must prove non-existence in the previous root(s).
-
Subs compresses these proofs: STARK or SNARK β root cert.
-
Owners get an inclusion proof β leaf cert.
-
Certificates are non-revocable: once bound to a script pubkey, itβs yours.
Note: Only the tree root gets committed to Bitcoin - certificates remain off-chain (low footprint!).
See https://github.com/buffrr/SIP-XXX
Operators are chosen via permissionless auctions on Bitcoin. They manage top-level spaces: https://explorer.spacesprotocol.org
Prereq (RISC Zero toolchain):
curl -L https://risczero.com/install | bash
rzup install
Install subs:
git clone https://github.com/spacesprotocol/subs && cd subs
cargo install --path subs
For operators, use --features metal
on macos or cuda
for nvidia machines to enable GPU acceleration.
Example to request a handle:
$ subs request alice@bitcoin
β Created handle request
β [email protected]
β Private key saved: [email protected]
Submit the request file to @bitcoin operator to get a certificate.
After getting a certificate, verify ownership:
$ subs verify [email protected] --root @bitcoin.cert.json
β Certificate verified
β handle : alice@bitcoin
β genesis: 85d3a410db41b317b7c0310df64cefb6504482c0b5c7e8a36c992ed0dfdb38af
β anchor : dd101b1e3a52e97d2a71d518c7794ffc614260f39d38a307ae7274bc976b286b
Add inclusion requests:
$ subs add [email protected]
# or all in a directory (files named <subspace>@<space>.req.json)
$ subs add .
Commit changes:
$ subs commit
Proving is the operator's responsibility, and generates the root certificate for the space.
To prove changes in the working directory:
$ subs prove
This will create a @bitcoin.cert.json
with a STARK proof.
$ subs compress
This will update @bitcoin.cert.json
to use a smaller SNARK receipt.
$ subs cert issue alice@bitcoin
If you have a bonsai API key, you can run the prover remotely.
BONSAI_API_KEY="YOUR_API_KEY" BONSAI_API_URL="BONSAI_URL" subs compress
This project is licensed under the Apache 2.0.