Bitcoin ABC 0.30.5
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 1982 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 874 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 3912 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 2806 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 4890 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 3897 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 3286 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 4093 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 3922 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 640 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 2378 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 163 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 494 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 544 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 594 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 1814 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 715 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 2473 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 4940 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 2037 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 422 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 4162 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 2257 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 989 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 1143 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 1221 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 1579 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 1420 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 1301 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 2986 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 2610 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 2650 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 2678 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 2091 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 1282 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 257 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 3716 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 4224 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 743 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 295 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 320 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 4470 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 209 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 2324 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 2722 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 3585 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 1384 of file rpcwallet.cpp.

Here is the caller graph for this function:

◆ unloadwallet()

static RPCHelpMan unloadwallet ( )
static

Definition at line 2919 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 4851 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 4653 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 4570 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: