Takes in the data portion of a bech32 address and decodes it to a byte array It also checks the validity of the data portion according to BIP173
Checks if the possible human readable part follows BIP173 rules
Creates a checksum for the given byte vector according to BIP173
Assumes we are given a valid bech32 string
Takes a bech32 5bit array and encodes it to a string
Converts a byte vector to 5bit vector and then serializes to bech32
Converts a byte vector to 5bit vector and then serializes to bech32
Encodes a bitvector to a bech32 string
Decodes a byte array from 5bits to base 8bits
Converts a byte array from 8bits to base 5 bits
Converts a byte vector from 8bits to 5bits
Expands the human readable part of a bech32 address as per BIP173
Validate a Bech32 string, and determine HRP and data.
Validate a Bech32 string, and determine HRP and data. Fails if HRP is not LN or BTC compatible.
Mimics this function by Sipa
A abstract class representing basic utility functions of Bech32 For more information on Bech32 please seee BIP173 https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki