![]() |
Bitcoin ABC
0.22.13
P2P Digital Currency
|
#include <amount.h>
#include <chainparams.h>
#include <coins.h>
#include <config.h>
#include <consensus/validation.h>
#include <core_io.h>
#include <interfaces/chain.h>
#include <key_io.h>
#include <network.h>
#include <node/context.h>
#include <outputtype.h>
#include <policy/fees.h>
#include <rpc/rawtransaction_util.h>
#include <rpc/server.h>
#include <rpc/util.h>
#include <script/descriptor.h>
#include <util/bip32.h>
#include <util/error.h>
#include <util/message.h>
#include <util/moneystr.h>
#include <util/ref.h>
#include <util/string.h>
#include <util/system.h>
#include <util/translation.h>
#include <util/url.h>
#include <util/vector.h>
#include <wallet/coincontrol.h>
#include <wallet/context.h>
#include <wallet/rpcwallet.h>
#include <wallet/wallet.h>
#include <wallet/walletdb.h>
#include <wallet/walletutil.h>
#include <univalue.h>
#include <event2/http.h>
Go to the source code of this file.
Classes | |
struct | tallyitem |
class | DescribeWalletAddressVisitor |
Functions | |
static bool | GetAvoidReuseFlag (const CWallet *const pwallet, const UniValue ¶m) |
static bool | ParseIncludeWatchonly (const UniValue &include_watchonly, const CWallet &pwallet) |
Used by RPC commands that have an include_watchonly parameter. More... | |
bool | HaveKey (const SigningProvider &wallet, const CKey &key) |
Checks if a CKey is in the given CWallet compressed or otherwise. More... | |
bool | GetWalletNameFromJSONRPCRequest (const JSONRPCRequest &request, std::string &wallet_name) |
std::shared_ptr< CWallet > | GetWalletForJSONRPCRequest (const JSONRPCRequest &request) |
Figures out what wallet, if any, to use for a JSONRPCRequest. More... | |
bool | EnsureWalletIsAvailable (const CWallet *pwallet, bool avoidException) |
void | EnsureWalletIsUnlocked (const CWallet *pwallet) |
WalletContext & | EnsureWalletContext (const util::Ref &context) |
LegacyScriptPubKeyMan & | EnsureLegacyScriptPubKeyMan (CWallet &wallet, bool also_create) |
static void | WalletTxToJSON (interfaces::Chain &chain, const CWalletTx &wtx, UniValue &entry) |
static std::string | LabelFromValue (const UniValue &value) |
static UniValue | getnewaddress (const Config &config, const JSONRPCRequest &request) |
static UniValue | getrawchangeaddress (const Config &config, const JSONRPCRequest &request) |
static UniValue | setlabel (const Config &config, const JSONRPCRequest &request) |
static CTransactionRef | SendMoney (CWallet *const pwallet, const CTxDestination &address, Amount nValue, bool fSubtractFeeFromAmount, const CCoinControl &coin_control, mapValue_t mapValue) |
static UniValue | sendtoaddress (const Config &config, const JSONRPCRequest &request) |
static UniValue | listaddressgroupings (const Config &config, const JSONRPCRequest &request) |
static UniValue | signmessage (const Config &config, const JSONRPCRequest &request) |
static Amount | GetReceived (const CWallet &wallet, const UniValue ¶ms, bool by_label) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet) |
static UniValue | getreceivedbyaddress (const Config &config, const JSONRPCRequest &request) |
static UniValue | getreceivedbylabel (const Config &config, const JSONRPCRequest &request) |
static UniValue | getbalance (const Config &config, const JSONRPCRequest &request) |
static UniValue | getunconfirmedbalance (const Config &config, const JSONRPCRequest &request) |
static UniValue | sendmany (const Config &config, const JSONRPCRequest &request) |
static UniValue | addmultisigaddress (const Config &config, const JSONRPCRequest &request) |
static UniValue | ListReceived (const Config &config, const CWallet *const pwallet, const UniValue ¶ms, bool by_label) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet) |
static UniValue | listreceivedbyaddress (const Config &config, const JSONRPCRequest &request) |
static UniValue | listreceivedbylabel (const Config &config, const JSONRPCRequest &request) |
static void | MaybePushAddress (UniValue &entry, const CTxDestination &dest) |
static void | ListTransactions (const CWallet *const pwallet, const CWalletTx &wtx, int nMinDepth, bool fLong, UniValue &ret, const isminefilter &filter_ismine, const std::string *filter_label) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet) |
List transactions based on the given criteria. More... | |
static const std::vector< RPCResult > | TransactionDescriptionString () |
UniValue | listtransactions (const Config &config, const JSONRPCRequest &request) |
static UniValue | listsinceblock (const Config &config, const JSONRPCRequest &request) |
static UniValue | gettransaction (const Config &config, const JSONRPCRequest &request) |
static UniValue | abandontransaction (const Config &config, const JSONRPCRequest &request) |
static UniValue | backupwallet (const Config &config, const JSONRPCRequest &request) |
static UniValue | keypoolrefill (const Config &config, const JSONRPCRequest &request) |
static UniValue | walletpassphrase (const Config &config, const JSONRPCRequest &request) |
static UniValue | walletpassphrasechange (const Config &config, const JSONRPCRequest &request) |
static UniValue | walletlock (const Config &config, const JSONRPCRequest &request) |
static UniValue | encryptwallet (const Config &config, const JSONRPCRequest &request) |
static UniValue | lockunspent (const Config &config, const JSONRPCRequest &request) |
static UniValue | listlockunspent (const Config &config, const JSONRPCRequest &request) |
static UniValue | settxfee (const Config &config, const JSONRPCRequest &request) |
static UniValue | getbalances (const Config &config, const JSONRPCRequest &request) |
static UniValue | getwalletinfo (const Config &config, const JSONRPCRequest &request) |
static UniValue | listwalletdir (const Config &config, const JSONRPCRequest &request) |
static UniValue | listwallets (const Config &config, const JSONRPCRequest &request) |
static UniValue | loadwallet (const Config &config, const JSONRPCRequest &request) |
static UniValue | setwalletflag (const Config &config, const JSONRPCRequest &request) |
static UniValue | createwallet (const Config &config, const JSONRPCRequest &request) |
static UniValue | unloadwallet (const Config &config, const JSONRPCRequest &request) |
static UniValue | listunspent (const Config &config, const JSONRPCRequest &request) |
void | FundTransaction (CWallet *const pwallet, CMutableTransaction &tx, Amount &fee_out, int &change_position, UniValue options, CCoinControl &coinControl) |
static UniValue | fundrawtransaction (const Config &config, const JSONRPCRequest &request) |
UniValue | signrawtransactionwithwallet (const Config &config, const JSONRPCRequest &request) |
UniValue | rescanblockchain (const Config &config, const JSONRPCRequest &request) |
static UniValue | DescribeWalletAddress (const CWallet *const pwallet, const CTxDestination &dest) |
static UniValue | AddressBookDataToJSON (const CAddressBookData &data, const bool verbose) |
Convert CAddressBookData to JSON record. More... | |
UniValue | getaddressinfo (const Config &config, const JSONRPCRequest &request) |
UniValue | getaddressesbylabel (const Config &config, const JSONRPCRequest &request) |
UniValue | listlabels (const Config &config, const JSONRPCRequest &request) |
static UniValue | sethdseed (const Config &config, const JSONRPCRequest &request) |
static UniValue | walletprocesspsbt (const Config &config, const JSONRPCRequest &request) |
static UniValue | walletcreatefundedpsbt (const Config &config, const JSONRPCRequest &request) |
static UniValue | upgradewallet (const Config &config, const JSONRPCRequest &request) |
Span< const CRPCCommand > | GetWalletRPCCommands () |
Variables | |
static const std::string | WALLET_ENDPOINT_BASE = "/wallet/" |
static const std::string | HELP_REQUIRING_PASSPHRASE |
|
static |
Definition at line 2148 of file rpcwallet.cpp.
|
static |
Definition at line 1072 of file rpcwallet.cpp.
|
static |
Convert CAddressBookData to JSON record.
Definition at line 4288 of file rpcwallet.cpp.
|
static |
Definition at line 2202 of file rpcwallet.cpp.
|
static |
Definition at line 3310 of file rpcwallet.cpp.
|
static |
Definition at line 4272 of file rpcwallet.cpp.
|
static |
Definition at line 2512 of file rpcwallet.cpp.
LegacyScriptPubKeyMan& EnsureLegacyScriptPubKeyMan | ( | CWallet & | wallet, |
bool | also_create | ||
) |
Definition at line 156 of file rpcwallet.cpp.
WalletContext& EnsureWalletContext | ( | const util::Ref & | context | ) |
Definition at line 147 of file rpcwallet.cpp.
bool EnsureWalletIsAvailable | ( | const CWallet * | pwallet, |
bool | avoidException | ||
) |
void EnsureWalletIsUnlocked | ( | const CWallet * | pwallet | ) |
Definition at line 139 of file rpcwallet.cpp.
|
static |
Definition at line 3830 of file rpcwallet.cpp.
void FundTransaction | ( | CWallet *const | pwallet, |
CMutableTransaction & | tx, | ||
Amount & | fee_out, | ||
int & | change_position, | ||
UniValue | options, | ||
CCoinControl & | coinControl | ||
) |
Definition at line 3711 of file rpcwallet.cpp.
UniValue getaddressesbylabel | ( | const Config & | config, |
const JSONRPCRequest & | request | ||
) |
Definition at line 4495 of file rpcwallet.cpp.
UniValue getaddressinfo | ( | const Config & | config, |
const JSONRPCRequest & | request | ||
) |
Definition at line 4298 of file rpcwallet.cpp.
Definition at line 50 of file rpcwallet.cpp.
|
static |
Definition at line 798 of file rpcwallet.cpp.
|
static |
Definition at line 2870 of file rpcwallet.cpp.
|
static |
Definition at line 210 of file rpcwallet.cpp.
|
static |
Definition at line 273 of file rpcwallet.cpp.
Definition at line 650 of file rpcwallet.cpp.
|
static |
Definition at line 704 of file rpcwallet.cpp.
|
static |
Definition at line 753 of file rpcwallet.cpp.
|
static |
Definition at line 1985 of file rpcwallet.cpp.
|
static |
Definition at line 871 of file rpcwallet.cpp.
std::shared_ptr<CWallet> GetWalletForJSONRPCRequest | ( | const JSONRPCRequest & | request | ) |
Figures out what wallet, if any, to use for a JSONRPCRequest.
[in] | request | JSONRPCRequest that wishes to access a wallet |
Definition at line 103 of file rpcwallet.cpp.
|
static |
Definition at line 2966 of file rpcwallet.cpp.
bool GetWalletNameFromJSONRPCRequest | ( | const JSONRPCRequest & | request, |
std::string & | wallet_name | ||
) |
Definition at line 90 of file rpcwallet.cpp.
Span<const CRPCCommand> GetWalletRPCCommands | ( | ) |
bool HaveKey | ( | const SigningProvider & | wallet, |
const CKey & | key | ||
) |
Checks if a CKey is in the given CWallet compressed or otherwise.
Definition at line 83 of file rpcwallet.cpp.
|
static |
Definition at line 2239 of file rpcwallet.cpp.
|
static |
Definition at line 202 of file rpcwallet.cpp.
|
static |
Definition at line 511 of file rpcwallet.cpp.
UniValue listlabels | ( | const Config & | config, |
const JSONRPCRequest & | request | ||
) |
Definition at line 4563 of file rpcwallet.cpp.
|
static |
Definition at line 2751 of file rpcwallet.cpp.
|
static |
Definition at line 1184 of file rpcwallet.cpp.
|
static |
Definition at line 1341 of file rpcwallet.cpp.
|
static |
Definition at line 1417 of file rpcwallet.cpp.
|
static |
Definition at line 1764 of file rpcwallet.cpp.
|
static |
List transactions based on the given criteria.
pwallet | The wallet. |
wtx | The wallet transaction. |
nMinDepth | The minimum confirmation depth. |
fLong | Whether to include the JSON version of the transaction. |
ret | The UniValue into which the result is stored. |
filter_ismine | The "is mine" filter flags. |
filter_label | Optional label string to filter incoming transactions. |
Definition at line 1494 of file rpcwallet.cpp.
UniValue listtransactions | ( | const Config & | config, |
const JSONRPCRequest & | request | ||
) |
Definition at line 1611 of file rpcwallet.cpp.
|
static |
Definition at line 3448 of file rpcwallet.cpp.
|
static |
Definition at line 3097 of file rpcwallet.cpp.
|
static |
Definition at line 3137 of file rpcwallet.cpp.
|
static |
Definition at line 3170 of file rpcwallet.cpp.
|
static |
Definition at line 2589 of file rpcwallet.cpp.
|
static |
Definition at line 1476 of file rpcwallet.cpp.
|
static |
Used by RPC commands that have an include_watchonly parameter.
We default to true for watchonly wallets if include_watchonly isn't explicitly set.
Definition at line 68 of file rpcwallet.cpp.
UniValue rescanblockchain | ( | const Config & | config, |
const JSONRPCRequest & | request | ||
) |
Definition at line 4094 of file rpcwallet.cpp.
|
static |
Definition at line 898 of file rpcwallet.cpp.
|
static |
Definition at line 367 of file rpcwallet.cpp.
|
static |
Definition at line 410 of file rpcwallet.cpp.
|
static |
Definition at line 4623 of file rpcwallet.cpp.
|
static |
Definition at line 320 of file rpcwallet.cpp.
|
static |
Definition at line 2818 of file rpcwallet.cpp.
|
static |
Definition at line 3230 of file rpcwallet.cpp.
|
static |
Definition at line 581 of file rpcwallet.cpp.
UniValue signrawtransactionwithwallet | ( | const Config & | config, |
const JSONRPCRequest & | request | ||
) |
Definition at line 3963 of file rpcwallet.cpp.
|
static |
|
static |
Definition at line 3402 of file rpcwallet.cpp.
|
static |
Definition at line 5000 of file rpcwallet.cpp.
|
static |
Definition at line 4809 of file rpcwallet.cpp.
|
static |
Definition at line 2467 of file rpcwallet.cpp.
|
static |
Definition at line 2290 of file rpcwallet.cpp.
|
static |
Definition at line 2406 of file rpcwallet.cpp.
|
static |
Definition at line 4725 of file rpcwallet.cpp.
|
static |
Definition at line 169 of file rpcwallet.cpp.
|
static |
Definition at line 46 of file rpcwallet.cpp.
|
static |
Definition at line 45 of file rpcwallet.cpp.