Qtbech32 0.1.1
Bech32 library
Functions
segwit_addr Namespace Reference

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)
 

Function Documentation

◆ decode()

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.

◆ encode() [1/2]

std::string segwit_addr::encode ( const std::string hrp,
int  witver,
const data &  witprog 
)

Encode a SegWit address.

◆ encode() [2/2]

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.