An independent community project, not affiliated with RGB-WG, the RGB Protocol Association or LNP/BP. Early work: not for real funds.

The rules of RGB, tested live in your browser

RGB is now two incompatible protocols, v0.11 and v0.12. Each has rules that decide whether an invoice parses and whether a consignment is valid. This page runs a test suite for those rules, for both lines, right here.

Loading the engine…

How it works

The rules. Each rule is one invariant: a consignment's types must match the trusted ones, a witness must close the seals it spends, and so on. They are written as data in rules/v011.jsonld and rules/v012.jsonld, and the specification is generated from them.

The vectors. Every case from the upstream invoice tests, real invoices and consignments from the CLIs, and corruptions: every single-byte change of each consignment was run through the reference code and filed under the rule it breaks.

The engine. rgbjs: each line's own Rust crates compiled to WebAssembly. A copy is in this repository, and nothing is fetched from anywhere else.

PASS means the engine gave the reference verdict: it accepted what the reference code accepts, rejected what it rejects, and never showed a corrupted consignment as the original. Open a rule to see its vectors, and a vector to see the result.