diff --git a/Cargo-minimal.lock b/Cargo-minimal.lock index 65a65281a..49b2d61a5 100644 --- a/Cargo-minimal.lock +++ b/Cargo-minimal.lock @@ -68,6 +68,10 @@ dependencies = [ "serde_test", ] +[[package]] +name = "bitcoin-addresses" +version = "0.0.0" + [[package]] name = "bitcoin-fuzz" version = "0.0.1" diff --git a/Cargo-recent.lock b/Cargo-recent.lock index 4d0dceadf..91c38c420 100644 --- a/Cargo-recent.lock +++ b/Cargo-recent.lock @@ -67,6 +67,10 @@ dependencies = [ "serde_test", ] +[[package]] +name = "bitcoin-addresses" +version = "0.0.0" + [[package]] name = "bitcoin-fuzz" version = "0.0.1" diff --git a/Cargo.toml b/Cargo.toml index 991d67927..35cd100a1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,10 @@ [workspace] -members = ["base58", "bitcoin", "fuzz", "hashes", "internals", "io", "units"] +members = ["addresses", "base58", "bitcoin", "fuzz", "hashes", "internals", "io", "units"] resolver = "2" +[patch.crates-io.bitcoin-addresses] +path = "addresses" + [patch.crates-io.base58ck] path = "base58" diff --git a/addresses/CHANGELOG.md b/addresses/CHANGELOG.md new file mode 100644 index 000000000..4ac809f05 --- /dev/null +++ b/addresses/CHANGELOG.md @@ -0,0 +1,3 @@ +# 0.0.0 - Initial dummy release + +- Empty crate to reserve the name on crates.io diff --git a/addresses/Cargo.toml b/addresses/Cargo.toml new file mode 100644 index 000000000..156be7a8d --- /dev/null +++ b/addresses/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "bitcoin-addresses" +version = "0.0.0" +authors = ["Andrew Poelstra "] +license = "CC0-1.0" +repository = "https://github.com/rust-bitcoin/rust-bitcoin" +description = "Bitcoin address" +categories = ["cryptography::cryptocurrencies"] +keywords = ["bitcoin", "types"] +readme = "README.md" +edition = "2021" +rust-version = "1.56.1" +exclude = ["tests", "contrib"] + +[features] +default = ["std"] +std = ["alloc"] +alloc = [] + +[dependencies] + +[dev-dependencies] + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/addresses/README.md b/addresses/README.md new file mode 100644 index 000000000..41ab86553 --- /dev/null +++ b/addresses/README.md @@ -0,0 +1,7 @@ +# Bitcoin Receive + +Types and logic required to receive bitcoin - i.e., bitcoin addresses. + +## Minimum Supported Rust Version (MSRV) + +This library should always compile with any combination of features on **Rust 1.56.1**. diff --git a/addresses/contrib/test_vars.sh b/addresses/contrib/test_vars.sh new file mode 100644 index 000000000..88e2d26e1 --- /dev/null +++ b/addresses/contrib/test_vars.sh @@ -0,0 +1,14 @@ +# No shebang, this file should not be executed. +# shellcheck disable=SC2148 +# +# disable verify unused vars, despite the fact that they are used when sourced +# shellcheck disable=SC2034 + +# Test all these features with "std" enabled. +FEATURES_WITH_STD="" + +# Test all these features without "std" enabled. +FEATURES_WITHOUT_STD="" + +# Run these examples. +EXAMPLES="" diff --git a/addresses/src/lib.rs b/addresses/src/lib.rs new file mode 100644 index 000000000..b660dad39 --- /dev/null +++ b/addresses/src/lib.rs @@ -0,0 +1,23 @@ +// 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. +//! +//! ref: + +#![cfg_attr(all(not(test), not(feature = "std")), no_std)] +// Experimental features we need. +#![cfg_attr(docsrs, feature(doc_auto_cfg))] +// 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; diff --git a/contrib/crates.sh b/contrib/crates.sh index 5a6dd7645..b3bb34178 100644 --- a/contrib/crates.sh +++ b/contrib/crates.sh @@ -5,4 +5,4 @@ # shellcheck disable=SC2034 # Crates in this workspace to test (note "fuzz" is only built not tested). -CRATES=("base58" "bitcoin" "fuzz" "hashes" "internals" "io" "units") +CRATES=("addresses" "base58" "bitcoin" "fuzz" "hashes" "internals" "io" "units")