decodeBech32
Decomposes a Bech32 checksummed string (eg. a Cardano address), and returns the human readable part and the original bytes Throws an error if checksum is invalid.
export function decodeBech32(addr: string): [string, number[]]
Arguments
Name | Type | Description |
---|---|---|
addr | string |
Return value
First part is the human-readable part, second part is a list containing the underlying bytes.
[string, number[]]