dbc/
lib.rs

1// Deterministic bitcoin commitments library.
2//
3// SPDX-License-Identifier: Apache-2.0
4//
5// Written in 2019-2024 by
6//     Dr Maxim Orlovsky <orlovsky@lnp-bp.org>
7//
8// Copyright (C) 2019-2024 LNP/BP Standards Association. All rights reserved.
9//
10// Licensed under the Apache License, Version 2.0 (the "License");
11// you may not use this file except in compliance with the License.
12// You may obtain a copy of the License at
13//
14//     http://www.apache.org/licenses/LICENSE-2.0
15//
16// Unless required by applicable law or agreed to in writing, software
17// distributed under the License is distributed on an "AS IS" BASIS,
18// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19// See the License for the specific language governing permissions and
20// limitations under the License.
21
22// Coding conventions
23// TODO: Activate no_std once StrictEncoding will support it
24// #![cfg_attr(not(feature = "std"), no_std)]
25#![deny(
26    unsafe_code,
27    dead_code,
28    missing_docs,
29    unused_variables,
30    unused_mut,
31    unused_imports,
32    non_upper_case_globals,
33    non_camel_case_types,
34    non_snake_case
35)]
36#![cfg_attr(coverage_nightly, feature(coverage_attribute))]
37#![cfg_attr(docsrs, feature(doc_auto_cfg))]
38
39//! Deterministic bitcoin commitments library.
40//!
41//! Deterministic bitcoin commitments are part of the client-side-validation.
42//! They allow to embed commitment to extra-transaction data into a bitcoin
43//! transaction in a provable way, such that it can always be proven that a
44//! given transaction contains one and only one commitment of a specific type
45//! for a given commitment protocol.
46
47#[macro_use]
48extern crate amplify;
49#[cfg(feature = "serde")]
50#[macro_use]
51extern crate serde;
52#[macro_use]
53extern crate strict_encoding;
54extern crate commit_verify;
55
56/// Name of the strict type library generated from the data types in this crate.
57pub const LIB_NAME_BPCORE: &str = "BPCore";
58
59pub mod keytweak;
60pub mod opret;
61pub mod sigtweak;
62pub mod tapret;