Remove deprecated wallet_seed RPC endpoint

This commit is contained in:
Nikolaos D. Bougalis
2018-01-25 23:34:58 -08:00
committed by seelabs
parent 6328fabd5c
commit 7e936187ac
8 changed files with 4 additions and 86 deletions

View File

@@ -2834,10 +2834,6 @@
</ClCompile>
<ClInclude Include="..\..\src\ripple\rpc\handlers\WalletPropose.h">
</ClInclude>
<ClCompile Include="..\..\src\ripple\rpc\handlers\WalletSeed.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\ripple\rpc\impl\Handler.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>

View File

@@ -3297,9 +3297,6 @@
<ClInclude Include="..\..\src\ripple\rpc\handlers\WalletPropose.h">
<Filter>ripple\rpc\handlers</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ripple\rpc\handlers\WalletSeed.cpp">
<Filter>ripple\rpc\handlers</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ripple\rpc\impl\Handler.cpp">
<Filter>ripple\rpc\impl</Filter>
</ClCompile>

View File

@@ -1000,17 +1000,6 @@ private:
return jvRequest;
}
// wallet_seed [<seed>|<passphrase>|<passkey>]
Json::Value parseWalletSeed (Json::Value const& jvParams)
{
Json::Value jvRequest{Json::objectValue};
if (jvParams.size ())
jvRequest[jss::secret] = jvParams[0u].asString ();
return jvRequest;
}
// parse gateway balances
// gateway_balances [<ledger>] <issuer_account> [ <hotwallet> [ <hotwallet> ]]
@@ -1138,7 +1127,6 @@ public:
{ "validation_seed", &RPCParser::parseValidationSeed, 0, 1 },
{ "version", &RPCParser::parseAsIs, 0, 0 },
{ "wallet_propose", &RPCParser::parseWalletPropose, 0, 1 },
{ "wallet_seed", &RPCParser::parseWalletSeed, 0, 1 },
{ "internal", &RPCParser::parseInternal, 1, -1 },
// Evented methods

View File

@@ -71,7 +71,6 @@ JSS ( account_objects ); // out: AccountObjects
JSS ( account_root ); // in: LedgerEntry
JSS ( accounts ); // in: LedgerEntry, Subscribe,
// handlers/Ledger, Unsubscribe
// out: WalletAccounts
JSS ( accounts_proposed ); // in: Subscribe, Unsubscribe
JSS ( action );
JSS ( acquiring ); // out: LedgerRequest
@@ -139,7 +138,7 @@ JSS ( dbKBTotal ); // out: getCounts
JSS ( dbKBTransaction ); // out: getCounts
JSS ( debug_signing ); // in: TransactionSign
JSS ( delivered_amount ); // out: addPaymentDeliveredAmount
JSS ( deprecated ); // out: WalletSeed
JSS ( deprecated ); // out
JSS ( descending ); // in: AccountTx*
JSS ( destination_account ); // in: PathRequest, RipplePathFind, account_lines
// out: AccountChannels
@@ -217,7 +216,7 @@ JSS ( issuer ); // in: RipplePathFind, Subscribe,
// out: paths/Node, STPathSet, STAmount
JSS ( jsonrpc ); // json version
JSS ( jq_trans_overflow ); // JobQueue transaction limit overflow.
JSS ( key ); // out: WalletSeed
JSS ( key ); // out
JSS ( key_type ); // in/out: WalletPropose, TransactionSign
JSS ( latency ); // out: PeerImp
JSS ( last ); // out: RPCVersion
@@ -370,10 +369,10 @@ JSS ( role ); // out: Ping.cpp
JSS ( rt_accounts ); // in: Subscribe, Unsubscribe
JSS ( sanity ); // out: PeerImp
JSS ( search_depth ); // in: RipplePathFind
JSS ( secret ); // in: TransactionSign, WalletSeed,
JSS ( secret ); // in: TransactionSign,
// ValidationCreate, ValidationSeed,
// channel_authorize
JSS ( seed ); // in: WalletAccounts, out: WalletSeed
JSS ( seed ); //
JSS ( seed_hex ); // in: WalletPropose, TransactionSign
JSS ( send_currencies ); // out: AccountCurrencies
JSS ( send_max ); // in: PathRequest, RipplePathFind

View File

@@ -65,8 +65,6 @@ Json::Value doRandom (RPC::Context&);
Json::Value doRipplePathFind (RPC::Context&);
Json::Value doServerInfo (RPC::Context&); // for humans
Json::Value doServerState (RPC::Context&); // for machines
Json::Value doSessionClose (RPC::Context&);
Json::Value doSessionOpen (RPC::Context&);
Json::Value doSign (RPC::Context&);
Json::Value doSignFor (RPC::Context&);
Json::Value doStop (RPC::Context&);
@@ -80,11 +78,7 @@ Json::Value doUnlList (RPC::Context&);
Json::Value doUnsubscribe (RPC::Context&);
Json::Value doValidationCreate (RPC::Context&);
Json::Value doValidationSeed (RPC::Context&);
Json::Value doWalletLock (RPC::Context&);
Json::Value doWalletPropose (RPC::Context&);
Json::Value doWalletSeed (RPC::Context&);
Json::Value doWalletUnlock (RPC::Context&);
Json::Value doWalletVerify (RPC::Context&);
Json::Value doValidators (RPC::Context&);
Json::Value doValidatorListSites (RPC::Context&);
} // ripple

View File

@@ -1,54 +0,0 @@
//------------------------------------------------------------------------------
/*
This file is part of rippled: https://github.com/ripple/rippled
Copyright (c) 2012-2014 Ripple Labs Inc.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
//==============================================================================
#include <BeastConfig.h>
#include <ripple/json/json_value.h>
#include <ripple/net/RPCErr.h>
#include <ripple/protocol/ErrorCodes.h>
#include <ripple/protocol/JsonFields.h>
#include <ripple/protocol/Seed.h>
#include <ripple/rpc/Context.h>
namespace ripple {
// {
// secret: <string>
// }
Json::Value doWalletSeed (RPC::Context& context)
{
boost::optional<Seed> seed;
bool bSecret = context.params.isMember (jss::secret);
if (bSecret)
seed = parseGenericSeed (context.params[jss::secret].asString ());
else
seed = randomSeed ();
if (!seed)
return rpcError (rpcBAD_SEED);
Json::Value obj (Json::objectValue);
obj[jss::seed] = toBase58(*seed);
obj[jss::key] = seedAs1751(*seed);
obj[jss::deprecated] = "Use wallet_propose instead";
return obj;
}
} // ripple

View File

@@ -154,7 +154,6 @@ Handler handlerArray[] {
{ "validators", byRef (&doValidators), Role::ADMIN, NO_CONDITION },
{ "validator_list_sites", byRef (&doValidatorListSites), Role::ADMIN, NO_CONDITION },
{ "wallet_propose", byRef (&doWalletPropose), Role::ADMIN, NO_CONDITION },
{ "wallet_seed", byRef (&doWalletSeed), Role::ADMIN, NO_CONDITION },
// Evented methods
{ "subscribe", byRef (&doSubscribe), Role::USER, NO_CONDITION },

View File

@@ -51,7 +51,6 @@
#include <ripple/rpc/handlers/Validators.cpp>
#include <ripple/rpc/handlers/ValidatorListSites.cpp>
#include <ripple/rpc/handlers/WalletPropose.cpp>
#include <ripple/rpc/handlers/WalletSeed.cpp>
#include <ripple/rpc/impl/Handler.cpp>
#include <ripple/rpc/impl/LegacyPathFind.cpp>