9 releases

new 0.11.0-beta.9 Nov 19, 2024
0.11.0-beta.8 Sep 5, 2024
0.11.0-beta.7 Aug 20, 2024
0.11.0-beta.6 Jun 8, 2024
0.11.0-alpha.2 Nov 19, 2023

#8 in #lnp-bp

Download history 123/week @ 2024-07-29 27/week @ 2024-08-05 12/week @ 2024-08-12 260/week @ 2024-08-19 90/week @ 2024-08-26 142/week @ 2024-09-02 85/week @ 2024-09-09 129/week @ 2024-09-16 62/week @ 2024-09-23 158/week @ 2024-09-30 166/week @ 2024-10-07 75/week @ 2024-10-14 117/week @ 2024-10-21 45/week @ 2024-10-28 66/week @ 2024-11-04 67/week @ 2024-11-11

296 downloads per month

Apache-2.0

100KB
1.5K SLoC

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.

Installing

First, you need to install cargo. Minimum supported rust compiler version (MSRV) is shown in rust-version of Cargo.toml.

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:

[dependencies]
rgb-std = "0.11.0-beta.7" # use the latest version
rgb-runtime = "0.11.0-beta.7" # use the latest version

Using command-line

Contributing

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.

License

See LICENCE file.

Dependencies

~20–33MB
~384K SLoC