5 releases

0.11.1 Mar 29, 2024
0.11.0 Nov 14, 2023
0.10.0 Apr 10, 2023
0.10.0-rc.1 Mar 28, 2023
0.10.0-alpha.1 Mar 10, 2023

#21 in #lnp-bp

Download history 25/week @ 2024-02-13 92/week @ 2024-02-20 110/week @ 2024-02-27 95/week @ 2024-03-05 80/week @ 2024-03-12 33/week @ 2024-03-19 197/week @ 2024-03-26 89/week @ 2024-04-02 99/week @ 2024-04-09 9/week @ 2024-04-16 27/week @ 2024-04-23 3/week @ 2024-05-07 12/week @ 2024-05-14 51/week @ 2024-05-21 34/week @ 2024-05-28

100 downloads per month
Used in 2 crates (via rgb-contracts)



RGB smart contracts

Build Tests Lints codecov

crates.io Docs unsafe forbidden Apache-2 licensed

RGB is confidential & scalable client-validated smart contracts for Bitcoin & Lightning. It embraces the concepts of private & mutual ownership, abstraction and separation of concerns and represents "post-blockchain", Turing-complete form of trustless distributed computing which does not require introduction of "tokens". To learn more about RGB please check RGB black paper and RGB Tech websites.

This repository provides client-facing library which can be used by desktop apps and mobile wallets for integrating RGB support. It also provides binary rgb which runs in the command-line and exposes all RGB functionality locally, requiring only Electrum server.

The development of the project is supported and managed by LNP/BP Standards Association. The design of RGB smart contract system and implementation of this and underlying consensus libraries was done in 2019-2023 by Dr Maxim Orlovsky basing or earlier ideas of client-side-validation and RGB as "assets for bitcoin and LN" by Peter Todd and Giacomo Zucco.


First, you need to install cargo. Minimum supported rust compiler version (MSRV): 1.66, rust 2021 edition.

Next, you need to install developer components, which are OS-specific:

  • Linux

    sudo apt update
    sudo apt install -y build-essential cmake pkg-config
  • MacOS

    brew install cmake pkg-config
  • Windows: download and install the latest Build Tools for Visual Studio, including the 'Desktop development with C++' workflow and recommended optional features

Finally, install RGB command-line utility shipped with this repo by running

cargo install rgb-wallet

To use the library from other rust code add dependency to the Cargo.toml file:

rgb-std = "0.11.0-beta.3" # use the latest version
rgb-runtime = "0.11.0-beta.1" # use the latest version

Using command-line


Altcoins and "blockchains" other than Bitcoin blockchain/Bitcoin protocols are not supported and not planned to be supported; pull requests targeting them will be declined.


See LICENCE file.


~308K SLoC