Function bech32::segwit::encoded_length

source ·
pub fn encoded_length(
    hrp: Hrp,
    _witness_version: Fe32,
    witness_program: &[u8]
) -> Result<usize, SegwitCodeLengthError>
Expand description

Returns the length of the address after encoding HRP, witness version and program.

§Returns

Ok(address_length) if the encoded address length is less than or equal to 90. Otherwise returns a SegwitCodeLengthError containing the encoded address length.