Module which defines bech32 functions.
const E_DECODE_FAILED: u64 = 2;
const E_ENCODE_FAILED: u64 = 1;
const E_INVALID_BIP_CODE: u64 = 3;
const E_INVALID_NETWORK: u64 = 4;
const E_INVALID_WITNESS_VERSION: u64 = 5;
@param hrp: human-readable part in string @param data: arbitrary data to be encoded. Encode arbitrary data using string as the human-readable part and append a bech32 checksum.
@param network: network to be selected, i.e. bc, tb, or bcrt @param witness_version: segwit witness version. 0 for bech32, 1 for bech32m and taproot, and 2-16 is included. @param data: arbitrary data to be encoded. Encode arbitrary data to a Bitcoin address using string as the network, number as the witness version
public fun segwit_encode(network: vector<u8>, witness_version: u8, data: vector<u8>): vector<u8>
@param hrp: human-readable part bytes to be used as a decoding input @param encoded: encoded bytes to be decoded as data Decode a bech32 encoded string that includes a bech32 checksum.
@param hrp: human-readable part bytes to be used as a decoding input @param witness_ascii_version: segwit witness ASCII version to be used as a decoding input @param encoded: encoded bytes to be decoded as data Decode an encoded Bitcoin address
public fun segwit_decode(hrp: vector<u8>, witness_ascii_version: u8, encoded: vector<u8>): vector<u8>