Raven Core  3.0.0
P2P Digital Currency
Classes | Functions
rpcwallet.cpp File Reference
#include "amount.h"
#include "base58.h"
#include "chain.h"
#include "consensus/validation.h"
#include "core_io.h"
#include "httpserver.h"
#include "validation.h"
#include "net.h"
#include "policy/feerate.h"
#include "policy/fees.h"
#include "policy/policy.h"
#include "policy/rbf.h"
#include "rpc/mining.h"
#include "rpc/safemode.h"
#include "rpc/server.h"
#include "script/sign.h"
#include "timedata.h"
#include "util.h"
#include "utiltime.h"
#include "utilmoneystr.h"
#include "wallet/coincontrol.h"
#include "wallet/feebumper.h"
#include "wallet/wallet.h"
#include "wallet/walletdb.h"
#include <init.h>
#include <stdint.h>
#include <univalue.h>
Include dependency graph for rpcwallet.cpp:

Go to the source code of this file.

Classes

class  Witnessifier
 
struct  tallyitem
 

Functions

CWalletGetWalletForJSONRPCRequest (const JSONRPCRequest &request)
 Figures out what wallet, if any, to use for a JSONRPCRequest. More...
 
std::string HelpRequiringPassphrase (CWallet *const pwallet)
 
bool EnsureWalletIsAvailable (CWallet *const pwallet, bool avoidException)
 
void EnsureWalletIsUnlocked (CWallet *const pwallet)
 
void WalletTxToJSON (const CWalletTx &wtx, UniValue &entry)
 
std::string AccountFromValue (const UniValue &value)
 
UniValue getnewaddress (const JSONRPCRequest &request)
 
CTxDestination GetAccountAddress (CWallet *const pwallet, std::string strAccount, bool bForceNew=false)
 
UniValue getaccountaddress (const JSONRPCRequest &request)
 
UniValue getrawchangeaddress (const JSONRPCRequest &request)
 
UniValue setaccount (const JSONRPCRequest &request)
 
UniValue getaccount (const JSONRPCRequest &request)
 
UniValue getaddressesbyaccount (const JSONRPCRequest &request)
 
UniValue sendtoaddress (const JSONRPCRequest &request)
 
UniValue listaddressgroupings (const JSONRPCRequest &request)
 
UniValue signmessage (const JSONRPCRequest &request)
 
UniValue getreceivedbyaddress (const JSONRPCRequest &request)
 
UniValue getreceivedbyaccount (const JSONRPCRequest &request)
 
UniValue getbalance (const JSONRPCRequest &request)
 
UniValue getunconfirmedbalance (const JSONRPCRequest &request)
 
UniValue movecmd (const JSONRPCRequest &request)
 
UniValue sendfrom (const JSONRPCRequest &request)
 
UniValue sendmany (const JSONRPCRequest &request)
 
CScript _createmultisig_redeemScript (CWallet *const pwallet, const UniValue &params)
 Used by addmultisigaddress / createmultisig: More...
 
UniValue addmultisigaddress (const JSONRPCRequest &request)
 
UniValue addwitnessaddress (const JSONRPCRequest &request)
 
UniValue ListReceived (CWallet *const pwallet, const UniValue &params, bool fByAccounts)
 
UniValue listreceivedbyaddress (const JSONRPCRequest &request)
 
UniValue listreceivedbyaccount (const JSONRPCRequest &request)
 
void ListTransactions (CWallet *const pwallet, const CWalletTx &wtx, const std::string &strAccount, int nMinDepth, bool fLong, UniValue &ret, UniValue &retAssets, const isminefilter &filter)
 List transactions based on the given criteria. More...
 
void ListTransactions (CWallet *const pwallet, const CWalletTx &wtx, const std::string &strAccount, int nMinDepth, bool fLong, UniValue &ret, const isminefilter &filter)
 
void AcentryToJSON (const CAccountingEntry &acentry, const std::string &strAccount, UniValue &ret)
 
UniValue listtransactions (const JSONRPCRequest &request)
 
UniValue listaccounts (const JSONRPCRequest &request)
 
UniValue listsinceblock (const JSONRPCRequest &request)
 
UniValue gettransaction (const JSONRPCRequest &request)
 
UniValue abandontransaction (const JSONRPCRequest &request)
 
UniValue backupwallet (const JSONRPCRequest &request)
 
UniValue keypoolrefill (const JSONRPCRequest &request)
 
UniValue walletpassphrase (const JSONRPCRequest &request)
 
UniValue walletpassphrasechange (const JSONRPCRequest &request)
 
UniValue walletlock (const JSONRPCRequest &request)
 
UniValue encryptwallet (const JSONRPCRequest &request)
 
UniValue lockunspent (const JSONRPCRequest &request)
 
UniValue listlockunspent (const JSONRPCRequest &request)
 
UniValue settxfee (const JSONRPCRequest &request)
 
UniValue getwalletinfo (const JSONRPCRequest &request)
 
UniValue listwallets (const JSONRPCRequest &request)
 
UniValue resendwallettransactions (const JSONRPCRequest &request)
 
UniValue listunspent (const JSONRPCRequest &request)
 
UniValue fundrawtransaction (const JSONRPCRequest &request)
 
UniValue bumpfee (const JSONRPCRequest &request)
 
UniValue generate (const JSONRPCRequest &request)
 
UniValue rescanblockchain (const JSONRPCRequest &request)
 
UniValue abortrescan (const JSONRPCRequest &request)
 
UniValue dumpprivkey (const JSONRPCRequest &request)
 
UniValue importprivkey (const JSONRPCRequest &request)
 
UniValue importaddress (const JSONRPCRequest &request)
 
UniValue importpubkey (const JSONRPCRequest &request)
 
UniValue dumpwallet (const JSONRPCRequest &request)
 
UniValue importwallet (const JSONRPCRequest &request)
 
UniValue importprunedfunds (const JSONRPCRequest &request)
 
UniValue removeprunedfunds (const JSONRPCRequest &request)
 
UniValue importmulti (const JSONRPCRequest &request)
 
void RegisterWalletRPCCommands (CRPCTable &t)
 

Function Documentation

◆ _createmultisig_redeemScript()

CScript _createmultisig_redeemScript ( CWallet *const  pwallet,
const UniValue params 
)

Used by addmultisigaddress / createmultisig:

Definition at line 262 of file misc.cpp.

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

◆ abandontransaction()

UniValue abandontransaction ( const JSONRPCRequest request)

Definition at line 2092 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ abortrescan()

UniValue abortrescan ( const JSONRPCRequest request)

Definition at line 159 of file rpcdump.cpp.

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

◆ AccountFromValue()

std::string AccountFromValue ( const UniValue value)

Definition at line 126 of file rpcwallet.cpp.

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

◆ AcentryToJSON()

void AcentryToJSON ( const CAccountingEntry acentry,
const std::string &  strAccount,
UniValue ret 
)

Definition at line 1620 of file rpcwallet.cpp.

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

◆ addmultisigaddress()

UniValue addmultisigaddress ( const JSONRPCRequest request)

Definition at line 1106 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ addwitnessaddress()

UniValue addwitnessaddress ( const JSONRPCRequest request)

Definition at line 1211 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ backupwallet()

UniValue backupwallet ( const JSONRPCRequest request)

Definition at line 2132 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ bumpfee()

UniValue bumpfee ( const JSONRPCRequest request)

Definition at line 3066 of file rpcwallet.cpp.

◆ dumpprivkey()

UniValue dumpprivkey ( const JSONRPCRequest request)

Definition at line 551 of file rpcdump.cpp.

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

◆ dumpwallet()

UniValue dumpwallet ( const JSONRPCRequest request)

Definition at line 594 of file rpcdump.cpp.

Here is the caller graph for this function:

◆ encryptwallet()

UniValue encryptwallet ( const JSONRPCRequest request)

Definition at line 2363 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ EnsureWalletIsAvailable()

bool EnsureWalletIsAvailable ( CWallet *const  pwallet,
bool  avoidException 
)

Definition at line 63 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ EnsureWalletIsUnlocked()

void EnsureWalletIsUnlocked ( CWallet *const  pwallet)

Definition at line 80 of file rpcwallet.cpp.

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

◆ fundrawtransaction()

UniValue fundrawtransaction ( const JSONRPCRequest request)

Definition at line 2886 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ generate()

UniValue generate ( const JSONRPCRequest request)

Definition at line 3208 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getaccount()

UniValue getaccount ( const JSONRPCRequest request)

Definition at line 310 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ GetAccountAddress()

CTxDestination GetAccountAddress ( CWallet *const  pwallet,
std::string  strAccount,
bool  bForceNew = false 
)

Definition at line 180 of file rpcwallet.cpp.

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

◆ getaccountaddress()

UniValue getaccountaddress ( const JSONRPCRequest request)

Definition at line 190 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getaddressesbyaccount()

UniValue getaddressesbyaccount ( const JSONRPCRequest request)

Definition at line 346 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getbalance()

UniValue getbalance ( const JSONRPCRequest request)

Definition at line 745 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getnewaddress()

UniValue getnewaddress ( const JSONRPCRequest request)

Definition at line 134 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getrawchangeaddress()

UniValue getrawchangeaddress ( const JSONRPCRequest request)

Definition at line 224 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getreceivedbyaccount()

UniValue getreceivedbyaccount ( const JSONRPCRequest request)

Definition at line 685 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getreceivedbyaddress()

UniValue getreceivedbyaddress ( const JSONRPCRequest request)

Definition at line 623 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ gettransaction()

UniValue gettransaction ( const JSONRPCRequest request)

Definition at line 1987 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getunconfirmedbalance()

UniValue getunconfirmedbalance ( const JSONRPCRequest request)

Definition at line 818 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ GetWalletForJSONRPCRequest()

CWallet* GetWalletForJSONRPCRequest ( const JSONRPCRequest request)

Figures out what wallet, if any, to use for a JSONRPCRequest.

Parameters
[in]requestJSONRPCRequest that wishes to access a wallet
Returns
nullptr if no wallet should be used, or a pointer to the CWallet

Definition at line 40 of file rpcwallet.cpp.

◆ getwalletinfo()

UniValue getwalletinfo ( const JSONRPCRequest request)

Definition at line 2596 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ HelpRequiringPassphrase()

std::string HelpRequiringPassphrase ( CWallet *const  pwallet)

Definition at line 56 of file rpcwallet.cpp.

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

◆ importaddress()

UniValue importaddress ( const JSONRPCRequest request)

Definition at line 220 of file rpcdump.cpp.

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

◆ importmulti()

UniValue importmulti ( const JSONRPCRequest request)

Definition at line 1032 of file rpcdump.cpp.

Here is the caller graph for this function:

◆ importprivkey()

UniValue importprivkey ( const JSONRPCRequest request)

Definition at line 75 of file rpcdump.cpp.

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

◆ importprunedfunds()

UniValue importprunedfunds ( const JSONRPCRequest request)

Definition at line 291 of file rpcdump.cpp.

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

◆ importpubkey()

UniValue importpubkey ( const JSONRPCRequest request)

Definition at line 390 of file rpcdump.cpp.

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

◆ importwallet()

UniValue importwallet ( const JSONRPCRequest request)

Definition at line 450 of file rpcdump.cpp.

Here is the caller graph for this function:

◆ keypoolrefill()

UniValue keypoolrefill ( const JSONRPCRequest request)

Definition at line 2161 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listaccounts()

UniValue listaccounts ( const JSONRPCRequest request)

Definition at line 1768 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listaddressgroupings()

UniValue listaddressgroupings ( const JSONRPCRequest request)

Definition at line 508 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listlockunspent()

UniValue listlockunspent ( const JSONRPCRequest request)

Definition at line 2515 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ ListReceived()

UniValue ListReceived ( CWallet *const  pwallet,
const UniValue params,
bool  fByAccounts 
)

Definition at line 1271 of file rpcwallet.cpp.

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

◆ listreceivedbyaccount()

UniValue listreceivedbyaccount ( const JSONRPCRequest request)

Definition at line 1434 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listreceivedbyaddress()

UniValue listreceivedbyaddress ( const JSONRPCRequest request)

Definition at line 1389 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listsinceblock()

UniValue listsinceblock ( const JSONRPCRequest request)

Definition at line 1851 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ ListTransactions() [1/2]

void ListTransactions ( CWallet *const  pwallet,
const CWalletTx wtx,
const std::string &  strAccount,
int  nMinDepth,
bool  fLong,
UniValue ret,
UniValue retAssets,
const isminefilter filter 
)

List transactions based on the given criteria.

Parameters
pwalletThe wallet.
wtxThe wallet transaction.
strAccountThe account, if any, or "*" for all.
nMinDepthThe minimum confirmation depth.
fLongWhether to include the JSON version of the transaction.
retThe UniValue into which the result is stored.
filterThe "is mine" filter bool.

RVN START

RVN END

Definition at line 1492 of file rpcwallet.cpp.

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

◆ ListTransactions() [2/2]

void ListTransactions ( CWallet *const  pwallet,
const CWalletTx wtx,
const std::string &  strAccount,
int  nMinDepth,
bool  fLong,
UniValue ret,
const isminefilter filter 
)

Definition at line 1613 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listtransactions()

UniValue listtransactions ( const JSONRPCRequest request)

Definition at line 1637 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listunspent()

UniValue listunspent ( const JSONRPCRequest request)

Definition at line 2725 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listwallets()

UniValue listwallets ( const JSONRPCRequest request)

Definition at line 2657 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ lockunspent()

UniValue lockunspent ( const JSONRPCRequest request)

Definition at line 2425 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ movecmd()

UniValue movecmd ( const JSONRPCRequest request)

Definition at line 837 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ RegisterWalletRPCCommands()

void RegisterWalletRPCCommands ( CRPCTable t)

Definition at line 3398 of file rpcwallet.cpp.

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

◆ removeprunedfunds()

UniValue removeprunedfunds ( const JSONRPCRequest request)

Definition at line 352 of file rpcdump.cpp.

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

◆ rescanblockchain()

UniValue rescanblockchain ( const JSONRPCRequest request)

Definition at line 3253 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ resendwallettransactions()

UniValue resendwallettransactions ( const JSONRPCRequest request)

Definition at line 2690 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ sendfrom()

UniValue sendfrom ( const JSONRPCRequest request)

Definition at line 888 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ sendmany()

UniValue sendmany ( const JSONRPCRequest request)

Definition at line 960 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ sendtoaddress()

UniValue sendtoaddress ( const JSONRPCRequest request)

Definition at line 423 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ setaccount()

UniValue setaccount ( const JSONRPCRequest request)

Definition at line 262 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ settxfee()

UniValue settxfee ( const JSONRPCRequest request)

Definition at line 2567 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ signmessage()

UniValue signmessage ( const JSONRPCRequest request)

Definition at line 562 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ walletlock()

UniValue walletlock ( const JSONRPCRequest request)

Definition at line 2323 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ walletpassphrase()

UniValue walletpassphrase ( const JSONRPCRequest request)

Definition at line 2208 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ walletpassphrasechange()

UniValue walletpassphrasechange ( const JSONRPCRequest request)

Definition at line 2272 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ WalletTxToJSON()

void WalletTxToJSON ( const CWalletTx wtx,
UniValue entry 
)

Definition at line 87 of file rpcwallet.cpp.

Here is the call graph for this function: