Introduce wrappers around CZCViewingKey

This commit is contained in:
Jack Grigg
2018-04-24 22:53:54 +01:00
parent 472f75bc2d
commit 8bf3a3d700
4 changed files with 25 additions and 7 deletions

View File

@@ -3067,12 +3067,10 @@ UniValue zc_raw_keygen(const UniValue& params, bool fHelp)
auto addr = k.address();
auto viewing_key = k.viewing_key();
CZCViewingKey viewingkey(viewing_key);
UniValue result(UniValue::VOBJ);
result.push_back(Pair("zcaddress", EncodePaymentAddress(addr)));
result.push_back(Pair("zcsecretkey", EncodeSpendingKey(k)));
result.push_back(Pair("zcviewingkey", viewingkey.ToString()));
result.push_back(Pair("zcviewingkey", EncodeViewingKey(viewing_key)));
return result;
}