diff --git a/api/bitcoin/all-features.txt b/api/bitcoin/all-features.txt index 998fb3762..70bcacfe6 100644 --- a/api/bitcoin/all-features.txt +++ b/api/bitcoin/all-features.txt @@ -442,6 +442,10 @@ impl bitcoin::taproot::merkle_branch::IntoIter impl bitcoin::taproot::merkle_branch::TaprootMerkleBranch impl bitcoin::taproot::serialized_signature::IntoIter impl bitcoin::taproot::serialized_signature::SerializedSignature +impl bitcoin_hashes::GeneralHash for bitcoin::TapSighash +impl bitcoin_hashes::GeneralHash for bitcoin::taproot::TapLeafHash +impl bitcoin_hashes::GeneralHash for bitcoin::taproot::TapNodeHash +impl bitcoin_hashes::GeneralHash for bitcoin::taproot::TapTweakHash impl bitcoin_hashes::Hash for bitcoin::LegacySighash impl bitcoin_hashes::Hash for bitcoin::PubkeyHash impl bitcoin_hashes::Hash for bitcoin::SegwitV0Sighash @@ -7017,19 +7021,14 @@ pub fn bitcoin::LegacySighash::borrow(&self) -> &[u8] pub fn bitcoin::LegacySighash::clone(&self) -> bitcoin::LegacySighash pub fn bitcoin::LegacySighash::cmp(&self, other: &bitcoin::LegacySighash) -> core::cmp::Ordering pub fn bitcoin::LegacySighash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::LegacySighash::engine() -> ::Engine pub fn bitcoin::LegacySighash::eq(&self, other: &bitcoin::LegacySighash) -> bool pub fn bitcoin::LegacySighash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::LegacySighash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::LegacySighash pub fn bitcoin::LegacySighash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::LegacySighash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::LegacySighash::from_engine(e: ::Engine) -> bitcoin::LegacySighash pub fn bitcoin::LegacySighash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::LegacySighash::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::LegacySighash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::LegacySighash::hash(data: &[u8]) -> Self pub fn bitcoin::LegacySighash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::LegacySighash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::LegacySighash::index(&self, index: I) -> &Self::Output pub fn bitcoin::LegacySighash::partial_cmp(&self, other: &bitcoin::LegacySighash) -> core::option::Option pub fn bitcoin::LegacySighash::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -7066,7 +7065,6 @@ pub fn bitcoin::PubkeyHash::borrow(&self) -> &[u8] pub fn bitcoin::PubkeyHash::clone(&self) -> bitcoin::PubkeyHash pub fn bitcoin::PubkeyHash::cmp(&self, other: &bitcoin::PubkeyHash) -> core::cmp::Ordering pub fn bitcoin::PubkeyHash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::PubkeyHash::engine() -> ::Engine pub fn bitcoin::PubkeyHash::eq(&self, other: &bitcoin::PubkeyHash) -> bool pub fn bitcoin::PubkeyHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::PubkeyHash::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::PubkeyHash @@ -7075,14 +7073,10 @@ pub fn bitcoin::PubkeyHash::from(key: &bitcoin::PublicKey) -> bitcoin::PubkeyHas pub fn bitcoin::PubkeyHash::from(key: bitcoin::CompressedPublicKey) -> Self pub fn bitcoin::PubkeyHash::from(key: bitcoin::PublicKey) -> bitcoin::PubkeyHash pub fn bitcoin::PubkeyHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::PubkeyHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::PubkeyHash::from_engine(e: ::Engine) -> bitcoin::PubkeyHash pub fn bitcoin::PubkeyHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::PubkeyHash::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::PubkeyHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::PubkeyHash::hash(data: &[u8]) -> Self pub fn bitcoin::PubkeyHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::PubkeyHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::PubkeyHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::PubkeyHash::partial_cmp(&self, other: &bitcoin::PubkeyHash) -> core::option::Option pub fn bitcoin::PubkeyHash::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -7117,19 +7111,14 @@ pub fn bitcoin::SegwitV0Sighash::borrow(&self) -> &[u8] pub fn bitcoin::SegwitV0Sighash::clone(&self) -> bitcoin::SegwitV0Sighash pub fn bitcoin::SegwitV0Sighash::cmp(&self, other: &bitcoin::SegwitV0Sighash) -> core::cmp::Ordering pub fn bitcoin::SegwitV0Sighash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::SegwitV0Sighash::engine() -> ::Engine pub fn bitcoin::SegwitV0Sighash::eq(&self, other: &bitcoin::SegwitV0Sighash) -> bool pub fn bitcoin::SegwitV0Sighash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::SegwitV0Sighash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::SegwitV0Sighash pub fn bitcoin::SegwitV0Sighash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::SegwitV0Sighash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::SegwitV0Sighash::from_engine(e: ::Engine) -> bitcoin::SegwitV0Sighash pub fn bitcoin::SegwitV0Sighash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::SegwitV0Sighash::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::SegwitV0Sighash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::SegwitV0Sighash::hash(data: &[u8]) -> Self pub fn bitcoin::SegwitV0Sighash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::SegwitV0Sighash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::SegwitV0Sighash::index(&self, index: I) -> &Self::Output pub fn bitcoin::SegwitV0Sighash::partial_cmp(&self, other: &bitcoin::SegwitV0Sighash) -> core::option::Option pub fn bitcoin::SegwitV0Sighash::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -7141,13 +7130,14 @@ pub fn bitcoin::TapSighash::borrow(&self) -> &[u8] pub fn bitcoin::TapSighash::clone(&self) -> bitcoin::TapSighash pub fn bitcoin::TapSighash::cmp(&self, other: &bitcoin::TapSighash) -> core::cmp::Ordering pub fn bitcoin::TapSighash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::TapSighash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::TapSighash::engine() -> ::Engine +pub fn bitcoin::TapSighash::engine() -> Self::Engine pub fn bitcoin::TapSighash::eq(&self, other: &bitcoin::TapSighash) -> bool pub fn bitcoin::TapSighash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::TapSighash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::TapSighash pub fn bitcoin::TapSighash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::TapSighash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::TapSighash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::TapSighash +pub fn bitcoin::TapSighash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::TapSighash::from_engine(e: Self::Engine) -> bitcoin::TapSighash pub fn bitcoin::TapSighash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::TapSighash::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::TapSighash::from_str(s: &str) -> core::result::Result @@ -7184,21 +7174,16 @@ pub fn bitcoin::WPubkeyHash::borrow(&self) -> &[u8] pub fn bitcoin::WPubkeyHash::clone(&self) -> bitcoin::WPubkeyHash pub fn bitcoin::WPubkeyHash::cmp(&self, other: &bitcoin::WPubkeyHash) -> core::cmp::Ordering pub fn bitcoin::WPubkeyHash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::WPubkeyHash::engine() -> ::Engine pub fn bitcoin::WPubkeyHash::eq(&self, other: &bitcoin::WPubkeyHash) -> bool pub fn bitcoin::WPubkeyHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::WPubkeyHash::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::WPubkeyHash pub fn bitcoin::WPubkeyHash::from(key: &bitcoin::CompressedPublicKey) -> Self pub fn bitcoin::WPubkeyHash::from(key: bitcoin::CompressedPublicKey) -> Self pub fn bitcoin::WPubkeyHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::WPubkeyHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::WPubkeyHash::from_engine(e: ::Engine) -> bitcoin::WPubkeyHash pub fn bitcoin::WPubkeyHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::WPubkeyHash::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::WPubkeyHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::WPubkeyHash::hash(data: &[u8]) -> Self pub fn bitcoin::WPubkeyHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::WPubkeyHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::WPubkeyHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::WPubkeyHash::partial_cmp(&self, other: &bitcoin::WPubkeyHash) -> core::option::Option pub fn bitcoin::WPubkeyHash::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -7433,20 +7418,15 @@ pub fn bitcoin::bip158::FilterHash::cmp(&self, other: &bitcoin::bip158::FilterHa pub fn bitcoin::bip158::FilterHash::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::bip158::FilterHash::consensus_encode(&self, w: &mut W) -> core::result::Result pub fn bitcoin::bip158::FilterHash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::bip158::FilterHash::engine() -> ::Engine pub fn bitcoin::bip158::FilterHash::eq(&self, other: &bitcoin::bip158::FilterHash) -> bool pub fn bitcoin::bip158::FilterHash::filter_header(&self, previous_filter_header: bitcoin::bip158::FilterHeader) -> bitcoin::bip158::FilterHeader pub fn bitcoin::bip158::FilterHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::bip158::FilterHash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::bip158::FilterHash pub fn bitcoin::bip158::FilterHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::bip158::FilterHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::bip158::FilterHash::from_engine(e: ::Engine) -> bitcoin::bip158::FilterHash pub fn bitcoin::bip158::FilterHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip158::FilterHash::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip158::FilterHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::bip158::FilterHash::hash(data: &[u8]) -> Self pub fn bitcoin::bip158::FilterHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::bip158::FilterHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::bip158::FilterHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::bip158::FilterHash::partial_cmp(&self, other: &bitcoin::bip158::FilterHash) -> core::option::Option pub fn bitcoin::bip158::FilterHash::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -7460,19 +7440,14 @@ pub fn bitcoin::bip158::FilterHeader::cmp(&self, other: &bitcoin::bip158::Filter pub fn bitcoin::bip158::FilterHeader::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::bip158::FilterHeader::consensus_encode(&self, w: &mut W) -> core::result::Result pub fn bitcoin::bip158::FilterHeader::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::bip158::FilterHeader::engine() -> ::Engine pub fn bitcoin::bip158::FilterHeader::eq(&self, other: &bitcoin::bip158::FilterHeader) -> bool pub fn bitcoin::bip158::FilterHeader::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::bip158::FilterHeader::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::bip158::FilterHeader pub fn bitcoin::bip158::FilterHeader::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::bip158::FilterHeader::from_engine(e: ::Engine) -> Self -pub fn bitcoin::bip158::FilterHeader::from_engine(e: ::Engine) -> bitcoin::bip158::FilterHeader pub fn bitcoin::bip158::FilterHeader::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip158::FilterHeader::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip158::FilterHeader::from_str(s: &str) -> core::result::Result -pub fn bitcoin::bip158::FilterHeader::hash(data: &[u8]) -> Self pub fn bitcoin::bip158::FilterHeader::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::bip158::FilterHeader::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::bip158::FilterHeader::index(&self, index: I) -> &Self::Output pub fn bitcoin::bip158::FilterHeader::partial_cmp(&self, other: &bitcoin::bip158::FilterHeader) -> core::option::Option pub fn bitcoin::bip158::FilterHeader::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -7608,21 +7583,16 @@ pub fn bitcoin::bip32::XKeyIdentifier::borrow(&self) -> &[u8] pub fn bitcoin::bip32::XKeyIdentifier::clone(&self) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::cmp(&self, other: &bitcoin::bip32::XKeyIdentifier) -> core::cmp::Ordering pub fn bitcoin::bip32::XKeyIdentifier::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::bip32::XKeyIdentifier::engine() -> ::Engine pub fn bitcoin::bip32::XKeyIdentifier::eq(&self, other: &bitcoin::bip32::XKeyIdentifier) -> bool pub fn bitcoin::bip32::XKeyIdentifier::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::bip32::XKeyIdentifier::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from(key: &bitcoin::bip32::Xpub) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from(key: bitcoin::bip32::Xpub) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::bip32::XKeyIdentifier::from_engine(e: ::Engine) -> Self -pub fn bitcoin::bip32::XKeyIdentifier::from_engine(e: ::Engine) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip32::XKeyIdentifier::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip32::XKeyIdentifier::from_str(s: &str) -> core::result::Result -pub fn bitcoin::bip32::XKeyIdentifier::hash(data: &[u8]) -> Self pub fn bitcoin::bip32::XKeyIdentifier::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::bip32::XKeyIdentifier::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::bip32::XKeyIdentifier::index(&self, index: I) -> &Self::Output pub fn bitcoin::bip32::XKeyIdentifier::partial_cmp(&self, other: &bitcoin::bip32::XKeyIdentifier) -> core::option::Option pub fn bitcoin::bip32::XKeyIdentifier::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -7696,7 +7666,6 @@ pub fn bitcoin::blockdata::block::BlockHash::cmp(&self, other: &bitcoin::blockda pub fn bitcoin::blockdata::block::BlockHash::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::blockdata::block::BlockHash::consensus_encode(&self, w: &mut W) -> core::result::Result pub fn bitcoin::blockdata::block::BlockHash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::blockdata::block::BlockHash::engine() -> ::Engine pub fn bitcoin::blockdata::block::BlockHash::eq(&self, other: &bitcoin::blockdata::block::BlockHash) -> bool pub fn bitcoin::blockdata::block::BlockHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::block::BlockHash::from(block: &bitcoin::blockdata::block::Block) -> bitcoin::blockdata::block::BlockHash @@ -7705,14 +7674,10 @@ pub fn bitcoin::blockdata::block::BlockHash::from(header: &bitcoin::blockdata::b pub fn bitcoin::blockdata::block::BlockHash::from(header: bitcoin::blockdata::block::Header) -> bitcoin::blockdata::block::BlockHash pub fn bitcoin::blockdata::block::BlockHash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::block::BlockHash pub fn bitcoin::blockdata::block::BlockHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::block::BlockHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::block::BlockHash::from_engine(e: ::Engine) -> bitcoin::blockdata::block::BlockHash pub fn bitcoin::blockdata::block::BlockHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::block::BlockHash::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::block::BlockHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::block::BlockHash::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::block::BlockHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::block::BlockHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::block::BlockHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::block::BlockHash::partial_cmp(&self, other: &bitcoin::blockdata::block::BlockHash) -> core::option::Option pub fn bitcoin::blockdata::block::BlockHash::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -7759,19 +7724,14 @@ pub fn bitcoin::blockdata::block::WitnessCommitment::borrow(&self) -> &[u8] pub fn bitcoin::blockdata::block::WitnessCommitment::clone(&self) -> bitcoin::blockdata::block::WitnessCommitment pub fn bitcoin::blockdata::block::WitnessCommitment::cmp(&self, other: &bitcoin::blockdata::block::WitnessCommitment) -> core::cmp::Ordering pub fn bitcoin::blockdata::block::WitnessCommitment::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::blockdata::block::WitnessCommitment::engine() -> ::Engine pub fn bitcoin::blockdata::block::WitnessCommitment::eq(&self, other: &bitcoin::blockdata::block::WitnessCommitment) -> bool pub fn bitcoin::blockdata::block::WitnessCommitment::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::block::WitnessCommitment::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::block::WitnessCommitment pub fn bitcoin::blockdata::block::WitnessCommitment::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::block::WitnessCommitment::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::block::WitnessCommitment::from_engine(e: ::Engine) -> bitcoin::blockdata::block::WitnessCommitment pub fn bitcoin::blockdata::block::WitnessCommitment::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::block::WitnessCommitment::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::block::WitnessCommitment::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::block::WitnessCommitment::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::block::WitnessCommitment::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::block::WitnessCommitment::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::block::WitnessCommitment::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::block::WitnessCommitment::partial_cmp(&self, other: &bitcoin::blockdata::block::WitnessCommitment) -> core::option::Option pub fn bitcoin::blockdata::block::WitnessCommitment::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -8268,21 +8228,16 @@ pub fn bitcoin::blockdata::script::ScriptHash::borrow(&self) -> &[u8] pub fn bitcoin::blockdata::script::ScriptHash::clone(&self) -> bitcoin::blockdata::script::ScriptHash pub fn bitcoin::blockdata::script::ScriptHash::cmp(&self, other: &bitcoin::blockdata::script::ScriptHash) -> core::cmp::Ordering pub fn bitcoin::blockdata::script::ScriptHash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::blockdata::script::ScriptHash::engine() -> ::Engine pub fn bitcoin::blockdata::script::ScriptHash::eq(&self, other: &bitcoin::blockdata::script::ScriptHash) -> bool pub fn bitcoin::blockdata::script::ScriptHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::script::ScriptHash::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::blockdata::script::ScriptHash pub fn bitcoin::blockdata::script::ScriptHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::script::ScriptHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::script::ScriptHash::from_engine(e: ::Engine) -> bitcoin::blockdata::script::ScriptHash pub fn bitcoin::blockdata::script::ScriptHash::from_script(redeem_script: &bitcoin::blockdata::script::Script) -> core::result::Result pub fn bitcoin::blockdata::script::ScriptHash::from_script_unchecked(script: &bitcoin::blockdata::script::Script) -> Self pub fn bitcoin::blockdata::script::ScriptHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::script::ScriptHash::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::script::ScriptHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::script::ScriptHash::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::script::ScriptHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::script::ScriptHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::script::ScriptHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::script::ScriptHash::partial_cmp(&self, other: &bitcoin::blockdata::script::ScriptHash) -> core::option::Option pub fn bitcoin::blockdata::script::ScriptHash::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -8298,21 +8253,16 @@ pub fn bitcoin::blockdata::script::WScriptHash::borrow(&self) -> &[u8] pub fn bitcoin::blockdata::script::WScriptHash::clone(&self) -> bitcoin::blockdata::script::WScriptHash pub fn bitcoin::blockdata::script::WScriptHash::cmp(&self, other: &bitcoin::blockdata::script::WScriptHash) -> core::cmp::Ordering pub fn bitcoin::blockdata::script::WScriptHash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::blockdata::script::WScriptHash::engine() -> ::Engine pub fn bitcoin::blockdata::script::WScriptHash::eq(&self, other: &bitcoin::blockdata::script::WScriptHash) -> bool pub fn bitcoin::blockdata::script::WScriptHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::script::WScriptHash::from(inner: bitcoin_hashes::sha256::Hash) -> bitcoin::blockdata::script::WScriptHash pub fn bitcoin::blockdata::script::WScriptHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::script::WScriptHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::script::WScriptHash::from_engine(e: ::Engine) -> bitcoin::blockdata::script::WScriptHash pub fn bitcoin::blockdata::script::WScriptHash::from_script(witness_script: &bitcoin::blockdata::script::Script) -> core::result::Result pub fn bitcoin::blockdata::script::WScriptHash::from_script_unchecked(script: &bitcoin::blockdata::script::Script) -> Self pub fn bitcoin::blockdata::script::WScriptHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::script::WScriptHash::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::script::WScriptHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::script::WScriptHash::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::script::WScriptHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::script::WScriptHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::script::WScriptHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::script::WScriptHash::partial_cmp(&self, other: &bitcoin::blockdata::script::WScriptHash) -> core::option::Option pub fn bitcoin::blockdata::script::WScriptHash::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -8517,21 +8467,16 @@ pub fn bitcoin::blockdata::transaction::Txid::cmp(&self, other: &bitcoin::blockd pub fn bitcoin::blockdata::transaction::Txid::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::blockdata::transaction::Txid::consensus_encode(&self, w: &mut W) -> core::result::Result pub fn bitcoin::blockdata::transaction::Txid::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::blockdata::transaction::Txid::engine() -> ::Engine pub fn bitcoin::blockdata::transaction::Txid::eq(&self, other: &bitcoin::blockdata::transaction::Txid) -> bool pub fn bitcoin::blockdata::transaction::Txid::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::transaction::Txid::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from(tx: &bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from(tx: bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::transaction::Txid::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::transaction::Txid::from_engine(e: ::Engine) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::transaction::Txid::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::transaction::Txid::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::transaction::Txid::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::transaction::Txid::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::transaction::Txid::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::transaction::Txid::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::transaction::Txid::partial_cmp(&self, other: &bitcoin::blockdata::transaction::Txid) -> core::option::Option pub fn bitcoin::blockdata::transaction::Txid::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -8558,21 +8503,16 @@ pub fn bitcoin::blockdata::transaction::Wtxid::cmp(&self, other: &bitcoin::block pub fn bitcoin::blockdata::transaction::Wtxid::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::blockdata::transaction::Wtxid::consensus_encode(&self, w: &mut W) -> core::result::Result pub fn bitcoin::blockdata::transaction::Wtxid::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::blockdata::transaction::Wtxid::engine() -> ::Engine pub fn bitcoin::blockdata::transaction::Wtxid::eq(&self, other: &bitcoin::blockdata::transaction::Wtxid) -> bool pub fn bitcoin::blockdata::transaction::Wtxid::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::transaction::Wtxid::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from(tx: &bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from(tx: bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::transaction::Wtxid::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::transaction::Wtxid::from_engine(e: ::Engine) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::transaction::Wtxid::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::transaction::Wtxid::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::transaction::Wtxid::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::transaction::Wtxid::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::transaction::Wtxid::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::transaction::Wtxid::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::transaction::Wtxid::partial_cmp(&self, other: &bitcoin::blockdata::transaction::Wtxid) -> core::option::Option pub fn bitcoin::blockdata::transaction::Wtxid::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -8882,20 +8822,15 @@ pub fn bitcoin::merkle_tree::TxMerkleNode::combine(&self, other: &Self) -> Self pub fn bitcoin::merkle_tree::TxMerkleNode::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::merkle_tree::TxMerkleNode::consensus_encode(&self, w: &mut W) -> core::result::Result pub fn bitcoin::merkle_tree::TxMerkleNode::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::merkle_tree::TxMerkleNode::engine() -> ::Engine pub fn bitcoin::merkle_tree::TxMerkleNode::eq(&self, other: &bitcoin::merkle_tree::TxMerkleNode) -> bool pub fn bitcoin::merkle_tree::TxMerkleNode::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::merkle_tree::TxMerkleNode::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::merkle_tree::TxMerkleNode pub fn bitcoin::merkle_tree::TxMerkleNode::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::merkle_tree::TxMerkleNode::from_engine(e: ::Engine) -> Self -pub fn bitcoin::merkle_tree::TxMerkleNode::from_engine(e: ::Engine) -> bitcoin::merkle_tree::TxMerkleNode pub fn bitcoin::merkle_tree::TxMerkleNode::from_leaf(leaf: Self::Leaf) -> Self pub fn bitcoin::merkle_tree::TxMerkleNode::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::merkle_tree::TxMerkleNode::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::merkle_tree::TxMerkleNode::from_str(s: &str) -> core::result::Result -pub fn bitcoin::merkle_tree::TxMerkleNode::hash(data: &[u8]) -> Self pub fn bitcoin::merkle_tree::TxMerkleNode::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::merkle_tree::TxMerkleNode::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::merkle_tree::TxMerkleNode::index(&self, index: I) -> &Self::Output pub fn bitcoin::merkle_tree::TxMerkleNode::partial_cmp(&self, other: &bitcoin::merkle_tree::TxMerkleNode) -> core::option::Option pub fn bitcoin::merkle_tree::TxMerkleNode::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -8910,20 +8845,15 @@ pub fn bitcoin::merkle_tree::WitnessMerkleNode::combine(&self, other: &Self) -> pub fn bitcoin::merkle_tree::WitnessMerkleNode::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::consensus_encode(&self, w: &mut W) -> core::result::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::merkle_tree::WitnessMerkleNode::engine() -> ::Engine pub fn bitcoin::merkle_tree::WitnessMerkleNode::eq(&self, other: &bitcoin::merkle_tree::WitnessMerkleNode) -> bool pub fn bitcoin::merkle_tree::WitnessMerkleNode::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::merkle_tree::WitnessMerkleNode pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_engine(e: ::Engine) -> Self -pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_engine(e: ::Engine) -> bitcoin::merkle_tree::WitnessMerkleNode pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_leaf(leaf: Self::Leaf) -> Self pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_slice_delegated(sl: &[u8]) -> core::result::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_str(s: &str) -> core::result::Result -pub fn bitcoin::merkle_tree::WitnessMerkleNode::hash(data: &[u8]) -> Self pub fn bitcoin::merkle_tree::WitnessMerkleNode::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::merkle_tree::WitnessMerkleNode::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::merkle_tree::WitnessMerkleNode::index(&self, index: I) -> &Self::Output pub fn bitcoin::merkle_tree::WitnessMerkleNode::partial_cmp(&self, other: &bitcoin::merkle_tree::WitnessMerkleNode) -> core::option::Option pub fn bitcoin::merkle_tree::WitnessMerkleNode::serialize(&self, s: S) -> core::result::Result<::Ok, ::Error> @@ -9643,14 +9573,15 @@ pub fn bitcoin::taproot::TapLeafHash::cmp(&self, other: &bitcoin::taproot::TapLe pub fn bitcoin::taproot::TapLeafHash::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::taproot::TapLeafHash::consensus_encode(&self, w: &mut W) -> core::result::Result pub fn bitcoin::taproot::TapLeafHash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::taproot::TapLeafHash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::taproot::TapLeafHash::engine() -> ::Engine +pub fn bitcoin::taproot::TapLeafHash::engine() -> Self::Engine pub fn bitcoin::taproot::TapLeafHash::eq(&self, other: &bitcoin::taproot::TapLeafHash) -> bool pub fn bitcoin::taproot::TapLeafHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::taproot::TapLeafHash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from(script_path: bitcoin::sighash::ScriptPath<'s>) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::taproot::TapLeafHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::taproot::TapLeafHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::taproot::TapLeafHash +pub fn bitcoin::taproot::TapLeafHash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::taproot::TapLeafHash::from_engine(e: Self::Engine) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from_script(script: &bitcoin::blockdata::script::Script, ver: bitcoin::taproot::LeafVersion) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::taproot::TapLeafHash::from_slice_delegated(sl: &[u8]) -> core::result::Result @@ -9677,7 +9608,8 @@ pub fn bitcoin::taproot::TapNodeHash::borrow(&self) -> &[u8] pub fn bitcoin::taproot::TapNodeHash::clone(&self) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::cmp(&self, other: &bitcoin::taproot::TapNodeHash) -> core::cmp::Ordering pub fn bitcoin::taproot::TapNodeHash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::taproot::TapNodeHash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::taproot::TapNodeHash::engine() -> ::Engine +pub fn bitcoin::taproot::TapNodeHash::engine() -> Self::Engine pub fn bitcoin::taproot::TapNodeHash::eq(&self, other: &bitcoin::taproot::TapNodeHash) -> bool pub fn bitcoin::taproot::TapNodeHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::taproot::TapNodeHash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::taproot::TapNodeHash @@ -9685,8 +9617,8 @@ pub fn bitcoin::taproot::TapNodeHash::from(leaf: &bitcoin::taproot::LeafNode) -> pub fn bitcoin::taproot::TapNodeHash::from(leaf: bitcoin::taproot::LeafNode) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from(leaf: bitcoin::taproot::TapLeafHash) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::taproot::TapNodeHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::taproot::TapNodeHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::taproot::TapNodeHash +pub fn bitcoin::taproot::TapNodeHash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::taproot::TapNodeHash::from_engine(e: Self::Engine) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_node_hashes(a: bitcoin::taproot::TapNodeHash, b: bitcoin::taproot::TapNodeHash) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_script(script: &bitcoin::blockdata::script::Script, ver: bitcoin::taproot::LeafVersion) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_slice(sl: &[u8]) -> core::result::Result @@ -9718,15 +9650,16 @@ pub fn bitcoin::taproot::TapTweakHash::borrow(&self) -> &[u8] pub fn bitcoin::taproot::TapTweakHash::clone(&self) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::cmp(&self, other: &bitcoin::taproot::TapTweakHash) -> core::cmp::Ordering pub fn bitcoin::taproot::TapTweakHash::deserialize>(d: D) -> core::result::Result::Error> -pub fn bitcoin::taproot::TapTweakHash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::taproot::TapTweakHash::engine() -> ::Engine +pub fn bitcoin::taproot::TapTweakHash::engine() -> Self::Engine pub fn bitcoin::taproot::TapTweakHash::eq(&self, other: &bitcoin::taproot::TapTweakHash) -> bool pub fn bitcoin::taproot::TapTweakHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::taproot::TapTweakHash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from(spend_info: &bitcoin::taproot::TaprootSpendInfo) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from(spend_info: bitcoin::taproot::TaprootSpendInfo) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::taproot::TapTweakHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::taproot::TapTweakHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::taproot::TapTweakHash +pub fn bitcoin::taproot::TapTweakHash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::taproot::TapTweakHash::from_engine(e: Self::Engine) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from_key_and_tweak(internal_key: bitcoin::key::UntweakedPublicKey, merkle_root: core::option::Option) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::taproot::TapTweakHash::from_slice_delegated(sl: &[u8]) -> core::result::Result @@ -10413,27 +10346,23 @@ pub type bitcoin::CompressedPublicKey::Err = bitcoin::key::ParseCompressedPublic pub type bitcoin::CompressedPublicKey::Error = bitcoin::key::UncompressedPublicKeyError pub type bitcoin::EcdsaSighashType::Err = bitcoin::sighash::SighashTypeParseError pub type bitcoin::LegacySighash::Bytes = ::Bytes -pub type bitcoin::LegacySighash::Engine = ::Engine pub type bitcoin::LegacySighash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::LegacySighash::Output = >::Output pub type bitcoin::PrivateKey::Err = bitcoin::key::FromWifError pub type bitcoin::PrivateKey::Output = [u8] pub type bitcoin::PubkeyHash::Bytes = ::Bytes -pub type bitcoin::PubkeyHash::Engine = ::Engine pub type bitcoin::PubkeyHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::PubkeyHash::Output = >::Output pub type bitcoin::PublicKey::Err = bitcoin::key::ParsePublicKeyError pub type bitcoin::SegwitV0Sighash::Bytes = ::Bytes -pub type bitcoin::SegwitV0Sighash::Engine = ::Engine pub type bitcoin::SegwitV0Sighash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::SegwitV0Sighash::Output = >::Output pub type bitcoin::TapSighash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::TapSighash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::TapSighash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::TapSighash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::TapSighash::Output = >::Output pub type bitcoin::TapSighashType::Err = bitcoin::sighash::SighashTypeParseError pub type bitcoin::WPubkeyHash::Bytes = ::Bytes -pub type bitcoin::WPubkeyHash::Engine = ::Engine pub type bitcoin::WPubkeyHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::WPubkeyHash::Output = >::Output pub type bitcoin::address::Address::Err = bitcoin::address::error::ParseError @@ -10442,11 +10371,9 @@ pub type bitcoin::bip152::ShortId::Err = hex_conservative::error::HexToArrayErro pub type bitcoin::bip152::ShortId::Error = core::array::TryFromSliceError pub type bitcoin::bip152::ShortId::Output = <[u8] as core::ops::index::Index>::Output pub type bitcoin::bip158::FilterHash::Bytes = ::Bytes -pub type bitcoin::bip158::FilterHash::Engine = ::Engine pub type bitcoin::bip158::FilterHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::bip158::FilterHash::Output = >::Output pub type bitcoin::bip158::FilterHeader::Bytes = ::Bytes -pub type bitcoin::bip158::FilterHeader::Engine = ::Engine pub type bitcoin::bip158::FilterHeader::Err = hex_conservative::error::HexToArrayError pub type bitcoin::bip158::FilterHeader::Output = >::Output pub type bitcoin::bip32::ChainCode::Err = hex_conservative::error::HexToArrayError @@ -10463,18 +10390,15 @@ pub type bitcoin::bip32::Fingerprint::Error = core::array::TryFromSliceError pub type bitcoin::bip32::Fingerprint::Output = <[u8] as core::ops::index::Index>::Output pub type bitcoin::bip32::KeySource = (bitcoin::bip32::Fingerprint, bitcoin::bip32::DerivationPath) pub type bitcoin::bip32::XKeyIdentifier::Bytes = ::Bytes -pub type bitcoin::bip32::XKeyIdentifier::Engine = ::Engine pub type bitcoin::bip32::XKeyIdentifier::Err = hex_conservative::error::HexToArrayError pub type bitcoin::bip32::XKeyIdentifier::Output = >::Output pub type bitcoin::bip32::Xpriv::Err = bitcoin::bip32::Error pub type bitcoin::bip32::Xpriv::Error = bitcoin::psbt::GetKeyError pub type bitcoin::bip32::Xpub::Err = bitcoin::bip32::Error pub type bitcoin::blockdata::block::BlockHash::Bytes = ::Bytes -pub type bitcoin::blockdata::block::BlockHash::Engine = ::Engine pub type bitcoin::blockdata::block::BlockHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::block::BlockHash::Output = >::Output pub type bitcoin::blockdata::block::WitnessCommitment::Bytes = ::Bytes -pub type bitcoin::blockdata::block::WitnessCommitment::Engine = ::Engine pub type bitcoin::blockdata::block::WitnessCommitment::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::block::WitnessCommitment::Output = >::Output pub type bitcoin::blockdata::constants::ChainHash::Err = hex_conservative::error::HexToArrayError @@ -10495,12 +10419,10 @@ pub type bitcoin::blockdata::script::Script::Output = bitcoin::blockdata::script pub type bitcoin::blockdata::script::Script::Owned = bitcoin::blockdata::script::ScriptBuf pub type bitcoin::blockdata::script::ScriptBuf::Target = bitcoin::blockdata::script::Script pub type bitcoin::blockdata::script::ScriptHash::Bytes = ::Bytes -pub type bitcoin::blockdata::script::ScriptHash::Engine = ::Engine pub type bitcoin::blockdata::script::ScriptHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::script::ScriptHash::Error = bitcoin::blockdata::script::RedeemScriptSizeError pub type bitcoin::blockdata::script::ScriptHash::Output = >::Output pub type bitcoin::blockdata::script::WScriptHash::Bytes = ::Bytes -pub type bitcoin::blockdata::script::WScriptHash::Engine = ::Engine pub type bitcoin::blockdata::script::WScriptHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::script::WScriptHash::Error = bitcoin::blockdata::script::WitnessScriptSizeError pub type bitcoin::blockdata::script::WScriptHash::Output = >::Output @@ -10511,11 +10433,9 @@ pub type bitcoin::blockdata::transaction::OutPoint::Err = bitcoin::blockdata::tr pub type bitcoin::blockdata::transaction::Sequence::Err = bitcoin_units::parse::ParseIntError pub type bitcoin::blockdata::transaction::Sequence::Error = bitcoin_units::parse::ParseIntError pub type bitcoin::blockdata::transaction::Txid::Bytes = ::Bytes -pub type bitcoin::blockdata::transaction::Txid::Engine = ::Engine pub type bitcoin::blockdata::transaction::Txid::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::transaction::Txid::Output = >::Output pub type bitcoin::blockdata::transaction::Wtxid::Bytes = ::Bytes -pub type bitcoin::blockdata::transaction::Wtxid::Engine = ::Engine pub type bitcoin::blockdata::transaction::Wtxid::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::transaction::Wtxid::Output = >::Output pub type bitcoin::blockdata::witness::Iter<'a>::Item = &'a [u8] @@ -10541,12 +10461,10 @@ pub type bitcoin::key::UntweakedPublicKey::TweakedAux = (bitcoin::key::TweakedPu pub type bitcoin::key::UntweakedPublicKey::TweakedKey = bitcoin::key::TweakedPublicKey pub type bitcoin::merkle_tree::MerkleNode::Leaf pub type bitcoin::merkle_tree::TxMerkleNode::Bytes = ::Bytes -pub type bitcoin::merkle_tree::TxMerkleNode::Engine = ::Engine pub type bitcoin::merkle_tree::TxMerkleNode::Err = hex_conservative::error::HexToArrayError pub type bitcoin::merkle_tree::TxMerkleNode::Leaf = bitcoin::blockdata::transaction::Txid pub type bitcoin::merkle_tree::TxMerkleNode::Output = >::Output pub type bitcoin::merkle_tree::WitnessMerkleNode::Bytes = ::Bytes -pub type bitcoin::merkle_tree::WitnessMerkleNode::Engine = ::Engine pub type bitcoin::merkle_tree::WitnessMerkleNode::Err = hex_conservative::error::HexToArrayError pub type bitcoin::merkle_tree::WitnessMerkleNode::Leaf = bitcoin::blockdata::transaction::Wtxid pub type bitcoin::merkle_tree::WitnessMerkleNode::Output = >::Output @@ -10573,17 +10491,17 @@ pub type bitcoin::taproot::NodeInfo::Error = bitcoin::taproot::IncompleteBuilder pub type bitcoin::taproot::ScriptLeaves<'tree>::Item = bitcoin::taproot::ScriptLeaf<'tree> pub type bitcoin::taproot::Signature::Error = bitcoin::taproot::SigFromSliceError pub type bitcoin::taproot::TapLeafHash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::taproot::TapLeafHash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::taproot::TapLeafHash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::taproot::TapLeafHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::taproot::TapLeafHash::Output = >::Output pub type bitcoin::taproot::TapNodeHash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::taproot::TapNodeHash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::taproot::TapNodeHash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::taproot::TapNodeHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::taproot::TapNodeHash::Output = >::Output pub type bitcoin::taproot::TapTree::Error = bitcoin::taproot::HiddenNodesError pub type bitcoin::taproot::TapTree::Error = bitcoin::taproot::IncompleteBuilderError pub type bitcoin::taproot::TapTweakHash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::taproot::TapTweakHash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::taproot::TapTweakHash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::taproot::TapTweakHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::taproot::TapTweakHash::Output = >::Output pub type bitcoin::taproot::merkle_branch::IntoIter::Item = bitcoin::taproot::TapNodeHash diff --git a/api/bitcoin/default-features.txt b/api/bitcoin/default-features.txt index c5831a048..53f0eae48 100644 --- a/api/bitcoin/default-features.txt +++ b/api/bitcoin/default-features.txt @@ -433,6 +433,10 @@ impl bitcoin::taproot::merkle_branch::IntoIter impl bitcoin::taproot::merkle_branch::TaprootMerkleBranch impl bitcoin::taproot::serialized_signature::IntoIter impl bitcoin::taproot::serialized_signature::SerializedSignature +impl bitcoin_hashes::GeneralHash for bitcoin::TapSighash +impl bitcoin_hashes::GeneralHash for bitcoin::taproot::TapLeafHash +impl bitcoin_hashes::GeneralHash for bitcoin::taproot::TapNodeHash +impl bitcoin_hashes::GeneralHash for bitcoin::taproot::TapTweakHash impl bitcoin_hashes::Hash for bitcoin::LegacySighash impl bitcoin_hashes::Hash for bitcoin::PubkeyHash impl bitcoin_hashes::Hash for bitcoin::SegwitV0Sighash @@ -6706,18 +6710,13 @@ pub fn bitcoin::LegacySighash::as_ref(&self) -> &[u8] pub fn bitcoin::LegacySighash::borrow(&self) -> &[u8] pub fn bitcoin::LegacySighash::clone(&self) -> bitcoin::LegacySighash pub fn bitcoin::LegacySighash::cmp(&self, other: &bitcoin::LegacySighash) -> core::cmp::Ordering -pub fn bitcoin::LegacySighash::engine() -> ::Engine pub fn bitcoin::LegacySighash::eq(&self, other: &bitcoin::LegacySighash) -> bool pub fn bitcoin::LegacySighash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::LegacySighash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::LegacySighash pub fn bitcoin::LegacySighash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::LegacySighash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::LegacySighash::from_engine(e: ::Engine) -> bitcoin::LegacySighash pub fn bitcoin::LegacySighash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::LegacySighash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::LegacySighash::hash(data: &[u8]) -> Self pub fn bitcoin::LegacySighash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::LegacySighash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::LegacySighash::index(&self, index: I) -> &Self::Output pub fn bitcoin::LegacySighash::partial_cmp(&self, other: &bitcoin::LegacySighash) -> core::option::Option pub fn bitcoin::LegacySighash::to_byte_array(self) -> Self::Bytes @@ -6749,7 +6748,6 @@ pub fn bitcoin::PubkeyHash::as_ref(&self) -> &bitcoin::blockdata::script::PushBy pub fn bitcoin::PubkeyHash::borrow(&self) -> &[u8] pub fn bitcoin::PubkeyHash::clone(&self) -> bitcoin::PubkeyHash pub fn bitcoin::PubkeyHash::cmp(&self, other: &bitcoin::PubkeyHash) -> core::cmp::Ordering -pub fn bitcoin::PubkeyHash::engine() -> ::Engine pub fn bitcoin::PubkeyHash::eq(&self, other: &bitcoin::PubkeyHash) -> bool pub fn bitcoin::PubkeyHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::PubkeyHash::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::PubkeyHash @@ -6758,13 +6756,9 @@ pub fn bitcoin::PubkeyHash::from(key: &bitcoin::PublicKey) -> bitcoin::PubkeyHas pub fn bitcoin::PubkeyHash::from(key: bitcoin::CompressedPublicKey) -> Self pub fn bitcoin::PubkeyHash::from(key: bitcoin::PublicKey) -> bitcoin::PubkeyHash pub fn bitcoin::PubkeyHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::PubkeyHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::PubkeyHash::from_engine(e: ::Engine) -> bitcoin::PubkeyHash pub fn bitcoin::PubkeyHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::PubkeyHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::PubkeyHash::hash(data: &[u8]) -> Self pub fn bitcoin::PubkeyHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::PubkeyHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::PubkeyHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::PubkeyHash::partial_cmp(&self, other: &bitcoin::PubkeyHash) -> core::option::Option pub fn bitcoin::PubkeyHash::to_byte_array(self) -> Self::Bytes @@ -6795,18 +6789,13 @@ pub fn bitcoin::SegwitV0Sighash::as_ref(&self) -> &[u8] pub fn bitcoin::SegwitV0Sighash::borrow(&self) -> &[u8] pub fn bitcoin::SegwitV0Sighash::clone(&self) -> bitcoin::SegwitV0Sighash pub fn bitcoin::SegwitV0Sighash::cmp(&self, other: &bitcoin::SegwitV0Sighash) -> core::cmp::Ordering -pub fn bitcoin::SegwitV0Sighash::engine() -> ::Engine pub fn bitcoin::SegwitV0Sighash::eq(&self, other: &bitcoin::SegwitV0Sighash) -> bool pub fn bitcoin::SegwitV0Sighash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::SegwitV0Sighash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::SegwitV0Sighash pub fn bitcoin::SegwitV0Sighash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::SegwitV0Sighash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::SegwitV0Sighash::from_engine(e: ::Engine) -> bitcoin::SegwitV0Sighash pub fn bitcoin::SegwitV0Sighash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::SegwitV0Sighash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::SegwitV0Sighash::hash(data: &[u8]) -> Self pub fn bitcoin::SegwitV0Sighash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::SegwitV0Sighash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::SegwitV0Sighash::index(&self, index: I) -> &Self::Output pub fn bitcoin::SegwitV0Sighash::partial_cmp(&self, other: &bitcoin::SegwitV0Sighash) -> core::option::Option pub fn bitcoin::SegwitV0Sighash::to_byte_array(self) -> Self::Bytes @@ -6816,13 +6805,14 @@ pub fn bitcoin::TapSighash::as_ref(&self) -> &[u8] pub fn bitcoin::TapSighash::borrow(&self) -> &[u8] pub fn bitcoin::TapSighash::clone(&self) -> bitcoin::TapSighash pub fn bitcoin::TapSighash::cmp(&self, other: &bitcoin::TapSighash) -> core::cmp::Ordering -pub fn bitcoin::TapSighash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::TapSighash::engine() -> ::Engine +pub fn bitcoin::TapSighash::engine() -> Self::Engine pub fn bitcoin::TapSighash::eq(&self, other: &bitcoin::TapSighash) -> bool pub fn bitcoin::TapSighash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::TapSighash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::TapSighash pub fn bitcoin::TapSighash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::TapSighash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::TapSighash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::TapSighash +pub fn bitcoin::TapSighash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::TapSighash::from_engine(e: Self::Engine) -> bitcoin::TapSighash pub fn bitcoin::TapSighash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::TapSighash::from_str(s: &str) -> core::result::Result pub fn bitcoin::TapSighash::hash(data: &[u8]) -> Self @@ -6854,20 +6844,15 @@ pub fn bitcoin::WPubkeyHash::as_ref(&self) -> &bitcoin::blockdata::script::PushB pub fn bitcoin::WPubkeyHash::borrow(&self) -> &[u8] pub fn bitcoin::WPubkeyHash::clone(&self) -> bitcoin::WPubkeyHash pub fn bitcoin::WPubkeyHash::cmp(&self, other: &bitcoin::WPubkeyHash) -> core::cmp::Ordering -pub fn bitcoin::WPubkeyHash::engine() -> ::Engine pub fn bitcoin::WPubkeyHash::eq(&self, other: &bitcoin::WPubkeyHash) -> bool pub fn bitcoin::WPubkeyHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::WPubkeyHash::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::WPubkeyHash pub fn bitcoin::WPubkeyHash::from(key: &bitcoin::CompressedPublicKey) -> Self pub fn bitcoin::WPubkeyHash::from(key: bitcoin::CompressedPublicKey) -> Self pub fn bitcoin::WPubkeyHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::WPubkeyHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::WPubkeyHash::from_engine(e: ::Engine) -> bitcoin::WPubkeyHash pub fn bitcoin::WPubkeyHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::WPubkeyHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::WPubkeyHash::hash(data: &[u8]) -> Self pub fn bitcoin::WPubkeyHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::WPubkeyHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::WPubkeyHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::WPubkeyHash::partial_cmp(&self, other: &bitcoin::WPubkeyHash) -> core::option::Option pub fn bitcoin::WPubkeyHash::to_byte_array(self) -> Self::Bytes @@ -7096,19 +7081,14 @@ pub fn bitcoin::bip158::FilterHash::clone(&self) -> bitcoin::bip158::FilterHash pub fn bitcoin::bip158::FilterHash::cmp(&self, other: &bitcoin::bip158::FilterHash) -> core::cmp::Ordering pub fn bitcoin::bip158::FilterHash::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::bip158::FilterHash::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::bip158::FilterHash::engine() -> ::Engine pub fn bitcoin::bip158::FilterHash::eq(&self, other: &bitcoin::bip158::FilterHash) -> bool pub fn bitcoin::bip158::FilterHash::filter_header(&self, previous_filter_header: bitcoin::bip158::FilterHeader) -> bitcoin::bip158::FilterHeader pub fn bitcoin::bip158::FilterHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::bip158::FilterHash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::bip158::FilterHash pub fn bitcoin::bip158::FilterHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::bip158::FilterHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::bip158::FilterHash::from_engine(e: ::Engine) -> bitcoin::bip158::FilterHash pub fn bitcoin::bip158::FilterHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip158::FilterHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::bip158::FilterHash::hash(data: &[u8]) -> Self pub fn bitcoin::bip158::FilterHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::bip158::FilterHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::bip158::FilterHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::bip158::FilterHash::partial_cmp(&self, other: &bitcoin::bip158::FilterHash) -> core::option::Option pub fn bitcoin::bip158::FilterHash::to_byte_array(self) -> Self::Bytes @@ -7120,18 +7100,13 @@ pub fn bitcoin::bip158::FilterHeader::clone(&self) -> bitcoin::bip158::FilterHea pub fn bitcoin::bip158::FilterHeader::cmp(&self, other: &bitcoin::bip158::FilterHeader) -> core::cmp::Ordering pub fn bitcoin::bip158::FilterHeader::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::bip158::FilterHeader::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::bip158::FilterHeader::engine() -> ::Engine pub fn bitcoin::bip158::FilterHeader::eq(&self, other: &bitcoin::bip158::FilterHeader) -> bool pub fn bitcoin::bip158::FilterHeader::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::bip158::FilterHeader::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::bip158::FilterHeader pub fn bitcoin::bip158::FilterHeader::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::bip158::FilterHeader::from_engine(e: ::Engine) -> Self -pub fn bitcoin::bip158::FilterHeader::from_engine(e: ::Engine) -> bitcoin::bip158::FilterHeader pub fn bitcoin::bip158::FilterHeader::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip158::FilterHeader::from_str(s: &str) -> core::result::Result -pub fn bitcoin::bip158::FilterHeader::hash(data: &[u8]) -> Self pub fn bitcoin::bip158::FilterHeader::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::bip158::FilterHeader::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::bip158::FilterHeader::index(&self, index: I) -> &Self::Output pub fn bitcoin::bip158::FilterHeader::partial_cmp(&self, other: &bitcoin::bip158::FilterHeader) -> core::option::Option pub fn bitcoin::bip158::FilterHeader::to_byte_array(self) -> Self::Bytes @@ -7257,20 +7232,15 @@ pub fn bitcoin::bip32::XKeyIdentifier::as_ref(&self) -> &[u8] pub fn bitcoin::bip32::XKeyIdentifier::borrow(&self) -> &[u8] pub fn bitcoin::bip32::XKeyIdentifier::clone(&self) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::cmp(&self, other: &bitcoin::bip32::XKeyIdentifier) -> core::cmp::Ordering -pub fn bitcoin::bip32::XKeyIdentifier::engine() -> ::Engine pub fn bitcoin::bip32::XKeyIdentifier::eq(&self, other: &bitcoin::bip32::XKeyIdentifier) -> bool pub fn bitcoin::bip32::XKeyIdentifier::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::bip32::XKeyIdentifier::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from(key: &bitcoin::bip32::Xpub) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from(key: bitcoin::bip32::Xpub) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::bip32::XKeyIdentifier::from_engine(e: ::Engine) -> Self -pub fn bitcoin::bip32::XKeyIdentifier::from_engine(e: ::Engine) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip32::XKeyIdentifier::from_str(s: &str) -> core::result::Result -pub fn bitcoin::bip32::XKeyIdentifier::hash(data: &[u8]) -> Self pub fn bitcoin::bip32::XKeyIdentifier::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::bip32::XKeyIdentifier::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::bip32::XKeyIdentifier::index(&self, index: I) -> &Self::Output pub fn bitcoin::bip32::XKeyIdentifier::partial_cmp(&self, other: &bitcoin::bip32::XKeyIdentifier) -> core::option::Option pub fn bitcoin::bip32::XKeyIdentifier::to_byte_array(self) -> Self::Bytes @@ -7336,7 +7306,6 @@ pub fn bitcoin::blockdata::block::BlockHash::clone(&self) -> bitcoin::blockdata: pub fn bitcoin::blockdata::block::BlockHash::cmp(&self, other: &bitcoin::blockdata::block::BlockHash) -> core::cmp::Ordering pub fn bitcoin::blockdata::block::BlockHash::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::blockdata::block::BlockHash::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::blockdata::block::BlockHash::engine() -> ::Engine pub fn bitcoin::blockdata::block::BlockHash::eq(&self, other: &bitcoin::blockdata::block::BlockHash) -> bool pub fn bitcoin::blockdata::block::BlockHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::block::BlockHash::from(block: &bitcoin::blockdata::block::Block) -> bitcoin::blockdata::block::BlockHash @@ -7345,13 +7314,9 @@ pub fn bitcoin::blockdata::block::BlockHash::from(header: &bitcoin::blockdata::b pub fn bitcoin::blockdata::block::BlockHash::from(header: bitcoin::blockdata::block::Header) -> bitcoin::blockdata::block::BlockHash pub fn bitcoin::blockdata::block::BlockHash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::block::BlockHash pub fn bitcoin::blockdata::block::BlockHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::block::BlockHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::block::BlockHash::from_engine(e: ::Engine) -> bitcoin::blockdata::block::BlockHash pub fn bitcoin::blockdata::block::BlockHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::block::BlockHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::block::BlockHash::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::block::BlockHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::block::BlockHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::block::BlockHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::block::BlockHash::partial_cmp(&self, other: &bitcoin::blockdata::block::BlockHash) -> core::option::Option pub fn bitcoin::blockdata::block::BlockHash::to_byte_array(self) -> Self::Bytes @@ -7392,18 +7357,13 @@ pub fn bitcoin::blockdata::block::WitnessCommitment::as_ref(&self) -> &[u8] pub fn bitcoin::blockdata::block::WitnessCommitment::borrow(&self) -> &[u8] pub fn bitcoin::blockdata::block::WitnessCommitment::clone(&self) -> bitcoin::blockdata::block::WitnessCommitment pub fn bitcoin::blockdata::block::WitnessCommitment::cmp(&self, other: &bitcoin::blockdata::block::WitnessCommitment) -> core::cmp::Ordering -pub fn bitcoin::blockdata::block::WitnessCommitment::engine() -> ::Engine pub fn bitcoin::blockdata::block::WitnessCommitment::eq(&self, other: &bitcoin::blockdata::block::WitnessCommitment) -> bool pub fn bitcoin::blockdata::block::WitnessCommitment::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::block::WitnessCommitment::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::block::WitnessCommitment pub fn bitcoin::blockdata::block::WitnessCommitment::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::block::WitnessCommitment::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::block::WitnessCommitment::from_engine(e: ::Engine) -> bitcoin::blockdata::block::WitnessCommitment pub fn bitcoin::blockdata::block::WitnessCommitment::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::block::WitnessCommitment::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::block::WitnessCommitment::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::block::WitnessCommitment::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::block::WitnessCommitment::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::block::WitnessCommitment::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::block::WitnessCommitment::partial_cmp(&self, other: &bitcoin::blockdata::block::WitnessCommitment) -> core::option::Option pub fn bitcoin::blockdata::block::WitnessCommitment::to_byte_array(self) -> Self::Bytes @@ -7884,20 +7844,15 @@ pub fn bitcoin::blockdata::script::ScriptHash::as_ref(&self) -> &bitcoin::blockd pub fn bitcoin::blockdata::script::ScriptHash::borrow(&self) -> &[u8] pub fn bitcoin::blockdata::script::ScriptHash::clone(&self) -> bitcoin::blockdata::script::ScriptHash pub fn bitcoin::blockdata::script::ScriptHash::cmp(&self, other: &bitcoin::blockdata::script::ScriptHash) -> core::cmp::Ordering -pub fn bitcoin::blockdata::script::ScriptHash::engine() -> ::Engine pub fn bitcoin::blockdata::script::ScriptHash::eq(&self, other: &bitcoin::blockdata::script::ScriptHash) -> bool pub fn bitcoin::blockdata::script::ScriptHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::script::ScriptHash::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::blockdata::script::ScriptHash pub fn bitcoin::blockdata::script::ScriptHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::script::ScriptHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::script::ScriptHash::from_engine(e: ::Engine) -> bitcoin::blockdata::script::ScriptHash pub fn bitcoin::blockdata::script::ScriptHash::from_script(redeem_script: &bitcoin::blockdata::script::Script) -> core::result::Result pub fn bitcoin::blockdata::script::ScriptHash::from_script_unchecked(script: &bitcoin::blockdata::script::Script) -> Self pub fn bitcoin::blockdata::script::ScriptHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::script::ScriptHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::script::ScriptHash::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::script::ScriptHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::script::ScriptHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::script::ScriptHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::script::ScriptHash::partial_cmp(&self, other: &bitcoin::blockdata::script::ScriptHash) -> core::option::Option pub fn bitcoin::blockdata::script::ScriptHash::to_byte_array(self) -> Self::Bytes @@ -7911,20 +7866,15 @@ pub fn bitcoin::blockdata::script::WScriptHash::as_ref(&self) -> &bitcoin::block pub fn bitcoin::blockdata::script::WScriptHash::borrow(&self) -> &[u8] pub fn bitcoin::blockdata::script::WScriptHash::clone(&self) -> bitcoin::blockdata::script::WScriptHash pub fn bitcoin::blockdata::script::WScriptHash::cmp(&self, other: &bitcoin::blockdata::script::WScriptHash) -> core::cmp::Ordering -pub fn bitcoin::blockdata::script::WScriptHash::engine() -> ::Engine pub fn bitcoin::blockdata::script::WScriptHash::eq(&self, other: &bitcoin::blockdata::script::WScriptHash) -> bool pub fn bitcoin::blockdata::script::WScriptHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::script::WScriptHash::from(inner: bitcoin_hashes::sha256::Hash) -> bitcoin::blockdata::script::WScriptHash pub fn bitcoin::blockdata::script::WScriptHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::script::WScriptHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::script::WScriptHash::from_engine(e: ::Engine) -> bitcoin::blockdata::script::WScriptHash pub fn bitcoin::blockdata::script::WScriptHash::from_script(witness_script: &bitcoin::blockdata::script::Script) -> core::result::Result pub fn bitcoin::blockdata::script::WScriptHash::from_script_unchecked(script: &bitcoin::blockdata::script::Script) -> Self pub fn bitcoin::blockdata::script::WScriptHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::script::WScriptHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::script::WScriptHash::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::script::WScriptHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::script::WScriptHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::script::WScriptHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::script::WScriptHash::partial_cmp(&self, other: &bitcoin::blockdata::script::WScriptHash) -> core::option::Option pub fn bitcoin::blockdata::script::WScriptHash::to_byte_array(self) -> Self::Bytes @@ -8115,20 +8065,15 @@ pub fn bitcoin::blockdata::transaction::Txid::clone(&self) -> bitcoin::blockdata pub fn bitcoin::blockdata::transaction::Txid::cmp(&self, other: &bitcoin::blockdata::transaction::Txid) -> core::cmp::Ordering pub fn bitcoin::blockdata::transaction::Txid::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::blockdata::transaction::Txid::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::blockdata::transaction::Txid::engine() -> ::Engine pub fn bitcoin::blockdata::transaction::Txid::eq(&self, other: &bitcoin::blockdata::transaction::Txid) -> bool pub fn bitcoin::blockdata::transaction::Txid::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::transaction::Txid::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from(tx: &bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from(tx: bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::transaction::Txid::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::transaction::Txid::from_engine(e: ::Engine) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::transaction::Txid::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::transaction::Txid::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::transaction::Txid::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::transaction::Txid::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::transaction::Txid::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::transaction::Txid::partial_cmp(&self, other: &bitcoin::blockdata::transaction::Txid) -> core::option::Option pub fn bitcoin::blockdata::transaction::Txid::to_byte_array(self) -> Self::Bytes @@ -8151,20 +8096,15 @@ pub fn bitcoin::blockdata::transaction::Wtxid::clone(&self) -> bitcoin::blockdat pub fn bitcoin::blockdata::transaction::Wtxid::cmp(&self, other: &bitcoin::blockdata::transaction::Wtxid) -> core::cmp::Ordering pub fn bitcoin::blockdata::transaction::Wtxid::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::blockdata::transaction::Wtxid::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::blockdata::transaction::Wtxid::engine() -> ::Engine pub fn bitcoin::blockdata::transaction::Wtxid::eq(&self, other: &bitcoin::blockdata::transaction::Wtxid) -> bool pub fn bitcoin::blockdata::transaction::Wtxid::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::transaction::Wtxid::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from(tx: &bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from(tx: bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::transaction::Wtxid::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::transaction::Wtxid::from_engine(e: ::Engine) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::transaction::Wtxid::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::transaction::Wtxid::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::transaction::Wtxid::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::transaction::Wtxid::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::transaction::Wtxid::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::transaction::Wtxid::partial_cmp(&self, other: &bitcoin::blockdata::transaction::Wtxid) -> core::option::Option pub fn bitcoin::blockdata::transaction::Wtxid::to_byte_array(self) -> Self::Bytes @@ -8425,19 +8365,14 @@ pub fn bitcoin::merkle_tree::TxMerkleNode::cmp(&self, other: &bitcoin::merkle_tr pub fn bitcoin::merkle_tree::TxMerkleNode::combine(&self, other: &Self) -> Self pub fn bitcoin::merkle_tree::TxMerkleNode::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::merkle_tree::TxMerkleNode::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::merkle_tree::TxMerkleNode::engine() -> ::Engine pub fn bitcoin::merkle_tree::TxMerkleNode::eq(&self, other: &bitcoin::merkle_tree::TxMerkleNode) -> bool pub fn bitcoin::merkle_tree::TxMerkleNode::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::merkle_tree::TxMerkleNode::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::merkle_tree::TxMerkleNode pub fn bitcoin::merkle_tree::TxMerkleNode::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::merkle_tree::TxMerkleNode::from_engine(e: ::Engine) -> Self -pub fn bitcoin::merkle_tree::TxMerkleNode::from_engine(e: ::Engine) -> bitcoin::merkle_tree::TxMerkleNode pub fn bitcoin::merkle_tree::TxMerkleNode::from_leaf(leaf: Self::Leaf) -> Self pub fn bitcoin::merkle_tree::TxMerkleNode::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::merkle_tree::TxMerkleNode::from_str(s: &str) -> core::result::Result -pub fn bitcoin::merkle_tree::TxMerkleNode::hash(data: &[u8]) -> Self pub fn bitcoin::merkle_tree::TxMerkleNode::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::merkle_tree::TxMerkleNode::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::merkle_tree::TxMerkleNode::index(&self, index: I) -> &Self::Output pub fn bitcoin::merkle_tree::TxMerkleNode::partial_cmp(&self, other: &bitcoin::merkle_tree::TxMerkleNode) -> core::option::Option pub fn bitcoin::merkle_tree::TxMerkleNode::to_byte_array(self) -> Self::Bytes @@ -8450,19 +8385,14 @@ pub fn bitcoin::merkle_tree::WitnessMerkleNode::cmp(&self, other: &bitcoin::merk pub fn bitcoin::merkle_tree::WitnessMerkleNode::combine(&self, other: &Self) -> Self pub fn bitcoin::merkle_tree::WitnessMerkleNode::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::merkle_tree::WitnessMerkleNode::engine() -> ::Engine pub fn bitcoin::merkle_tree::WitnessMerkleNode::eq(&self, other: &bitcoin::merkle_tree::WitnessMerkleNode) -> bool pub fn bitcoin::merkle_tree::WitnessMerkleNode::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::merkle_tree::WitnessMerkleNode pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_engine(e: ::Engine) -> Self -pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_engine(e: ::Engine) -> bitcoin::merkle_tree::WitnessMerkleNode pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_leaf(leaf: Self::Leaf) -> Self pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_str(s: &str) -> core::result::Result -pub fn bitcoin::merkle_tree::WitnessMerkleNode::hash(data: &[u8]) -> Self pub fn bitcoin::merkle_tree::WitnessMerkleNode::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::merkle_tree::WitnessMerkleNode::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::merkle_tree::WitnessMerkleNode::index(&self, index: I) -> &Self::Output pub fn bitcoin::merkle_tree::WitnessMerkleNode::partial_cmp(&self, other: &bitcoin::merkle_tree::WitnessMerkleNode) -> core::option::Option pub fn bitcoin::merkle_tree::WitnessMerkleNode::to_byte_array(self) -> Self::Bytes @@ -9139,14 +9069,15 @@ pub fn bitcoin::taproot::TapLeafHash::clone(&self) -> bitcoin::taproot::TapLeafH pub fn bitcoin::taproot::TapLeafHash::cmp(&self, other: &bitcoin::taproot::TapLeafHash) -> core::cmp::Ordering pub fn bitcoin::taproot::TapLeafHash::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::taproot::TapLeafHash::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::taproot::TapLeafHash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::taproot::TapLeafHash::engine() -> ::Engine +pub fn bitcoin::taproot::TapLeafHash::engine() -> Self::Engine pub fn bitcoin::taproot::TapLeafHash::eq(&self, other: &bitcoin::taproot::TapLeafHash) -> bool pub fn bitcoin::taproot::TapLeafHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::taproot::TapLeafHash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from(script_path: bitcoin::sighash::ScriptPath<'s>) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::taproot::TapLeafHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::taproot::TapLeafHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::taproot::TapLeafHash +pub fn bitcoin::taproot::TapLeafHash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::taproot::TapLeafHash::from_engine(e: Self::Engine) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from_script(script: &bitcoin::blockdata::script::Script, ver: bitcoin::taproot::LeafVersion) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::taproot::TapLeafHash::from_str(s: &str) -> core::result::Result @@ -9170,7 +9101,8 @@ pub fn bitcoin::taproot::TapNodeHash::assume_hidden(hash: [u8; 32]) -> bitcoin:: pub fn bitcoin::taproot::TapNodeHash::borrow(&self) -> &[u8] pub fn bitcoin::taproot::TapNodeHash::clone(&self) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::cmp(&self, other: &bitcoin::taproot::TapNodeHash) -> core::cmp::Ordering -pub fn bitcoin::taproot::TapNodeHash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::taproot::TapNodeHash::engine() -> ::Engine +pub fn bitcoin::taproot::TapNodeHash::engine() -> Self::Engine pub fn bitcoin::taproot::TapNodeHash::eq(&self, other: &bitcoin::taproot::TapNodeHash) -> bool pub fn bitcoin::taproot::TapNodeHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::taproot::TapNodeHash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::taproot::TapNodeHash @@ -9178,8 +9110,8 @@ pub fn bitcoin::taproot::TapNodeHash::from(leaf: &bitcoin::taproot::LeafNode) -> pub fn bitcoin::taproot::TapNodeHash::from(leaf: bitcoin::taproot::LeafNode) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from(leaf: bitcoin::taproot::TapLeafHash) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::taproot::TapNodeHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::taproot::TapNodeHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::taproot::TapNodeHash +pub fn bitcoin::taproot::TapNodeHash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::taproot::TapNodeHash::from_engine(e: Self::Engine) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_node_hashes(a: bitcoin::taproot::TapNodeHash, b: bitcoin::taproot::TapNodeHash) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_script(script: &bitcoin::blockdata::script::Script, ver: bitcoin::taproot::LeafVersion) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_slice(sl: &[u8]) -> core::result::Result @@ -9206,15 +9138,16 @@ pub fn bitcoin::taproot::TapTweakHash::as_ref(&self) -> &[u8] pub fn bitcoin::taproot::TapTweakHash::borrow(&self) -> &[u8] pub fn bitcoin::taproot::TapTweakHash::clone(&self) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::cmp(&self, other: &bitcoin::taproot::TapTweakHash) -> core::cmp::Ordering -pub fn bitcoin::taproot::TapTweakHash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::taproot::TapTweakHash::engine() -> ::Engine +pub fn bitcoin::taproot::TapTweakHash::engine() -> Self::Engine pub fn bitcoin::taproot::TapTweakHash::eq(&self, other: &bitcoin::taproot::TapTweakHash) -> bool pub fn bitcoin::taproot::TapTweakHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::taproot::TapTweakHash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from(spend_info: &bitcoin::taproot::TaprootSpendInfo) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from(spend_info: bitcoin::taproot::TaprootSpendInfo) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::taproot::TapTweakHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::taproot::TapTweakHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::taproot::TapTweakHash +pub fn bitcoin::taproot::TapTweakHash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::taproot::TapTweakHash::from_engine(e: Self::Engine) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from_key_and_tweak(internal_key: bitcoin::key::UntweakedPublicKey, merkle_root: core::option::Option) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::taproot::TapTweakHash::from_str(s: &str) -> core::result::Result @@ -9882,27 +9815,23 @@ pub type bitcoin::CompressedPublicKey::Err = bitcoin::key::ParseCompressedPublic pub type bitcoin::CompressedPublicKey::Error = bitcoin::key::UncompressedPublicKeyError pub type bitcoin::EcdsaSighashType::Err = bitcoin::sighash::SighashTypeParseError pub type bitcoin::LegacySighash::Bytes = ::Bytes -pub type bitcoin::LegacySighash::Engine = ::Engine pub type bitcoin::LegacySighash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::LegacySighash::Output = >::Output pub type bitcoin::PrivateKey::Err = bitcoin::key::FromWifError pub type bitcoin::PrivateKey::Output = [u8] pub type bitcoin::PubkeyHash::Bytes = ::Bytes -pub type bitcoin::PubkeyHash::Engine = ::Engine pub type bitcoin::PubkeyHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::PubkeyHash::Output = >::Output pub type bitcoin::PublicKey::Err = bitcoin::key::ParsePublicKeyError pub type bitcoin::SegwitV0Sighash::Bytes = ::Bytes -pub type bitcoin::SegwitV0Sighash::Engine = ::Engine pub type bitcoin::SegwitV0Sighash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::SegwitV0Sighash::Output = >::Output pub type bitcoin::TapSighash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::TapSighash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::TapSighash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::TapSighash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::TapSighash::Output = >::Output pub type bitcoin::TapSighashType::Err = bitcoin::sighash::SighashTypeParseError pub type bitcoin::WPubkeyHash::Bytes = ::Bytes -pub type bitcoin::WPubkeyHash::Engine = ::Engine pub type bitcoin::WPubkeyHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::WPubkeyHash::Output = >::Output pub type bitcoin::address::Address::Err = bitcoin::address::error::ParseError @@ -9911,11 +9840,9 @@ pub type bitcoin::bip152::ShortId::Err = hex_conservative::error::HexToArrayErro pub type bitcoin::bip152::ShortId::Error = core::array::TryFromSliceError pub type bitcoin::bip152::ShortId::Output = <[u8] as core::ops::index::Index>::Output pub type bitcoin::bip158::FilterHash::Bytes = ::Bytes -pub type bitcoin::bip158::FilterHash::Engine = ::Engine pub type bitcoin::bip158::FilterHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::bip158::FilterHash::Output = >::Output pub type bitcoin::bip158::FilterHeader::Bytes = ::Bytes -pub type bitcoin::bip158::FilterHeader::Engine = ::Engine pub type bitcoin::bip158::FilterHeader::Err = hex_conservative::error::HexToArrayError pub type bitcoin::bip158::FilterHeader::Output = >::Output pub type bitcoin::bip32::ChainCode::Err = hex_conservative::error::HexToArrayError @@ -9932,18 +9859,15 @@ pub type bitcoin::bip32::Fingerprint::Error = core::array::TryFromSliceError pub type bitcoin::bip32::Fingerprint::Output = <[u8] as core::ops::index::Index>::Output pub type bitcoin::bip32::KeySource = (bitcoin::bip32::Fingerprint, bitcoin::bip32::DerivationPath) pub type bitcoin::bip32::XKeyIdentifier::Bytes = ::Bytes -pub type bitcoin::bip32::XKeyIdentifier::Engine = ::Engine pub type bitcoin::bip32::XKeyIdentifier::Err = hex_conservative::error::HexToArrayError pub type bitcoin::bip32::XKeyIdentifier::Output = >::Output pub type bitcoin::bip32::Xpriv::Err = bitcoin::bip32::Error pub type bitcoin::bip32::Xpriv::Error = bitcoin::psbt::GetKeyError pub type bitcoin::bip32::Xpub::Err = bitcoin::bip32::Error pub type bitcoin::blockdata::block::BlockHash::Bytes = ::Bytes -pub type bitcoin::blockdata::block::BlockHash::Engine = ::Engine pub type bitcoin::blockdata::block::BlockHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::block::BlockHash::Output = >::Output pub type bitcoin::blockdata::block::WitnessCommitment::Bytes = ::Bytes -pub type bitcoin::blockdata::block::WitnessCommitment::Engine = ::Engine pub type bitcoin::blockdata::block::WitnessCommitment::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::block::WitnessCommitment::Output = >::Output pub type bitcoin::blockdata::constants::ChainHash::Err = hex_conservative::error::HexToArrayError @@ -9964,12 +9888,10 @@ pub type bitcoin::blockdata::script::Script::Output = bitcoin::blockdata::script pub type bitcoin::blockdata::script::Script::Owned = bitcoin::blockdata::script::ScriptBuf pub type bitcoin::blockdata::script::ScriptBuf::Target = bitcoin::blockdata::script::Script pub type bitcoin::blockdata::script::ScriptHash::Bytes = ::Bytes -pub type bitcoin::blockdata::script::ScriptHash::Engine = ::Engine pub type bitcoin::blockdata::script::ScriptHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::script::ScriptHash::Error = bitcoin::blockdata::script::RedeemScriptSizeError pub type bitcoin::blockdata::script::ScriptHash::Output = >::Output pub type bitcoin::blockdata::script::WScriptHash::Bytes = ::Bytes -pub type bitcoin::blockdata::script::WScriptHash::Engine = ::Engine pub type bitcoin::blockdata::script::WScriptHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::script::WScriptHash::Error = bitcoin::blockdata::script::WitnessScriptSizeError pub type bitcoin::blockdata::script::WScriptHash::Output = >::Output @@ -9980,11 +9902,9 @@ pub type bitcoin::blockdata::transaction::OutPoint::Err = bitcoin::blockdata::tr pub type bitcoin::blockdata::transaction::Sequence::Err = bitcoin_units::parse::ParseIntError pub type bitcoin::blockdata::transaction::Sequence::Error = bitcoin_units::parse::ParseIntError pub type bitcoin::blockdata::transaction::Txid::Bytes = ::Bytes -pub type bitcoin::blockdata::transaction::Txid::Engine = ::Engine pub type bitcoin::blockdata::transaction::Txid::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::transaction::Txid::Output = >::Output pub type bitcoin::blockdata::transaction::Wtxid::Bytes = ::Bytes -pub type bitcoin::blockdata::transaction::Wtxid::Engine = ::Engine pub type bitcoin::blockdata::transaction::Wtxid::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::transaction::Wtxid::Output = >::Output pub type bitcoin::blockdata::witness::Iter<'a>::Item = &'a [u8] @@ -10001,12 +9921,10 @@ pub type bitcoin::key::UntweakedPublicKey::TweakedAux = (bitcoin::key::TweakedPu pub type bitcoin::key::UntweakedPublicKey::TweakedKey = bitcoin::key::TweakedPublicKey pub type bitcoin::merkle_tree::MerkleNode::Leaf pub type bitcoin::merkle_tree::TxMerkleNode::Bytes = ::Bytes -pub type bitcoin::merkle_tree::TxMerkleNode::Engine = ::Engine pub type bitcoin::merkle_tree::TxMerkleNode::Err = hex_conservative::error::HexToArrayError pub type bitcoin::merkle_tree::TxMerkleNode::Leaf = bitcoin::blockdata::transaction::Txid pub type bitcoin::merkle_tree::TxMerkleNode::Output = >::Output pub type bitcoin::merkle_tree::WitnessMerkleNode::Bytes = ::Bytes -pub type bitcoin::merkle_tree::WitnessMerkleNode::Engine = ::Engine pub type bitcoin::merkle_tree::WitnessMerkleNode::Err = hex_conservative::error::HexToArrayError pub type bitcoin::merkle_tree::WitnessMerkleNode::Leaf = bitcoin::blockdata::transaction::Wtxid pub type bitcoin::merkle_tree::WitnessMerkleNode::Output = >::Output @@ -10031,17 +9949,17 @@ pub type bitcoin::taproot::NodeInfo::Error = bitcoin::taproot::IncompleteBuilder pub type bitcoin::taproot::ScriptLeaves<'tree>::Item = bitcoin::taproot::ScriptLeaf<'tree> pub type bitcoin::taproot::Signature::Error = bitcoin::taproot::SigFromSliceError pub type bitcoin::taproot::TapLeafHash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::taproot::TapLeafHash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::taproot::TapLeafHash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::taproot::TapLeafHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::taproot::TapLeafHash::Output = >::Output pub type bitcoin::taproot::TapNodeHash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::taproot::TapNodeHash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::taproot::TapNodeHash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::taproot::TapNodeHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::taproot::TapNodeHash::Output = >::Output pub type bitcoin::taproot::TapTree::Error = bitcoin::taproot::HiddenNodesError pub type bitcoin::taproot::TapTree::Error = bitcoin::taproot::IncompleteBuilderError pub type bitcoin::taproot::TapTweakHash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::taproot::TapTweakHash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::taproot::TapTweakHash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::taproot::TapTweakHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::taproot::TapTweakHash::Output = >::Output pub type bitcoin::taproot::merkle_branch::IntoIter::Item = bitcoin::taproot::TapNodeHash diff --git a/api/bitcoin/no-features.txt b/api/bitcoin/no-features.txt index 09e04724d..36ffc2e83 100644 --- a/api/bitcoin/no-features.txt +++ b/api/bitcoin/no-features.txt @@ -364,6 +364,10 @@ impl bitcoin::taproot::merkle_branch::IntoIter impl bitcoin::taproot::merkle_branch::TaprootMerkleBranch impl bitcoin::taproot::serialized_signature::IntoIter impl bitcoin::taproot::serialized_signature::SerializedSignature +impl bitcoin_hashes::GeneralHash for bitcoin::TapSighash +impl bitcoin_hashes::GeneralHash for bitcoin::taproot::TapLeafHash +impl bitcoin_hashes::GeneralHash for bitcoin::taproot::TapNodeHash +impl bitcoin_hashes::GeneralHash for bitcoin::taproot::TapTweakHash impl bitcoin_hashes::Hash for bitcoin::LegacySighash impl bitcoin_hashes::Hash for bitcoin::PubkeyHash impl bitcoin_hashes::Hash for bitcoin::SegwitV0Sighash @@ -6076,18 +6080,13 @@ pub fn bitcoin::LegacySighash::as_ref(&self) -> &[u8] pub fn bitcoin::LegacySighash::borrow(&self) -> &[u8] pub fn bitcoin::LegacySighash::clone(&self) -> bitcoin::LegacySighash pub fn bitcoin::LegacySighash::cmp(&self, other: &bitcoin::LegacySighash) -> core::cmp::Ordering -pub fn bitcoin::LegacySighash::engine() -> ::Engine pub fn bitcoin::LegacySighash::eq(&self, other: &bitcoin::LegacySighash) -> bool pub fn bitcoin::LegacySighash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::LegacySighash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::LegacySighash pub fn bitcoin::LegacySighash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::LegacySighash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::LegacySighash::from_engine(e: ::Engine) -> bitcoin::LegacySighash pub fn bitcoin::LegacySighash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::LegacySighash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::LegacySighash::hash(data: &[u8]) -> Self pub fn bitcoin::LegacySighash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::LegacySighash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::LegacySighash::index(&self, index: I) -> &Self::Output pub fn bitcoin::LegacySighash::partial_cmp(&self, other: &bitcoin::LegacySighash) -> core::option::Option pub fn bitcoin::LegacySighash::to_byte_array(self) -> Self::Bytes @@ -6119,7 +6118,6 @@ pub fn bitcoin::PubkeyHash::as_ref(&self) -> &bitcoin::blockdata::script::PushBy pub fn bitcoin::PubkeyHash::borrow(&self) -> &[u8] pub fn bitcoin::PubkeyHash::clone(&self) -> bitcoin::PubkeyHash pub fn bitcoin::PubkeyHash::cmp(&self, other: &bitcoin::PubkeyHash) -> core::cmp::Ordering -pub fn bitcoin::PubkeyHash::engine() -> ::Engine pub fn bitcoin::PubkeyHash::eq(&self, other: &bitcoin::PubkeyHash) -> bool pub fn bitcoin::PubkeyHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::PubkeyHash::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::PubkeyHash @@ -6128,13 +6126,9 @@ pub fn bitcoin::PubkeyHash::from(key: &bitcoin::PublicKey) -> bitcoin::PubkeyHas pub fn bitcoin::PubkeyHash::from(key: bitcoin::CompressedPublicKey) -> Self pub fn bitcoin::PubkeyHash::from(key: bitcoin::PublicKey) -> bitcoin::PubkeyHash pub fn bitcoin::PubkeyHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::PubkeyHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::PubkeyHash::from_engine(e: ::Engine) -> bitcoin::PubkeyHash pub fn bitcoin::PubkeyHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::PubkeyHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::PubkeyHash::hash(data: &[u8]) -> Self pub fn bitcoin::PubkeyHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::PubkeyHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::PubkeyHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::PubkeyHash::partial_cmp(&self, other: &bitcoin::PubkeyHash) -> core::option::Option pub fn bitcoin::PubkeyHash::to_byte_array(self) -> Self::Bytes @@ -6165,18 +6159,13 @@ pub fn bitcoin::SegwitV0Sighash::as_ref(&self) -> &[u8] pub fn bitcoin::SegwitV0Sighash::borrow(&self) -> &[u8] pub fn bitcoin::SegwitV0Sighash::clone(&self) -> bitcoin::SegwitV0Sighash pub fn bitcoin::SegwitV0Sighash::cmp(&self, other: &bitcoin::SegwitV0Sighash) -> core::cmp::Ordering -pub fn bitcoin::SegwitV0Sighash::engine() -> ::Engine pub fn bitcoin::SegwitV0Sighash::eq(&self, other: &bitcoin::SegwitV0Sighash) -> bool pub fn bitcoin::SegwitV0Sighash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::SegwitV0Sighash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::SegwitV0Sighash pub fn bitcoin::SegwitV0Sighash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::SegwitV0Sighash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::SegwitV0Sighash::from_engine(e: ::Engine) -> bitcoin::SegwitV0Sighash pub fn bitcoin::SegwitV0Sighash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::SegwitV0Sighash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::SegwitV0Sighash::hash(data: &[u8]) -> Self pub fn bitcoin::SegwitV0Sighash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::SegwitV0Sighash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::SegwitV0Sighash::index(&self, index: I) -> &Self::Output pub fn bitcoin::SegwitV0Sighash::partial_cmp(&self, other: &bitcoin::SegwitV0Sighash) -> core::option::Option pub fn bitcoin::SegwitV0Sighash::to_byte_array(self) -> Self::Bytes @@ -6186,13 +6175,14 @@ pub fn bitcoin::TapSighash::as_ref(&self) -> &[u8] pub fn bitcoin::TapSighash::borrow(&self) -> &[u8] pub fn bitcoin::TapSighash::clone(&self) -> bitcoin::TapSighash pub fn bitcoin::TapSighash::cmp(&self, other: &bitcoin::TapSighash) -> core::cmp::Ordering -pub fn bitcoin::TapSighash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::TapSighash::engine() -> ::Engine +pub fn bitcoin::TapSighash::engine() -> Self::Engine pub fn bitcoin::TapSighash::eq(&self, other: &bitcoin::TapSighash) -> bool pub fn bitcoin::TapSighash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::TapSighash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::TapSighash pub fn bitcoin::TapSighash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::TapSighash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::TapSighash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::TapSighash +pub fn bitcoin::TapSighash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::TapSighash::from_engine(e: Self::Engine) -> bitcoin::TapSighash pub fn bitcoin::TapSighash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::TapSighash::from_str(s: &str) -> core::result::Result pub fn bitcoin::TapSighash::hash(data: &[u8]) -> Self @@ -6224,20 +6214,15 @@ pub fn bitcoin::WPubkeyHash::as_ref(&self) -> &bitcoin::blockdata::script::PushB pub fn bitcoin::WPubkeyHash::borrow(&self) -> &[u8] pub fn bitcoin::WPubkeyHash::clone(&self) -> bitcoin::WPubkeyHash pub fn bitcoin::WPubkeyHash::cmp(&self, other: &bitcoin::WPubkeyHash) -> core::cmp::Ordering -pub fn bitcoin::WPubkeyHash::engine() -> ::Engine pub fn bitcoin::WPubkeyHash::eq(&self, other: &bitcoin::WPubkeyHash) -> bool pub fn bitcoin::WPubkeyHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::WPubkeyHash::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::WPubkeyHash pub fn bitcoin::WPubkeyHash::from(key: &bitcoin::CompressedPublicKey) -> Self pub fn bitcoin::WPubkeyHash::from(key: bitcoin::CompressedPublicKey) -> Self pub fn bitcoin::WPubkeyHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::WPubkeyHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::WPubkeyHash::from_engine(e: ::Engine) -> bitcoin::WPubkeyHash pub fn bitcoin::WPubkeyHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::WPubkeyHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::WPubkeyHash::hash(data: &[u8]) -> Self pub fn bitcoin::WPubkeyHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::WPubkeyHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::WPubkeyHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::WPubkeyHash::partial_cmp(&self, other: &bitcoin::WPubkeyHash) -> core::option::Option pub fn bitcoin::WPubkeyHash::to_byte_array(self) -> Self::Bytes @@ -6459,19 +6444,14 @@ pub fn bitcoin::bip158::FilterHash::clone(&self) -> bitcoin::bip158::FilterHash pub fn bitcoin::bip158::FilterHash::cmp(&self, other: &bitcoin::bip158::FilterHash) -> core::cmp::Ordering pub fn bitcoin::bip158::FilterHash::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::bip158::FilterHash::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::bip158::FilterHash::engine() -> ::Engine pub fn bitcoin::bip158::FilterHash::eq(&self, other: &bitcoin::bip158::FilterHash) -> bool pub fn bitcoin::bip158::FilterHash::filter_header(&self, previous_filter_header: bitcoin::bip158::FilterHeader) -> bitcoin::bip158::FilterHeader pub fn bitcoin::bip158::FilterHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::bip158::FilterHash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::bip158::FilterHash pub fn bitcoin::bip158::FilterHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::bip158::FilterHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::bip158::FilterHash::from_engine(e: ::Engine) -> bitcoin::bip158::FilterHash pub fn bitcoin::bip158::FilterHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip158::FilterHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::bip158::FilterHash::hash(data: &[u8]) -> Self pub fn bitcoin::bip158::FilterHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::bip158::FilterHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::bip158::FilterHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::bip158::FilterHash::partial_cmp(&self, other: &bitcoin::bip158::FilterHash) -> core::option::Option pub fn bitcoin::bip158::FilterHash::to_byte_array(self) -> Self::Bytes @@ -6483,18 +6463,13 @@ pub fn bitcoin::bip158::FilterHeader::clone(&self) -> bitcoin::bip158::FilterHea pub fn bitcoin::bip158::FilterHeader::cmp(&self, other: &bitcoin::bip158::FilterHeader) -> core::cmp::Ordering pub fn bitcoin::bip158::FilterHeader::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::bip158::FilterHeader::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::bip158::FilterHeader::engine() -> ::Engine pub fn bitcoin::bip158::FilterHeader::eq(&self, other: &bitcoin::bip158::FilterHeader) -> bool pub fn bitcoin::bip158::FilterHeader::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::bip158::FilterHeader::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::bip158::FilterHeader pub fn bitcoin::bip158::FilterHeader::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::bip158::FilterHeader::from_engine(e: ::Engine) -> Self -pub fn bitcoin::bip158::FilterHeader::from_engine(e: ::Engine) -> bitcoin::bip158::FilterHeader pub fn bitcoin::bip158::FilterHeader::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip158::FilterHeader::from_str(s: &str) -> core::result::Result -pub fn bitcoin::bip158::FilterHeader::hash(data: &[u8]) -> Self pub fn bitcoin::bip158::FilterHeader::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::bip158::FilterHeader::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::bip158::FilterHeader::index(&self, index: I) -> &Self::Output pub fn bitcoin::bip158::FilterHeader::partial_cmp(&self, other: &bitcoin::bip158::FilterHeader) -> core::option::Option pub fn bitcoin::bip158::FilterHeader::to_byte_array(self) -> Self::Bytes @@ -6619,20 +6594,15 @@ pub fn bitcoin::bip32::XKeyIdentifier::as_ref(&self) -> &[u8] pub fn bitcoin::bip32::XKeyIdentifier::borrow(&self) -> &[u8] pub fn bitcoin::bip32::XKeyIdentifier::clone(&self) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::cmp(&self, other: &bitcoin::bip32::XKeyIdentifier) -> core::cmp::Ordering -pub fn bitcoin::bip32::XKeyIdentifier::engine() -> ::Engine pub fn bitcoin::bip32::XKeyIdentifier::eq(&self, other: &bitcoin::bip32::XKeyIdentifier) -> bool pub fn bitcoin::bip32::XKeyIdentifier::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::bip32::XKeyIdentifier::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from(key: &bitcoin::bip32::Xpub) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from(key: bitcoin::bip32::Xpub) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::bip32::XKeyIdentifier::from_engine(e: ::Engine) -> Self -pub fn bitcoin::bip32::XKeyIdentifier::from_engine(e: ::Engine) -> bitcoin::bip32::XKeyIdentifier pub fn bitcoin::bip32::XKeyIdentifier::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::bip32::XKeyIdentifier::from_str(s: &str) -> core::result::Result -pub fn bitcoin::bip32::XKeyIdentifier::hash(data: &[u8]) -> Self pub fn bitcoin::bip32::XKeyIdentifier::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::bip32::XKeyIdentifier::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::bip32::XKeyIdentifier::index(&self, index: I) -> &Self::Output pub fn bitcoin::bip32::XKeyIdentifier::partial_cmp(&self, other: &bitcoin::bip32::XKeyIdentifier) -> core::option::Option pub fn bitcoin::bip32::XKeyIdentifier::to_byte_array(self) -> Self::Bytes @@ -6697,7 +6667,6 @@ pub fn bitcoin::blockdata::block::BlockHash::clone(&self) -> bitcoin::blockdata: pub fn bitcoin::blockdata::block::BlockHash::cmp(&self, other: &bitcoin::blockdata::block::BlockHash) -> core::cmp::Ordering pub fn bitcoin::blockdata::block::BlockHash::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::blockdata::block::BlockHash::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::blockdata::block::BlockHash::engine() -> ::Engine pub fn bitcoin::blockdata::block::BlockHash::eq(&self, other: &bitcoin::blockdata::block::BlockHash) -> bool pub fn bitcoin::blockdata::block::BlockHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::block::BlockHash::from(block: &bitcoin::blockdata::block::Block) -> bitcoin::blockdata::block::BlockHash @@ -6706,13 +6675,9 @@ pub fn bitcoin::blockdata::block::BlockHash::from(header: &bitcoin::blockdata::b pub fn bitcoin::blockdata::block::BlockHash::from(header: bitcoin::blockdata::block::Header) -> bitcoin::blockdata::block::BlockHash pub fn bitcoin::blockdata::block::BlockHash::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::block::BlockHash pub fn bitcoin::blockdata::block::BlockHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::block::BlockHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::block::BlockHash::from_engine(e: ::Engine) -> bitcoin::blockdata::block::BlockHash pub fn bitcoin::blockdata::block::BlockHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::block::BlockHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::block::BlockHash::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::block::BlockHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::block::BlockHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::block::BlockHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::block::BlockHash::partial_cmp(&self, other: &bitcoin::blockdata::block::BlockHash) -> core::option::Option pub fn bitcoin::blockdata::block::BlockHash::to_byte_array(self) -> Self::Bytes @@ -6752,18 +6717,13 @@ pub fn bitcoin::blockdata::block::WitnessCommitment::as_ref(&self) -> &[u8] pub fn bitcoin::blockdata::block::WitnessCommitment::borrow(&self) -> &[u8] pub fn bitcoin::blockdata::block::WitnessCommitment::clone(&self) -> bitcoin::blockdata::block::WitnessCommitment pub fn bitcoin::blockdata::block::WitnessCommitment::cmp(&self, other: &bitcoin::blockdata::block::WitnessCommitment) -> core::cmp::Ordering -pub fn bitcoin::blockdata::block::WitnessCommitment::engine() -> ::Engine pub fn bitcoin::blockdata::block::WitnessCommitment::eq(&self, other: &bitcoin::blockdata::block::WitnessCommitment) -> bool pub fn bitcoin::blockdata::block::WitnessCommitment::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::block::WitnessCommitment::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::block::WitnessCommitment pub fn bitcoin::blockdata::block::WitnessCommitment::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::block::WitnessCommitment::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::block::WitnessCommitment::from_engine(e: ::Engine) -> bitcoin::blockdata::block::WitnessCommitment pub fn bitcoin::blockdata::block::WitnessCommitment::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::block::WitnessCommitment::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::block::WitnessCommitment::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::block::WitnessCommitment::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::block::WitnessCommitment::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::block::WitnessCommitment::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::block::WitnessCommitment::partial_cmp(&self, other: &bitcoin::blockdata::block::WitnessCommitment) -> core::option::Option pub fn bitcoin::blockdata::block::WitnessCommitment::to_byte_array(self) -> Self::Bytes @@ -7239,20 +7199,15 @@ pub fn bitcoin::blockdata::script::ScriptHash::as_ref(&self) -> &bitcoin::blockd pub fn bitcoin::blockdata::script::ScriptHash::borrow(&self) -> &[u8] pub fn bitcoin::blockdata::script::ScriptHash::clone(&self) -> bitcoin::blockdata::script::ScriptHash pub fn bitcoin::blockdata::script::ScriptHash::cmp(&self, other: &bitcoin::blockdata::script::ScriptHash) -> core::cmp::Ordering -pub fn bitcoin::blockdata::script::ScriptHash::engine() -> ::Engine pub fn bitcoin::blockdata::script::ScriptHash::eq(&self, other: &bitcoin::blockdata::script::ScriptHash) -> bool pub fn bitcoin::blockdata::script::ScriptHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::script::ScriptHash::from(inner: bitcoin_hashes::hash160::Hash) -> bitcoin::blockdata::script::ScriptHash pub fn bitcoin::blockdata::script::ScriptHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::script::ScriptHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::script::ScriptHash::from_engine(e: ::Engine) -> bitcoin::blockdata::script::ScriptHash pub fn bitcoin::blockdata::script::ScriptHash::from_script(redeem_script: &bitcoin::blockdata::script::Script) -> core::result::Result pub fn bitcoin::blockdata::script::ScriptHash::from_script_unchecked(script: &bitcoin::blockdata::script::Script) -> Self pub fn bitcoin::blockdata::script::ScriptHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::script::ScriptHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::script::ScriptHash::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::script::ScriptHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::script::ScriptHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::script::ScriptHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::script::ScriptHash::partial_cmp(&self, other: &bitcoin::blockdata::script::ScriptHash) -> core::option::Option pub fn bitcoin::blockdata::script::ScriptHash::to_byte_array(self) -> Self::Bytes @@ -7266,20 +7221,15 @@ pub fn bitcoin::blockdata::script::WScriptHash::as_ref(&self) -> &bitcoin::block pub fn bitcoin::blockdata::script::WScriptHash::borrow(&self) -> &[u8] pub fn bitcoin::blockdata::script::WScriptHash::clone(&self) -> bitcoin::blockdata::script::WScriptHash pub fn bitcoin::blockdata::script::WScriptHash::cmp(&self, other: &bitcoin::blockdata::script::WScriptHash) -> core::cmp::Ordering -pub fn bitcoin::blockdata::script::WScriptHash::engine() -> ::Engine pub fn bitcoin::blockdata::script::WScriptHash::eq(&self, other: &bitcoin::blockdata::script::WScriptHash) -> bool pub fn bitcoin::blockdata::script::WScriptHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::script::WScriptHash::from(inner: bitcoin_hashes::sha256::Hash) -> bitcoin::blockdata::script::WScriptHash pub fn bitcoin::blockdata::script::WScriptHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::script::WScriptHash::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::script::WScriptHash::from_engine(e: ::Engine) -> bitcoin::blockdata::script::WScriptHash pub fn bitcoin::blockdata::script::WScriptHash::from_script(witness_script: &bitcoin::blockdata::script::Script) -> core::result::Result pub fn bitcoin::blockdata::script::WScriptHash::from_script_unchecked(script: &bitcoin::blockdata::script::Script) -> Self pub fn bitcoin::blockdata::script::WScriptHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::script::WScriptHash::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::script::WScriptHash::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::script::WScriptHash::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::script::WScriptHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::script::WScriptHash::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::script::WScriptHash::partial_cmp(&self, other: &bitcoin::blockdata::script::WScriptHash) -> core::option::Option pub fn bitcoin::blockdata::script::WScriptHash::to_byte_array(self) -> Self::Bytes @@ -7460,20 +7410,15 @@ pub fn bitcoin::blockdata::transaction::Txid::clone(&self) -> bitcoin::blockdata pub fn bitcoin::blockdata::transaction::Txid::cmp(&self, other: &bitcoin::blockdata::transaction::Txid) -> core::cmp::Ordering pub fn bitcoin::blockdata::transaction::Txid::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::blockdata::transaction::Txid::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::blockdata::transaction::Txid::engine() -> ::Engine pub fn bitcoin::blockdata::transaction::Txid::eq(&self, other: &bitcoin::blockdata::transaction::Txid) -> bool pub fn bitcoin::blockdata::transaction::Txid::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::transaction::Txid::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from(tx: &bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from(tx: bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::transaction::Txid::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::transaction::Txid::from_engine(e: ::Engine) -> bitcoin::blockdata::transaction::Txid pub fn bitcoin::blockdata::transaction::Txid::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::transaction::Txid::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::transaction::Txid::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::transaction::Txid::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::transaction::Txid::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::transaction::Txid::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::transaction::Txid::partial_cmp(&self, other: &bitcoin::blockdata::transaction::Txid) -> core::option::Option pub fn bitcoin::blockdata::transaction::Txid::to_byte_array(self) -> Self::Bytes @@ -7496,20 +7441,15 @@ pub fn bitcoin::blockdata::transaction::Wtxid::clone(&self) -> bitcoin::blockdat pub fn bitcoin::blockdata::transaction::Wtxid::cmp(&self, other: &bitcoin::blockdata::transaction::Wtxid) -> core::cmp::Ordering pub fn bitcoin::blockdata::transaction::Wtxid::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::blockdata::transaction::Wtxid::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::blockdata::transaction::Wtxid::engine() -> ::Engine pub fn bitcoin::blockdata::transaction::Wtxid::eq(&self, other: &bitcoin::blockdata::transaction::Wtxid) -> bool pub fn bitcoin::blockdata::transaction::Wtxid::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::blockdata::transaction::Wtxid::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from(tx: &bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from(tx: bitcoin::blockdata::transaction::Transaction) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::blockdata::transaction::Wtxid::from_engine(e: ::Engine) -> Self -pub fn bitcoin::blockdata::transaction::Wtxid::from_engine(e: ::Engine) -> bitcoin::blockdata::transaction::Wtxid pub fn bitcoin::blockdata::transaction::Wtxid::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::blockdata::transaction::Wtxid::from_str(s: &str) -> core::result::Result -pub fn bitcoin::blockdata::transaction::Wtxid::hash(data: &[u8]) -> Self pub fn bitcoin::blockdata::transaction::Wtxid::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::blockdata::transaction::Wtxid::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::blockdata::transaction::Wtxid::index(&self, index: I) -> &Self::Output pub fn bitcoin::blockdata::transaction::Wtxid::partial_cmp(&self, other: &bitcoin::blockdata::transaction::Wtxid) -> core::option::Option pub fn bitcoin::blockdata::transaction::Wtxid::to_byte_array(self) -> Self::Bytes @@ -7760,19 +7700,14 @@ pub fn bitcoin::merkle_tree::TxMerkleNode::cmp(&self, other: &bitcoin::merkle_tr pub fn bitcoin::merkle_tree::TxMerkleNode::combine(&self, other: &Self) -> Self pub fn bitcoin::merkle_tree::TxMerkleNode::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::merkle_tree::TxMerkleNode::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::merkle_tree::TxMerkleNode::engine() -> ::Engine pub fn bitcoin::merkle_tree::TxMerkleNode::eq(&self, other: &bitcoin::merkle_tree::TxMerkleNode) -> bool pub fn bitcoin::merkle_tree::TxMerkleNode::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::merkle_tree::TxMerkleNode::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::merkle_tree::TxMerkleNode pub fn bitcoin::merkle_tree::TxMerkleNode::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::merkle_tree::TxMerkleNode::from_engine(e: ::Engine) -> Self -pub fn bitcoin::merkle_tree::TxMerkleNode::from_engine(e: ::Engine) -> bitcoin::merkle_tree::TxMerkleNode pub fn bitcoin::merkle_tree::TxMerkleNode::from_leaf(leaf: Self::Leaf) -> Self pub fn bitcoin::merkle_tree::TxMerkleNode::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::merkle_tree::TxMerkleNode::from_str(s: &str) -> core::result::Result -pub fn bitcoin::merkle_tree::TxMerkleNode::hash(data: &[u8]) -> Self pub fn bitcoin::merkle_tree::TxMerkleNode::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::merkle_tree::TxMerkleNode::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::merkle_tree::TxMerkleNode::index(&self, index: I) -> &Self::Output pub fn bitcoin::merkle_tree::TxMerkleNode::partial_cmp(&self, other: &bitcoin::merkle_tree::TxMerkleNode) -> core::option::Option pub fn bitcoin::merkle_tree::TxMerkleNode::to_byte_array(self) -> Self::Bytes @@ -7785,19 +7720,14 @@ pub fn bitcoin::merkle_tree::WitnessMerkleNode::cmp(&self, other: &bitcoin::merk pub fn bitcoin::merkle_tree::WitnessMerkleNode::combine(&self, other: &Self) -> Self pub fn bitcoin::merkle_tree::WitnessMerkleNode::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::merkle_tree::WitnessMerkleNode::engine() -> ::Engine pub fn bitcoin::merkle_tree::WitnessMerkleNode::eq(&self, other: &bitcoin::merkle_tree::WitnessMerkleNode) -> bool pub fn bitcoin::merkle_tree::WitnessMerkleNode::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::from(inner: bitcoin_hashes::sha256d::Hash) -> bitcoin::merkle_tree::WitnessMerkleNode pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_engine(e: ::Engine) -> Self -pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_engine(e: ::Engine) -> bitcoin::merkle_tree::WitnessMerkleNode pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_leaf(leaf: Self::Leaf) -> Self pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::merkle_tree::WitnessMerkleNode::from_str(s: &str) -> core::result::Result -pub fn bitcoin::merkle_tree::WitnessMerkleNode::hash(data: &[u8]) -> Self pub fn bitcoin::merkle_tree::WitnessMerkleNode::hash<__H: core::hash::Hasher>(&self, state: &mut __H) -pub fn bitcoin::merkle_tree::WitnessMerkleNode::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin::merkle_tree::WitnessMerkleNode::index(&self, index: I) -> &Self::Output pub fn bitcoin::merkle_tree::WitnessMerkleNode::partial_cmp(&self, other: &bitcoin::merkle_tree::WitnessMerkleNode) -> core::option::Option pub fn bitcoin::merkle_tree::WitnessMerkleNode::to_byte_array(self) -> Self::Bytes @@ -8250,14 +8180,15 @@ pub fn bitcoin::taproot::TapLeafHash::clone(&self) -> bitcoin::taproot::TapLeafH pub fn bitcoin::taproot::TapLeafHash::cmp(&self, other: &bitcoin::taproot::TapLeafHash) -> core::cmp::Ordering pub fn bitcoin::taproot::TapLeafHash::consensus_decode(r: &mut R) -> core::result::Result pub fn bitcoin::taproot::TapLeafHash::consensus_encode(&self, w: &mut W) -> core::result::Result -pub fn bitcoin::taproot::TapLeafHash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::taproot::TapLeafHash::engine() -> ::Engine +pub fn bitcoin::taproot::TapLeafHash::engine() -> Self::Engine pub fn bitcoin::taproot::TapLeafHash::eq(&self, other: &bitcoin::taproot::TapLeafHash) -> bool pub fn bitcoin::taproot::TapLeafHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::taproot::TapLeafHash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from(script_path: bitcoin::sighash::ScriptPath<'s>) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::taproot::TapLeafHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::taproot::TapLeafHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::taproot::TapLeafHash +pub fn bitcoin::taproot::TapLeafHash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::taproot::TapLeafHash::from_engine(e: Self::Engine) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from_script(script: &bitcoin::blockdata::script::Script, ver: bitcoin::taproot::LeafVersion) -> bitcoin::taproot::TapLeafHash pub fn bitcoin::taproot::TapLeafHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::taproot::TapLeafHash::from_str(s: &str) -> core::result::Result @@ -8281,7 +8212,8 @@ pub fn bitcoin::taproot::TapNodeHash::assume_hidden(hash: [u8; 32]) -> bitcoin:: pub fn bitcoin::taproot::TapNodeHash::borrow(&self) -> &[u8] pub fn bitcoin::taproot::TapNodeHash::clone(&self) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::cmp(&self, other: &bitcoin::taproot::TapNodeHash) -> core::cmp::Ordering -pub fn bitcoin::taproot::TapNodeHash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::taproot::TapNodeHash::engine() -> ::Engine +pub fn bitcoin::taproot::TapNodeHash::engine() -> Self::Engine pub fn bitcoin::taproot::TapNodeHash::eq(&self, other: &bitcoin::taproot::TapNodeHash) -> bool pub fn bitcoin::taproot::TapNodeHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::taproot::TapNodeHash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::taproot::TapNodeHash @@ -8289,8 +8221,8 @@ pub fn bitcoin::taproot::TapNodeHash::from(leaf: &bitcoin::taproot::LeafNode) -> pub fn bitcoin::taproot::TapNodeHash::from(leaf: bitcoin::taproot::LeafNode) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from(leaf: bitcoin::taproot::TapLeafHash) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::taproot::TapNodeHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::taproot::TapNodeHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::taproot::TapNodeHash +pub fn bitcoin::taproot::TapNodeHash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::taproot::TapNodeHash::from_engine(e: Self::Engine) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_node_hashes(a: bitcoin::taproot::TapNodeHash, b: bitcoin::taproot::TapNodeHash) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_script(script: &bitcoin::blockdata::script::Script, ver: bitcoin::taproot::LeafVersion) -> bitcoin::taproot::TapNodeHash pub fn bitcoin::taproot::TapNodeHash::from_slice(sl: &[u8]) -> core::result::Result @@ -8317,15 +8249,16 @@ pub fn bitcoin::taproot::TapTweakHash::as_ref(&self) -> &[u8] pub fn bitcoin::taproot::TapTweakHash::borrow(&self) -> &[u8] pub fn bitcoin::taproot::TapTweakHash::clone(&self) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::cmp(&self, other: &bitcoin::taproot::TapTweakHash) -> core::cmp::Ordering -pub fn bitcoin::taproot::TapTweakHash::engine() -> as bitcoin_hashes::Hash>::Engine +pub fn bitcoin::taproot::TapTweakHash::engine() -> ::Engine +pub fn bitcoin::taproot::TapTweakHash::engine() -> Self::Engine pub fn bitcoin::taproot::TapTweakHash::eq(&self, other: &bitcoin::taproot::TapTweakHash) -> bool pub fn bitcoin::taproot::TapTweakHash::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin::taproot::TapTweakHash::from(inner: bitcoin_hashes::sha256t::Hash) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from(spend_info: &bitcoin::taproot::TaprootSpendInfo) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from(spend_info: bitcoin::taproot::TaprootSpendInfo) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin::taproot::TapTweakHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> Self -pub fn bitcoin::taproot::TapTweakHash::from_engine(e: as bitcoin_hashes::Hash>::Engine) -> bitcoin::taproot::TapTweakHash +pub fn bitcoin::taproot::TapTweakHash::from_engine(e: ::Engine) -> Self +pub fn bitcoin::taproot::TapTweakHash::from_engine(e: Self::Engine) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from_key_and_tweak(internal_key: bitcoin::key::UntweakedPublicKey, merkle_root: core::option::Option) -> bitcoin::taproot::TapTweakHash pub fn bitcoin::taproot::TapTweakHash::from_slice(sl: &[u8]) -> core::result::Result pub fn bitcoin::taproot::TapTweakHash::from_str(s: &str) -> core::result::Result @@ -8960,27 +8893,23 @@ pub type bitcoin::CompressedPublicKey::Err = bitcoin::key::ParseCompressedPublic pub type bitcoin::CompressedPublicKey::Error = bitcoin::key::UncompressedPublicKeyError pub type bitcoin::EcdsaSighashType::Err = bitcoin::sighash::SighashTypeParseError pub type bitcoin::LegacySighash::Bytes = ::Bytes -pub type bitcoin::LegacySighash::Engine = ::Engine pub type bitcoin::LegacySighash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::LegacySighash::Output = >::Output pub type bitcoin::PrivateKey::Err = bitcoin::key::FromWifError pub type bitcoin::PrivateKey::Output = [u8] pub type bitcoin::PubkeyHash::Bytes = ::Bytes -pub type bitcoin::PubkeyHash::Engine = ::Engine pub type bitcoin::PubkeyHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::PubkeyHash::Output = >::Output pub type bitcoin::PublicKey::Err = bitcoin::key::ParsePublicKeyError pub type bitcoin::SegwitV0Sighash::Bytes = ::Bytes -pub type bitcoin::SegwitV0Sighash::Engine = ::Engine pub type bitcoin::SegwitV0Sighash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::SegwitV0Sighash::Output = >::Output pub type bitcoin::TapSighash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::TapSighash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::TapSighash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::TapSighash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::TapSighash::Output = >::Output pub type bitcoin::TapSighashType::Err = bitcoin::sighash::SighashTypeParseError pub type bitcoin::WPubkeyHash::Bytes = ::Bytes -pub type bitcoin::WPubkeyHash::Engine = ::Engine pub type bitcoin::WPubkeyHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::WPubkeyHash::Output = >::Output pub type bitcoin::address::Address::Err = bitcoin::address::error::ParseError @@ -8989,11 +8918,9 @@ pub type bitcoin::bip152::ShortId::Err = hex_conservative::error::HexToArrayErro pub type bitcoin::bip152::ShortId::Error = core::array::TryFromSliceError pub type bitcoin::bip152::ShortId::Output = <[u8] as core::ops::index::Index>::Output pub type bitcoin::bip158::FilterHash::Bytes = ::Bytes -pub type bitcoin::bip158::FilterHash::Engine = ::Engine pub type bitcoin::bip158::FilterHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::bip158::FilterHash::Output = >::Output pub type bitcoin::bip158::FilterHeader::Bytes = ::Bytes -pub type bitcoin::bip158::FilterHeader::Engine = ::Engine pub type bitcoin::bip158::FilterHeader::Err = hex_conservative::error::HexToArrayError pub type bitcoin::bip158::FilterHeader::Output = >::Output pub type bitcoin::bip32::ChainCode::Err = hex_conservative::error::HexToArrayError @@ -9010,18 +8937,15 @@ pub type bitcoin::bip32::Fingerprint::Error = core::array::TryFromSliceError pub type bitcoin::bip32::Fingerprint::Output = <[u8] as core::ops::index::Index>::Output pub type bitcoin::bip32::KeySource = (bitcoin::bip32::Fingerprint, bitcoin::bip32::DerivationPath) pub type bitcoin::bip32::XKeyIdentifier::Bytes = ::Bytes -pub type bitcoin::bip32::XKeyIdentifier::Engine = ::Engine pub type bitcoin::bip32::XKeyIdentifier::Err = hex_conservative::error::HexToArrayError pub type bitcoin::bip32::XKeyIdentifier::Output = >::Output pub type bitcoin::bip32::Xpriv::Err = bitcoin::bip32::Error pub type bitcoin::bip32::Xpriv::Error = bitcoin::psbt::GetKeyError pub type bitcoin::bip32::Xpub::Err = bitcoin::bip32::Error pub type bitcoin::blockdata::block::BlockHash::Bytes = ::Bytes -pub type bitcoin::blockdata::block::BlockHash::Engine = ::Engine pub type bitcoin::blockdata::block::BlockHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::block::BlockHash::Output = >::Output pub type bitcoin::blockdata::block::WitnessCommitment::Bytes = ::Bytes -pub type bitcoin::blockdata::block::WitnessCommitment::Engine = ::Engine pub type bitcoin::blockdata::block::WitnessCommitment::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::block::WitnessCommitment::Output = >::Output pub type bitcoin::blockdata::constants::ChainHash::Err = hex_conservative::error::HexToArrayError @@ -9041,12 +8965,10 @@ pub type bitcoin::blockdata::script::Script::Output = bitcoin::blockdata::script pub type bitcoin::blockdata::script::Script::Owned = bitcoin::blockdata::script::ScriptBuf pub type bitcoin::blockdata::script::ScriptBuf::Target = bitcoin::blockdata::script::Script pub type bitcoin::blockdata::script::ScriptHash::Bytes = ::Bytes -pub type bitcoin::blockdata::script::ScriptHash::Engine = ::Engine pub type bitcoin::blockdata::script::ScriptHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::script::ScriptHash::Error = bitcoin::blockdata::script::RedeemScriptSizeError pub type bitcoin::blockdata::script::ScriptHash::Output = >::Output pub type bitcoin::blockdata::script::WScriptHash::Bytes = ::Bytes -pub type bitcoin::blockdata::script::WScriptHash::Engine = ::Engine pub type bitcoin::blockdata::script::WScriptHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::script::WScriptHash::Error = bitcoin::blockdata::script::WitnessScriptSizeError pub type bitcoin::blockdata::script::WScriptHash::Output = >::Output @@ -9056,11 +8978,9 @@ pub type bitcoin::blockdata::script::witness_version::WitnessVersion::Error = bi pub type bitcoin::blockdata::transaction::OutPoint::Err = bitcoin::blockdata::transaction::ParseOutPointError pub type bitcoin::blockdata::transaction::Sequence::Err = bitcoin_units::parse::ParseIntError pub type bitcoin::blockdata::transaction::Txid::Bytes = ::Bytes -pub type bitcoin::blockdata::transaction::Txid::Engine = ::Engine pub type bitcoin::blockdata::transaction::Txid::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::transaction::Txid::Output = >::Output pub type bitcoin::blockdata::transaction::Wtxid::Bytes = ::Bytes -pub type bitcoin::blockdata::transaction::Wtxid::Engine = ::Engine pub type bitcoin::blockdata::transaction::Wtxid::Err = hex_conservative::error::HexToArrayError pub type bitcoin::blockdata::transaction::Wtxid::Output = >::Output pub type bitcoin::blockdata::witness::Iter<'a>::Item = &'a [u8] @@ -9077,12 +8997,10 @@ pub type bitcoin::key::UntweakedPublicKey::TweakedAux = (bitcoin::key::TweakedPu pub type bitcoin::key::UntweakedPublicKey::TweakedKey = bitcoin::key::TweakedPublicKey pub type bitcoin::merkle_tree::MerkleNode::Leaf pub type bitcoin::merkle_tree::TxMerkleNode::Bytes = ::Bytes -pub type bitcoin::merkle_tree::TxMerkleNode::Engine = ::Engine pub type bitcoin::merkle_tree::TxMerkleNode::Err = hex_conservative::error::HexToArrayError pub type bitcoin::merkle_tree::TxMerkleNode::Leaf = bitcoin::blockdata::transaction::Txid pub type bitcoin::merkle_tree::TxMerkleNode::Output = >::Output pub type bitcoin::merkle_tree::WitnessMerkleNode::Bytes = ::Bytes -pub type bitcoin::merkle_tree::WitnessMerkleNode::Engine = ::Engine pub type bitcoin::merkle_tree::WitnessMerkleNode::Err = hex_conservative::error::HexToArrayError pub type bitcoin::merkle_tree::WitnessMerkleNode::Leaf = bitcoin::blockdata::transaction::Wtxid pub type bitcoin::merkle_tree::WitnessMerkleNode::Output = >::Output @@ -9103,17 +9021,17 @@ pub type bitcoin::taproot::NodeInfo::Error = bitcoin::taproot::IncompleteBuilder pub type bitcoin::taproot::ScriptLeaves<'tree>::Item = bitcoin::taproot::ScriptLeaf<'tree> pub type bitcoin::taproot::Signature::Error = bitcoin::taproot::SigFromSliceError pub type bitcoin::taproot::TapLeafHash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::taproot::TapLeafHash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::taproot::TapLeafHash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::taproot::TapLeafHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::taproot::TapLeafHash::Output = >::Output pub type bitcoin::taproot::TapNodeHash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::taproot::TapNodeHash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::taproot::TapNodeHash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::taproot::TapNodeHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::taproot::TapNodeHash::Output = >::Output pub type bitcoin::taproot::TapTree::Error = bitcoin::taproot::HiddenNodesError pub type bitcoin::taproot::TapTree::Error = bitcoin::taproot::IncompleteBuilderError pub type bitcoin::taproot::TapTweakHash::Bytes = as bitcoin_hashes::Hash>::Bytes -pub type bitcoin::taproot::TapTweakHash::Engine = as bitcoin_hashes::Hash>::Engine +pub type bitcoin::taproot::TapTweakHash::Engine = as bitcoin_hashes::GeneralHash>::Engine pub type bitcoin::taproot::TapTweakHash::Err = hex_conservative::error::HexToArrayError pub type bitcoin::taproot::TapTweakHash::Output = >::Output pub type bitcoin::taproot::merkle_branch::IntoIter::Item = bitcoin::taproot::TapNodeHash diff --git a/api/hashes/all-features.txt b/api/hashes/all-features.txt index d78d4d13b..2af40a445 100644 --- a/api/hashes/all-features.txt +++ b/api/hashes/all-features.txt @@ -1,6 +1,6 @@ -#[repr(transparent)] pub struct bitcoin_hashes::Hmac(_) +#[repr(transparent)] pub struct bitcoin_hashes::Hmac(_) #[repr(transparent)] pub struct bitcoin_hashes::hash160::Hash(_) -#[repr(transparent)] pub struct bitcoin_hashes::hmac::Hmac(_) +#[repr(transparent)] pub struct bitcoin_hashes::hmac::Hmac(_) #[repr(transparent)] pub struct bitcoin_hashes::ripemd160::Hash(_) #[repr(transparent)] pub struct bitcoin_hashes::sha1::Hash(_) #[repr(transparent)] pub struct bitcoin_hashes::sha256::Hash(_) @@ -11,6 +11,15 @@ #[repr(transparent)] pub struct bitcoin_hashes::sha512_256::Hash(_) #[repr(transparent)] pub struct bitcoin_hashes::siphash24::Hash(_) impl bitcoin_hashes::FromSliceError +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::hash160::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::ripemd160::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha1::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha256::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha256d::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha384::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha512::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha512_256::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::siphash24::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::hash160::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::ripemd160::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::sha1::Hash @@ -391,7 +400,7 @@ impl std::io::Write for bitcoin_hashes::sha1::HashEngine impl std::io::Write for bitcoin_hashes::sha256::HashEngine impl std::io::Write for bitcoin_hashes::sha512::HashEngine impl std::io::Write for bitcoin_hashes::siphash24::HashEngine -impl<'de, T: bitcoin_hashes::Hash + serde::de::Deserialize<'de>> serde::de::Deserialize<'de> for bitcoin_hashes::hmac::Hmac +impl<'de, T: bitcoin_hashes::GeneralHash + serde::de::Deserialize<'de>> serde::de::Deserialize<'de> for bitcoin_hashes::hmac::Hmac impl<'de, T: bitcoin_hashes::sha256t::Tag> serde::de::Deserialize<'de> for bitcoin_hashes::sha256t::Hash impl<'de> serde::de::Deserialize<'de> for bitcoin_hashes::hash160::Hash impl<'de> serde::de::Deserialize<'de> for bitcoin_hashes::ripemd160::Hash @@ -414,21 +423,23 @@ impl> core::ops::index::Index for bit impl> core::ops::index::Index for bitcoin_hashes::sha512::Hash impl> core::ops::index::Index for bitcoin_hashes::sha512_256::Hash impl> core::ops::index::Index for bitcoin_hashes::siphash24::Hash -impl core::str::traits::FromStr for bitcoin_hashes::hmac::Hmac -impl schemars::JsonSchema for bitcoin_hashes::hmac::Hmac -impl serde::ser::Serialize for bitcoin_hashes::hmac::Hmac -impl bitcoin_hashes::Hash for bitcoin_hashes::hmac::Hmac -impl bitcoin_hashes::HashEngine for bitcoin_hashes::hmac::HmacEngine -impl bitcoin_hashes::hkdf::Hkdf -impl bitcoin_hashes::hmac::HmacEngine -impl bitcoin_io::Write for bitcoin_hashes::hmac::HmacEngine -impl core::convert::AsRef<[u8]> for bitcoin_hashes::hmac::Hmac -impl core::default::Default for bitcoin_hashes::hmac::HmacEngine -impl core::fmt::Debug for bitcoin_hashes::hmac::Hmac -impl core::fmt::Display for bitcoin_hashes::hmac::Hmac -impl core::fmt::LowerHex for bitcoin_hashes::hmac::Hmac -impl core::marker::StructuralPartialEq for bitcoin_hashes::hmac::Hmac -impl std::io::Write for bitcoin_hashes::hmac::HmacEngine +impl core::str::traits::FromStr for bitcoin_hashes::hmac::Hmac +impl schemars::JsonSchema for bitcoin_hashes::hmac::Hmac +impl serde::ser::Serialize for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::Hash for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::HashEngine for bitcoin_hashes::hmac::HmacEngine +impl bitcoin_hashes::hkdf::Hkdf +impl bitcoin_hashes::hmac::HmacEngine +impl bitcoin_io::Write for bitcoin_hashes::hmac::HmacEngine +impl core::convert::AsRef<[u8]> for bitcoin_hashes::hmac::Hmac +impl core::default::Default for bitcoin_hashes::hmac::HmacEngine +impl core::fmt::Debug for bitcoin_hashes::hmac::Hmac +impl core::fmt::Display for bitcoin_hashes::hmac::Hmac +impl core::fmt::LowerHex for bitcoin_hashes::hmac::Hmac +impl core::marker::StructuralPartialEq for bitcoin_hashes::hmac::Hmac +impl std::io::Write for bitcoin_hashes::hmac::HmacEngine +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha256t::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::sha256t::Hash impl bitcoin_hashes::serde_macros::serde_details::SerdeHash for bitcoin_hashes::sha256t::Hash impl core::borrow::Borrow<[u8]> for bitcoin_hashes::sha256t::Hash @@ -449,48 +460,48 @@ impl core::marker::Copy for bitcoin_hashes::sha impl core::str::traits::FromStr for bitcoin_hashes::sha256t::Hash impl schemars::JsonSchema for bitcoin_hashes::sha256t::Hash impl serde::ser::Serialize for bitcoin_hashes::sha256t::Hash -impl core::clone::Clone for bitcoin_hashes::hmac::Hmac -impl core::clone::Clone for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::clone::Clone -impl core::cmp::Eq for bitcoin_hashes::hmac::Hmac -impl core::cmp::Ord for bitcoin_hashes::hmac::Hmac -impl core::cmp::PartialEq for bitcoin_hashes::hmac::Hmac -impl core::cmp::PartialOrd for bitcoin_hashes::hmac::Hmac -impl core::hash::Hash for bitcoin_hashes::hmac::Hmac -impl core::marker::Copy for bitcoin_hashes::hmac::Hmac +impl core::clone::Clone for bitcoin_hashes::hmac::Hmac +impl core::clone::Clone for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::clone::Clone +impl core::cmp::Eq for bitcoin_hashes::hmac::Hmac +impl core::cmp::Ord for bitcoin_hashes::hmac::Hmac +impl core::cmp::PartialEq for bitcoin_hashes::hmac::Hmac +impl core::cmp::PartialOrd for bitcoin_hashes::hmac::Hmac +impl core::hash::Hash for bitcoin_hashes::hmac::Hmac +impl core::marker::Copy for bitcoin_hashes::hmac::Hmac impl bitcoin_hashes::sha256t::Hash where (T): bitcoin_hashes::sha256t::Tag impl bitcoin_hashes::sha256t::Tag for (T) where T: bitcoin_hashes::sha256t::Tag impl core::marker::Freeze for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Freeze impl core::marker::Freeze for bitcoin_hashes::hmac::Hmac where T: core::marker::Freeze -impl core::marker::Freeze for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Freeze -impl core::marker::Freeze for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Freeze +impl core::marker::Freeze for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Freeze +impl core::marker::Freeze for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Freeze impl core::marker::Freeze for bitcoin_hashes::sha256t::Hash impl core::marker::Send for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Send impl core::marker::Send for bitcoin_hashes::hmac::Hmac where T: core::marker::Send -impl core::marker::Send for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Send -impl core::marker::Send for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Send +impl core::marker::Send for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Send +impl core::marker::Send for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Send impl core::marker::Send for bitcoin_hashes::sha256t::Hash where T: core::marker::Send impl core::marker::Sync for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Sync impl core::marker::Sync for bitcoin_hashes::hmac::Hmac where T: core::marker::Sync -impl core::marker::Sync for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Sync -impl core::marker::Sync for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Sync +impl core::marker::Sync for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Sync +impl core::marker::Sync for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Sync impl core::marker::Sync for bitcoin_hashes::sha256t::Hash where T: core::marker::Sync impl core::marker::Unpin for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Unpin impl core::marker::Unpin for bitcoin_hashes::hmac::Hmac where T: core::marker::Unpin -impl core::marker::Unpin for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Unpin -impl core::marker::Unpin for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Unpin +impl core::marker::Unpin for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Unpin +impl core::marker::Unpin for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Unpin impl core::marker::Unpin for bitcoin_hashes::sha256t::Hash where T: core::marker::Unpin impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hkdf::Hkdf where T: core::panic::unwind_safe::RefUnwindSafe impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::Hmac where T: core::panic::unwind_safe::RefUnwindSafe -impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::RefUnwindSafe -impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::RefUnwindSafe impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::sha256t::Hash where T: core::panic::unwind_safe::RefUnwindSafe impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hkdf::Hkdf where T: core::panic::unwind_safe::UnwindSafe impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::Hmac where T: core::panic::unwind_safe::UnwindSafe -impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::UnwindSafe -impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::UnwindSafe +impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::UnwindSafe +impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::UnwindSafe impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::sha256t::Hash where T: core::panic::unwind_safe::UnwindSafe -pub bitcoin_hashes::hmac::HmacMidState::inner: <::Engine as bitcoin_hashes::HashEngine>::MidState -pub bitcoin_hashes::hmac::HmacMidState::outer: <::Engine as bitcoin_hashes::HashEngine>::MidState +pub bitcoin_hashes::hmac::HmacMidState::inner: <::Engine as bitcoin_hashes::HashEngine>::MidState +pub bitcoin_hashes::hmac::HmacMidState::outer: <::Engine as bitcoin_hashes::HashEngine>::MidState pub const bitcoin_hashes::Hash::DISPLAY_BACKWARD: bool pub const bitcoin_hashes::Hash::LEN: usize pub const bitcoin_hashes::HashEngine::BLOCK_SIZE: usize @@ -579,13 +590,13 @@ pub fn bitcoin_hashes::FromSliceError::eq(&self, other: &bitcoin_hashes::FromSli pub fn bitcoin_hashes::FromSliceError::expected_length(&self) -> usize pub fn bitcoin_hashes::FromSliceError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin_hashes::FromSliceError::invalid_length(&self) -> usize +pub fn bitcoin_hashes::GeneralHash::engine() -> Self::Engine +pub fn bitcoin_hashes::GeneralHash::from_engine(e: Self::Engine) -> Self +pub fn bitcoin_hashes::GeneralHash::hash(data: &[u8]) -> Self +pub fn bitcoin_hashes::GeneralHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin_hashes::Hash::as_byte_array(&self) -> &Self::Bytes -pub fn bitcoin_hashes::Hash::engine() -> Self::Engine pub fn bitcoin_hashes::Hash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin_hashes::Hash::from_engine(e: Self::Engine) -> Self pub fn bitcoin_hashes::Hash::from_slice(sl: &[u8]) -> core::result::Result -pub fn bitcoin_hashes::Hash::hash(data: &[u8]) -> Self -pub fn bitcoin_hashes::Hash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin_hashes::Hash::to_byte_array(self) -> Self::Bytes pub fn bitcoin_hashes::HashEngine::input(&mut self, data: &[u8]) pub fn bitcoin_hashes::HashEngine::midstate(&self) -> Self::MidState @@ -645,7 +656,7 @@ pub fn bitcoin_hashes::hmac::HmacEngine::clone(&self) -> bitcoin_hashes::hmac pub fn bitcoin_hashes::hmac::HmacEngine::default() -> Self pub fn bitcoin_hashes::hmac::HmacEngine::flush(&mut self) -> bitcoin_io::Result<()> pub fn bitcoin_hashes::hmac::HmacEngine::flush(&mut self) -> std::io::error::Result<()> -pub fn bitcoin_hashes::hmac::HmacEngine::from_inner_engines(iengine: ::Engine, oengine: ::Engine) -> bitcoin_hashes::hmac::HmacEngine +pub fn bitcoin_hashes::hmac::HmacEngine::from_inner_engines(iengine: ::Engine, oengine: ::Engine) -> bitcoin_hashes::hmac::HmacEngine pub fn bitcoin_hashes::hmac::HmacEngine::input(&mut self, buf: &[u8]) pub fn bitcoin_hashes::hmac::HmacEngine::midstate(&self) -> Self::MidState pub fn bitcoin_hashes::hmac::HmacEngine::n_bytes_hashed(&self) -> usize @@ -995,11 +1006,11 @@ pub mod bitcoin_hashes::sha512 pub mod bitcoin_hashes::sha512_256 pub mod bitcoin_hashes::siphash24 pub struct bitcoin_hashes::FromSliceError -pub struct bitcoin_hashes::HmacEngine -pub struct bitcoin_hashes::hkdf::Hkdf +pub struct bitcoin_hashes::HmacEngine +pub struct bitcoin_hashes::hkdf::Hkdf pub struct bitcoin_hashes::hkdf::MaxLengthError -pub struct bitcoin_hashes::hmac::HmacEngine -pub struct bitcoin_hashes::hmac::HmacMidState +pub struct bitcoin_hashes::hmac::HmacEngine +pub struct bitcoin_hashes::hmac::HmacMidState pub struct bitcoin_hashes::ripemd160::HashEngine pub struct bitcoin_hashes::sha1::HashEngine pub struct bitcoin_hashes::sha256::HashEngine @@ -1009,12 +1020,13 @@ pub struct bitcoin_hashes::sha512::HashEngine pub struct bitcoin_hashes::sha512_256::HashEngine(_) pub struct bitcoin_hashes::siphash24::HashEngine pub struct bitcoin_hashes::siphash24::State +pub trait bitcoin_hashes::GeneralHash: bitcoin_hashes::Hash pub trait bitcoin_hashes::Hash: core::marker::Copy + core::clone::Clone + core::cmp::PartialEq + core::cmp::Eq + core::cmp::PartialOrd + core::cmp::Ord + core::hash::Hash + core::fmt::Debug + core::fmt::Display + core::fmt::LowerHex + core::convert::AsRef<[u8]> pub trait bitcoin_hashes::HashEngine: core::clone::Clone + core::default::Default pub trait bitcoin_hashes::serde_macros::serde_details::SerdeHash where Self: core::marker::Sized + core::str::traits::FromStr + core::fmt::Display + core::ops::index::Index + core::ops::index::Index, ::Err: core::fmt::Display pub trait bitcoin_hashes::sha256t::Tag +pub type bitcoin_hashes::GeneralHash::Engine: bitcoin_hashes::HashEngine pub type bitcoin_hashes::Hash::Bytes: hex_conservative::parse::FromHex + core::marker::Copy -pub type bitcoin_hashes::Hash::Engine: bitcoin_hashes::HashEngine pub type bitcoin_hashes::HashEngine::MidState pub type bitcoin_hashes::hash160::Hash::Bytes = [u8; 20] pub type bitcoin_hashes::hash160::Hash::Engine = bitcoin_hashes::sha256::HashEngine diff --git a/api/hashes/alloc-only.txt b/api/hashes/alloc-only.txt index c3d91f632..b72c9ddc6 100644 --- a/api/hashes/alloc-only.txt +++ b/api/hashes/alloc-only.txt @@ -1,6 +1,6 @@ -#[repr(transparent)] pub struct bitcoin_hashes::Hmac(_) +#[repr(transparent)] pub struct bitcoin_hashes::Hmac(_) #[repr(transparent)] pub struct bitcoin_hashes::hash160::Hash(_) -#[repr(transparent)] pub struct bitcoin_hashes::hmac::Hmac(_) +#[repr(transparent)] pub struct bitcoin_hashes::hmac::Hmac(_) #[repr(transparent)] pub struct bitcoin_hashes::ripemd160::Hash(_) #[repr(transparent)] pub struct bitcoin_hashes::sha1::Hash(_) #[repr(transparent)] pub struct bitcoin_hashes::sha256::Hash(_) @@ -11,6 +11,15 @@ #[repr(transparent)] pub struct bitcoin_hashes::sha512_256::Hash(_) #[repr(transparent)] pub struct bitcoin_hashes::siphash24::Hash(_) impl bitcoin_hashes::FromSliceError +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::hash160::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::ripemd160::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha1::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha256::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha256d::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha384::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha512::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha512_256::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::siphash24::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::hash160::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::ripemd160::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::sha1::Hash @@ -361,17 +370,19 @@ impl> core::ops::index::Index for bit impl> core::ops::index::Index for bitcoin_hashes::sha512::Hash impl> core::ops::index::Index for bitcoin_hashes::sha512_256::Hash impl> core::ops::index::Index for bitcoin_hashes::siphash24::Hash -impl core::str::traits::FromStr for bitcoin_hashes::hmac::Hmac -impl bitcoin_hashes::Hash for bitcoin_hashes::hmac::Hmac -impl bitcoin_hashes::HashEngine for bitcoin_hashes::hmac::HmacEngine -impl bitcoin_hashes::hkdf::Hkdf -impl bitcoin_hashes::hmac::HmacEngine -impl core::convert::AsRef<[u8]> for bitcoin_hashes::hmac::Hmac -impl core::default::Default for bitcoin_hashes::hmac::HmacEngine -impl core::fmt::Debug for bitcoin_hashes::hmac::Hmac -impl core::fmt::Display for bitcoin_hashes::hmac::Hmac -impl core::fmt::LowerHex for bitcoin_hashes::hmac::Hmac -impl core::marker::StructuralPartialEq for bitcoin_hashes::hmac::Hmac +impl core::str::traits::FromStr for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::Hash for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::HashEngine for bitcoin_hashes::hmac::HmacEngine +impl bitcoin_hashes::hkdf::Hkdf +impl bitcoin_hashes::hmac::HmacEngine +impl core::convert::AsRef<[u8]> for bitcoin_hashes::hmac::Hmac +impl core::default::Default for bitcoin_hashes::hmac::HmacEngine +impl core::fmt::Debug for bitcoin_hashes::hmac::Hmac +impl core::fmt::Display for bitcoin_hashes::hmac::Hmac +impl core::fmt::LowerHex for bitcoin_hashes::hmac::Hmac +impl core::marker::StructuralPartialEq for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha256t::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::sha256t::Hash impl core::borrow::Borrow<[u8]> for bitcoin_hashes::sha256t::Hash impl core::clone::Clone for bitcoin_hashes::sha256t::Hash @@ -389,48 +400,48 @@ impl core::fmt::UpperHex for bitcoin_hashes::sh impl core::hash::Hash for bitcoin_hashes::sha256t::Hash impl core::marker::Copy for bitcoin_hashes::sha256t::Hash impl core::str::traits::FromStr for bitcoin_hashes::sha256t::Hash -impl core::clone::Clone for bitcoin_hashes::hmac::Hmac -impl core::clone::Clone for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::clone::Clone -impl core::cmp::Eq for bitcoin_hashes::hmac::Hmac -impl core::cmp::Ord for bitcoin_hashes::hmac::Hmac -impl core::cmp::PartialEq for bitcoin_hashes::hmac::Hmac -impl core::cmp::PartialOrd for bitcoin_hashes::hmac::Hmac -impl core::hash::Hash for bitcoin_hashes::hmac::Hmac -impl core::marker::Copy for bitcoin_hashes::hmac::Hmac +impl core::clone::Clone for bitcoin_hashes::hmac::Hmac +impl core::clone::Clone for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::clone::Clone +impl core::cmp::Eq for bitcoin_hashes::hmac::Hmac +impl core::cmp::Ord for bitcoin_hashes::hmac::Hmac +impl core::cmp::PartialEq for bitcoin_hashes::hmac::Hmac +impl core::cmp::PartialOrd for bitcoin_hashes::hmac::Hmac +impl core::hash::Hash for bitcoin_hashes::hmac::Hmac +impl core::marker::Copy for bitcoin_hashes::hmac::Hmac impl bitcoin_hashes::sha256t::Hash where (T): bitcoin_hashes::sha256t::Tag impl bitcoin_hashes::sha256t::Tag for (T) where T: bitcoin_hashes::sha256t::Tag impl core::marker::Freeze for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Freeze impl core::marker::Freeze for bitcoin_hashes::hmac::Hmac where T: core::marker::Freeze -impl core::marker::Freeze for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Freeze -impl core::marker::Freeze for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Freeze +impl core::marker::Freeze for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Freeze +impl core::marker::Freeze for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Freeze impl core::marker::Freeze for bitcoin_hashes::sha256t::Hash impl core::marker::Send for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Send impl core::marker::Send for bitcoin_hashes::hmac::Hmac where T: core::marker::Send -impl core::marker::Send for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Send -impl core::marker::Send for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Send +impl core::marker::Send for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Send +impl core::marker::Send for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Send impl core::marker::Send for bitcoin_hashes::sha256t::Hash where T: core::marker::Send impl core::marker::Sync for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Sync impl core::marker::Sync for bitcoin_hashes::hmac::Hmac where T: core::marker::Sync -impl core::marker::Sync for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Sync -impl core::marker::Sync for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Sync +impl core::marker::Sync for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Sync +impl core::marker::Sync for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Sync impl core::marker::Sync for bitcoin_hashes::sha256t::Hash where T: core::marker::Sync impl core::marker::Unpin for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Unpin impl core::marker::Unpin for bitcoin_hashes::hmac::Hmac where T: core::marker::Unpin -impl core::marker::Unpin for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Unpin -impl core::marker::Unpin for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Unpin +impl core::marker::Unpin for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Unpin +impl core::marker::Unpin for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Unpin impl core::marker::Unpin for bitcoin_hashes::sha256t::Hash where T: core::marker::Unpin impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hkdf::Hkdf where T: core::panic::unwind_safe::RefUnwindSafe impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::Hmac where T: core::panic::unwind_safe::RefUnwindSafe -impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::RefUnwindSafe -impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::RefUnwindSafe impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::sha256t::Hash where T: core::panic::unwind_safe::RefUnwindSafe impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hkdf::Hkdf where T: core::panic::unwind_safe::UnwindSafe impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::Hmac where T: core::panic::unwind_safe::UnwindSafe -impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::UnwindSafe -impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::UnwindSafe +impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::UnwindSafe +impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::UnwindSafe impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::sha256t::Hash where T: core::panic::unwind_safe::UnwindSafe -pub bitcoin_hashes::hmac::HmacMidState::inner: <::Engine as bitcoin_hashes::HashEngine>::MidState -pub bitcoin_hashes::hmac::HmacMidState::outer: <::Engine as bitcoin_hashes::HashEngine>::MidState +pub bitcoin_hashes::hmac::HmacMidState::inner: <::Engine as bitcoin_hashes::HashEngine>::MidState +pub bitcoin_hashes::hmac::HmacMidState::outer: <::Engine as bitcoin_hashes::HashEngine>::MidState pub const bitcoin_hashes::Hash::DISPLAY_BACKWARD: bool pub const bitcoin_hashes::Hash::LEN: usize pub const bitcoin_hashes::HashEngine::BLOCK_SIZE: usize @@ -506,13 +517,13 @@ pub fn bitcoin_hashes::FromSliceError::eq(&self, other: &bitcoin_hashes::FromSli pub fn bitcoin_hashes::FromSliceError::expected_length(&self) -> usize pub fn bitcoin_hashes::FromSliceError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin_hashes::FromSliceError::invalid_length(&self) -> usize +pub fn bitcoin_hashes::GeneralHash::engine() -> Self::Engine +pub fn bitcoin_hashes::GeneralHash::from_engine(e: Self::Engine) -> Self +pub fn bitcoin_hashes::GeneralHash::hash(data: &[u8]) -> Self +pub fn bitcoin_hashes::GeneralHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin_hashes::Hash::as_byte_array(&self) -> &Self::Bytes -pub fn bitcoin_hashes::Hash::engine() -> Self::Engine pub fn bitcoin_hashes::Hash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin_hashes::Hash::from_engine(e: Self::Engine) -> Self pub fn bitcoin_hashes::Hash::from_slice(sl: &[u8]) -> core::result::Result -pub fn bitcoin_hashes::Hash::hash(data: &[u8]) -> Self -pub fn bitcoin_hashes::Hash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin_hashes::Hash::to_byte_array(self) -> Self::Bytes pub fn bitcoin_hashes::HashEngine::input(&mut self, data: &[u8]) pub fn bitcoin_hashes::HashEngine::midstate(&self) -> Self::MidState @@ -560,7 +571,7 @@ pub fn bitcoin_hashes::hmac::Hmac::partial_cmp(&self, other: &bitcoin_hashes: pub fn bitcoin_hashes::hmac::Hmac::to_byte_array(self) -> Self::Bytes pub fn bitcoin_hashes::hmac::HmacEngine::clone(&self) -> bitcoin_hashes::hmac::HmacEngine pub fn bitcoin_hashes::hmac::HmacEngine::default() -> Self -pub fn bitcoin_hashes::hmac::HmacEngine::from_inner_engines(iengine: ::Engine, oengine: ::Engine) -> bitcoin_hashes::hmac::HmacEngine +pub fn bitcoin_hashes::hmac::HmacEngine::from_inner_engines(iengine: ::Engine, oengine: ::Engine) -> bitcoin_hashes::hmac::HmacEngine pub fn bitcoin_hashes::hmac::HmacEngine::input(&mut self, buf: &[u8]) pub fn bitcoin_hashes::hmac::HmacEngine::midstate(&self) -> Self::MidState pub fn bitcoin_hashes::hmac::HmacEngine::n_bytes_hashed(&self) -> usize @@ -836,11 +847,11 @@ pub mod bitcoin_hashes::sha512 pub mod bitcoin_hashes::sha512_256 pub mod bitcoin_hashes::siphash24 pub struct bitcoin_hashes::FromSliceError -pub struct bitcoin_hashes::HmacEngine -pub struct bitcoin_hashes::hkdf::Hkdf +pub struct bitcoin_hashes::HmacEngine +pub struct bitcoin_hashes::hkdf::Hkdf pub struct bitcoin_hashes::hkdf::MaxLengthError -pub struct bitcoin_hashes::hmac::HmacEngine -pub struct bitcoin_hashes::hmac::HmacMidState +pub struct bitcoin_hashes::hmac::HmacEngine +pub struct bitcoin_hashes::hmac::HmacMidState pub struct bitcoin_hashes::ripemd160::HashEngine pub struct bitcoin_hashes::sha1::HashEngine pub struct bitcoin_hashes::sha256::HashEngine @@ -850,11 +861,12 @@ pub struct bitcoin_hashes::sha512::HashEngine pub struct bitcoin_hashes::sha512_256::HashEngine(_) pub struct bitcoin_hashes::siphash24::HashEngine pub struct bitcoin_hashes::siphash24::State +pub trait bitcoin_hashes::GeneralHash: bitcoin_hashes::Hash pub trait bitcoin_hashes::Hash: core::marker::Copy + core::clone::Clone + core::cmp::PartialEq + core::cmp::Eq + core::cmp::PartialOrd + core::cmp::Ord + core::hash::Hash + core::fmt::Debug + core::fmt::Display + core::fmt::LowerHex + core::convert::AsRef<[u8]> pub trait bitcoin_hashes::HashEngine: core::clone::Clone + core::default::Default pub trait bitcoin_hashes::sha256t::Tag +pub type bitcoin_hashes::GeneralHash::Engine: bitcoin_hashes::HashEngine pub type bitcoin_hashes::Hash::Bytes: hex_conservative::parse::FromHex + core::marker::Copy -pub type bitcoin_hashes::Hash::Engine: bitcoin_hashes::HashEngine pub type bitcoin_hashes::HashEngine::MidState pub type bitcoin_hashes::hash160::Hash::Bytes = [u8; 20] pub type bitcoin_hashes::hash160::Hash::Engine = bitcoin_hashes::sha256::HashEngine diff --git a/api/hashes/no-features.txt b/api/hashes/no-features.txt index 36948e986..41f965a48 100644 --- a/api/hashes/no-features.txt +++ b/api/hashes/no-features.txt @@ -1,6 +1,6 @@ -#[repr(transparent)] pub struct bitcoin_hashes::Hmac(_) +#[repr(transparent)] pub struct bitcoin_hashes::Hmac(_) #[repr(transparent)] pub struct bitcoin_hashes::hash160::Hash(_) -#[repr(transparent)] pub struct bitcoin_hashes::hmac::Hmac(_) +#[repr(transparent)] pub struct bitcoin_hashes::hmac::Hmac(_) #[repr(transparent)] pub struct bitcoin_hashes::ripemd160::Hash(_) #[repr(transparent)] pub struct bitcoin_hashes::sha1::Hash(_) #[repr(transparent)] pub struct bitcoin_hashes::sha256::Hash(_) @@ -11,6 +11,15 @@ #[repr(transparent)] pub struct bitcoin_hashes::sha512_256::Hash(_) #[repr(transparent)] pub struct bitcoin_hashes::siphash24::Hash(_) impl bitcoin_hashes::FromSliceError +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::hash160::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::ripemd160::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha1::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha256::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha256d::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha384::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha512::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha512_256::Hash +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::siphash24::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::hash160::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::ripemd160::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::sha1::Hash @@ -361,17 +370,19 @@ impl> core::ops::index::Index for bit impl> core::ops::index::Index for bitcoin_hashes::sha512::Hash impl> core::ops::index::Index for bitcoin_hashes::sha512_256::Hash impl> core::ops::index::Index for bitcoin_hashes::siphash24::Hash -impl core::str::traits::FromStr for bitcoin_hashes::hmac::Hmac -impl bitcoin_hashes::Hash for bitcoin_hashes::hmac::Hmac -impl bitcoin_hashes::HashEngine for bitcoin_hashes::hmac::HmacEngine -impl bitcoin_hashes::hkdf::Hkdf -impl bitcoin_hashes::hmac::HmacEngine -impl core::convert::AsRef<[u8]> for bitcoin_hashes::hmac::Hmac -impl core::default::Default for bitcoin_hashes::hmac::HmacEngine -impl core::fmt::Debug for bitcoin_hashes::hmac::Hmac -impl core::fmt::Display for bitcoin_hashes::hmac::Hmac -impl core::fmt::LowerHex for bitcoin_hashes::hmac::Hmac -impl core::marker::StructuralPartialEq for bitcoin_hashes::hmac::Hmac +impl core::str::traits::FromStr for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::Hash for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::HashEngine for bitcoin_hashes::hmac::HmacEngine +impl bitcoin_hashes::hkdf::Hkdf +impl bitcoin_hashes::hmac::HmacEngine +impl core::convert::AsRef<[u8]> for bitcoin_hashes::hmac::Hmac +impl core::default::Default for bitcoin_hashes::hmac::HmacEngine +impl core::fmt::Debug for bitcoin_hashes::hmac::Hmac +impl core::fmt::Display for bitcoin_hashes::hmac::Hmac +impl core::fmt::LowerHex for bitcoin_hashes::hmac::Hmac +impl core::marker::StructuralPartialEq for bitcoin_hashes::hmac::Hmac +impl bitcoin_hashes::GeneralHash for bitcoin_hashes::sha256t::Hash impl bitcoin_hashes::Hash for bitcoin_hashes::sha256t::Hash impl core::borrow::Borrow<[u8]> for bitcoin_hashes::sha256t::Hash impl core::clone::Clone for bitcoin_hashes::sha256t::Hash @@ -389,48 +400,48 @@ impl core::fmt::UpperHex for bitcoin_hashes::sh impl core::hash::Hash for bitcoin_hashes::sha256t::Hash impl core::marker::Copy for bitcoin_hashes::sha256t::Hash impl core::str::traits::FromStr for bitcoin_hashes::sha256t::Hash -impl core::clone::Clone for bitcoin_hashes::hmac::Hmac -impl core::clone::Clone for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::clone::Clone -impl core::cmp::Eq for bitcoin_hashes::hmac::Hmac -impl core::cmp::Ord for bitcoin_hashes::hmac::Hmac -impl core::cmp::PartialEq for bitcoin_hashes::hmac::Hmac -impl core::cmp::PartialOrd for bitcoin_hashes::hmac::Hmac -impl core::hash::Hash for bitcoin_hashes::hmac::Hmac -impl core::marker::Copy for bitcoin_hashes::hmac::Hmac +impl core::clone::Clone for bitcoin_hashes::hmac::Hmac +impl core::clone::Clone for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::clone::Clone +impl core::cmp::Eq for bitcoin_hashes::hmac::Hmac +impl core::cmp::Ord for bitcoin_hashes::hmac::Hmac +impl core::cmp::PartialEq for bitcoin_hashes::hmac::Hmac +impl core::cmp::PartialOrd for bitcoin_hashes::hmac::Hmac +impl core::hash::Hash for bitcoin_hashes::hmac::Hmac +impl core::marker::Copy for bitcoin_hashes::hmac::Hmac impl bitcoin_hashes::sha256t::Hash where (T): bitcoin_hashes::sha256t::Tag impl bitcoin_hashes::sha256t::Tag for (T) where T: bitcoin_hashes::sha256t::Tag impl core::marker::Freeze for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Freeze impl core::marker::Freeze for bitcoin_hashes::hmac::Hmac where T: core::marker::Freeze -impl core::marker::Freeze for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Freeze -impl core::marker::Freeze for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Freeze +impl core::marker::Freeze for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Freeze +impl core::marker::Freeze for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Freeze impl core::marker::Freeze for bitcoin_hashes::sha256t::Hash impl core::marker::Send for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Send impl core::marker::Send for bitcoin_hashes::hmac::Hmac where T: core::marker::Send -impl core::marker::Send for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Send -impl core::marker::Send for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Send +impl core::marker::Send for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Send +impl core::marker::Send for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Send impl core::marker::Send for bitcoin_hashes::sha256t::Hash where T: core::marker::Send impl core::marker::Sync for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Sync impl core::marker::Sync for bitcoin_hashes::hmac::Hmac where T: core::marker::Sync -impl core::marker::Sync for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Sync -impl core::marker::Sync for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Sync +impl core::marker::Sync for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Sync +impl core::marker::Sync for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Sync impl core::marker::Sync for bitcoin_hashes::sha256t::Hash where T: core::marker::Sync impl core::marker::Unpin for bitcoin_hashes::hkdf::Hkdf where T: core::marker::Unpin impl core::marker::Unpin for bitcoin_hashes::hmac::Hmac where T: core::marker::Unpin -impl core::marker::Unpin for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Unpin -impl core::marker::Unpin for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Unpin +impl core::marker::Unpin for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::marker::Unpin +impl core::marker::Unpin for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::marker::Unpin impl core::marker::Unpin for bitcoin_hashes::sha256t::Hash where T: core::marker::Unpin impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hkdf::Hkdf where T: core::panic::unwind_safe::RefUnwindSafe impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::Hmac where T: core::panic::unwind_safe::RefUnwindSafe -impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::RefUnwindSafe -impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::RefUnwindSafe +impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::RefUnwindSafe impl core::panic::unwind_safe::RefUnwindSafe for bitcoin_hashes::sha256t::Hash where T: core::panic::unwind_safe::RefUnwindSafe impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hkdf::Hkdf where T: core::panic::unwind_safe::UnwindSafe impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::Hmac where T: core::panic::unwind_safe::UnwindSafe -impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::UnwindSafe -impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::UnwindSafe +impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacEngine where ::Engine: core::panic::unwind_safe::UnwindSafe +impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::hmac::HmacMidState where <::Engine as bitcoin_hashes::HashEngine>::MidState: core::panic::unwind_safe::UnwindSafe impl core::panic::unwind_safe::UnwindSafe for bitcoin_hashes::sha256t::Hash where T: core::panic::unwind_safe::UnwindSafe -pub bitcoin_hashes::hmac::HmacMidState::inner: <::Engine as bitcoin_hashes::HashEngine>::MidState -pub bitcoin_hashes::hmac::HmacMidState::outer: <::Engine as bitcoin_hashes::HashEngine>::MidState +pub bitcoin_hashes::hmac::HmacMidState::inner: <::Engine as bitcoin_hashes::HashEngine>::MidState +pub bitcoin_hashes::hmac::HmacMidState::outer: <::Engine as bitcoin_hashes::HashEngine>::MidState pub const bitcoin_hashes::Hash::DISPLAY_BACKWARD: bool pub const bitcoin_hashes::Hash::LEN: usize pub const bitcoin_hashes::HashEngine::BLOCK_SIZE: usize @@ -506,13 +517,13 @@ pub fn bitcoin_hashes::FromSliceError::eq(&self, other: &bitcoin_hashes::FromSli pub fn bitcoin_hashes::FromSliceError::expected_length(&self) -> usize pub fn bitcoin_hashes::FromSliceError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result pub fn bitcoin_hashes::FromSliceError::invalid_length(&self) -> usize +pub fn bitcoin_hashes::GeneralHash::engine() -> Self::Engine +pub fn bitcoin_hashes::GeneralHash::from_engine(e: Self::Engine) -> Self +pub fn bitcoin_hashes::GeneralHash::hash(data: &[u8]) -> Self +pub fn bitcoin_hashes::GeneralHash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin_hashes::Hash::as_byte_array(&self) -> &Self::Bytes -pub fn bitcoin_hashes::Hash::engine() -> Self::Engine pub fn bitcoin_hashes::Hash::from_byte_array(bytes: Self::Bytes) -> Self -pub fn bitcoin_hashes::Hash::from_engine(e: Self::Engine) -> Self pub fn bitcoin_hashes::Hash::from_slice(sl: &[u8]) -> core::result::Result -pub fn bitcoin_hashes::Hash::hash(data: &[u8]) -> Self -pub fn bitcoin_hashes::Hash::hash_byte_chunks(byte_slices: I) -> Self where B: core::convert::AsRef<[u8]>, I: core::iter::traits::collect::IntoIterator pub fn bitcoin_hashes::Hash::to_byte_array(self) -> Self::Bytes pub fn bitcoin_hashes::HashEngine::input(&mut self, data: &[u8]) pub fn bitcoin_hashes::HashEngine::midstate(&self) -> Self::MidState @@ -559,7 +570,7 @@ pub fn bitcoin_hashes::hmac::Hmac::partial_cmp(&self, other: &bitcoin_hashes: pub fn bitcoin_hashes::hmac::Hmac::to_byte_array(self) -> Self::Bytes pub fn bitcoin_hashes::hmac::HmacEngine::clone(&self) -> bitcoin_hashes::hmac::HmacEngine pub fn bitcoin_hashes::hmac::HmacEngine::default() -> Self -pub fn bitcoin_hashes::hmac::HmacEngine::from_inner_engines(iengine: ::Engine, oengine: ::Engine) -> bitcoin_hashes::hmac::HmacEngine +pub fn bitcoin_hashes::hmac::HmacEngine::from_inner_engines(iengine: ::Engine, oengine: ::Engine) -> bitcoin_hashes::hmac::HmacEngine pub fn bitcoin_hashes::hmac::HmacEngine::input(&mut self, buf: &[u8]) pub fn bitcoin_hashes::hmac::HmacEngine::midstate(&self) -> Self::MidState pub fn bitcoin_hashes::hmac::HmacEngine::n_bytes_hashed(&self) -> usize @@ -835,11 +846,11 @@ pub mod bitcoin_hashes::sha512 pub mod bitcoin_hashes::sha512_256 pub mod bitcoin_hashes::siphash24 pub struct bitcoin_hashes::FromSliceError -pub struct bitcoin_hashes::HmacEngine -pub struct bitcoin_hashes::hkdf::Hkdf +pub struct bitcoin_hashes::HmacEngine +pub struct bitcoin_hashes::hkdf::Hkdf pub struct bitcoin_hashes::hkdf::MaxLengthError -pub struct bitcoin_hashes::hmac::HmacEngine -pub struct bitcoin_hashes::hmac::HmacMidState +pub struct bitcoin_hashes::hmac::HmacEngine +pub struct bitcoin_hashes::hmac::HmacMidState pub struct bitcoin_hashes::ripemd160::HashEngine pub struct bitcoin_hashes::sha1::HashEngine pub struct bitcoin_hashes::sha256::HashEngine @@ -849,11 +860,12 @@ pub struct bitcoin_hashes::sha512::HashEngine pub struct bitcoin_hashes::sha512_256::HashEngine(_) pub struct bitcoin_hashes::siphash24::HashEngine pub struct bitcoin_hashes::siphash24::State +pub trait bitcoin_hashes::GeneralHash: bitcoin_hashes::Hash pub trait bitcoin_hashes::Hash: core::marker::Copy + core::clone::Clone + core::cmp::PartialEq + core::cmp::Eq + core::cmp::PartialOrd + core::cmp::Ord + core::hash::Hash + core::fmt::Debug + core::fmt::Display + core::fmt::LowerHex + core::convert::AsRef<[u8]> pub trait bitcoin_hashes::HashEngine: core::clone::Clone + core::default::Default pub trait bitcoin_hashes::sha256t::Tag +pub type bitcoin_hashes::GeneralHash::Engine: bitcoin_hashes::HashEngine pub type bitcoin_hashes::Hash::Bytes: hex_conservative::parse::FromHex + core::marker::Copy -pub type bitcoin_hashes::Hash::Engine: bitcoin_hashes::HashEngine pub type bitcoin_hashes::HashEngine::MidState pub type bitcoin_hashes::hash160::Hash::Bytes = [u8; 20] pub type bitcoin_hashes::hash160::Hash::Engine = bitcoin_hashes::sha256::HashEngine diff --git a/bitcoin/src/bip152.rs b/bitcoin/src/bip152.rs index df432fc00..f8341ea9f 100644 --- a/bitcoin/src/bip152.rs +++ b/bitcoin/src/bip152.rs @@ -383,11 +383,12 @@ mod test { }; fn dummy_tx(nonce: &[u8]) -> Transaction { + let dummy_txid = Txid::from_byte_array(hashes::sha256::Hash::hash(nonce).to_byte_array()); Transaction { version: transaction::Version::ONE, lock_time: absolute::LockTime::from_consensus(2), input: vec![TxIn { - previous_output: OutPoint::new(Txid::hash(nonce), 0), + previous_output: OutPoint::new(dummy_txid, 0), script_sig: ScriptBuf::new(), sequence: Sequence(1), witness: Witness::new(), @@ -400,8 +401,8 @@ mod test { Block { header: block::Header { version: block::Version::ONE, - prev_blockhash: BlockHash::hash(&[0]), - merkle_root: TxMerkleNode::hash(&[1]), + prev_blockhash: BlockHash::from_byte_array([0x99; 32]), + merkle_root: TxMerkleNode::from_byte_array([0x77; 32]), time: 2, bits: CompactTarget::from_consensus(3), nonce: 4, diff --git a/bitcoin/src/bip158.rs b/bitcoin/src/bip158.rs index 6aa0cda06..8c12a871c 100644 --- a/bitcoin/src/bip158.rs +++ b/bitcoin/src/bip158.rs @@ -118,7 +118,7 @@ impl FilterHash { let mut header_data = [0u8; 64]; header_data[0..32].copy_from_slice(&self[..]); header_data[32..64].copy_from_slice(&previous_filter_header[..]); - FilterHeader::hash(&header_data) + FilterHeader(sha256d::Hash::hash(&header_data)) } } @@ -146,8 +146,7 @@ impl BlockFilter { /// /// [BIP 157]: pub fn filter_header(&self, previous_filter_header: FilterHeader) -> FilterHeader { - let filter_hash = FilterHash::hash(self.content.as_slice()); - filter_hash.filter_header(previous_filter_header) + FilterHash(sha256d::Hash::hash(&self.content)).filter_header(previous_filter_header) } /// Returns true if any query matches against this [`BlockFilter`]. diff --git a/bitcoin/src/bip32.rs b/bitcoin/src/bip32.rs index 6ace63289..f8ade73aa 100644 --- a/bitcoin/src/bip32.rs +++ b/bitcoin/src/bip32.rs @@ -9,9 +9,8 @@ use core::ops::Index; use core::str::FromStr; use core::{fmt, slice}; -use hashes::{hash160, hash_newtype, sha512, Hash, HashEngine, Hmac, HmacEngine}; +use hashes::{hash160, hash_newtype, sha512, GeneralHash, HashEngine, Hmac, HmacEngine}; use internals::{impl_array_newtype, write_err}; -use io::Write; use secp256k1::{Secp256k1, XOnlyPublicKey}; use crate::crypto::key::{CompressedPublicKey, Keypair, PrivateKey}; @@ -820,9 +819,7 @@ impl Xpub { /// Returns the HASH160 of the chaincode pub fn identifier(&self) -> XKeyIdentifier { - let mut engine = XKeyIdentifier::engine(); - engine.write_all(&self.public_key.serialize()).expect("engines don't error"); - XKeyIdentifier::from_engine(engine) + XKeyIdentifier(hash160::Hash::hash(&self.public_key.serialize())) } /// Returns the first four bytes of the identifier diff --git a/bitcoin/src/blockdata/block.rs b/bitcoin/src/blockdata/block.rs index 3980934cb..ca83df732 100644 --- a/bitcoin/src/blockdata/block.rs +++ b/bitcoin/src/blockdata/block.rs @@ -73,9 +73,9 @@ impl Header { /// Returns the block hash. pub fn block_hash(&self) -> BlockHash { - let mut engine = BlockHash::engine(); + let mut engine = sha256d::Hash::engine(); self.consensus_encode(&mut engine).expect("engines don't error"); - BlockHash::from_engine(engine) + BlockHash(sha256d::Hash::from_engine(engine)) } /// Computes the target (range [0, T] inclusive) that a blockhash must land in to be valid. @@ -295,10 +295,10 @@ impl Block { witness_root: WitnessMerkleNode, witness_reserved_value: &[u8], ) -> WitnessCommitment { - let mut encoder = WitnessCommitment::engine(); + let mut encoder = sha256d::Hash::engine(); witness_root.consensus_encode(&mut encoder).expect("engines don't error"); encoder.input(witness_reserved_value); - WitnessCommitment::from_engine(encoder) + WitnessCommitment(sha256d::Hash::from_engine(encoder)) } /// Computes the merkle root of transactions hashed for witness. diff --git a/bitcoin/src/blockdata/script/mod.rs b/bitcoin/src/blockdata/script/mod.rs index b50f9204c..4cb001f30 100644 --- a/bitcoin/src/blockdata/script/mod.rs +++ b/bitcoin/src/blockdata/script/mod.rs @@ -109,7 +109,7 @@ impl ScriptHash { return Err(RedeemScriptSizeError { size: redeem_script.len() }); } - Ok(ScriptHash::hash(redeem_script.as_bytes())) + Ok(ScriptHash(hash160::Hash::hash(redeem_script.as_bytes()))) } /// Creates a `ScriptHash` from any script irrespective of script size. @@ -118,7 +118,9 @@ impl ScriptHash { /// then the output will be unspendable (see [BIP-16]). /// /// [BIP-16]: - pub fn from_script_unchecked(script: &Script) -> Self { ScriptHash::hash(script.as_bytes()) } + pub fn from_script_unchecked(script: &Script) -> Self { + ScriptHash(hash160::Hash::hash(script.as_bytes())) + } } impl WScriptHash { @@ -135,7 +137,7 @@ impl WScriptHash { return Err(WitnessScriptSizeError { size: witness_script.len() }); } - Ok(WScriptHash::hash(witness_script.as_bytes())) + Ok(WScriptHash(sha256::Hash::hash(witness_script.as_bytes()))) } /// Creates a `WScriptHash` from any script irrespective of script size. @@ -144,7 +146,9 @@ impl WScriptHash { /// output then the output will be unspendable (see [BIP-141]). /// /// ref: [BIP-141](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki) - pub fn from_script_unchecked(script: &Script) -> Self { WScriptHash::hash(script.as_bytes()) } + pub fn from_script_unchecked(script: &Script) -> Self { + WScriptHash(sha256::Hash::hash(script.as_bytes())) + } } impl TryFrom for ScriptHash { diff --git a/bitcoin/src/blockdata/script/tests.rs b/bitcoin/src/blockdata/script/tests.rs index 82fdfb982..beaa3d1e3 100644 --- a/bitcoin/src/blockdata/script/tests.rs +++ b/bitcoin/src/blockdata/script/tests.rs @@ -6,7 +6,7 @@ use hex_lit::hex; use super::*; use crate::consensus::encode::{deserialize, serialize}; -use crate::crypto::key::{PubkeyHash, PublicKey, WPubkeyHash, XOnlyPublicKey}; +use crate::crypto::key::{PublicKey, XOnlyPublicKey}; use crate::FeeRate; #[test] @@ -203,10 +203,10 @@ fn script_generators() { .unwrap(); assert!(ScriptBuf::new_p2pk(pubkey).is_p2pk()); - let pubkey_hash = PubkeyHash::hash(&pubkey.inner.serialize()); + let pubkey_hash = pubkey.pubkey_hash(); assert!(ScriptBuf::new_p2pkh(pubkey_hash).is_p2pkh()); - let wpubkey_hash = WPubkeyHash::hash(&pubkey.inner.serialize()); + let wpubkey_hash = pubkey.wpubkey_hash().unwrap(); assert!(ScriptBuf::new_p2wpkh(wpubkey_hash).is_p2wpkh()); let script = Builder::new().push_opcode(OP_NUMEQUAL).push_verify().into_script(); diff --git a/bitcoin/src/blockdata/transaction.rs b/bitcoin/src/blockdata/transaction.rs index b11f9c903..3e9db5b4b 100644 --- a/bitcoin/src/blockdata/transaction.rs +++ b/bitcoin/src/blockdata/transaction.rs @@ -754,12 +754,12 @@ impl Transaction { /// this will be equal to [`Transaction::compute_wtxid()`]. #[doc(alias = "txid")] pub fn compute_txid(&self) -> Txid { - let mut enc = Txid::engine(); + let mut enc = sha256d::Hash::engine(); self.version.consensus_encode(&mut enc).expect("engines don't error"); self.input.consensus_encode(&mut enc).expect("engines don't error"); self.output.consensus_encode(&mut enc).expect("engines don't error"); self.lock_time.consensus_encode(&mut enc).expect("engines don't error"); - Txid::from_engine(enc) + Txid(sha256d::Hash::from_engine(enc)) } /// Computes the segwit version of the transaction id. @@ -778,9 +778,9 @@ impl Transaction { /// this will be equal to [`Transaction::txid()`]. #[doc(alias = "wtxid")] pub fn compute_wtxid(&self) -> Wtxid { - let mut enc = Wtxid::engine(); + let mut enc = sha256d::Hash::engine(); self.consensus_encode(&mut enc).expect("engines don't error"); - Wtxid::from_engine(enc) + Wtxid(sha256d::Hash::from_engine(enc)) } /// Returns the weight of this transaction, as defined by BIP-141. diff --git a/bitcoin/src/consensus/encode.rs b/bitcoin/src/consensus/encode.rs index 3e7dbe919..10606fde9 100644 --- a/bitcoin/src/consensus/encode.rs +++ b/bitcoin/src/consensus/encode.rs @@ -16,7 +16,7 @@ use core::{fmt, mem}; -use hashes::{sha256, sha256d, Hash}; +use hashes::{sha256, sha256d, GeneralHash, Hash}; use hex::error::{InvalidCharError, OddLengthStringError}; use internals::write_err; use io::{BufRead, Cursor, Read, Write}; @@ -768,7 +768,7 @@ impl Decodable for Box<[u8]> { /// Does a double-SHA256 on `data` and returns the first 4 bytes. fn sha2_checksum(data: &[u8]) -> [u8; 4] { - let checksum = ::hash(data); + let checksum = ::hash(data); [checksum[0], checksum[1], checksum[2], checksum[3]] } diff --git a/bitcoin/src/crypto/key.rs b/bitcoin/src/crypto/key.rs index 11e0dbc54..b483ceeeb 100644 --- a/bitcoin/src/crypto/key.rs +++ b/bitcoin/src/crypto/key.rs @@ -58,7 +58,9 @@ impl PublicKey { } /// Returns bitcoin 160-bit hash of the public key. - pub fn pubkey_hash(&self) -> PubkeyHash { self.with_serialized(PubkeyHash::hash) } + pub fn pubkey_hash(&self) -> PubkeyHash { + PubkeyHash(self.with_serialized(hash160::Hash::hash)) + } /// Returns bitcoin 160-bit hash of the public key for witness program pub fn wpubkey_hash(&self) -> Result { @@ -275,7 +277,7 @@ pub struct CompressedPublicKey(pub secp256k1::PublicKey); impl CompressedPublicKey { /// Returns bitcoin 160-bit hash of the public key. - pub fn pubkey_hash(&self) -> PubkeyHash { PubkeyHash::hash(&self.to_bytes()) } + pub fn pubkey_hash(&self) -> PubkeyHash { PubkeyHash(hash160::Hash::hash(&self.to_bytes())) } /// Returns bitcoin 160-bit hash of the public key for witness program. pub fn wpubkey_hash(&self) -> WPubkeyHash { diff --git a/bitcoin/src/crypto/sighash.rs b/bitcoin/src/crypto/sighash.rs index 124a025fc..b23d52488 100644 --- a/bitcoin/src/crypto/sighash.rs +++ b/bitcoin/src/crypto/sighash.rs @@ -55,6 +55,18 @@ hash_newtype! { impl_message_from_hash!(LegacySighash); impl_message_from_hash!(SegwitV0Sighash); +// Implement private engine/from_engine methods for use within this module; +// but outside of it, it should not be possible to construct these hash +// types from arbitrary data (except by casting via to/from_byte_array). +impl LegacySighash { + fn engine() -> sha256::HashEngine { sha256d::Hash::engine() } + fn from_engine(e: sha256::HashEngine) -> Self { Self(sha256d::Hash::from_engine(e)) } +} +impl SegwitV0Sighash { + fn engine() -> sha256::HashEngine { sha256d::Hash::engine() } + fn from_engine(e: sha256::HashEngine) -> Self { Self(sha256d::Hash::from_engine(e)) } +} + sha256t_hash_newtype! { pub struct TapSighashTag = hash_str("TapSighash"); @@ -1351,10 +1363,10 @@ impl EncodeSigningDataResult { /// /// ```rust /// # use bitcoin::consensus::deserialize; - /// # use bitcoin::hashes::{Hash, hex::FromHex}; + /// # use bitcoin::hashes::{sha256d, Hash, hex::FromHex}; /// # use bitcoin::sighash::{LegacySighash, SighashCache}; /// # use bitcoin::Transaction; - /// # let mut writer = LegacySighash::engine(); + /// # let mut writer = sha256d::Hash::engine(); /// # let input_index = 0; /// # let script_pubkey = bitcoin::ScriptBuf::new(); /// # let sighash_u32 = 0u32; @@ -1366,6 +1378,8 @@ impl EncodeSigningDataResult { /// .is_sighash_single_bug() /// .expect("writer can't fail") { /// // use a hash value of "1", instead of computing the actual hash due to SIGHASH_SINGLE bug + /// } else { + /// // use the hash from `writer` /// } /// ``` pub fn is_sighash_single_bug(self) -> Result { diff --git a/bitcoin/src/hash_types.rs b/bitcoin/src/hash_types.rs index 58c008a7f..bcd2fc611 100644 --- a/bitcoin/src/hash_types.rs +++ b/bitcoin/src/hash_types.rs @@ -18,65 +18,89 @@ mod tests { WScriptHash, XKeyIdentifier, }; + #[rustfmt::skip] + /// sha256d of the empty string + const DUMMY32: [u8; 32] = [ + 0x5d, 0xf6, 0xe0, 0xe2, 0x76, 0x13, 0x59, 0xd3, + 0x0a, 0x82, 0x75, 0x05, 0x8e, 0x29, 0x9f, 0xcc, + 0x03, 0x81, 0x53, 0x45, 0x45, 0xf5, 0x5c, 0xf4, + 0x3e, 0x41, 0x98, 0x3f, 0x5d, 0x4c, 0x94, 0x56, + ]; + /// hash160 of the empty string + #[rustfmt::skip] + const DUMMY20: [u8; 20] = [ + 0xb4, 0x72, 0xa2, 0x66, 0xd0, 0xbd, 0x89, 0xc1, 0x37, 0x06, + 0xa4, 0x13, 0x2c, 0xcf, 0xb1, 0x6f, 0x7c, 0x3b, 0x9f, 0xcb, + ]; + #[test] fn hash_display() { assert_eq!( - Txid::hash(&[]).to_string(), + Txid::from_byte_array(DUMMY32).to_string(), "56944c5d3f98413ef45cf54545538103cc9f298e0575820ad3591376e2e0f65d", ); assert_eq!( - Wtxid::hash(&[]).to_string(), + Wtxid::from_byte_array(DUMMY32).to_string(), "56944c5d3f98413ef45cf54545538103cc9f298e0575820ad3591376e2e0f65d", ); assert_eq!( - BlockHash::hash(&[]).to_string(), + BlockHash::from_byte_array(DUMMY32).to_string(), "56944c5d3f98413ef45cf54545538103cc9f298e0575820ad3591376e2e0f65d", ); assert_eq!( - LegacySighash::hash(&[]).to_string(), + LegacySighash::from_byte_array(DUMMY32).to_string(), "5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456", ); assert_eq!( - SegwitV0Sighash::hash(&[]).to_string(), + SegwitV0Sighash::from_byte_array(DUMMY32).to_string(), "5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456", ); assert_eq!( - TapSighash::hash(&[]).to_string(), - "dabc11914abcd8072900042a2681e52f8dba99ce82e224f97b5fdb7cd4b9c803", - ); - - assert_eq!(PubkeyHash::hash(&[]).to_string(), "b472a266d0bd89c13706a4132ccfb16f7c3b9fcb",); - assert_eq!(ScriptHash::hash(&[]).to_string(), "b472a266d0bd89c13706a4132ccfb16f7c3b9fcb",); - assert_eq!(WPubkeyHash::hash(&[]).to_string(), "b472a266d0bd89c13706a4132ccfb16f7c3b9fcb",); - assert_eq!( - WScriptHash::hash(&[]).to_string(), - "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + TapSighash::from_byte_array(DUMMY32).to_string(), + "5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456", ); assert_eq!( - TxMerkleNode::hash(&[]).to_string(), + PubkeyHash::from_byte_array(DUMMY20).to_string(), + "b472a266d0bd89c13706a4132ccfb16f7c3b9fcb", + ); + assert_eq!( + ScriptHash::from_byte_array(DUMMY20).to_string(), + "b472a266d0bd89c13706a4132ccfb16f7c3b9fcb", + ); + assert_eq!( + WPubkeyHash::from_byte_array(DUMMY20).to_string(), + "b472a266d0bd89c13706a4132ccfb16f7c3b9fcb", + ); + assert_eq!( + WScriptHash::from_byte_array(DUMMY32).to_string(), + "5df6e0e2761359d30a8275058e299fcc0381534545f55cf43e41983f5d4c9456", + ); + + assert_eq!( + TxMerkleNode::from_byte_array(DUMMY32).to_string(), "56944c5d3f98413ef45cf54545538103cc9f298e0575820ad3591376e2e0f65d", ); assert_eq!( - WitnessMerkleNode::hash(&[]).to_string(), + WitnessMerkleNode::from_byte_array(DUMMY32).to_string(), "56944c5d3f98413ef45cf54545538103cc9f298e0575820ad3591376e2e0f65d", ); assert_eq!( - WitnessCommitment::hash(&[]).to_string(), + WitnessCommitment::from_byte_array(DUMMY32).to_string(), "56944c5d3f98413ef45cf54545538103cc9f298e0575820ad3591376e2e0f65d", ); assert_eq!( - XKeyIdentifier::hash(&[]).to_string(), + XKeyIdentifier::from_byte_array(DUMMY20).to_string(), "b472a266d0bd89c13706a4132ccfb16f7c3b9fcb", ); assert_eq!( - FilterHash::hash(&[]).to_string(), + FilterHash::from_byte_array(DUMMY32).to_string(), "56944c5d3f98413ef45cf54545538103cc9f298e0575820ad3591376e2e0f65d", ); assert_eq!( - FilterHeader::hash(&[]).to_string(), + FilterHeader::from_byte_array(DUMMY32).to_string(), "56944c5d3f98413ef45cf54545538103cc9f298e0575820ad3591376e2e0f65d", ); } diff --git a/bitcoin/src/psbt/macros.rs b/bitcoin/src/psbt/macros.rs index fb06bbcdf..86284cb33 100644 --- a/bitcoin/src/psbt/macros.rs +++ b/bitcoin/src/psbt/macros.rs @@ -121,7 +121,7 @@ macro_rules! psbt_insert_hash_pair { match $slf.$map.entry(key_val) { btree_map::Entry::Vacant(empty_key) => { let val: Vec = Deserialize::deserialize(&$raw_value)?; - if <$hash as hashes::Hash>::hash(&val) != key_val { + if <$hash as hashes::GeneralHash>::hash(&val) != key_val { return Err(psbt::Error::InvalidPreimageHashPair { preimage: val.into_boxed_slice(), hash: Box::from(key_val.borrow()), diff --git a/bitcoin/src/psbt/mod.rs b/bitcoin/src/psbt/mod.rs index a4531c7e9..eca18faa2 100644 --- a/bitcoin/src/psbt/mod.rs +++ b/bitcoin/src/psbt/mod.rs @@ -2251,7 +2251,7 @@ mod tests { fn sign_psbt() { use crate::bip32::{DerivationPath, Fingerprint}; use crate::witness_version::WitnessVersion; - use crate::{WPubkeyHash, WitnessProgram}; + use crate::WitnessProgram; let unsigned_tx = Transaction { version: transaction::Version::TWO, @@ -2271,7 +2271,7 @@ mod tests { // First input we can spend. See comment above on key_map for why we use defaults here. let txout_wpkh = TxOut { value: Amount::from_sat(10), - script_pubkey: ScriptBuf::new_p2wpkh(WPubkeyHash::hash(&pk.to_bytes())), + script_pubkey: ScriptBuf::new_p2wpkh(pk.wpubkey_hash().unwrap()), }; psbt.inputs[0].witness_utxo = Some(txout_wpkh); diff --git a/hashes/embedded/src/main.rs b/hashes/embedded/src/main.rs index 447626c53..738940ac6 100644 --- a/hashes/embedded/src/main.rs +++ b/hashes/embedded/src/main.rs @@ -9,7 +9,7 @@ extern crate bitcoin_hashes; #[cfg(feature = "alloc")] use alloc_cortex_m::CortexMHeap; #[cfg(feature = "alloc")] use alloc::string::ToString; -use bitcoin_hashes::{sha256, Hash, HashEngine}; +use bitcoin_hashes::{sha256, HashEngine}; use bitcoin_io::Write; use core::str::FromStr; use cortex_m_rt::entry; @@ -33,11 +33,11 @@ fn main() -> ! { #[cfg(feature = "alloc")] unsafe { ALLOCATOR.init(cortex_m_rt::heap_start() as usize, HEAP_SIZE) } - let mut engine = TestType::engine(); + let mut engine = sha256::Hash::engine(); engine.write_all(b"abc").unwrap(); check_result(engine); - let mut engine = TestType::engine(); + let mut engine = sha256::Hash::engine(); engine.input(b"abc"); check_result(engine); @@ -46,7 +46,7 @@ fn main() -> ! { } fn check_result(engine: sha256::HashEngine) { - let hash = TestType::from_engine(engine); + let hash = TestType(sha256::Hash::from_engine(engine)); let hash_check = TestType::from_str("ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad") diff --git a/hashes/src/hash160.rs b/hashes/src/hash160.rs index 6f2da18fd..6993dadd7 100644 --- a/hashes/src/hash160.rs +++ b/hashes/src/hash160.rs @@ -34,7 +34,8 @@ mod tests { #[test] #[cfg(feature = "alloc")] fn test() { - use crate::{hash160, Hash, HashEngine}; + use super::Hash; + use crate::{hash160, HashEngine}; #[derive(Clone)] #[cfg(feature = "alloc")] @@ -111,7 +112,7 @@ mod tests { mod benches { use test::Bencher; - use crate::{hash160, Hash, HashEngine}; + use crate::{hash160, GeneralHash as _, Hash as _, HashEngine}; #[bench] pub fn hash160_10(bh: &mut Bencher) { diff --git a/hashes/src/hkdf.rs b/hashes/src/hkdf.rs index e22418a94..62ad499ff 100644 --- a/hashes/src/hkdf.rs +++ b/hashes/src/hkdf.rs @@ -11,7 +11,7 @@ use alloc::vec; use alloc::vec::Vec; use core::fmt; -use crate::{Hash, HashEngine, Hmac, HmacEngine}; +use crate::{GeneralHash, HashEngine, Hmac, HmacEngine}; /// Output keying material max length multiple. const MAX_OUTPUT_BLOCKS: usize = 255; @@ -32,12 +32,12 @@ impl fmt::Display for MaxLengthError { impl std::error::Error for MaxLengthError {} /// HMAC-based Extract-and-Expand Key Derivation Function (HKDF). -pub struct Hkdf { +pub struct Hkdf { /// Pseudorandom key based on the extract step. prk: Hmac, } -impl Hkdf { +impl Hkdf { /// Initialize a HKDF by performing the extract step. pub fn new(salt: &[u8], ikm: &[u8]) -> Self { let mut hmac_engine: HmacEngine = HmacEngine::new(salt); diff --git a/hashes/src/hmac.rs b/hashes/src/hmac.rs index 80268f489..1e0f60a06 100644 --- a/hashes/src/hmac.rs +++ b/hashes/src/hmac.rs @@ -12,15 +12,15 @@ use core::{convert, fmt, str}; #[cfg(feature = "serde")] use serde::{Deserialize, Deserializer, Serialize, Serializer}; -use crate::{FromSliceError, Hash, HashEngine}; +use crate::{FromSliceError, GeneralHash, Hash, HashEngine}; /// A hash computed from a RFC 2104 HMAC. Parameterized by the underlying hash function. #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)] #[repr(transparent)] -pub struct Hmac(T); +pub struct Hmac(T); #[cfg(feature = "schemars")] -impl schemars::JsonSchema for Hmac { +impl schemars::JsonSchema for Hmac { fn is_referenceable() -> bool { ::is_referenceable() } fn schema_name() -> std::string::String { ::schema_name() } @@ -30,13 +30,13 @@ impl schemars::JsonSchema for Hmac { } } -impl str::FromStr for Hmac { +impl str::FromStr for Hmac { type Err = ::Err; fn from_str(s: &str) -> Result { Ok(Hmac(str::FromStr::from_str(s)?)) } } /// Pair of underlying hash midstates which represent the current state of an `HmacEngine`. -pub struct HmacMidState { +pub struct HmacMidState { /// Midstate of the inner hash engine pub inner: ::MidState, /// Midstate of the outer hash engine @@ -45,16 +45,16 @@ pub struct HmacMidState { /// Pair of underlying hash engines, used for the inner and outer hash of HMAC. #[derive(Clone)] -pub struct HmacEngine { +pub struct HmacEngine { iengine: T::Engine, oengine: T::Engine, } -impl Default for HmacEngine { +impl Default for HmacEngine { fn default() -> Self { HmacEngine::new(&[]) } } -impl HmacEngine { +impl HmacEngine { /// Constructs a new keyed HMAC from `key`. /// /// We only support underlying hashes whose block sizes are ≤ 128 bytes. @@ -67,10 +67,13 @@ impl HmacEngine { let mut ipad = [0x36u8; 128]; let mut opad = [0x5cu8; 128]; - let mut ret = HmacEngine { iengine: ::engine(), oengine: ::engine() }; + let mut ret = HmacEngine { + iengine: ::engine(), + oengine: ::engine(), + }; if key.len() > T::Engine::BLOCK_SIZE { - let hash = ::hash(key); + let hash = ::hash(key); for (b_i, b_h) in ipad.iter_mut().zip(hash.as_ref()) { *b_i ^= *b_h; } @@ -97,7 +100,7 @@ impl HmacEngine { } } -impl HashEngine for HmacEngine { +impl HashEngine for HmacEngine { type MidState = HmacMidState; fn midstate(&self) -> Self::MidState { @@ -111,25 +114,24 @@ impl HashEngine for HmacEngine { fn input(&mut self, buf: &[u8]) { self.iengine.input(buf) } } -impl fmt::Debug for Hmac { +impl fmt::Debug for Hmac { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Debug::fmt(&self.0, f) } } -impl fmt::Display for Hmac { +impl fmt::Display for Hmac { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Display::fmt(&self.0, f) } } -impl fmt::LowerHex for Hmac { +impl fmt::LowerHex for Hmac { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::LowerHex::fmt(&self.0, f) } } -impl convert::AsRef<[u8]> for Hmac { +impl convert::AsRef<[u8]> for Hmac { fn as_ref(&self) -> &[u8] { self.0.as_ref() } } -impl Hash for Hmac { +impl GeneralHash for Hmac { type Engine = HmacEngine; - type Bytes = T::Bytes; fn from_engine(mut e: HmacEngine) -> Hmac { let ihash = T::from_engine(e.iengine); @@ -137,7 +139,10 @@ impl Hash for Hmac { let ohash = T::from_engine(e.oengine); Hmac(ohash) } +} +impl Hash for Hmac { + type Bytes = T::Bytes; const LEN: usize = T::LEN; fn from_slice(sl: &[u8]) -> Result, FromSliceError> { T::from_slice(sl).map(Hmac) } @@ -150,14 +155,14 @@ impl Hash for Hmac { } #[cfg(feature = "serde")] -impl Serialize for Hmac { +impl Serialize for Hmac { fn serialize(&self, s: S) -> Result { Serialize::serialize(&self.0, s) } } #[cfg(feature = "serde")] -impl<'de, T: Hash + Deserialize<'de>> Deserialize<'de> for Hmac { +impl<'de, T: GeneralHash + Deserialize<'de>> Deserialize<'de> for Hmac { fn deserialize>(d: D) -> Result, D::Error> { let bytes = Deserialize::deserialize(d)?; Ok(Hmac(bytes)) @@ -169,7 +174,7 @@ mod tests { #[test] #[cfg(feature = "alloc")] fn test() { - use crate::{sha256, Hash, HashEngine, Hmac, HmacEngine}; + use crate::{sha256, GeneralHash as _, Hash as _, HashEngine, Hmac, HmacEngine}; #[derive(Clone)] struct Test { @@ -297,7 +302,7 @@ mod tests { fn hmac_sha512_serde() { use serde_test::{assert_tokens, Configure, Token}; - use crate::{sha512, Hash, Hmac}; + use crate::{sha512, Hash as _, Hmac}; #[rustfmt::skip] static HASH_BYTES: [u8; 64] = [ @@ -327,7 +332,7 @@ mod tests { mod benches { use test::Bencher; - use crate::{sha256, Hash, HashEngine, Hmac}; + use crate::{sha256, GeneralHash as _, HashEngine, Hmac}; #[bench] pub fn hmac_sha256_10(bh: &mut Bencher) { diff --git a/hashes/src/impls.rs b/hashes/src/impls.rs index 340161f88..bf9f0b8d4 100644 --- a/hashes/src/impls.rs +++ b/hashes/src/impls.rs @@ -60,14 +60,16 @@ impl_write!( Ok(buf.len()) }, |_us| { Ok(()) }, - T: crate::Hash + T: crate::GeneralHash ); #[cfg(test)] mod tests { use bitcoin_io::Write; - use crate::{hash160, hmac, ripemd160, sha1, sha256, sha256d, sha512, siphash24, Hash}; + use crate::{ + hash160, hmac, ripemd160, sha1, sha256, sha256d, sha512, siphash24, GeneralHash as _, + }; macro_rules! write_test { ($mod:ident, $exp_empty:expr, $exp_256:expr, $exp_64k:expr,) => { diff --git a/hashes/src/internal_macros.rs b/hashes/src/internal_macros.rs index 41006c4df..82445d67e 100644 --- a/hashes/src/internal_macros.rs +++ b/hashes/src/internal_macros.rs @@ -99,16 +99,19 @@ macro_rules! hash_trait_impls { } } - impl<$($gen: $gent),*> crate::Hash for Hash<$($gen),*> { + impl<$($gen: $gent),*> crate::GeneralHash for Hash<$($gen),*> { type Engine = HashEngine; - type Bytes = [u8; $bits / 8]; - - const LEN: usize = $bits / 8; - const DISPLAY_BACKWARD: bool = $reverse; fn engine() -> HashEngine { Self::engine() } fn from_engine(e: HashEngine) -> Hash<$($gen),*> { Self::from_engine(e) } + } + + impl<$($gen: $gent),*> crate::Hash for Hash<$($gen),*> { + type Bytes = [u8; $bits / 8]; + + const LEN: usize = $bits / 8; + const DISPLAY_BACKWARD: bool = $reverse; fn from_slice(sl: &[u8]) -> $crate::_export::_core::result::Result, FromSliceError> { Self::from_slice(sl) diff --git a/hashes/src/lib.rs b/hashes/src/lib.rs index f12f7de8c..09a57d410 100644 --- a/hashes/src/lib.rs +++ b/hashes/src/lib.rs @@ -12,7 +12,7 @@ //! Hashing a single byte slice or a string: //! //! ```rust -//! use bitcoin_hashes::{sha256, Hash as _}; +//! use bitcoin_hashes::{sha256, GeneralHash as _}; //! //! let bytes = [0u8; 5]; //! let hash_of_bytes = sha256::Hash::hash(&bytes); @@ -23,7 +23,7 @@ //! Hashing content from a reader: //! //! ```rust -//! use bitcoin_hashes::{sha256, Hash as _}; +//! use bitcoin_hashes::{sha256, GeneralHash as _}; //! //! #[cfg(std)] //! # fn main() -> std::io::Result<()> { @@ -147,40 +147,19 @@ pub trait HashEngine: Clone + Default { fn n_bytes_hashed(&self) -> usize; } -/// Trait which applies to hashes of all types. -pub trait Hash: - Copy - + Clone - + PartialEq - + Eq - + PartialOrd - + Ord - + hash::Hash - + fmt::Debug - + fmt::Display - + fmt::LowerHex - + convert::AsRef<[u8]> -{ +/// Trait describing hash digests which can be constructed by hashing arbitrary data. +pub trait GeneralHash: Hash { /// A hashing engine which bytes can be serialized into. It is expected /// to implement the `io::Write` trait, and to never return errors under /// any conditions. type Engine: HashEngine; - /// The byte array that represents the hash internally. - type Bytes: hex::FromHex + Copy; - /// Constructs a new engine. fn engine() -> Self::Engine { Self::Engine::default() } /// Produces a hash from the current state of a given engine. fn from_engine(e: Self::Engine) -> Self; - /// Length of the hash, in bytes. - const LEN: usize; - - /// Copies a byte slice into a hash object. - fn from_slice(sl: &[u8]) -> Result; - /// Hashes some bytes. fn hash(data: &[u8]) -> Self { let mut engine = Self::engine(); @@ -200,6 +179,30 @@ pub trait Hash: } Self::from_engine(engine) } +} + +/// Trait which applies to hashes of all types. +pub trait Hash: + Copy + + Clone + + PartialEq + + Eq + + PartialOrd + + Ord + + hash::Hash + + fmt::Debug + + fmt::Display + + fmt::LowerHex + + convert::AsRef<[u8]> +{ + /// The byte array that represents the hash internally. + type Bytes: hex::FromHex + Copy; + + /// Length of the hash, in bytes. + const LEN: usize; + + /// Copies a byte slice into a hash object. + fn from_slice(sl: &[u8]) -> Result; /// Flag indicating whether user-visible serializations of this hash /// should be backward. For some reason Satoshi decided this should be @@ -252,9 +255,17 @@ mod tests { struct TestNewtype2(sha256d::Hash); } + #[rustfmt::skip] + const DUMMY: TestNewtype = TestNewtype::from_byte_array([ + 0x12, 0x23, 0x34, 0x45, 0x56, 0x67, 0x78, 0x89, + 0x13, 0x24, 0x35, 0x46, 0x57, 0x68, 0x79, 0x8a, + 0x14, 0x25, 0x36, 0x47, 0x58, 0x69, 0x7a, 0x8b, + 0x15, 0x26, 0x37, 0x48, 0x59, 0x6a, 0x7b, 0x8c, + ]); + #[test] fn convert_newtypes() { - let h1 = TestNewtype::hash(&[]); + let h1 = DUMMY; let h2: TestNewtype2 = h1.to_raw_hash().into(); assert_eq!(&h1[..], &h2[..]); @@ -265,7 +276,7 @@ mod tests { #[test] fn newtype_fmt_roundtrip() { - let orig = TestNewtype::hash(&[]); + let orig = DUMMY; let hex = format!("{}", orig); let rinsed = hex.parse::().expect("failed to parse hex"); assert_eq!(rinsed, orig) diff --git a/hashes/src/sha256.rs b/hashes/src/sha256.rs index 37be2ff8b..6900ae583 100644 --- a/hashes/src/sha256.rs +++ b/hashes/src/sha256.rs @@ -101,7 +101,7 @@ impl crate::HashEngine for HashEngine { impl Hash { /// Iterate the sha256 algorithm to turn a sha256 hash into a sha256d hash pub fn hash_again(&self) -> sha256d::Hash { - crate::Hash::from_byte_array(::hash(&self.0).0) + crate::Hash::from_byte_array(::hash(&self.0).0) } /// Computes hash from `bytes` in `const` context. diff --git a/hashes/src/sha256t.rs b/hashes/src/sha256t.rs index 20924d633..3a924e136 100644 --- a/hashes/src/sha256t.rs +++ b/hashes/src/sha256t.rs @@ -207,6 +207,58 @@ macro_rules! sha256t_hash_newtype { $(#[$($hash_attr)*])* $hash_vis struct $hash_name($(#[$($field_attr)*])* $crate::sha256t::Hash<$tag>); } + + impl $hash_name { + /// Constructs a new engine. + #[allow(unused)] // the user of macro may not need this + pub fn engine() -> <$hash_name as $crate::GeneralHash>::Engine { + <$hash_name as $crate::GeneralHash>::engine() + } + + /// Produces a hash from the current state of a given engine. + #[allow(unused)] // the user of macro may not need this + pub fn from_engine(e: <$hash_name as $crate::GeneralHash>::Engine) -> Self { + <$hash_name as $crate::GeneralHash>::from_engine(e) + } + + /// Hashes some bytes. + #[allow(unused)] // the user of macro may not need this + pub fn hash(data: &[u8]) -> Self { + use $crate::HashEngine; + + let mut engine = Self::engine(); + engine.input(data); + Self::from_engine(engine) + } + + /// Hashes all the byte slices retrieved from the iterator together. + #[allow(unused)] // the user of macro may not need this + pub fn hash_byte_chunks(byte_slices: I) -> Self + where + B: AsRef<[u8]>, + I: IntoIterator, + { + use $crate::HashEngine; + + let mut engine = Self::engine(); + for slice in byte_slices { + engine.input(slice.as_ref()); + } + Self::from_engine(engine) + } + } + + impl $crate::GeneralHash for $hash_name { + type Engine = <$crate::sha256t::Hash<$tag> as $crate::GeneralHash>::Engine; + + fn engine() -> Self::Engine { + <$crate::sha256t::Hash<$tag> as $crate::GeneralHash>::engine() + } + + fn from_engine(e: Self::Engine) -> $hash_name { + Self::from(<$crate::sha256t::Hash<$tag> as $crate::GeneralHash>::from_engine(e)) + } + } } } diff --git a/hashes/src/util.rs b/hashes/src/util.rs index 51f25b4a2..746828b7c 100644 --- a/hashes/src/util.rs +++ b/hashes/src/util.rs @@ -209,46 +209,11 @@ macro_rules! hash_newtype { &self.0 } - /// Constructs a new engine. - pub fn engine() -> <$hash as $crate::Hash>::Engine { - <$hash as $crate::Hash>::engine() - } - - /// Produces a hash from the current state of a given engine. - pub fn from_engine(e: <$hash as $crate::Hash>::Engine) -> Self { - Self::from(<$hash as $crate::Hash>::from_engine(e)) - } - /// Copies a byte slice into a hash object. pub fn from_slice(sl: &[u8]) -> $crate::_export::_core::result::Result<$newtype, $crate::FromSliceError> { Ok($newtype(<$hash as $crate::Hash>::from_slice(sl)?)) } - /// Hashes some bytes. - #[allow(unused)] // the user of macro may not need this - pub fn hash(data: &[u8]) -> Self { - use $crate::HashEngine; - - let mut engine = Self::engine(); - engine.input(data); - Self::from_engine(engine) - } - - /// Hashes all the byte slices retrieved from the iterator together. - pub fn hash_byte_chunks(byte_slices: I) -> Self - where - B: AsRef<[u8]>, - I: IntoIterator, - { - use $crate::HashEngine; - - let mut engine = Self::engine(); - for slice in byte_slices { - engine.input(slice.as_ref()); - } - Self::from_engine(engine) - } - /// Returns the underlying byte array. pub const fn to_byte_array(self) -> <$hash as $crate::Hash>::Bytes { self.0.to_byte_array() @@ -279,16 +244,12 @@ macro_rules! hash_newtype { } impl $crate::Hash for $newtype { - type Engine = <$hash as $crate::Hash>::Engine; type Bytes = <$hash as $crate::Hash>::Bytes; const LEN: usize = <$hash as $crate::Hash>::LEN; const DISPLAY_BACKWARD: bool = $crate::hash_newtype_get_direction!($hash, $(#[$($type_attrs)*])*); - fn engine() -> <$hash as $crate::Hash>::Engine { Self::engine() } - - fn from_engine(e: <$hash as $crate::Hash>::Engine) -> $newtype { Self::from_engine(e) } - + #[inline] fn from_slice(sl: &[u8]) -> $crate::_export::_core::result::Result<$newtype, $crate::FromSliceError> { Self::from_slice(sl) } diff --git a/hashes/tests/regression.rs b/hashes/tests/regression.rs index 73de4fa3a..c4572a8d0 100644 --- a/hashes/tests/regression.rs +++ b/hashes/tests/regression.rs @@ -2,7 +2,7 @@ use bitcoin_hashes::{ hash160, ripemd160, sha1, sha256, sha256d, sha256t, sha384, sha512, sha512_256, siphash24, - Hash as _, HashEngine as _, Hmac, HmacEngine, + GeneralHash as _, HashEngine as _, Hmac, HmacEngine, }; const DATA: &str = "arbitrary data to hash as a regression test";