12bool ParseHDKeypath(
const std::string& keypath_str, std::vector<uint32_t>& keypath)
 
   14    std::stringstream ss(keypath_str);
 
   17    while (std::getline(ss, item, 
'/')) {
 
   18        if (item.compare(
"m") == 0) {
 
   27        size_t pos = item.find(
"'");
 
   28        if (pos != std::string::npos) {
 
   30            if (pos != item.size() - 1) {
 
   34            item = item.substr(0, item.size() - 1); 
 
   38        if (item.find_first_not_of( 
"0123456789" ) != std::string::npos) {
 
   47        keypath.push_back(path);
 
   58        if (i >> 31) ret += 
'\'';
 
bool ParseHDKeypath(const std::string &keypath_str, std::vector< uint32_t > &keypath)
Parse an HD keypaths like "m/7/0'/2000".
std::string FormatHDKeypath(const std::vector< uint32_t > &path)
std::string WriteHDKeypath(const std::vector< uint32_t > &keypath)
Write HD keypaths as strings.
bool ParseUInt32(const std::string &str, uint32_t *out)
Convert decimal string to unsigned 32-bit integer with strict parse error feedback.