mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 05:49:11 +01:00
122078b9ec
* [rpc] split wallet and non-wallet parts of DescribeAddressVisitor * [rpc] Move DescribeAddressVisitor to rpc/util * Create getaddressinfo RPC and deprecate parts of validateaddress Moves the parts of validateaddress which require the wallet into getaddressinfo which is part of the wallet RPCs. Mark those parts of validateaddress which require the wallet as deprecated. Validateaddress will call getaddressinfo for the data that both share for right now. Moves IsMine functions to libbitcoin_common and then links libbitcoin_wallet before libbitcoin_common in order to prevent linker errors since IsMine is no longer used in libbitcoin_server. * scripted-diff: validateaddress to getaddressinfo in tests Change all instances of validateaddress to getaddressinfo since it seems that no test actually uses validateaddress for actually validating addresses. -BEGIN VERIFY SCRIPT- find ./test/functional -path '*py' -not -path ./test/functional/wallet_disable.py -not -path ./test/functional/rpc_deprecated.py -not -path ./test/functional/wallet_address_types.py -exec sed -i'' -e 's/validateaddress/getaddressinfo/g' {} \; -END VERIFY SCRIPT- * wallet: Add missing description of "hdchainid" * Update src/wallet/rpcwallet.cpp Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com> Co-authored-by: John Newbery <john@johnnewbery.com> Co-authored-by: Andrew Chow <achow101-github@achow101.com> Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
32 lines
1000 B
C++
32 lines
1000 B
C++
// Copyright (c) 2016 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_WALLET_RPCWALLET_H
|
|
#define BITCOIN_WALLET_RPCWALLET_H
|
|
|
|
#include <string>
|
|
|
|
class CRPCTable;
|
|
class CWallet;
|
|
class JSONRPCRequest;
|
|
class UniValue;
|
|
|
|
void RegisterWalletRPCCommands(CRPCTable &t);
|
|
|
|
/**
|
|
* Figures out what wallet, if any, to use for a JSONRPCRequest.
|
|
*
|
|
* @param[in] request JSONRPCRequest that wishes to access a wallet
|
|
* @return nullptr if no wallet should be used, or a pointer to the CWallet
|
|
*/
|
|
CWallet *GetWalletForJSONRPCRequest(const JSONRPCRequest& request);
|
|
|
|
std::string HelpRequiringPassphrase(CWallet *);
|
|
void EnsureWalletIsUnlocked(CWallet *);
|
|
bool EnsureWalletIsAvailable(CWallet *, bool avoidException);
|
|
|
|
UniValue getaddressinfo(const JSONRPCRequest& request);
|
|
UniValue signrawtransactionwithwallet(const JSONRPCRequest& request);
|
|
#endif //BITCOIN_WALLET_RPCWALLET_H
|