This follows the coding style guideline that the file that contains a
class should follow the exact name of this (main) class.
key.{h|cpp} -> PrivateKey.{h|cpp}
The unit tests testing base58 encoding were using univalue JSON
parsing, since we deprecatd univalue to be a hub-private lib
this has now been ported to Qts JSON parser.
Which also makes the clunky cmake hack nice to replace with the
QRC files concept.
As I was in there anyway, the base58 methods being global scope
C-style methods has now been fixed by putting them in a namespace.
The API-wise nice addition of base58 encoding learning about
private keys has as a downside that external projects get the
surprise of pulling in a lot more code.
Those that want to avoid this, while not using private keys, can
simply add
add_definitions(-DNPRIVKEY) # avoid private-key using code
to their CMake file.
Also write some new accessor methods on the baseclass.
The longer term idea is to make the server itself only use the uint160
raw version for bitcoin addresses.
For now move the encodings (between that uint160 and human-readable) to
the utils library.