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#![deny(
24    non_upper_case_globals,
25    non_camel_case_types,
26    non_snake_case,
27    unused_mut,
28    unused_imports,
29    dead_code,
30    missing_docs
31)]
32#![cfg_attr(docsrs, feature(doc_auto_cfg))]
33
34//! Deterministic bitcoin commitments library.
35//!
36//! Deterministic bitcoin commitments are part of the client-side-validation.
37//! They allow to embed commitment to extra-transaction data into a bitcoin
38//! transaction in a provable way, such that it can always be proven that a
39//! given transaction contains one and only one commitment of a specific type
40//! for a given commitment protocol.
41
42#[macro_use]
43extern crate amplify;
44#[cfg(feature = "serde")]
45#[macro_use]
46extern crate serde_crate as serde;
47#[macro_use]
48extern crate strict_encoding;
49extern crate commit_verify;
50
51/// Name of the strict type library generated from the data types in this crate.
52pub const LIB_NAME_BPCORE: &str = "BPCore";
53
54pub mod anchor;
55pub mod keytweak;
56pub mod opret;
57pub mod sigtweak;
58pub mod tapret;
59mod proof;
60
61pub use anchor::Anchor;
62pub use proof::{DbcMethod, Method, MethodParseError, Proof};