base58: Re-name crate to base58ck
The current name `base58check` is taken, as is `base58`. Use `base58ck` instead. Add a brief section to the readme about the crate naming.
This commit is contained in:
parent
1ceac90bf6
commit
6b09857f55
|
@ -15,7 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base58check"
|
name = "base58ck"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitcoin-internals",
|
"bitcoin-internals",
|
||||||
|
@ -49,7 +49,7 @@ dependencies = [
|
||||||
name = "bitcoin"
|
name = "bitcoin"
|
||||||
version = "0.31.0"
|
version = "0.31.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base58check",
|
"base58ck",
|
||||||
"base64",
|
"base64",
|
||||||
"bech32",
|
"bech32",
|
||||||
"bincode",
|
"bincode",
|
||||||
|
|
|
@ -15,7 +15,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base58check"
|
name = "base58ck"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitcoin-internals",
|
"bitcoin-internals",
|
||||||
|
@ -48,7 +48,7 @@ dependencies = [
|
||||||
name = "bitcoin"
|
name = "bitcoin"
|
||||||
version = "0.31.0"
|
version = "0.31.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base58check",
|
"base58ck",
|
||||||
"base64",
|
"base64",
|
||||||
"bech32",
|
"bech32",
|
||||||
"bincode",
|
"bincode",
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
members = ["bitcoin", "hashes", "internals", "fuzz", "io", "units", "base58"]
|
members = ["bitcoin", "hashes", "internals", "fuzz", "io", "units", "base58"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[patch.crates-io.base58check]
|
[patch.crates-io.base58ck]
|
||||||
path = "base58"
|
path = "base58"
|
||||||
|
|
||||||
[patch.crates-io.bitcoin]
|
[patch.crates-io.bitcoin]
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "base58check"
|
name = "base58ck"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"]
|
authors = ["Andrew Poelstra <apoelstra@wpsoftware.net>"]
|
||||||
license = "CC0-1.0"
|
license = "CC0-1.0"
|
||||||
|
|
|
@ -4,16 +4,22 @@ Bitcoin base58 encoding
|
||||||
This crate provides encoding and decoding of base58 strings as defined by the Bitcoin ecosystem
|
This crate provides encoding and decoding of base58 strings as defined by the Bitcoin ecosystem
|
||||||
including the checksum.
|
including the checksum.
|
||||||
|
|
||||||
There are two other crates on crates.io that implement base58 encoding and decoding. This
|
There are a bunch of crates on crates.io that implement base58 encoding and decoding. The more
|
||||||
crate differs from them because:
|
obviously named ones differ from this crate because:
|
||||||
|
|
||||||
1. [bitcoin-base58](https://crates.io/crates/bitcoin-base58) is transpiled from the C++ code in
|
1. [bitcoin-base58](https://crates.io/crates/bitcoin-base58) is transpiled from the C++ code in
|
||||||
Bitcoin Core as part of a large long-term transpilation project; this crate is a pure Rust
|
Bitcoin Core as part of a large long-term transpilation project, whereas this crate is a pure
|
||||||
implementation intended to be production-ready and to provide an Rust-idiomatic API.
|
Rust implementation intended to be production-ready and to provide an Rust-idiomatic API.
|
||||||
|
|
||||||
2. [base58](https://crates.io/crates/base58) is incomplete and appears unmaintained as of
|
2. [base58](https://crates.io/crates/base58) implements parsing but does not validate checksums (see
|
||||||
February 2024. It does not validate checksums and will therefore accept invalid Bitcoin
|
`base58check`). It may be appropriate in cases where performance is more important than safety.
|
||||||
addresses. It may be appropriate in cases where performance is more important than safety.
|
Appears unmaintained.
|
||||||
|
|
||||||
|
3. [base58check](https://crates.io/crates/base58check) Adds checksum to the `base58` crate and
|
||||||
|
depends on [sha2](https://crates.io/crates/sha2/0.8.2) for hashing. Appears unmaintained.
|
||||||
|
|
||||||
|
This crate uses [bitcoin_hashes](https://crates.io/crates/bitcoin_hashes) when hashing to calculate
|
||||||
|
the checksum.
|
||||||
|
|
||||||
|
|
||||||
## Minimum Supported Rust Version (MSRV)
|
## Minimum Supported Rust Version (MSRV)
|
||||||
|
|
|
@ -28,7 +28,7 @@ all-features = true
|
||||||
rustdoc-args = ["--cfg", "docsrs"]
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base58 = { package = "base58check", version = "0.1.0", default-features = false }
|
base58 = { package = "base58ck", version = "0.1.0", default-features = false }
|
||||||
bech32 = { version = "0.11.0", default-features = false, features = ["alloc"] }
|
bech32 = { version = "0.11.0", default-features = false, features = ["alloc"] }
|
||||||
hashes = { package = "bitcoin_hashes", version = "0.13.0", default-features = false, features = ["alloc", "io"] }
|
hashes = { package = "bitcoin_hashes", version = "0.13.0", default-features = false, features = ["alloc", "io"] }
|
||||||
hex = { package = "hex-conservative", version = "0.2.0", default-features = false, features = ["alloc"] }
|
hex = { package = "hex-conservative", version = "0.2.0", default-features = false, features = ["alloc"] }
|
||||||
|
|
|
@ -27,7 +27,7 @@ codegen-units = 1 # better optimizations
|
||||||
debug = true # symbols are nice and they don't increase the size on Flash
|
debug = true # symbols are nice and they don't increase the size on Flash
|
||||||
lto = true # better optimizations
|
lto = true # better optimizations
|
||||||
|
|
||||||
[patch.crates-io.base58check]
|
[patch.crates-io.base58ck]
|
||||||
path = "../../base58"
|
path = "../../base58"
|
||||||
|
|
||||||
[patch.crates-io.bitcoin_hashes]
|
[patch.crates-io.bitcoin_hashes]
|
||||||
|
|
Loading…
Reference in New Issue