Implemented RPC calls z_importkey, z_exportkey, z_getnewaddress.

Modified RPC calls dumpwallet and importwallet to include spending keys.
This commit is contained in:
Simon
2016-08-09 23:15:22 -07:00
parent 2833fb14af
commit c1c4594371
9 changed files with 300 additions and 3 deletions

View File

@@ -10,6 +10,7 @@
#include "wallet/db.h"
#include "key.h"
#include "keystore.h"
#include "zcash/Address.hpp"
#include <list>
#include <stdint.h>
@@ -130,6 +131,9 @@ public:
static bool Recover(CDBEnv& dbenv, const std::string& filename, bool fOnlyKeys);
static bool Recover(CDBEnv& dbenv, const std::string& filename);
/// Write spending key to wallet database, where key is payment address and value is spending key.
bool WriteZKey(const libzcash::PaymentAddress& addr, const libzcash::SpendingKey& key, const CKeyMetadata &keyMeta);
private:
CWalletDB(const CWalletDB&);
void operator=(const CWalletDB&);