mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Remove deprecated wallet_seed RPC endpoint
This commit is contained in:
committed by
seelabs
parent
6328fabd5c
commit
7e936187ac
@@ -2834,10 +2834,6 @@
|
|||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClInclude Include="..\..\src\ripple\rpc\handlers\WalletPropose.h">
|
<ClInclude Include="..\..\src\ripple\rpc\handlers\WalletPropose.h">
|
||||||
</ClInclude>
|
</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">
|
<ClCompile Include="..\..\src\ripple\rpc\impl\Handler.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='debug|x64'">True</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='release|x64'">True</ExcludedFromBuild>
|
||||||
|
|||||||
@@ -3297,9 +3297,6 @@
|
|||||||
<ClInclude Include="..\..\src\ripple\rpc\handlers\WalletPropose.h">
|
<ClInclude Include="..\..\src\ripple\rpc\handlers\WalletPropose.h">
|
||||||
<Filter>ripple\rpc\handlers</Filter>
|
<Filter>ripple\rpc\handlers</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClCompile Include="..\..\src\ripple\rpc\handlers\WalletSeed.cpp">
|
|
||||||
<Filter>ripple\rpc\handlers</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\src\ripple\rpc\impl\Handler.cpp">
|
<ClCompile Include="..\..\src\ripple\rpc\impl\Handler.cpp">
|
||||||
<Filter>ripple\rpc\impl</Filter>
|
<Filter>ripple\rpc\impl</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|||||||
@@ -1000,17 +1000,6 @@ private:
|
|||||||
return jvRequest;
|
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
|
// parse gateway balances
|
||||||
// gateway_balances [<ledger>] <issuer_account> [ <hotwallet> [ <hotwallet> ]]
|
// gateway_balances [<ledger>] <issuer_account> [ <hotwallet> [ <hotwallet> ]]
|
||||||
|
|
||||||
@@ -1138,7 +1127,6 @@ public:
|
|||||||
{ "validation_seed", &RPCParser::parseValidationSeed, 0, 1 },
|
{ "validation_seed", &RPCParser::parseValidationSeed, 0, 1 },
|
||||||
{ "version", &RPCParser::parseAsIs, 0, 0 },
|
{ "version", &RPCParser::parseAsIs, 0, 0 },
|
||||||
{ "wallet_propose", &RPCParser::parseWalletPropose, 0, 1 },
|
{ "wallet_propose", &RPCParser::parseWalletPropose, 0, 1 },
|
||||||
{ "wallet_seed", &RPCParser::parseWalletSeed, 0, 1 },
|
|
||||||
{ "internal", &RPCParser::parseInternal, 1, -1 },
|
{ "internal", &RPCParser::parseInternal, 1, -1 },
|
||||||
|
|
||||||
// Evented methods
|
// Evented methods
|
||||||
|
|||||||
@@ -71,7 +71,6 @@ JSS ( account_objects ); // out: AccountObjects
|
|||||||
JSS ( account_root ); // in: LedgerEntry
|
JSS ( account_root ); // in: LedgerEntry
|
||||||
JSS ( accounts ); // in: LedgerEntry, Subscribe,
|
JSS ( accounts ); // in: LedgerEntry, Subscribe,
|
||||||
// handlers/Ledger, Unsubscribe
|
// handlers/Ledger, Unsubscribe
|
||||||
// out: WalletAccounts
|
|
||||||
JSS ( accounts_proposed ); // in: Subscribe, Unsubscribe
|
JSS ( accounts_proposed ); // in: Subscribe, Unsubscribe
|
||||||
JSS ( action );
|
JSS ( action );
|
||||||
JSS ( acquiring ); // out: LedgerRequest
|
JSS ( acquiring ); // out: LedgerRequest
|
||||||
@@ -139,7 +138,7 @@ JSS ( dbKBTotal ); // out: getCounts
|
|||||||
JSS ( dbKBTransaction ); // out: getCounts
|
JSS ( dbKBTransaction ); // out: getCounts
|
||||||
JSS ( debug_signing ); // in: TransactionSign
|
JSS ( debug_signing ); // in: TransactionSign
|
||||||
JSS ( delivered_amount ); // out: addPaymentDeliveredAmount
|
JSS ( delivered_amount ); // out: addPaymentDeliveredAmount
|
||||||
JSS ( deprecated ); // out: WalletSeed
|
JSS ( deprecated ); // out
|
||||||
JSS ( descending ); // in: AccountTx*
|
JSS ( descending ); // in: AccountTx*
|
||||||
JSS ( destination_account ); // in: PathRequest, RipplePathFind, account_lines
|
JSS ( destination_account ); // in: PathRequest, RipplePathFind, account_lines
|
||||||
// out: AccountChannels
|
// out: AccountChannels
|
||||||
@@ -217,7 +216,7 @@ JSS ( issuer ); // in: RipplePathFind, Subscribe,
|
|||||||
// out: paths/Node, STPathSet, STAmount
|
// out: paths/Node, STPathSet, STAmount
|
||||||
JSS ( jsonrpc ); // json version
|
JSS ( jsonrpc ); // json version
|
||||||
JSS ( jq_trans_overflow ); // JobQueue transaction limit overflow.
|
JSS ( jq_trans_overflow ); // JobQueue transaction limit overflow.
|
||||||
JSS ( key ); // out: WalletSeed
|
JSS ( key ); // out
|
||||||
JSS ( key_type ); // in/out: WalletPropose, TransactionSign
|
JSS ( key_type ); // in/out: WalletPropose, TransactionSign
|
||||||
JSS ( latency ); // out: PeerImp
|
JSS ( latency ); // out: PeerImp
|
||||||
JSS ( last ); // out: RPCVersion
|
JSS ( last ); // out: RPCVersion
|
||||||
@@ -370,10 +369,10 @@ JSS ( role ); // out: Ping.cpp
|
|||||||
JSS ( rt_accounts ); // in: Subscribe, Unsubscribe
|
JSS ( rt_accounts ); // in: Subscribe, Unsubscribe
|
||||||
JSS ( sanity ); // out: PeerImp
|
JSS ( sanity ); // out: PeerImp
|
||||||
JSS ( search_depth ); // in: RipplePathFind
|
JSS ( search_depth ); // in: RipplePathFind
|
||||||
JSS ( secret ); // in: TransactionSign, WalletSeed,
|
JSS ( secret ); // in: TransactionSign,
|
||||||
// ValidationCreate, ValidationSeed,
|
// ValidationCreate, ValidationSeed,
|
||||||
// channel_authorize
|
// channel_authorize
|
||||||
JSS ( seed ); // in: WalletAccounts, out: WalletSeed
|
JSS ( seed ); //
|
||||||
JSS ( seed_hex ); // in: WalletPropose, TransactionSign
|
JSS ( seed_hex ); // in: WalletPropose, TransactionSign
|
||||||
JSS ( send_currencies ); // out: AccountCurrencies
|
JSS ( send_currencies ); // out: AccountCurrencies
|
||||||
JSS ( send_max ); // in: PathRequest, RipplePathFind
|
JSS ( send_max ); // in: PathRequest, RipplePathFind
|
||||||
|
|||||||
@@ -65,8 +65,6 @@ Json::Value doRandom (RPC::Context&);
|
|||||||
Json::Value doRipplePathFind (RPC::Context&);
|
Json::Value doRipplePathFind (RPC::Context&);
|
||||||
Json::Value doServerInfo (RPC::Context&); // for humans
|
Json::Value doServerInfo (RPC::Context&); // for humans
|
||||||
Json::Value doServerState (RPC::Context&); // for machines
|
Json::Value doServerState (RPC::Context&); // for machines
|
||||||
Json::Value doSessionClose (RPC::Context&);
|
|
||||||
Json::Value doSessionOpen (RPC::Context&);
|
|
||||||
Json::Value doSign (RPC::Context&);
|
Json::Value doSign (RPC::Context&);
|
||||||
Json::Value doSignFor (RPC::Context&);
|
Json::Value doSignFor (RPC::Context&);
|
||||||
Json::Value doStop (RPC::Context&);
|
Json::Value doStop (RPC::Context&);
|
||||||
@@ -80,11 +78,7 @@ Json::Value doUnlList (RPC::Context&);
|
|||||||
Json::Value doUnsubscribe (RPC::Context&);
|
Json::Value doUnsubscribe (RPC::Context&);
|
||||||
Json::Value doValidationCreate (RPC::Context&);
|
Json::Value doValidationCreate (RPC::Context&);
|
||||||
Json::Value doValidationSeed (RPC::Context&);
|
Json::Value doValidationSeed (RPC::Context&);
|
||||||
Json::Value doWalletLock (RPC::Context&);
|
|
||||||
Json::Value doWalletPropose (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 doValidators (RPC::Context&);
|
||||||
Json::Value doValidatorListSites (RPC::Context&);
|
Json::Value doValidatorListSites (RPC::Context&);
|
||||||
} // ripple
|
} // ripple
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -154,7 +154,6 @@ Handler handlerArray[] {
|
|||||||
{ "validators", byRef (&doValidators), Role::ADMIN, NO_CONDITION },
|
{ "validators", byRef (&doValidators), Role::ADMIN, NO_CONDITION },
|
||||||
{ "validator_list_sites", byRef (&doValidatorListSites), Role::ADMIN, NO_CONDITION },
|
{ "validator_list_sites", byRef (&doValidatorListSites), Role::ADMIN, NO_CONDITION },
|
||||||
{ "wallet_propose", byRef (&doWalletPropose), Role::ADMIN, NO_CONDITION },
|
{ "wallet_propose", byRef (&doWalletPropose), Role::ADMIN, NO_CONDITION },
|
||||||
{ "wallet_seed", byRef (&doWalletSeed), Role::ADMIN, NO_CONDITION },
|
|
||||||
|
|
||||||
// Evented methods
|
// Evented methods
|
||||||
{ "subscribe", byRef (&doSubscribe), Role::USER, NO_CONDITION },
|
{ "subscribe", byRef (&doSubscribe), Role::USER, NO_CONDITION },
|
||||||
|
|||||||
@@ -51,7 +51,6 @@
|
|||||||
#include <ripple/rpc/handlers/Validators.cpp>
|
#include <ripple/rpc/handlers/Validators.cpp>
|
||||||
#include <ripple/rpc/handlers/ValidatorListSites.cpp>
|
#include <ripple/rpc/handlers/ValidatorListSites.cpp>
|
||||||
#include <ripple/rpc/handlers/WalletPropose.cpp>
|
#include <ripple/rpc/handlers/WalletPropose.cpp>
|
||||||
#include <ripple/rpc/handlers/WalletSeed.cpp>
|
|
||||||
|
|
||||||
#include <ripple/rpc/impl/Handler.cpp>
|
#include <ripple/rpc/impl/Handler.cpp>
|
||||||
#include <ripple/rpc/impl/LegacyPathFind.cpp>
|
#include <ripple/rpc/impl/LegacyPathFind.cpp>
|
||||||
|
|||||||
Reference in New Issue
Block a user