#bitcoin #lightning #rgb #smart-contracts #digital-assets

bin+lib rgb20

RGB-20 Library: fungible digital assets for bitcoin & lightning

20 releases

Uses new Rust 2021

0.8.0-rc.4 Jul 30, 2022
0.8.0-beta.2 Jun 29, 2022
0.5.0-alpha.3 Aug 30, 2021
0.4.0 Mar 14, 2021

#1803 in Magic Beans

Download history 26/week @ 2022-04-21 98/week @ 2022-04-28 73/week @ 2022-05-05 173/week @ 2022-05-12 58/week @ 2022-05-19 98/week @ 2022-05-26 118/week @ 2022-06-02 141/week @ 2022-06-09 95/week @ 2022-06-16 33/week @ 2022-06-23 89/week @ 2022-06-30 48/week @ 2022-07-07 118/week @ 2022-07-14 86/week @ 2022-07-21 68/week @ 2022-07-28 47/week @ 2022-08-04

340 downloads per month
Used in 5 crates

MIT license

98KB
1.5K SLoC

RGB-20 Library

RGB20 is an RGB schema for fungible digital assets on bitcoin & lightning.

This repository provides rust library and a command-line utility rgb20 which can be used alongside RGB Node to generate and parse RGB20 data (schema, issue assets, interpret contract information returned by RGB Node).

Command-line utility

Install with Docker

Build

Clone the repository and checkout to the desired version (here v0.8.0-rc.3):

$ git clone https://github.com/RGB-WG/rust-rgb20
$ cd rust-rgb20
$ git checkout v0.8.0-rc.3

Build and tag the Docker image:

$ docker build -t rgb20:v0.8.0-rc.3 .

Usage

$ docker run rgb20:v0.8.0-rc.3 --help

lib.rs:

RGB20 library for working with fungible asset types, operating under schemata, defined with LNPBP-20 standard:

  • Root RGB20 schema, returned by [schema::schema()] with id [SCHEMA_ID_BECH32]
  • RGB20 subschema, returned by [schema::subschema()], prohibiting asset replacement procedure and having id [SUBSCHEMA_ID_BECH32]
  • High-level RGB20 API performing asset issuance, transfers and other asset-management operations

Dependencies

~22MB
~369K SLoC