satsnet_addresses/lib.rs
1// SPDX-License-Identifier: CC0-1.0
2
3//! # Bitcoin Addresses
4//!
5//! Bitcoin addresses do not appear on chain; rather, they are conventions used by Bitcoin (wallet)
6//! software to communicate where coins should be sent and are based on the output type e.g., P2WPKH.
7//!
8//! This crate can be used in a no-std environment but requires an allocator.
9//!
10//! ref: <https://sprovoost.nl/2022/11/10/what-is-a-bitcoin-address/>
11
12// NB: This crate is empty if `alloc` is not enabled.
13#![cfg(feature = "alloc")]
14#![cfg_attr(all(not(test), not(feature = "std")), no_std)]
15// Experimental features we need.
16#![cfg_attr(docsrs, feature(doc_auto_cfg))]
17// Coding conventions.
18#![warn(missing_docs)]
19// Exclude lints we don't think are valuable.
20#![allow(clippy::needless_question_mark)] // https://github.com/rust-bitcoin/rust-bitcoin/pull/2134
21#![allow(clippy::manual_range_contains)] // More readable than clippy's format.
22#![allow(clippy::needless_borrows_for_generic_args)] // https://github.com/rust-lang/rust-clippy/issues/12454
23
24extern crate alloc;
25
26#[cfg(feature = "std")]
27extern crate std;