RGB smart contracts: client-facing library & command-line for desktop and mobile

Overview

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): 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 Visual Studio Redistributable

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

cargo install rgb-contracts --all-features

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

[dependencies]
rgb-contracts = "0.10"

Then all RGB library main components can be imported with use rgb::prelude::*.

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.

You might also like...
Helpful functions and macros for developing smart contracts on NEAR Protocol.

near-contract-tools Helpful functions and macros for developing smart contracts on NEAR Protocol. This package is a collection of common tools and pat

Helpful functions and macros for developing smart contracts on NEAR Protocol.

near-contract-tools Helpful functions and macros for developing smart contracts on NEAR Protocol. This package is a collection of common tools and pat

Rust project for working with ETH - Ethereum transactions with Rust on Ganache and also deploy smart contracts :)

Just a test project to work with Ethereum but using Rust. I'm using plain Rust here, not Foundry. In future we will use Foundry. Hope you're already f

A framework for publishing, deploying, invoking, and upgrading soroban smart contracts

SmartDeploy A framework for publishing, deploying, and upgrading Soroban smart contracts. Uses Loam-SDK Publishing Currently smart contracts are insta

An automated CLI tool that optimizes gas usage in Solidity smart contracts, focusing on storage and function call efficiency.

Solidity-Gas-Optimizoor An high performance automated CLI tool that optimizes gas usage in Solidity smart contracts, focusing on storage and function

Smart contracts for Ref Finance

Ref Finance Contracts This mono repo contains the source code for the smart contracts of Ref Finance on NEAR. Contracts Contract Reference Description

Skyward Finance smart-contracts

Build and Init ./build.sh near dev-deploy res/skyward.was export CONTRACT_ID=skyward.testnet near call $CONTRACT_ID new --account_id=$CONTRACT_ID Regi

My code for the terra.academy course on CosmWasm smart contracts

CosmWasm Starter Pack This is a template to build smart contracts in Rust to run inside a Cosmos SDK module on all chains that enable it. To understan

Smart contracts powering Spectrum Protocol on Terra

Spectrum Core Contracts This monorepository contains the source code for the core smart contracts implementing Spectrum Protocol on the Terra blockcha

Releases(v0.10.0-alpha.1)
Owner
RGB: scalable & private smart contracts for bitcoin & lightning
Working Group inside LNP/BP Standards Association https://github.com/LNP-BP
RGB: scalable & private smart contracts for bitcoin & lightning
The Mullvad VPN client app for desktop and mobile

Mullvad VPN desktop and mobile app Welcome to the Mullvad VPN client app. This repository contains all the source code for the desktop and mobile vers

Mullvad VPN 3k Jan 2, 2023
Rust client to Opensea's APIs and Ethereum smart contracts

opensea.rs Rust bindings & CLI to the Opensea API and Contracts CLI Usage Run cargo r -- --help to get the top level help menu: opensea-cli 0.1.0 Choo

Georgios Konstantopoulos 226 Dec 27, 2022
Rust client to Seaport's APIs and Ethereum smart contracts(WIP)

Seaport-rs WIP - WORK IN PROGRESS. REFER TO https://github.com/Alcibiades-Capital/quay FOR PRODUCTION READY CODE I'm new to Rust and seek to be legend

Perelyn 21 Nov 29, 2022
zink! is a library for developing ink! smart contracts with useful Rust macros that extend functionality and reduce boilerplate code.

zink! Smart Contract Macros This is a helper library for developing ink! smart contracts. It contains useful Rust macros that extend functionality and

Scio Labs 3 Nov 3, 2023
Rust library for build smart contracts on Internet Computer, by the Spinner.Cash team.

Spinner Rust library for building smart contracts on the Internet Computer. More specifically it is used by Spinner.Cash, a decentralized layer-2 prot

Spinner 6 May 31, 2022
A gRPC-based scripting library for interacting with CosmWasm smart-contracts.

Cosmos Rust Script Smart contract scripting library to ease CosmWasm smart contract development and deployment. cosm-script is inspired by terra-rust-

null 11 Nov 3, 2022
Unofficial Rust SDK library for Uniswap smart contracts.

uniswap-rs Unofficial Rust SDK library for Uniswap smart contracts. Quickstart Add this to your Cargo.toml: [dependencies] uniswap-rs = { git = "https

HopefulHeart 3 Sep 22, 2023
evm2near compiles Solidity contracts into NEAR WebAssembly contracts.

EVM → NEAR evm2near is a project for compiling EVM bytecode into wasm bytecode, with the particular goal of having that wasm artifact be executable on

Aurora 125 Dec 3, 2022
Ticketed Discreet Log Contracts (DLCs) to enable instant buy-in for wager-like contracts on Bitcoin.

dlctix Ticketed Discreet Log Contracts (DLCs) to enable instant buy-in for wager-like contracts on Bitcoin. This project is part of the Backdrop Build

null 7 Feb 29, 2024
A framework for creating PoC's for Solana Smart Contracts in a painless and intuitive way

Solana PoC Framework DISCLAIMER: any illegal usage of this framework is heavily discouraged. Most projects on Solana offer a more than generous bug bo

Neodyme 165 Dec 18, 2022