In lossy mode, the replacement character � is used to substitude invalid
encodings. By default lossy mode is off and invalid data will lead to exceptions.
Parameters
data: Uint8Array
lossy: boolean = false
Returns string
normalizeBech32
normalizeBech32(address: string): string
Takes a bech32 address and returns a normalized (i.e. lower case) representation of it.
The input is validated along the way, which makes this significantly safer than
using address.toLowerCase().
Takes UTF-8 data and decodes it to a string.
In lossy mode, the replacement character � is used to substitude invalid encodings. By default lossy mode is off and invalid data will lead to exceptions.