MCPcopy Index your code
hub / github.com/RGB-WG/rgb-core

github.com/RGB-WG/rgb-core @v0.12.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.12.0 ↗ · + Follow
47 symbols 107 edges 3 files 7 documented · 15%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

RGB Core Library

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 website.

RGB Core library provides consensus-critical and validation code for RGB. It is a standard implementation, jointly with LNP/BP Standards defining RGB consensus and validation rules.

The consensus-critical code library is shared with the following libraries: 1. Client-side-validation Lib. It is non-bitcoin-specific library, covering concepts related to client-side-validation (commitments, single-use-seals abstracted from bitcoin, consensus-critical data encoding protocols). 2. BP Core Lib. This is client-side-validation applied to bitcoin protocol with deterministic bitcoin commitments (tapret) and TXO-based single-use-seals. 3. AluVM virtual machine used by RGB for Turing-complete smart contract functionality. 4. Strict types, defining memory layout and serialization of structured data types used in 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-2024 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 Standard Lib: library providing high-level RGB smart contract API in rust. * RGB Wallet: runtime and command-line tool for working with RGB.

Contributing

Currently, library functionality is frozen and as a part of ossification only bugfixes are accepted.

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.

Extension points exported contracts — how you extend this code

ReadOperation (Interface)
Provider which reads an operation and its seals from a consignment stream. [1 implementers]
src/verify.rs
RgbSealDef (Interface)
A type which serves as a definition of a single-use seal for RGB contracts. The reason why this type is required additi [1 …
src/seals.rs
ContractApi (Interface)
API exposed by the contract required for evaluating and verifying the contract state (see [`ContractVerify`]). NB: `app [1 …
src/verify.rs
RgbSeal (Interface)
A type which serves as a single-use seal protocol implementation for RGB contracts. [1 implementers]
src/seals.rs
ContractVerify (Interface)
Main implementation of the contract verification procedure. # Nota bene This trait cannot be manually implemented; it [1 …
src/verify.rs

Core symbols most depended-on inside this repo

genesis
called by 11
src/verify.rs
run
called by 10
src/verify.rs
operation
called by 6
src/verify.rs
clone
called by 4
src/verify.rs
resolve
called by 3
src/seals.rs
codex
called by 2
src/verify.rs
lib
called by 2
src/verify.rs
codex
called by 2
src/verify.rs

Shape

Function 19
Method 19
Interface 5
Class 3
Enum 1

Languages

Rust100%

Modules by API surface

src/verify.rs39 symbols
src/seals.rs8 symbols

For agents

$ claude mcp add rgb-core \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page