Skip to main content

decode_optional_bech32

Function decode_optional_bech32 

Source
pub fn decode_optional_bech32(addr: Option<&str>) -> Result<Bytes, CoreError>
Expand description

Decodes an optional bech32 address, returning empty Bytes if None or empty.

§Arguments

  • addr - Optional bech32-encoded address string

§Returns

The raw bytes, or empty Bytes if input is None/empty