Function bech32::segwit::encode_v1

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

Encodes a segwit version 1 address.

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