Bitcoin ABC  0.28.12
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 <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)
 
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 ()
 
static RPCHelpMan createwallettransaction ()
 
Span< const CRPCCommandGetWalletRPCCommands ()
 

Function Documentation

◆ abandontransaction()

static RPCHelpMan abandontransaction ( )
static

Definition at line 1975 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 868 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 3916 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 4913 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 3901 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 3285 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 4097 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 3926 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 2375 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 1807 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 2470 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 4963 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 2030 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 4166 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 2254 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 982 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 1136 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 1214 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 1572 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 1412 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 1293 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 2084 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 1275 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 3720 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 4228 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 4481 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 2321 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 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 1376 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 4872 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 4666 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 4580 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: