#smart-contracts #lightning #bitcoin #lnp-bp #rgb

rgb-std

RGB standard library for working with smart contracts on Bitcoin & Lightning

32 releases

new 0.11.0-beta.9 Nov 19, 2024
0.11.0-beta.7 Aug 20, 2024
0.11.0-beta.6 Jun 8, 2024
0.11.0-beta.5 Mar 29, 2024
0.8.0 Jul 13, 2022

#755 in Magic Beans

Download history 53/week @ 2024-08-05 32/week @ 2024-08-12 693/week @ 2024-08-19 158/week @ 2024-08-26 421/week @ 2024-09-02 234/week @ 2024-09-09 373/week @ 2024-09-16 283/week @ 2024-09-23 218/week @ 2024-09-30 309/week @ 2024-10-07 111/week @ 2024-10-14 151/week @ 2024-10-21 75/week @ 2024-10-28 90/week @ 2024-11-04 76/week @ 2024-11-11 331/week @ 2024-11-18

580 downloads per month
Used in 20 crates (17 directly)

Apache-2.0

580KB
13K SLoC

RGB wallet & standard libraries for smart contracts on Bitcoin & Lightning

Build Tests Lints codecov

crates.io Docs unsafe forbidden Apache-2 licensed

RGB is confidential & scalable client-validated smart contracts for Bitcoin & Lightning. To learn more about RGB please check RGB blueprint and RGB FAQ websites.

RGB wallet standard library provides non-consensus-critical high-level API for RGB applications. It is based on [RGB Core Lib][Core], implementing validation and consensus rules for RGB smart contracts.

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-2022 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. Upon the release of RGBv1 the protocol will be immutable and this library will accept only bugfixes; i.e. it will be ossified by requiring consensus ACK for the new changes across the large set of maintainers.

The current list of the projects based on the library include:

  • RGB Node: standalone & embeddable node for running RGB.
  • [MyCitadel Node][MyCitadel Node]: wallet node providing RGB smart contract functionality integrated with Lightning network, bitcoin blockchain indexers, decentralized data storage and propagation (Storm) and wallet services. It can run as embedded, desktop, server or cloud-based node.

Library

The library can be integrated into other rust projects via Cargo.toml [dependencies] section:

rgb-std = "0.11.0"

For serialization purposes library provides serde feature, which is turned off by default.

MSRV

Minimum supported rust compiler version (MSRV) is shown in rust-version of Cargo.toml.

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

~21MB
~305K SLoC