Bitcoin ABC  0.26.3
P2P Digital Currency
Classes | Functions
rpcwallet.cpp File Reference
#include <chainparams.h>
#include <coins.h>
#include <config.h>
#include <consensus/amount.h>
#include <consensus/validation.h>
#include <core_io.h>
#include <interfaces/chain.h>
#include <key_io.h>
#include <node/context.h>
#include <outputtype.h>
#include <policy/fees.h>
#include <policy/policy.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/moneystr.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/load.h>
#include <wallet/receive.h>
#include <wallet/rpcwallet.h>
#include <wallet/spend.h>
#include <wallet/wallet.h>
#include <wallet/walletdb.h>
#include <wallet/walletutil.h>
#include <univalue.h>
#include <event2/http.h>
#include <optional>
Include dependency graph for rpcwallet.cpp:

Go to the source code of this file.

Classes

struct  tallyitem
 
class  DescribeWalletAddressVisitor
 

Functions

bool HaveKey (const SigningProvider &wallet, const CKey &key)
 Checks if a CKey is in the given CWallet compressed or otherwise. More...
 
static void WalletTxToJSON (const CWallet &wallet, const CWalletTx &wtx, UniValue &entry) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
static RPCHelpMan getnewaddress ()
 
static RPCHelpMan getrawchangeaddress ()
 
static RPCHelpMan setlabel ()
 
void ParseRecipients (const UniValue &address_amounts, const UniValue &subtract_fee_outputs, std::vector< CRecipient > &recipients, const CChainParams &chainParams)
 
UniValue SendMoney (CWallet *const pwallet, const CCoinControl &coin_control, std::vector< CRecipient > &recipients, mapValue_t map_value)
 
static RPCHelpMan sendtoaddress ()
 
static RPCHelpMan listaddressgroupings ()
 
static Amount GetReceived (const CWallet &wallet, const UniValue &params, bool by_label) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
 
static RPCHelpMan getreceivedbyaddress ()
 
static RPCHelpMan getreceivedbylabel ()
 
static RPCHelpMan getbalance ()
 
static RPCHelpMan getunconfirmedbalance ()
 
static RPCHelpMan sendmany ()
 
static RPCHelpMan addmultisigaddress ()
 
static UniValue ListReceived (const Config &config, const CWallet *const pwallet, const UniValue &params, bool by_label) EXCLUSIVE_LOCKS_REQUIRED(pwallet -> cs_wallet)
 
static RPCHelpMan listreceivedbyaddress ()
 
static RPCHelpMan listreceivedbylabel ()
 
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< RPCResultTransactionDescriptionString ()
 
RPCHelpMan listtransactions ()
 
static RPCHelpMan listsinceblock ()
 
static RPCHelpMan gettransaction ()
 
static RPCHelpMan abandontransaction ()
 
static RPCHelpMan keypoolrefill ()
 
static RPCHelpMan lockunspent ()
 
static RPCHelpMan listlockunspent ()
 
static RPCHelpMan settxfee ()
 
static RPCHelpMan getbalances ()
 
static RPCHelpMan getwalletinfo ()
 
static RPCHelpMan listwalletdir ()
 
static RPCHelpMan listwallets ()
 
static RPCHelpMan loadwallet ()
 
static RPCHelpMan setwalletflag ()
 
static RPCHelpMan createwallet ()
 
static RPCHelpMan unloadwallet ()
 
static RPCHelpMan listunspent ()
 
void FundTransaction (CWallet *const pwallet, CMutableTransaction &tx, Amount &fee_out, int &change_position, const UniValue &options, CCoinControl &coinControl)
 
static RPCHelpMan fundrawtransaction ()
 
RPCHelpMan signrawtransactionwithwallet ()
 
RPCHelpMan rescanblockchain ()
 
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...
 
RPCHelpMan getaddressinfo ()
 
RPCHelpMan getaddressesbylabel ()
 
RPCHelpMan listlabels ()
 
static RPCHelpMan send ()
 
static RPCHelpMan sethdseed ()
 
static RPCHelpMan walletprocesspsbt ()
 
static RPCHelpMan walletcreatefundedpsbt ()
 
static RPCHelpMan upgradewallet ()
 
RPCHelpMan signmessage ()
 
Span< const CRPCCommandGetWalletRPCCommands ()
 

Function Documentation

◆ abandontransaction()

static RPCHelpMan abandontransaction ( )
static

Definition at line 1969 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addmultisigaddress()

static RPCHelpMan addmultisigaddress ( )
static

Definition at line 867 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddressBookDataToJSON()

static UniValue AddressBookDataToJSON ( const CAddressBookData data,
const bool  verbose 
)
static

Convert CAddressBookData to JSON record.


Definition at line 3907 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createwallet()

static RPCHelpMan createwallet ( )
static

Definition at line 2794 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DescribeWalletAddress()

static UniValue DescribeWalletAddress ( const CWallet *const  pwallet,
const CTxDestination dest 
)
static

Definition at line 3891 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fundrawtransaction()

static RPCHelpMan fundrawtransaction ( )
static

Definition at line 3441 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FundTransaction()

void FundTransaction ( CWallet *const  pwallet,
CMutableTransaction tx,
Amount fee_out,
int &  change_position,
const UniValue options,
CCoinControl coinControl 
)

Definition at line 3291 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getaddressesbylabel()

RPCHelpMan getaddressesbylabel ( )

Definition at line 4088 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getaddressinfo()

RPCHelpMan getaddressinfo ( )

Definition at line 3917 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getbalance()

static RPCHelpMan getbalance ( )
static

Definition at line 635 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getbalances()

static RPCHelpMan getbalances ( )
static

Definition at line 2369 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getnewaddress()

static RPCHelpMan getnewaddress ( )
static

Definition at line 94 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getrawchangeaddress()

static RPCHelpMan getrawchangeaddress ( )
static

Definition at line 159 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetReceived()

static Amount GetReceived ( const CWallet wallet,
const UniValue params,
bool  by_label 
)
static

Definition at line 489 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getreceivedbyaddress()

static RPCHelpMan getreceivedbyaddress ( )
static

Definition at line 539 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getreceivedbylabel()

static RPCHelpMan getreceivedbylabel ( )
static

Definition at line 589 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gettransaction()

static RPCHelpMan gettransaction ( )
static

Definition at line 1802 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getunconfirmedbalance()

static RPCHelpMan getunconfirmedbalance ( )
static

Definition at line 710 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getwalletinfo()

static RPCHelpMan getwalletinfo ( )
static

Definition at line 2464 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetWalletRPCCommands()

Span<const CRPCCommand> GetWalletRPCCommands ( )

Definition at line 4885 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ HaveKey()

bool HaveKey ( const SigningProvider wallet,
const CKey key 
)

Checks if a CKey is in the given CWallet compressed or otherwise.

Definition at line 52 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ keypoolrefill()

static RPCHelpMan keypoolrefill ( )
static

Definition at line 2024 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listaddressgroupings()

static RPCHelpMan listaddressgroupings ( )
static

Definition at line 417 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listlabels()

RPCHelpMan listlabels ( )

Definition at line 4157 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listlockunspent()

static RPCHelpMan listlockunspent ( )
static

Definition at line 2248 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListReceived()

static UniValue ListReceived ( const Config config,
const CWallet *const  pwallet,
const UniValue params,
bool  by_label 
) -> cs_wallet)
static

Definition at line 981 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listreceivedbyaddress()

static RPCHelpMan listreceivedbyaddress ( )
static

Definition at line 1135 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listreceivedbylabel()

static RPCHelpMan listreceivedbylabel ( )
static

Definition at line 1212 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listsinceblock()

static RPCHelpMan listsinceblock ( )
static

Definition at line 1568 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listtransactions()

RPCHelpMan listtransactions ( )

Definition at line 1409 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ListTransactions()

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 
) -> cs_wallet)
static

List transactions based on the given criteria.

Parameters
pwalletThe wallet.
wtxThe wallet transaction.
nMinDepthThe minimum confirmation depth.
fLongWhether to include the JSON version of the transaction.
retThe UniValue into which the result is stored.
filter_ismineThe "is mine" filter flags.
filter_labelOptional label string to filter incoming transactions.

Definition at line 1290 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listunspent()

static RPCHelpMan listunspent ( )
static

Definition at line 2972 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listwalletdir()

static RPCHelpMan listwalletdir ( )
static

Definition at line 2599 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ listwallets()

static RPCHelpMan listwallets ( )
static

Definition at line 2639 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadwallet()

static RPCHelpMan loadwallet ( )
static

Definition at line 2667 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lockunspent()

static RPCHelpMan lockunspent ( )
static

Definition at line 2078 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MaybePushAddress()

static void MaybePushAddress ( UniValue entry,
const CTxDestination dest 
)
static

Definition at line 1272 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ParseRecipients()

void ParseRecipients ( const UniValue address_amounts,
const UniValue subtract_fee_outputs,
std::vector< CRecipient > &  recipients,
const CChainParams chainParams 
)

Definition at line 253 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rescanblockchain()

RPCHelpMan rescanblockchain ( )

Definition at line 3710 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send()

static RPCHelpMan send ( )
static

Definition at line 4219 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendmany()

static RPCHelpMan sendmany ( )
static

Definition at line 738 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendMoney()

UniValue SendMoney ( CWallet *const  pwallet,
const CCoinControl coin_control,
std::vector< CRecipient > &  recipients,
mapValue_t  map_value 
)

Definition at line 291 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sendtoaddress()

static RPCHelpMan sendtoaddress ( )
static

Definition at line 314 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sethdseed()

static RPCHelpMan sethdseed ( )
static

Definition at line 4462 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setlabel()

static RPCHelpMan setlabel ( )
static

Definition at line 205 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ settxfee()

static RPCHelpMan settxfee ( )
static

Definition at line 2315 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setwalletflag()

static RPCHelpMan setwalletflag ( )
static

Definition at line 2710 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ signmessage()

RPCHelpMan signmessage ( )

Definition at line 13 of file signmessage.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ signrawtransactionwithwallet()

RPCHelpMan signrawtransactionwithwallet ( )

Definition at line 3575 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TransactionDescriptionString()

static const std::vector<RPCResult> TransactionDescriptionString ( )
static

Definition at line 1373 of file rpcwallet.cpp.

Here is the caller graph for this function:

◆ unloadwallet()

static RPCHelpMan unloadwallet ( )
static

Definition at line 2906 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ upgradewallet()

static RPCHelpMan upgradewallet ( )
static

Definition at line 4843 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletcreatefundedpsbt()

static RPCHelpMan walletcreatefundedpsbt ( )
static

Definition at line 4647 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ walletprocesspsbt()

static RPCHelpMan walletprocesspsbt ( )
static

Definition at line 4561 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WalletTxToJSON()

static void WalletTxToJSON ( const CWallet wallet,
const CWalletTx wtx,
UniValue entry 
)
static

Definition at line 59 of file rpcwallet.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: