Bitcoin ABC  0.26.3
P2P Digital Currency
Classes | Functions
rpcwallet.cpp File Reference
#include <chainparams.h>
#include <coins.h>
#include <common/system.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/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 <variant>
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, bool broadcast=true)
 
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)
 
template<class Vec >
static void ListTransactions (const CWallet *const pwallet, const CWalletTx &wtx, int nMinDepth, bool fLong, Vec &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 ()
 
static RPCHelpMan createwallettransaction ()
 
Span< const CRPCCommandGetWalletRPCCommands ()
 

Function Documentation

◆ abandontransaction()

static RPCHelpMan abandontransaction ( )
static

Definition at line 1977 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 870 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 2801 of file rpcwallet.cpp.

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

◆ createwallettransaction()

static RPCHelpMan createwallettransaction ( )
static

Definition at line 4884 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 3892 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 3436 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 3281 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 636 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 2373 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 95 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 490 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 540 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 590 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 1809 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 711 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 2468 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 4934 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 53 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 2032 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 418 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 2252 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 984 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 1138 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 1216 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 1574 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 1415 of file rpcwallet.cpp.

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

◆ ListTransactions()

template<class Vec >
static void ListTransactions ( const CWallet *const  pwallet,
const CWalletTx wtx,
int  nMinDepth,
bool  fLong,
Vec &  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 vector into which the result is stored.
filter_ismineThe "is mine" filter flags.
filter_labelOptional label string to filter incoming transactions.

Definition at line 1296 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 2981 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 2605 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 2645 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 2673 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 2086 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 1277 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 3711 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 739 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,
bool  broadcast = true 
)

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 316 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 4465 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 2319 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 2717 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 3580 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 1379 of file rpcwallet.cpp.

Here is the caller graph for this function:

◆ unloadwallet()

static RPCHelpMan unloadwallet ( )
static

Definition at line 2914 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 4845 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 4564 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 60 of file rpcwallet.cpp.

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