14 #ifndef BITCOIN_BECH32_H 15 #define BITCOIN_BECH32_H 33 std::string
Encode(
Encoding encoding,
const std::string& hrp,
const std::vector<uint8_t>&
values);
46 DecodeResult
Decode(
const std::string& str);
49 std::pair<std::string, std::vector<int>>
LocateErrors(
const std::string& str);
53 #endif // BITCOIN_BECH32_H Bech32 encoding as defined in BIP173.
std::vector< uint8_t > data
The payload (excluding checksum)
std::pair< std::string, std::vector< int > > LocateErrors(const std::string &str)
Find index of an incorrect character in a Bech32 string.
std::string Encode(Encoding encoding, const std::string &hrp, const data &values)
Encode a Bech32 or Bech32m string.
static const int64_t values[]
A selection of numbers that do not trigger int64_t overflow when added/subtracted.
DecodeResult(Encoding enc, std::string &&h, std::vector< uint8_t > &&d)
Bech32m encoding as defined in BIP350.
std::string hrp
The human readable part.
DecodeResult Decode(const std::string &str)
Decode a Bech32 or Bech32m string.
Encoding encoding
What encoding was detected in the result; Encoding::INVALID if failed.