mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Round out node private key functionality.
This commit is contained in:
@@ -141,6 +141,20 @@ void NewcoinAddress::setNodePublic(const std::vector<unsigned char>& vPublic)
|
||||
// NodePrivate
|
||||
//
|
||||
|
||||
const std::vector<unsigned char>& NewcoinAddress::getNodePrivateData() const
|
||||
{
|
||||
switch (nVersion) {
|
||||
case VER_NONE:
|
||||
throw std::runtime_error("unset source");
|
||||
|
||||
case VER_NODE_PRIVATE:
|
||||
return vchData;
|
||||
|
||||
default:
|
||||
throw std::runtime_error(str(boost::format("bad source: %d") % int(nVersion)));
|
||||
}
|
||||
}
|
||||
|
||||
uint256 NewcoinAddress::getNodePrivate() const
|
||||
{
|
||||
switch (nVersion) {
|
||||
|
||||
@@ -54,6 +54,7 @@ public:
|
||||
//
|
||||
// Node Private
|
||||
//
|
||||
const std::vector<unsigned char>& getNodePrivateData() const;
|
||||
uint256 getNodePrivate() const;
|
||||
|
||||
std::string humanNodePrivate() const;
|
||||
|
||||
@@ -51,6 +51,7 @@ public:
|
||||
void start();
|
||||
|
||||
NewcoinAddress& getNodePublic() { return mNodePublicKey; }
|
||||
NewcoinAddress& getNodePrivate() { return mNodePrivateKey; }
|
||||
|
||||
NewcoinAddress addFamily(const std::string& passPhrase, bool lock);
|
||||
NewcoinAddress addFamily(const NewcoinAddress& familySeed, bool lock);
|
||||
|
||||
Reference in New Issue
Block a user