Function bech32::segwit::encode_v0

source ·
pub fn encode_v0(
    hrp: Hrp,
    witness_program: &[u8]
) -> Result<String, EncodeError>
Available on crate feature alloc only.
Expand description

Encodes a segwit version 0 address.

Does validity checks on the witness_version, length checks on the witness_program, and checks the total encoded string length.