Changeset View
Changeset View
Standalone View
Standalone View
src/base58.cpp
Show First 20 Lines • Show All 285 Lines • ▼ Show 20 Lines | |||||
bool CBitcoinSecret::SetString(const char *pszSecret) { | bool CBitcoinSecret::SetString(const char *pszSecret) { | ||||
return CBase58Data::SetString(pszSecret) && IsValid(); | return CBase58Data::SetString(pszSecret) && IsValid(); | ||||
} | } | ||||
bool CBitcoinSecret::SetString(const std::string &strSecret) { | bool CBitcoinSecret::SetString(const std::string &strSecret) { | ||||
return SetString(strSecret.c_str()); | return SetString(strSecret.c_str()); | ||||
} | } | ||||
std::string EncodeDestination(const CTxDestination &dest) { | std::string EncodeLegacyAddr(const CTxDestination &dest, | ||||
return boost::apply_visitor(DestinationEncoder(Params()), dest); | |||||
} | |||||
CTxDestination DecodeDestination(const std::string &str) { | |||||
return DecodeDestination(str, Params()); | |||||
} | |||||
bool IsValidDestinationString(const std::string &str, | |||||
const CChainParams ¶ms) { | const CChainParams ¶ms) { | ||||
return IsValidDestination(DecodeDestination(str, params)); | return boost::apply_visitor(DestinationEncoder(params), dest); | ||||
} | } | ||||
bool IsValidDestinationString(const std::string &str) { | CTxDestination DecodeLegacyAddr(const std::string &str, | ||||
return IsValidDestination(DecodeDestination(str, Params())); | const CChainParams ¶ms) { | ||||
return DecodeDestination(str, params); | |||||
} | } |