Rust library implementing confidential & scalable client-validated smart contracts for Bitcoin & Lightning.
The current list of the projects based on the library include:
- RGB Node: standalone & embeddable node for running RGB
- RGB SDK: SDK for developing mobile, web, desktop & server-side wallets and doing other forms of software integration with RGB Node
To learn more about the technologies enabled by the library please check:
The development of the library projects is supported by LNP/BP Standards Association.
Previously the code of the library was part of LNP/BP Core Library but later was extracted into a separate library in this repository via fork. The reasons for that were the facts that LNP/BP Core Lib has a lot of usage outside RGB project scope, and the overall dependencies & feature management complexity, compile times etc grow significantly. Another reason is the need for different review policies & security requirements (LNP/BP Core Lib may be more experimental than RGB).
The library is based on other projects:
- rust-bitcoin
- bitcoin_hashes
- rust-secp256k1
- rust-secp256k1-zkp for Pedersen commitments and Bulletproofs used in confidential state inside RGB protocols
- rust-miniscript
- rust-lnpbp LNP/BP Core Library
On Debian, run
sudo apt-get install cargo libssl-dev libzmq3-dev pkg-config g++ cmake
On Mac OS, run
brew cargo pkg-config zmq
Minimum supported rust compiler version (MSRV): 1.41.1 (if used without tokio)
git clone https://github.com/rgb-org/rgb-core
cd rgb-core
cargo build --release --all-features
The library can be found in target/release
directory.
You can run full test suite with:
./contrib/test.sh
Please refer to the cargo
documentation
for more detailed instructions.
Add these lines to your Cargo.toml
file at the very end of the [dependecies]
section:
rgb-core = "~0.3.0"
Contribution guidelines can be found in a separate CONTRIBUTING file
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.