parent
77a8f076b8
commit
e84346644e
|
@ -803,8 +803,8 @@ impl Address<NetworkUnchecked> {
|
||||||
|
|
||||||
/// Parse a bech32 Address string
|
/// Parse a bech32 Address string
|
||||||
pub fn from_bech32_str(s: &str) -> Result<Address<NetworkUnchecked>, Bech32Error> {
|
pub fn from_bech32_str(s: &str) -> Result<Address<NetworkUnchecked>, Bech32Error> {
|
||||||
let (hrp, witness_version, data) = bech32::segwit::decode(s)
|
let (hrp, witness_version, data) =
|
||||||
.map_err(|e| Bech32Error::ParseBech32(ParseBech32Error(e)))?;
|
bech32::segwit::decode(s).map_err(|e| Bech32Error::ParseBech32(ParseBech32Error(e)))?;
|
||||||
let version = WitnessVersion::try_from(witness_version.to_u8())?;
|
let version = WitnessVersion::try_from(witness_version.to_u8())?;
|
||||||
let program = WitnessProgram::new(version, &data)
|
let program = WitnessProgram::new(version, &data)
|
||||||
.expect("bech32 guarantees valid program length for witness");
|
.expect("bech32 guarantees valid program length for witness");
|
||||||
|
|
|
@ -87,7 +87,10 @@ pub mod locktime {
|
||||||
//! whether bit 22 of the `u32` consensus value is set.
|
//! whether bit 22 of the `u32` consensus value is set.
|
||||||
|
|
||||||
/// Re-export everything from the `primitives::locktime::relative` module.
|
/// Re-export everything from the `primitives::locktime::relative` module.
|
||||||
pub use primitives::locktime::relative::{Height, LockTime, Time, TimeOverflowError, DisabledLockTimeError, IncompatibleHeightError, IncompatibleTimeError};
|
pub use primitives::locktime::relative::{
|
||||||
|
DisabledLockTimeError, Height, IncompatibleHeightError, IncompatibleTimeError,
|
||||||
|
LockTime, Time, TimeOverflowError,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
// SPDX-License-Identifier: CC0-1.0
|
// SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
//! SipHash 2-4 implementation.
|
//! SipHash 2-4 implementation.
|
||||||
|
|
|
@ -51,7 +51,7 @@ pub use units::amount::{Amount, SignedAmount};
|
||||||
pub use units::{
|
pub use units::{
|
||||||
block::{BlockHeight, BlockInterval},
|
block::{BlockHeight, BlockInterval},
|
||||||
fee_rate::FeeRate,
|
fee_rate::FeeRate,
|
||||||
weight::Weight
|
weight::Weight,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
|
|
Loading…
Reference in New Issue