pub fn encode(data: &[u8], hrp: &str, variant: Variant) -> String
Convenience method for (general-purpose) Bech32 encoding.
Works around a bit of awkwardness in the [bech32] API. Panics if the HRP is invalid.
bech32