29 lines
1.1 KiB
Rust
29 lines
1.1 KiB
Rust
// SPDX-License-Identifier: CC0-1.0
|
|
|
|
//! # Bitcoin Addresses
|
|
//!
|
|
//! Bitcoin addresses do not appear on chain; rather, they are conventions used by Bitcoin (wallet)
|
|
//! software to communicate where coins should be sent and are based on the output type e.g., P2WPKH.
|
|
//!
|
|
//! This crate can be used in a no-std environment but requires an allocator.
|
|
//!
|
|
//! ref: <https://sprovoost.nl/2022/11/10/what-is-a-bitcoin-address/>
|
|
|
|
// NB: This crate is empty if `alloc` is not enabled.
|
|
#![cfg(feature = "alloc")]
|
|
#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
|
|
// Experimental features we need.
|
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
|
#![doc(test(attr(warn(unused))))]
|
|
// Coding conventions.
|
|
#![warn(missing_docs)]
|
|
// Exclude lints we don't think are valuable.
|
|
#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134
|
|
#![allow(clippy::manual_range_contains)] // More readable than clippy's format.
|
|
#![allow(clippy::needless_borrows_for_generic_args)] // https://github.com/rust-lang/rust-clippy/issues/12454
|
|
|
|
extern crate alloc;
|
|
|
|
#[cfg(feature = "std")]
|
|
extern crate std;
|