penumbra_proto::serializers::bech32str

Function encode

Source
pub fn encode(data: &[u8], hrp: &str, variant: Variant) -> String
Expand description

Convenience method for (general-purpose) Bech32 encoding.

Works around a bit of awkwardness in the [bech32] API. Panics if the HRP is invalid.