Add WriteHDKeypath function and move *HDKeypath to util/bip32.{h,cpp}

Creates new files util/bip32.h and util/bip32.cpp for containing
BIP 32 stuff.
Moves FormatKeyPath from descriptor.cpp to util/bip32.
Adds a wrapper around it to prepent the 'm' for when just the
BIP 32 style keypath is needed.
This commit is contained in:
Andrew Chow
2018-11-06 09:23:43 -05:00
parent c45415f73a
commit e7652d3f64
10 changed files with 95 additions and 57 deletions

View File

@@ -197,9 +197,6 @@ bool ConvertBits(const O& outfn, I it, I end) {
return true;
}
/** Parse an HD keypaths like "m/7/0'/2000". */
NODISCARD bool ParseHDKeypath(const std::string& keypath_str, std::vector<uint32_t>& keypath);
/**
* Converts the given character to its lowercase equivalent.
* This function is locale independent. It only converts uppercase