Dash Core  0.12.2.1
P2P Digital Currency
rpcwallet.cpp File Reference
#include "amount.h"
#include "base58.h"
#include "chain.h"
#include "core_io.h"
#include "init.h"
#include "instantx.h"
#include "net.h"
#include "policy/rbf.h"
#include "rpc/server.h"
#include "timedata.h"
#include "util.h"
#include "utilmoneystr.h"
#include "validation.h"
#include "wallet.h"
#include "walletdb.h"
#include "keepass.h"
#include <stdint.h>
#include <boost/assign/list_of.hpp>
#include <univalue.h>

Go to the source code of this file.

Classes

struct  tallyitem
 

Functions

std::string HelpRequiringPassphrase ()
 
bool EnsureWalletIsAvailable (bool avoidException)
 
void EnsureWalletIsUnlocked ()
 
void WalletTxToJSON (const CWalletTx &wtx, UniValue &entry)
 
string AccountFromValue (const UniValue &value)
 
UniValue getnewaddress (const UniValue &params, bool fHelp)
 
CBitcoinAddress GetAccountAddress (string strAccount, bool bForceNew=false)
 
UniValue getaccountaddress (const UniValue &params, bool fHelp)
 
UniValue getrawchangeaddress (const UniValue &params, bool fHelp)
 
UniValue setaccount (const UniValue &params, bool fHelp)
 
UniValue getaccount (const UniValue &params, bool fHelp)
 
UniValue getaddressesbyaccount (const UniValue &params, bool fHelp)
 
static void SendMoney (const CTxDestination &address, CAmount nValue, bool fSubtractFeeFromAmount, CWalletTx &wtxNew, bool fUseInstantSend=false, bool fUsePrivateSend=false)
 
UniValue sendtoaddress (const UniValue &params, bool fHelp)
 
UniValue instantsendtoaddress (const UniValue &params, bool fHelp)
 
UniValue listaddressgroupings (const UniValue &params, bool fHelp)
 
UniValue signmessage (const UniValue &params, bool fHelp)
 
UniValue getreceivedbyaddress (const UniValue &params, bool fHelp)
 
UniValue getreceivedbyaccount (const UniValue &params, bool fHelp)
 
CAmount GetAccountBalance (CWalletDB &walletdb, const string &strAccount, int nMinDepth, const isminefilter &filter, bool fAddLockConf)
 
CAmount GetAccountBalance (const string &strAccount, int nMinDepth, const isminefilter &filter, bool fAddLockConf)
 
UniValue getbalance (const UniValue &params, bool fHelp)
 
UniValue getunconfirmedbalance (const UniValue &params, bool fHelp)
 
UniValue movecmd (const UniValue &params, bool fHelp)
 
UniValue sendfrom (const UniValue &params, bool fHelp)
 
UniValue sendmany (const UniValue &params, bool fHelp)
 
CScript _createmultisig_redeemScript (const UniValue &params)
 
UniValue addmultisigaddress (const UniValue &params, bool fHelp)
 
UniValue ListReceived (const UniValue &params, bool fByAccounts)
 
UniValue listreceivedbyaddress (const UniValue &params, bool fHelp)
 
UniValue listreceivedbyaccount (const UniValue &params, bool fHelp)
 
static void MaybePushAddress (UniValue &entry, const CTxDestination &dest)
 
void ListTransactions (const CWalletTx &wtx, const string &strAccount, int nMinDepth, bool fLong, UniValue &ret, const isminefilter &filter)
 
void AcentryToJSON (const CAccountingEntry &acentry, const string &strAccount, UniValue &ret)
 
UniValue listtransactions (const UniValue &params, bool fHelp)
 
UniValue listaccounts (const UniValue &params, bool fHelp)
 
UniValue listsinceblock (const UniValue &params, bool fHelp)
 
UniValue gettransaction (const UniValue &params, bool fHelp)
 
UniValue abandontransaction (const UniValue &params, bool fHelp)
 
UniValue backupwallet (const UniValue &params, bool fHelp)
 
UniValue keypoolrefill (const UniValue &params, bool fHelp)
 
static void LockWallet (CWallet *pWallet)
 
UniValue walletpassphrase (const UniValue &params, bool fHelp)
 
UniValue walletpassphrasechange (const UniValue &params, bool fHelp)
 
UniValue walletlock (const UniValue &params, bool fHelp)
 
UniValue encryptwallet (const UniValue &params, bool fHelp)
 
UniValue lockunspent (const UniValue &params, bool fHelp)
 
UniValue listlockunspent (const UniValue &params, bool fHelp)
 
UniValue settxfee (const UniValue &params, bool fHelp)
 
UniValue getwalletinfo (const UniValue &params, bool fHelp)
 
UniValue keepass (const UniValue &params, bool fHelp)
 
UniValue resendwallettransactions (const UniValue &params, bool fHelp)
 
UniValue listunspent (const UniValue &params, bool fHelp)
 
UniValue fundrawtransaction (const UniValue &params, bool fHelp)
 

Variables

int64_t nWalletUnlockTime
 
static CCriticalSection cs_nWalletUnlockTime
 

Function Documentation

◆ _createmultisig_redeemScript()

CScript _createmultisig_redeemScript ( const UniValue params)

Used by addmultisigaddress / createmultisig:

Definition at line 340 of file misc.cpp.

Referenced by addmultisigaddress(), and createmultisig().

◆ abandontransaction()

UniValue abandontransaction ( const UniValue params,
bool  fHelp 
)

Definition at line 1902 of file rpcwallet.cpp.

Referenced by abandonconflict.AbandonConflictTest::run_test().

◆ AccountFromValue()

◆ AcentryToJSON()

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

Definition at line 1501 of file rpcwallet.cpp.

Referenced by listtransactions().

◆ addmultisigaddress()

◆ backupwallet()

UniValue backupwallet ( const UniValue params,
bool  fHelp 
)

◆ encryptwallet()

◆ EnsureWalletIsAvailable()

◆ EnsureWalletIsUnlocked()

◆ fundrawtransaction()

UniValue fundrawtransaction ( const UniValue params,
bool  fHelp 
)

Definition at line 2651 of file rpcwallet.cpp.

◆ getaccount()

UniValue getaccount ( const UniValue params,
bool  fHelp 
)

◆ GetAccountAddress()

CBitcoinAddress GetAccountAddress ( string  strAccount,
bool  bForceNew = false 
)

Definition at line 155 of file rpcwallet.cpp.

Referenced by getaccountaddress(), and setaccount().

◆ getaccountaddress()

UniValue getaccountaddress ( const UniValue params,
bool  fHelp 
)

◆ GetAccountBalance() [1/2]

CAmount GetAccountBalance ( CWalletDB walletdb,
const string &  strAccount,
int  nMinDepth,
const isminefilter filter,
bool  fAddLockConf 
)

Definition at line 760 of file rpcwallet.cpp.

Referenced by GetAccountBalance(), getbalance(), sendfrom(), and sendmany().

◆ GetAccountBalance() [2/2]

CAmount GetAccountBalance ( const string &  strAccount,
int  nMinDepth,
const isminefilter filter,
bool  fAddLockConf 
)

Definition at line 785 of file rpcwallet.cpp.

◆ getaddressesbyaccount()

UniValue getaddressesbyaccount ( const UniValue params,
bool  fHelp 
)

Definition at line 337 of file rpcwallet.cpp.

◆ getbalance()

◆ getnewaddress()

UniValue getnewaddress ( const UniValue params,
bool  fHelp 
)

◆ getrawchangeaddress()

◆ getreceivedbyaccount()

UniValue getreceivedbyaccount ( const UniValue params,
bool  fHelp 
)

Definition at line 701 of file rpcwallet.cpp.

Referenced by receivedby.ReceivedByTest::run_test().

◆ getreceivedbyaddress()

UniValue getreceivedbyaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 641 of file rpcwallet.cpp.

Referenced by receivedby.ReceivedByTest::run_test().

◆ gettransaction()

◆ getunconfirmedbalance()

UniValue getunconfirmedbalance ( const UniValue params,
bool  fHelp 
)

◆ getwalletinfo()

UniValue getwalletinfo ( const UniValue params,
bool  fHelp 
)

◆ HelpRequiringPassphrase()

std::string HelpRequiringPassphrase ( )

◆ instantsendtoaddress()

UniValue instantsendtoaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 476 of file rpcwallet.cpp.

◆ keepass()

UniValue keepass ( const UniValue params,
bool  fHelp 
)

Definition at line 2455 of file rpcwallet.cpp.

◆ keypoolrefill()

UniValue keypoolrefill ( const UniValue params,
bool  fHelp 
)

◆ listaccounts()

UniValue listaccounts ( const UniValue params,
bool  fHelp 
)

Definition at line 1645 of file rpcwallet.cpp.

Referenced by wallet.WalletTest::run_test().

◆ listaddressgroupings()

UniValue listaddressgroupings ( const UniValue params,
bool  fHelp 
)

Definition at line 534 of file rpcwallet.cpp.

◆ listlockunspent()

UniValue listlockunspent ( const UniValue params,
bool  fHelp 
)

Definition at line 2300 of file rpcwallet.cpp.

Referenced by wallet.WalletTest::run_test().

◆ ListReceived()

UniValue ListReceived ( const UniValue params,
bool  fByAccounts 
)

Definition at line 1214 of file rpcwallet.cpp.

Referenced by listreceivedbyaccount(), and listreceivedbyaddress().

◆ listreceivedbyaccount()

UniValue listreceivedbyaccount ( const UniValue params,
bool  fHelp 
)

Definition at line 1380 of file rpcwallet.cpp.

Referenced by receivedby.ReceivedByTest::run_test().

◆ listreceivedbyaddress()

UniValue listreceivedbyaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 1339 of file rpcwallet.cpp.

Referenced by receivedby.ReceivedByTest::run_test().

◆ listsinceblock()

UniValue listsinceblock ( const UniValue params,
bool  fHelp 
)

Definition at line 1726 of file rpcwallet.cpp.

Referenced by wallet.WalletTest::run_test().

◆ ListTransactions()

void ListTransactions ( const CWalletTx wtx,
const string &  strAccount,
int  nMinDepth,
bool  fLong,
UniValue ret,
const isminefilter filter 
)

Definition at line 1425 of file rpcwallet.cpp.

Referenced by gettransaction(), listsinceblock(), and listtransactions().

◆ listtransactions()

UniValue listtransactions ( const UniValue params,
bool  fHelp 
)

Definition at line 1518 of file rpcwallet.cpp.

◆ listunspent()

◆ lockunspent()

UniValue lockunspent ( const UniValue params,
bool  fHelp 
)

Definition at line 2216 of file rpcwallet.cpp.

Referenced by wallet.WalletTest::run_test().

◆ LockWallet()

static void LockWallet ( CWallet pWallet)
static

Definition at line 2000 of file rpcwallet.cpp.

Referenced by walletpassphrase().

◆ MaybePushAddress()

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

Definition at line 1418 of file rpcwallet.cpp.

Referenced by ListTransactions().

◆ movecmd()

UniValue movecmd ( const UniValue params,
bool  fHelp 
)

Definition at line 885 of file rpcwallet.cpp.

◆ resendwallettransactions()

UniValue resendwallettransactions ( const UniValue params,
bool  fHelp 
)

Definition at line 2505 of file rpcwallet.cpp.

Referenced by wallet.WalletTest::run_test().

◆ sendfrom()

UniValue sendfrom ( const UniValue params,
bool  fHelp 
)

◆ sendmany()

◆ SendMoney()

static void SendMoney ( const CTxDestination address,
CAmount  nValue,
bool  fSubtractFeeFromAmount,
CWalletTx wtxNew,
bool  fUseInstantSend = false,
bool  fUsePrivateSend = false 
)
static

Definition at line 374 of file rpcwallet.cpp.

Referenced by instantsendtoaddress(), sendfrom(), and sendtoaddress().

◆ sendtoaddress()

◆ setaccount()

UniValue setaccount ( const UniValue params,
bool  fHelp 
)

Definition at line 259 of file rpcwallet.cpp.

◆ settxfee()

UniValue settxfee ( const UniValue params,
bool  fHelp 
)

◆ signmessage()

UniValue signmessage ( const UniValue params,
bool  fHelp 
)

Definition at line 585 of file rpcwallet.cpp.

◆ walletlock()

◆ walletpassphrase()

◆ walletpassphrasechange()

UniValue walletpassphrasechange ( const UniValue params,
bool  fHelp 
)

Definition at line 2074 of file rpcwallet.cpp.

◆ WalletTxToJSON()

void WalletTxToJSON ( const CWalletTx wtx,
UniValue entry 
)

Definition at line 60 of file rpcwallet.cpp.

Referenced by gettransaction(), and ListTransactions().

Variable Documentation

◆ cs_nWalletUnlockTime

CCriticalSection cs_nWalletUnlockTime
static

Definition at line 33 of file rpcwallet.cpp.

Referenced by LockWallet(), walletlock(), and walletpassphrase().

◆ nWalletUnlockTime

int64_t nWalletUnlockTime

Definition at line 32 of file rpcwallet.cpp.

Referenced by getinfo(), getwalletinfo(), LockWallet(), walletlock(), and walletpassphrase().