Functions | |
std::pair< int, data > | decode (const std::string &hrp, const std::string &addr) |
std::string | encode (const std::string &hrp, int witver, const data &witprog) |
std::string | encode (const std::string &hrp, int witver, const std::vector< uint8_t > &witprog) |
std::pair< int, std::vector< uint8_t > > segwit_addr::decode | ( | const std::string & | hrp, |
const std::string & | addr | ||
) |
Decode a SegWit address.
Decode a SegWit address. Returns (witver, witprog). witver = -1 means failure.
std::string segwit_addr::encode | ( | const std::string & | hrp, |
int | witver, | ||
const data & | witprog | ||
) |
Encode a SegWit address.
std::string segwit_addr::encode | ( | const std::string & | hrp, |
int | witver, | ||
const std::vector< uint8_t > & | witprog | ||
) |
Encode a SegWit address. Empty string means failure.