Get started with
RGB Protocol on Bitcoin.
Everything you need to build on RGB Protocol on Bitcoin — from choosing the right library to issuing your first asset on Bitcoin mainnet.


Basic familiarity with Bitcoin and UTXOs is helpful. RGB Protocol on Bitcoin is implemented primarily in Rust, with higher-level SDKs available for other languages. No prior RGB experience required.
What will you build on
RGB Protocol on Bitcoin?
Three common starting points for developers on RGB Protocol on Bitcoin. Choose the one that matches your goal.

Build an application
Integrate RGB asset support into a wallet, exchange, or product. Use RGB Lib — the high-level SDK designed for application developers.

Issue an asset
Create a fungible token, stablecoin, NFT, or custom asset on Bitcoin. Choose the right schema and issue via CLI or SDK.

Understand the protocol
Dive into the technical specification — client-side validation, single-use seals, schemas, state transitions, and commitment schemes.
From zero to first
RGB asset transfer.
Start with the rgb-lib Python demo — a complete wallet-to-transfer flow on local regtest — then explore the full API when you’re ready to build.
rgb-lib and the Python demo
rgb-lib is a Rust SDK for building RGB applications on Bitcoin, with language bindings for Python, Kotlin, Swift, and Node.js. It abstracts the underlying RGB protocol, providing high-level APIs for wallet management, asset issuance, and transfers.
The fastest way to explore it is the rgb-lib Python demo: a Jupyter notebook that walks through a complete wallet-to-transfer flow on a local regtest environment. No Rust experience required.
Requires Docker
Clone and build the demo
Clone the rgb-lib-python repository and build the Docker image for the Jupyter demo.
# Clone the repository
git clone https://github.com/RGB-Tools/rgb-lib-python
cd rgb-lib-python/demo
./services.sh build
Docker builds the full RGB environment
Run the notebook
Start all services. A link will appear in the console — open it in your browser and run each cell from top to bottom. This covers wallet creation, asset issuance, and transfer end-to-end on regtest.
# Start all services (Bitcoin regtest + Electrum + Jupyter)
./services.sh start
# Open the link from the console output in your browser
# Run each cell from top to bottom
Local regtest — no real Bitcoin needed
What is rgb-lib
rgb-lib is the recommended high-level library for building applications on RGB Protocol on Bitcoin. It handles wallet creation, UTXO management, asset issuance, and transfers — abstracting the low-level protocol details. Language bindings are available for Python, Kotlin, Swift, and Node.js in addition to the native Rust API.
Bindings: Python · Kotlin · Swift · Node.js
Building with Rust
For production integration, rgb-lib exposes a native Rust API and bindings for Python, Kotlin, Swift, and Node.js. A complete setup requires additional steps not shown here — see the full repository for API reference, examples, and the latest rgb-lib releases.
// 1. Add rgb-lib to Cargo.toml
// 2. Create wallet + connect to the Bitcoin Network
// 3. Fund wallet + create UTXOs
// 4. Issue an asset (NIA, CFA, UDA, IFA, PFA)
// 5. Transfer the asset
github.com/RGB-Tools/rgb-lib ↗
For the complete RGB Lib API reference and more detailed examples, see the full library documentation ↗ and the RGB Lib GitHub repository ↗.
Choose the right schema
for your asset.
◎ Schema specifications from official RGB documentation at docs.rgb.info/rgb-contract-implementation/schema/supported-schemas ↗
An RGB Schema is a template that defines the structure of a contract — its state, transitions, and validation rules. As documented in docs.rgb.info, a Schema is “the analog of a class for an OOP language.” Five schemas are officially supported as of v0.11.1.
Fungible · Fixed supply
NIA
Non-Inflatable Asset
Transfer
Fixed-supply fungible token. Defines ticker, name, precision, and total issued supply. Supply cannot be increased after issuance. Use for tokens, stablecoins, or any asset with a hard cap.
Non-fungible · Unique
UDA
Unique Digital Asset
Transfer
Non-fungible asset (NFT). Supports embedded media (up to ~64KiB) and external media attachments via hash digest. Can include a proof of reserves for backed assets.
Fungible · Collectible
CFA
Collectible Fungible Asset
Transfer
Similar to NIA with an additional “Article” string that represents the collectible. For fungible assets that carry a collectible identity alongside their transferable value.
Fungible · Inflatable
IFA
Inflatable Fungible Asset
Transfer
Inflate
Replace
Burn
Fungible asset with secondary issuance rights. Supports inflation up to a defined total supply, burn operations, and replace rights for history validation shortcuts.
Fungible · Permissioned
PFA
Permissioned Fungible Asset
Transfer (signed)
Non-inflatable fungible asset where the issuer must explicitly authorize every transfer via signature. Designed for regulated assets such as company shares with legal transfer constraints.
Custom
Your schema
RGB schemas are composable and extensible. Build custom schemas for identity, DAO governance, proof of publication, or any application that requires programmable state on Bitcoin.
The RGB Bitcoin Protocol
library stack.
◎ Library map from official RGB documentation at docs.rgb.info/annexes/rgb-library-map ↗
RGB Bitcoin Protocol is organized as a stack of Rust libraries, each addressing a specific layer of the protocol. Start with RGB Lib for application development — it abstracts the layers below.

RGB Lib
Rust · Recommended for apps
High-level library for wallet and application integration. Abstracts all protocol complexity into clean APIs for issuing assets, managing UTXOs, and transferring.

RGB Lightning Node
Rust · Lightning integration
Run an RGB-enabled Lightning Network node. Manage asset-specific payment channels and route RGB asset payments over Lightning.

RGB Consensus
Rust · Protocol core
The core RGB protocol implementation — state transitions, schema validation, contract operations. For protocol-level development.

RGB Sandbox
Docker · Testing environment
Containerized testing environment for RGB development. Run a local Bitcoin regtest network with RGB fully configured — issue and transfer assets without touching mainnet.

RGB Schemas
Rust · Standard schemas
Official implementations of all supported RGB schemas — NIA, UDA, CFA, IFA, PFA. Reference implementations for asset issuance.

RGB Ops
Rust · Application-layer operations
Non-consensus-critical APIs for RGB applications, built on RGB Consensus — invoicing, PSBT construction, and other operations for RGB Bitcoin Protocol.
Test locally before
going to mainnet.
The RGB Sandbox provides a Docker-based environment with a local Bitcoin regtest network, fully configured for RGB development. Issue and transfer assets without spending real sats.
Clone the sandbox repository
git clone https://github.com/rgb-protocol/rgb-sandbox
cd rgb-sandbox
Start the sandbox environment
Docker starts a local Bitcoin regtest node, Electrum server, and all required RGB infrastructure.
docker-compose up -d
Run the demo scripts
The sandbox includes demo scripts that walk through issuing and transferring assets end-to-end on regtest.
./demo.sh
Full issue → transfer → receive cycle
What to read
next.

Client-side validation
Understand the cryptographic model that makes RGB Protocol on Bitcoin work.

RGB & Lightning Network
Build Lightning-native asset channels on RGB Protocol on Bitcoin.

Full protocol documentation
Complete technical specification — schemas, state transitions, commitment schemes.

Ecosystem & tools
Wallets, DEXes, and infrastructure projects built on RGB Protocol on Bitcoin.
Questions?
Join the developer community.
Ask questions, share what you’re building, and get support from the RGB community.
