LNP-BP / client_side_validation

Standard implementation of client-side-validation APIs
https://docs.rs/client_side_validation
Apache License 2.0
22 stars 19 forks source link
bitcoin client-side-validation distributed-computing distributed-systems lnp-bp single-use-seals

Foundation Libraries for Client-side-validation

Build Tests Lints codecov

crates.io Docs unsafe forbidden Apache-2 licensed

This is an implementation defining standard of client-side-validation representing a set of its Foundation libraries. The standards covered by the libraries include LNPBP-4, LNPBP-7, LNPBP-8, LNPBP-9, and LNPBP-81 (see Components section below for more details).

Client-side-validation is a paradigm for distributed computing, based on top of proof-of-publication/commitment medium layer, which may be a bitcoin blockchain or other type of distributed consensus system.

The development of the library is supported by LNP/BP Standards Association and is performed on its GitHub page.

The original idea of client-side-validation was proposed by Peter Todd with its possible applications designed by Giacomo Zucco. It was shaped into the protocol design by Dr Maxim Orlovsky with a big input from the community.

Minimum supported rust version for the library (MSRV) is 1.66 and 2021 rust edition.

Documentation

Detailed developer & API documentation for all libraries can be accessed at:

To learn about the technologies enabled by the library please check slides from our tech presentations and LNP/BP tech talks videos.

Components

This library consists of the following main three components, which define independent parts constituting together client-side-validation API and its core functionality. These are:

Usage

The repository contains rust libraries for client-side validation.

Use library in other projects

To use libraries, you just need latest version of libraries, published to crates.io into [dependencies] section of your project Cargo.toml. Here is the full list of available libraries from this repository:

client_side_validation = "1" # "Umbrella" library including all of the tree libraries below
commit_verify = "1" # Consensus and multi-message commitments
single_use_seals = "1" # Generic (non-bitcoin-specific) API

"Umbrella" client_side_validation library is configured with default set of features enabling all of its functionality (and including all of other libraries from this repository, listed above). If you need to restrict this set, either use specific libraries - or configure main library with a set of features in the following way:

[dependencies.client_side_validation]
version = "1"
default-features = false
features = [] # Your set of features goes here

The library has four feature flags, all of which are not used by default:

For specific features which may be enabled for the libraries, please check library-specific guidelines, located in README.md files in each of library subdirectories.

Libraries based on client-side-validation

Most of the developers will be probably interested in a more high-level libraries based on client-side-validation, applying it to a specific commitment mediums (bitcoin transaction graph from blockchain or state channels, or more exotic systems like confidential bitcoin transactions used by elements & liquid, or mimblewimble-based systems). Here is (potentially incomplete) list of such libraries:

Contributing

Contribution guidelines can be found in CONTRIBUTING

Licensing

The libraries are distributed on the terms of Apache 2.0 opensource license. See LICENCE file for the license details.