1
- # Client-side-validation library
1
+ # Bitcoin protocol core library
2
2
3
- ![ Build] ( https://github.com/LNP-BP/client_side_validation /workflows/Build/badge.svg )
4
- ![ Tests] ( https://github.com/LNP-BP/client_side_validation /workflows/Tests/badge.svg )
5
- ![ Lints] ( https://github.com/LNP-BP/client_side_validation /workflows/Lints/badge.svg )
6
- [ ![ codecov] ( https://codecov.io/gh/LNP-BP/client_side_validation /branch/master/graph/badge.svg )] ( https://codecov.io/gh/LNP-BP/client_side_validation )
3
+ ![ Build] ( https://github.com/LNP-BP/bp-core /workflows/Build/badge.svg )
4
+ ![ Tests] ( https://github.com/LNP-BP/bp-core /workflows/Tests/badge.svg )
5
+ ![ Lints] ( https://github.com/LNP-BP/bp-core /workflows/Lints/badge.svg )
6
+ [ ![ codecov] ( https://codecov.io/gh/LNP-BP/bp-core /branch/master/graph/badge.svg )] ( https://codecov.io/gh/LNP-BP/bp-core )
7
7
8
- [ ![ crates.io] ( https://meritbadge.herokuapp.com/client_side_validation )] ( https://crates.io/crates/client_side_validation )
9
- [ ![ Docs] ( https://docs.rs/lnpbp /badge.svg )] ( https://docs.rs/client_side_validation )
8
+ [ ![ crates.io] ( https://img.shields.io/crates/v/bp-core )] ( https://crates.io/crates/bp-core )
9
+ [ ![ Docs] ( https://docs.rs/bp-core /badge.svg )] ( https://docs.rs/bp-core )
10
10
[ ![ unsafe forbidden] ( https://img.shields.io/badge/unsafe-forbidden-success.svg )] ( https://github.com/rust-secure-code/safety-dance/ )
11
- [ ![ Apache-2 licensed] ( https://img.shields.io/crates/l/client_side_validation )] ( ./LICENSE )
11
+ [ ![ Apache-2 licensed] ( https://img.shields.io/crates/l/bp-core )] ( ./LICENSE )
12
12
13
- This is an implementation defining standard of client-side-validation, i.e. its
14
- Core library.
13
+ The library implements bitcoin protocol elements which are missed from other
14
+ existing bitcoin libraries, like [ rust-bitcoin] and [ descriptor wallet] .
15
+ Currently, it includes components necessary for [ client-side-validation] over
16
+ bitcoin, specifically
17
+ - deterministic bitcoin commitments API (LNPBP-1, 2 & 3 standards)
18
+ - bitcoin-based single-use-seal API (LNPBP-10 and LNPBP-39 standards)
15
19
16
20
Client-side-validation is a paradigm for distributed computing, based on top of
17
21
proof-of-publication/commitment medium layer, which may be a bitcoin blockchain
18
22
or other type of distributed consensus system.
19
23
20
24
The development of the library is supported by [ LNP/BP Standards Association] ( https://lnp-bp.org ) .
21
- The original idea of client-side-validation was proposed by Peter Todd with its
22
- possible applications designed by Giacomo Zucco. It was shaped into a protocol-
23
- level design by Dr Maxim Orlovsky with a big input from the community and
24
- implemented by him as this set of libraries.
25
-
26
-
27
- ## Documentation
28
-
29
- Detailed developer & API documentation for all libraries can be accessed
30
- at < https://docs.rs/client_side_validation/ >
31
-
32
- To learn about the technologies enabled by the library please check
33
- [ slides from our tech presentations] ( https://github.com/LNP-BP/FAQ/blob/master/Presentation%20slides/ )
34
- and [ LNP/BP tech talks videos] ( https://www.youtube.com/channel/UCK_Q3xcQ-H3ERwArGaMKsxg )
35
-
36
-
37
- ## Components
38
-
39
- This library consists of the following main three components, which define
40
- independent parts constituting together client-side-validation API and its core
41
- functionality. These are:
42
- - Strict encoding (LNPBP-7 standard): binary standard of encoding
43
- client-side-validated data
44
- - Commit-verify scheme and its client-side-validation specific implementations
45
- * consensus commitments
46
- * multi-commitments (LNPBP-4 standard)
47
- - Single-use-seals (LNPBP-8 standard)
48
-
49
- Basing on these APIs, this library includes specific applications for commitment/
50
- proof-of-publication mediums. Currently, this is * Bitcoin transaction graph*
51
- (both blockchain and state channel-based), consisting of two main components:
52
- - deterministic bitcoin commitments API (LNPBP-1, 2 & 3 standards)
53
- - bitcoin-based single-use-seal API (LNPBP-10 and LNPBP-39 standards)
54
25
55
26
56
27
## Usage
57
28
58
- The repository contains rust libraries for client-side validation and
59
- command-line tools for debugging/low-level hacking mode.
60
-
61
- ### Use library in other projects
62
-
63
- To use libraries, you just need lates version of libraries, published to
29
+ To use libraries, you just need latest version of libraries, published to
64
30
[ crates.io] ( https://crates.io ) into ` [dependencies] ` section of your project
65
31
` Cargo.toml ` . Here is the full list of available libraries from this repository:
66
32
67
33
``` toml
68
- client_side_validation = " 1" # "Umbrella" library including all other libraries
69
- strict_encoding = " 1" # Strict encoding API and derivation macros
70
- commit_verify = " 1" # Consensus and multi-message commitments
71
- single_use_seals = " 1" # Generic (non-bitcoin-specific) API
72
- bp-dbc = " 1" # Deterministic bitcoin commitments library
73
- bp-seals = " 1" # Bitcoin single-use-seals library
34
+ bp-dbc = " 0.5" # Deterministic bitcoin commitments crate
35
+ bp-seals = " 0.5" # Bitcoin single-use-seals crate
36
+ bp-core = " 0.5" # Library including both of the previous crates
74
37
```
75
38
76
- "Umbrella" ` client_side_validation ` library is configured with default set of
77
- features enabling all of its functionality (and including all of other libraries
78
- from this repository, listed above). If you need to restrict this set, either
79
- use specific libraries - or configure main library with a set of features in
80
- the following way:
81
- ``` toml
82
- [dependencies .client_side_validation ]
83
- version = " 1"
84
- default-features = false
85
- features = [] # Your set of features goes here
86
- # Avaliable features
87
- # * `derivation` - includes strict encoding derivation macros
88
- # * `strict_encoding` - strict encoding library (by default does not include
89
- # derivation macros, to use it you need`derivation`
90
- # feature to be explicetly enabled
91
- # * `multi-commitments` - LNPBP-4 multi-commitments
92
- # * `dbc` - deterministic bitcoin commitments
93
- # * `seals-all` - All single-use-seals component, including bitcoin seals
94
- # library
95
- # * `seals-api` - single-use-seals core API (without bitcoin-specific extensions)
96
- # * `seals-utxo - Bitcoin-based UTXO single-use-seals
97
- ```
98
-
99
- For specific features which may be enabled for the libraries, please check
100
- library-specific guidelines, located in ` README.md ` files in each of library
101
- subdirectories.
102
-
103
-
104
- ### Use command-line tool
105
-
106
- First, you have to install rust toolchain using instructions from
107
- [ the official website] ( https://www.rust-lang.org/tools/install ) .
108
-
109
- Next, if you need the latest published version, you can simply run
110
- ``` shell script
111
- cargo install client_side_validation
112
- ```
113
- which will give you the latest version of the command-line tool. For now, you
114
- can use it by typing in terminal
115
- ``` shell script
116
- clisv help
117
- ```
118
-
119
- If you need a latest ` master ` version (which may be unstable), you need to clone
120
- git repository and compile the project locally:
121
- ``` shell script
122
- git clone https://github.com/LNP-BP/client_side_validation
123
- cd client_side_validation
124
- cargo install --path .
125
- ```
39
+ ` bp-core ` crate is an "umbrella" library containing both deterministic bitcoin
40
+ commitments and bitcoin seals crates inside.
126
41
127
42
128
43
## Known applications
129
44
130
45
The current list of the projects based on the library include:
131
46
* [ RGB] ( https://github.com/LNP-BP/rgb-node ) : Confidential & scalable smart
132
47
contracts for Bitcoin & Lightning
133
- * [ LNP] ( https://www.youtube.com/watch?v=YmmNsWS5wiM ) : generalized lightning
134
- network and it's reference implementations named
135
- [ LNP Core] ( https://github.com/LNP-BP/lnp-core ) and
136
- [ LNP Node] ( https://github.com/LNP-BP/lnp-node )
137
48
* [ Bitcoin-based decentralized identity] ( https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2021-February/018381.html )
138
49
proposal uses single-use-seals
139
- * [ Internet2 project] ( https://github.com/internet2-org ) uses strict-encoding
140
- for building its Internet2 APIs and microservice architecture
141
-
142
- To learn more about the technologies enabled by the library please check
143
- [ slides from our tech presentations] ( https://github.com/LNP-BP/FAQ/blob/master/Presentation%20slides/ )
144
- and [ LNP/BP tech talks videos] ( https://www.youtube.com/channel/UCK_Q3xcQ-H3ERwArGaMKsxg )
145
50
146
51
147
52
## Contributing
@@ -160,3 +65,8 @@ be declined.
160
65
### Licensing
161
66
162
67
See [ LICENCE] ( LICENSE ) file.
68
+
69
+
70
+ [ rust-bitcoin ] : https://github.com/rust-bitcoin/rust-bitcoin
71
+ [ descriptor-wallet ] : https://github.com/LNP-BP/descriptor-wallet
72
+ [ client-side-validation ] : https://docs.rs/client_side_validation/
0 commit comments