From 500df6bd3217f981d11beecd2b70b39e779e089f Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 3 Dec 2012 17:46:33 -0800 Subject: [PATCH 1/5] Refactor RPC wallet_propose. --- src/cpp/ripple/CallRPC.cpp | 13 ++++++++++++- src/cpp/ripple/CallRPC.h | 5 +++-- src/cpp/ripple/RPCHandler.cpp | 15 ++++++++------- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/cpp/ripple/CallRPC.cpp b/src/cpp/ripple/CallRPC.cpp index 1b10a077c..ba98a48d7 100644 --- a/src/cpp/ripple/CallRPC.cpp +++ b/src/cpp/ripple/CallRPC.cpp @@ -239,6 +239,17 @@ Json::Value RPCParser::parseWalletAccounts(const Json::Value& jvParams) return jvRequest; } +// wallet_propose [] +// is only for testing. Master seeds should only be generated randomly. +Json::Value RPCParser::parseWalletPropose(const Json::Value& jvParams) +{ + Json::Value jvRequest; + + jvRequest["passphrase"] = jvParams[0u].asString(); + + return jvRequest; +} + // // parseCommand // @@ -300,7 +311,7 @@ Json::Value RPCParser::parseCommand(std::string strMethod, Json::Value jvParams) // { "validation_seed", &RPCParser::doValidationSeed, 0, 1, false, false, optNone }, { "wallet_accounts", &RPCParser::parseWalletAccounts, 1, 1 }, -// { "wallet_propose", &RPCParser::doWalletPropose, 0, 1, false, false, optNone }, + { "wallet_propose", &RPCParser::parseWalletPropose, 0, 1 }, // { "wallet_seed", &RPCParser::doWalletSeed, 0, 1, false, false, optNone }, // // { "login", &RPCParser::doLogin, 2, 2, true, false, optNone }, diff --git a/src/cpp/ripple/CallRPC.h b/src/cpp/ripple/CallRPC.h index 99d5caabd..db3677ec5 100644 --- a/src/cpp/ripple/CallRPC.h +++ b/src/cpp/ripple/CallRPC.h @@ -11,17 +11,18 @@ class RPCParser protected: typedef Json::Value (RPCParser::*parseFuncPtr)(const Json::Value &jvParams); - Json::Value parseAsIs(const Json::Value& jvParams); Json::Value parseAccountInfo(const Json::Value& jvParams); Json::Value parseAccountTransactions(const Json::Value& jvParams); + Json::Value parseAsIs(const Json::Value& jvParams); Json::Value parseConnect(const Json::Value& jvParams); Json::Value parseEvented(const Json::Value& jvParams); Json::Value parseLedger(const Json::Value& jvParams); - Json::Value parseWalletAccounts(const Json::Value& jvParams); Json::Value parseRippleLinesGet(const Json::Value& jvParams); Json::Value parseSubmit(const Json::Value& jvParams); Json::Value parseUnlAdd(const Json::Value& jvParams); Json::Value parseUnlDelete(const Json::Value& jvParams); + Json::Value parseWalletAccounts(const Json::Value& jvParams); + Json::Value parseWalletPropose(const Json::Value& jvParams); public: Json::Value parseCommand(std::string strMethod, Json::Value jvParams); diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index b2d602824..ce1395b81 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -1372,20 +1372,21 @@ Json::Value RPCHandler::doLogRotate(Json::Value) return Log::rotateLog(); } -// wallet_propose [] -// is only for testing. Master seeds should only be generated randomly. -Json::Value RPCHandler::doWalletPropose(Json::Value params) +// { +// passphrase: +// } +Json::Value RPCHandler::doWalletPropose(Json::Value jvRequest) { RippleAddress naSeed; RippleAddress naAccount; - if (params.empty()) + if (jvRequest.isMember("passphrase")) { - naSeed.setSeedRandom(); + naSeed = RippleAddress::createSeedGeneric(jvRequest["passphrase"].asString()); } else { - naSeed = RippleAddress::createSeedGeneric(params[0u].asString()); + naSeed.setSeedRandom(); } RippleAddress naGenerator = RippleAddress::createGeneratorPublic(naSeed); @@ -2219,7 +2220,7 @@ Json::Value RPCHandler::doCommand(Json::Value& jvParams, int iRole) { "validation_seed", &RPCHandler::doValidationSeed, 0, 1, false, false, optNone }, { "wallet_accounts", &RPCHandler::doWalletAccounts, -1, -1, false, false, optCurrent }, - { "wallet_propose", &RPCHandler::doWalletPropose, 0, 1, false, false, optNone }, + { "wallet_propose", &RPCHandler::doWalletPropose, -1, -1, false, false, optNone }, { "wallet_seed", &RPCHandler::doWalletSeed, 0, 1, false, false, optNone }, { "login", &RPCHandler::doLogin, 2, 2, true, false, optNone }, From be48c6510c132df713f3df48762bb3d3292d1a6f Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 3 Dec 2012 17:52:30 -0800 Subject: [PATCH 2/5] Refactor RPC wallet_seed. --- src/cpp/ripple/CallRPC.cpp | 16 ++++++++++++++-- src/cpp/ripple/CallRPC.h | 1 + src/cpp/ripple/RPCHandler.cpp | 29 +++++++++++++++-------------- 3 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/cpp/ripple/CallRPC.cpp b/src/cpp/ripple/CallRPC.cpp index ba98a48d7..22c2129aa 100644 --- a/src/cpp/ripple/CallRPC.cpp +++ b/src/cpp/ripple/CallRPC.cpp @@ -245,7 +245,19 @@ Json::Value RPCParser::parseWalletPropose(const Json::Value& jvParams) { Json::Value jvRequest; - jvRequest["passphrase"] = jvParams[0u].asString(); + if (jvParams.size()) + jvRequest["passphrase"] = jvParams[0u].asString(); + + return jvRequest; +} + +// wallet_seed [||] +Json::Value RPCParser::parseWalletSeed(const Json::Value& jvParams) +{ + Json::Value jvRequest; + + if (jvParams.size()) + jvRequest["secret"] = jvParams[0u].asString(); return jvRequest; } @@ -312,7 +324,7 @@ Json::Value RPCParser::parseCommand(std::string strMethod, Json::Value jvParams) { "wallet_accounts", &RPCParser::parseWalletAccounts, 1, 1 }, { "wallet_propose", &RPCParser::parseWalletPropose, 0, 1 }, -// { "wallet_seed", &RPCParser::doWalletSeed, 0, 1, false, false, optNone }, + { "wallet_seed", &RPCParser::parseWalletSeed, 0, 1 }, // // { "login", &RPCParser::doLogin, 2, 2, true, false, optNone }, diff --git a/src/cpp/ripple/CallRPC.h b/src/cpp/ripple/CallRPC.h index db3677ec5..37431d547 100644 --- a/src/cpp/ripple/CallRPC.h +++ b/src/cpp/ripple/CallRPC.h @@ -23,6 +23,7 @@ protected: Json::Value parseUnlDelete(const Json::Value& jvParams); Json::Value parseWalletAccounts(const Json::Value& jvParams); Json::Value parseWalletPropose(const Json::Value& jvParams); + Json::Value parseWalletSeed(const Json::Value& jvParams); public: Json::Value parseCommand(std::string strMethod, Json::Value jvParams); diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index ce1395b81..f9794c980 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -1401,39 +1401,40 @@ Json::Value RPCHandler::doWalletPropose(Json::Value jvRequest) return obj; } -// wallet_seed [||] -Json::Value RPCHandler::doWalletSeed(Json::Value params) +// { +// secret: +// } +Json::Value RPCHandler::doWalletSeed(Json::Value jvRequest) { - RippleAddress naSeed; + RippleAddress raSeed; + bool bSecret = jvRequest.isMember("secret"); - if (params.size() - && !naSeed.setSeedGeneric(params[0u].asString())) + if (bSecret && !raSeed.setSeedGeneric(jvRequest["secret"].asString())) { return rpcError(rpcBAD_SEED); } else { - RippleAddress naAccount; + RippleAddress raAccount; - if (!params.size()) + if (!bSecret) { - naSeed.setSeedRandom(); + raSeed.setSeedRandom(); } - RippleAddress naGenerator = RippleAddress::createGeneratorPublic(naSeed); + RippleAddress raGenerator = RippleAddress::createGeneratorPublic(raSeed); - naAccount.setAccountPublic(naGenerator, 0); + raAccount.setAccountPublic(raGenerator, 0); Json::Value obj(Json::objectValue); - obj["seed"] = naSeed.humanSeed(); - obj["key"] = naSeed.humanSeed1751(); + obj["seed"] = raSeed.humanSeed(); + obj["key"] = raSeed.humanSeed1751(); return obj; } } - // TODO: for now this simply checks if this is the admin account // TODO: need to prevent them hammering this over and over // TODO: maybe a better way is only allow admin from local host @@ -2221,7 +2222,7 @@ Json::Value RPCHandler::doCommand(Json::Value& jvParams, int iRole) { "wallet_accounts", &RPCHandler::doWalletAccounts, -1, -1, false, false, optCurrent }, { "wallet_propose", &RPCHandler::doWalletPropose, -1, -1, false, false, optNone }, - { "wallet_seed", &RPCHandler::doWalletSeed, 0, 1, false, false, optNone }, + { "wallet_seed", &RPCHandler::doWalletSeed, -1, -1, false, false, optNone }, { "login", &RPCHandler::doLogin, 2, 2, true, false, optNone }, From 9435dbee1895860a85076e1cf7bfdfbdc8532793 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 3 Dec 2012 17:57:18 -0800 Subject: [PATCH 3/5] Refactor RPC validation_create. --- src/cpp/ripple/CallRPC.cpp | 16 +++++++++++++++- src/cpp/ripple/CallRPC.h | 1 + src/cpp/ripple/RPCHandler.cpp | 27 +++++++++++++-------------- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/cpp/ripple/CallRPC.cpp b/src/cpp/ripple/CallRPC.cpp index 22c2129aa..2b3ffbf7d 100644 --- a/src/cpp/ripple/CallRPC.cpp +++ b/src/cpp/ripple/CallRPC.cpp @@ -229,6 +229,20 @@ Json::Value RPCParser::parseUnlDelete(const Json::Value& jvParams) return jvRequest; } +// validation_create [||] +// +// NOTE: It is poor security to specify secret information on the command line. This information might be saved in the command +// shell history file (e.g. .bash_history) and it may be leaked via the process status command (i.e. ps). +Json::Value RPCParser::parseValidationCreate(const Json::Value& jvParams) +{ + Json::Value jvRequest; + + if (jvParams.size()) + jvRequest["secret"] = jvParams[0u].asString(); + + return jvRequest; +} + // wallet_accounts Json::Value RPCParser::parseWalletAccounts(const Json::Value& jvParams) { @@ -319,7 +333,7 @@ Json::Value RPCParser::parseCommand(std::string strMethod, Json::Value jvParams) { "unl_reset", &RPCParser::parseAsIs, 0, 0 }, { "unl_score", &RPCParser::parseAsIs, 0, 0 }, -// { "validation_create", &RPCParser::doValidationCreate, 0, 1, false, false, optNone }, + { "validation_create", &RPCParser::parseValidationCreate, 0, 1 }, // { "validation_seed", &RPCParser::doValidationSeed, 0, 1, false, false, optNone }, { "wallet_accounts", &RPCParser::parseWalletAccounts, 1, 1 }, diff --git a/src/cpp/ripple/CallRPC.h b/src/cpp/ripple/CallRPC.h index 37431d547..5741fb53e 100644 --- a/src/cpp/ripple/CallRPC.h +++ b/src/cpp/ripple/CallRPC.h @@ -21,6 +21,7 @@ protected: Json::Value parseSubmit(const Json::Value& jvParams); Json::Value parseUnlAdd(const Json::Value& jvParams); Json::Value parseUnlDelete(const Json::Value& jvParams); + Json::Value parseValidationCreate(const Json::Value& jvParams); Json::Value parseWalletAccounts(const Json::Value& jvParams); Json::Value parseWalletPropose(const Json::Value& jvParams); Json::Value parseWalletSeed(const Json::Value& jvParams); diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index f9794c980..3e04a9b67 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -1237,28 +1237,27 @@ Json::Value RPCHandler::doAccountTransactions(Json::Value jvRequest) #endif } -// validation_create [||] -// -// NOTE: It is poor security to specify secret information on the command line. This information might be saved in the command -// shell history file (e.g. .bash_history) and it may be leaked via the process status command (i.e. ps). -Json::Value RPCHandler::doValidationCreate(Json::Value params) { - RippleAddress naSeed; +// { +// secret: +// } +Json::Value RPCHandler::doValidationCreate(Json::Value jvParams) { + RippleAddress raSeed; Json::Value obj(Json::objectValue); - if (params.empty()) + if (!jvParams.isMember("secret")) { - std::cerr << "Creating random validation seed." << std::endl; + cLog(lsDEBUG) << "Creating random validation seed."; - naSeed.setSeedRandom(); // Get a random seed. + raSeed.setSeedRandom(); // Get a random seed. } - else if (!naSeed.setSeedGeneric(params[0u].asString())) + else if (!raSeed.setSeedGeneric(jvParams["secret"].asString())) { return rpcError(rpcBAD_SEED); } - obj["validation_public_key"] = RippleAddress::createNodePublic(naSeed).humanNodePublic(); - obj["validation_seed"] = naSeed.humanSeed(); - obj["validation_key"] = naSeed.humanSeed1751(); + obj["validation_public_key"] = RippleAddress::createNodePublic(raSeed).humanNodePublic(); + obj["validation_seed"] = raSeed.humanSeed(); + obj["validation_key"] = raSeed.humanSeed1751(); return obj; } @@ -2217,7 +2216,7 @@ Json::Value RPCHandler::doCommand(Json::Value& jvParams, int iRole) { "unl_reset", &RPCHandler::doUnlReset, -1, -1, true, false, optNone }, { "unl_score", &RPCHandler::doUnlScore, -1, -1, true, false, optNone }, - { "validation_create", &RPCHandler::doValidationCreate, 0, 1, false, false, optNone }, + { "validation_create", &RPCHandler::doValidationCreate, -1, -1, false, false, optNone }, { "validation_seed", &RPCHandler::doValidationSeed, 0, 1, false, false, optNone }, { "wallet_accounts", &RPCHandler::doWalletAccounts, -1, -1, false, false, optCurrent }, From ecf8c6976394195e0de7b9be99157028b52604a5 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 3 Dec 2012 18:00:59 -0800 Subject: [PATCH 4/5] Refactor RPC validation_seed. --- src/cpp/ripple/CallRPC.cpp | 16 +++++++++++++++- src/cpp/ripple/CallRPC.h | 1 + src/cpp/ripple/RPCHandler.cpp | 17 +++++++++-------- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/cpp/ripple/CallRPC.cpp b/src/cpp/ripple/CallRPC.cpp index 2b3ffbf7d..1f0287775 100644 --- a/src/cpp/ripple/CallRPC.cpp +++ b/src/cpp/ripple/CallRPC.cpp @@ -243,6 +243,20 @@ Json::Value RPCParser::parseValidationCreate(const Json::Value& jvParams) return jvRequest; } +// validation_seed [||] +// +// NOTE: It is poor security to specify secret information on the command line. This information might be saved in the command +// shell history file (e.g. .bash_history) and it may be leaked via the process status command (i.e. ps). +Json::Value RPCParser::parseValidationSeed(const Json::Value& jvParams) +{ + Json::Value jvRequest; + + if (jvParams.size()) + jvRequest["secret"] = jvParams[0u].asString(); + + return jvRequest; +} + // wallet_accounts Json::Value RPCParser::parseWalletAccounts(const Json::Value& jvParams) { @@ -334,7 +348,7 @@ Json::Value RPCParser::parseCommand(std::string strMethod, Json::Value jvParams) { "unl_score", &RPCParser::parseAsIs, 0, 0 }, { "validation_create", &RPCParser::parseValidationCreate, 0, 1 }, -// { "validation_seed", &RPCParser::doValidationSeed, 0, 1, false, false, optNone }, + { "validation_seed", &RPCParser::parseValidationSeed, 0, 1 }, { "wallet_accounts", &RPCParser::parseWalletAccounts, 1, 1 }, { "wallet_propose", &RPCParser::parseWalletPropose, 0, 1 }, diff --git a/src/cpp/ripple/CallRPC.h b/src/cpp/ripple/CallRPC.h index 5741fb53e..5dfe1b374 100644 --- a/src/cpp/ripple/CallRPC.h +++ b/src/cpp/ripple/CallRPC.h @@ -22,6 +22,7 @@ protected: Json::Value parseUnlAdd(const Json::Value& jvParams); Json::Value parseUnlDelete(const Json::Value& jvParams); Json::Value parseValidationCreate(const Json::Value& jvParams); + Json::Value parseValidationSeed(const Json::Value& jvParams); Json::Value parseWalletAccounts(const Json::Value& jvParams); Json::Value parseWalletPropose(const Json::Value& jvParams); Json::Value parseWalletSeed(const Json::Value& jvParams); diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index 3e04a9b67..0d577202c 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -1262,14 +1262,13 @@ Json::Value RPCHandler::doValidationCreate(Json::Value jvParams) { return obj; } -// validation_seed [||] -// -// NOTE: It is poor security to specify secret information on the command line. This information might be saved in the command -// shell history file (e.g. .bash_history) and it may be leaked via the process status command (i.e. ps). -Json::Value RPCHandler::doValidationSeed(Json::Value params) { +// { +// secret: +// } +Json::Value RPCHandler::doValidationSeed(Json::Value jvRequest) { Json::Value obj(Json::objectValue); - if (params.empty()) + if (!jvRequest.isMember("secret")) { std::cerr << "Unset validation seed." << std::endl; @@ -1277,16 +1276,18 @@ Json::Value RPCHandler::doValidationSeed(Json::Value params) { theConfig.VALIDATION_PUB.clear(); theConfig.VALIDATION_PRIV.clear(); } - else if (!theConfig.VALIDATION_SEED.setSeedGeneric(params[0u].asString())) + else if (!theConfig.VALIDATION_SEED.setSeedGeneric(jvRequest["secret"].asString())) { theConfig.VALIDATION_PUB.clear(); theConfig.VALIDATION_PRIV.clear(); + return rpcError(rpcBAD_SEED); } else { theConfig.VALIDATION_PUB = RippleAddress::createNodePublic(theConfig.VALIDATION_SEED); theConfig.VALIDATION_PRIV = RippleAddress::createNodePrivate(theConfig.VALIDATION_SEED); + obj["validation_public_key"] = theConfig.VALIDATION_PUB.humanNodePublic(); obj["validation_seed"] = theConfig.VALIDATION_SEED.humanSeed(); obj["validation_key"] = theConfig.VALIDATION_SEED.humanSeed1751(); @@ -2217,7 +2218,7 @@ Json::Value RPCHandler::doCommand(Json::Value& jvParams, int iRole) { "unl_score", &RPCHandler::doUnlScore, -1, -1, true, false, optNone }, { "validation_create", &RPCHandler::doValidationCreate, -1, -1, false, false, optNone }, - { "validation_seed", &RPCHandler::doValidationSeed, 0, 1, false, false, optNone }, + { "validation_seed", &RPCHandler::doValidationSeed, -1, -1, false, false, optNone }, { "wallet_accounts", &RPCHandler::doWalletAccounts, -1, -1, false, false, optCurrent }, { "wallet_propose", &RPCHandler::doWalletPropose, -1, -1, false, false, optNone }, From 0635a5f6e398170e9670ee37051be644e76d2cd9 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 3 Dec 2012 18:08:27 -0800 Subject: [PATCH 5/5] Note unnecessary commands. --- src/cpp/ripple/CallRPC.cpp | 9 +++++---- src/cpp/ripple/RPCHandler.cpp | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/cpp/ripple/CallRPC.cpp b/src/cpp/ripple/CallRPC.cpp index 1f0287775..e5a4d487e 100644 --- a/src/cpp/ripple/CallRPC.cpp +++ b/src/cpp/ripple/CallRPC.cpp @@ -314,9 +314,6 @@ Json::Value RPCParser::parseCommand(std::string strMethod, Json::Value jvParams) { "account_info", &RPCParser::parseAccountInfo, 1, 2 }, { "account_tx", &RPCParser::parseAccountTransactions, 2, 3 }, { "connect", &RPCParser::parseConnect, 1, 2 }, -// { "data_delete", &RPCParser::doDataDelete, 1, 1, true, false, optNone }, -// { "data_fetch", &RPCParser::doDataFetch, 1, 1, true, false, optNone }, -// { "data_store", &RPCParser::doDataStore, 2, 2, true, false, optNone }, // { "get_counts", &RPCParser::doGetCounts, 0, 1, true, false, optNone }, { "ledger", &RPCParser::parseLedger, 0, 2 }, { "ledger_accept", &RPCParser::parseAsIs, 0, 0 }, @@ -353,8 +350,12 @@ Json::Value RPCParser::parseCommand(std::string strMethod, Json::Value jvParams) { "wallet_accounts", &RPCParser::parseWalletAccounts, 1, 1 }, { "wallet_propose", &RPCParser::parseWalletPropose, 0, 1 }, { "wallet_seed", &RPCParser::parseWalletSeed, 0, 1 }, -// + + // XXX Unnecessary commands which should be removed. // { "login", &RPCParser::doLogin, 2, 2, true, false, optNone }, +// { "data_delete", &RPCParser::doDataDelete, 1, 1, true, false, optNone }, +// { "data_fetch", &RPCParser::doDataFetch, 1, 1, true, false, optNone }, +// { "data_store", &RPCParser::doDataStore, 2, 2, true, false, optNone }, // Evented methods { "subscribe", &RPCParser::parseEvented, -1, -1 }, diff --git a/src/cpp/ripple/RPCHandler.cpp b/src/cpp/ripple/RPCHandler.cpp index 0d577202c..86d1289b4 100644 --- a/src/cpp/ripple/RPCHandler.cpp +++ b/src/cpp/ripple/RPCHandler.cpp @@ -2184,9 +2184,6 @@ Json::Value RPCHandler::doCommand(Json::Value& jvParams, int iRole) { "account_info", &RPCHandler::doAccountInfo, -1, -1, false, false, optCurrent }, { "account_tx", &RPCHandler::doAccountTransactions, -1, -1, false, false, optNetwork }, { "connect", &RPCHandler::doConnect, 1, 2, true, false, optNone }, - { "data_delete", &RPCHandler::doDataDelete, 1, 1, true, false, optNone }, - { "data_fetch", &RPCHandler::doDataFetch, 1, 1, true, false, optNone }, - { "data_store", &RPCHandler::doDataStore, 2, 2, true, false, optNone }, { "get_counts", &RPCHandler::doGetCounts, 0, 1, true, false, optNone }, { "ledger", &RPCHandler::doLedger, -1, -1, false, false, optNetwork }, { "ledger_accept", &RPCHandler::doLedgerAccept, -1, -1, true, false, optCurrent }, @@ -2224,7 +2221,11 @@ Json::Value RPCHandler::doCommand(Json::Value& jvParams, int iRole) { "wallet_propose", &RPCHandler::doWalletPropose, -1, -1, false, false, optNone }, { "wallet_seed", &RPCHandler::doWalletSeed, -1, -1, false, false, optNone }, + // XXX Unnecessary commands which should be removed. { "login", &RPCHandler::doLogin, 2, 2, true, false, optNone }, + { "data_delete", &RPCHandler::doDataDelete, 1, 1, true, false, optNone }, + { "data_fetch", &RPCHandler::doDataFetch, 1, 1, true, false, optNone }, + { "data_store", &RPCHandler::doDataStore, 2, 2, true, false, optNone }, // Evented methods { "subscribe", &RPCHandler::doSubscribe, -1, -1, false, true, optNone },