PRCYCoin  2.0.0.7rc1
P2P Digital Currency
Classes | Functions | Variables
rpcwallet.cpp File Reference
#include "amount.h"
#include "base58.h"
#include "core_io.h"
#include "init.h"
#include "net.h"
#include "rpc/server.h"
#include "timedata.h"
#include "util.h"
#include "utilmoneystr.h"
#include "wallet/wallet.h"
#include "wallet/walletdb.h"
#include <stdint.h>
#include <fstream>
#include <boost/algorithm/string.hpp>
#include <boost/assign/list_of.hpp>
#include <univalue.h>
Include dependency graph for rpcwallet.cpp:

Go to the source code of this file.

Classes

struct  tallyitem
 

Functions

std::string HelpRequiringPassphrase ()
 
void EnsureWallet ()
 
void EnsureWalletIsUnlocked (bool fAllowAnonOnly)
 
void WalletTxToJSON (const CWalletTx &wtx, UniValue &entry)
 
std::string AccountFromValue (const UniValue &value)
 
UniValue getnewaddress (const UniValue &params, bool fHelp)
 
CBitcoinAddress GetAccountAddress (std::string strAccount, bool bForceNew=false)
 
CBitcoinAddress GetHDAccountAddress (std::string strAccount, uint32_t nAccountIndex, 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)
 
void SendMoney (const CTxDestination &address, CAmount nValue, CWalletTx &wtxNew, bool fUseIX=false)
 
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 std::string &strAccount, int nMinDepth, const isminefilter &filter)
 
CAmount GetAccountBalance (const std::string &strAccount, int nMinDepth, const isminefilter &filter)
 
UniValue getbalance (const UniValue &params, bool fHelp)
 
UniValue getbalances (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)
 Used by addmultisigaddress / createmultisig: More...
 
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)
 
void ListTransactions (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 UniValue &params, bool fHelp)
 
UniValue listtransactionsbypaymentid (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 backupwallet (const UniValue &params, bool fHelp)
 
UniValue keypoolrefill (const UniValue &params, bool fHelp)
 
UniValue unlockwallet (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 gettxcount (const UniValue &params, bool fHelp)
 
UniValue reservebalance (const UniValue &params, bool fHelp)
 
UniValue setstakesplitthreshold (const UniValue &params, bool fHelp)
 
UniValue getstakesplitthreshold (const UniValue &params, bool fHelp)
 
UniValue autocombinedust (const UniValue &params, bool fHelp)
 
UniValue printMultiSend ()
 
UniValue printAddresses ()
 
unsigned int sumMultiSend ()
 
UniValue multisend (const UniValue &params, bool fHelp)
 
UniValue createprivacywallet (const UniValue &params, bool fHelp)
 
UniValue createprivacyaccount (const UniValue &params, bool fHelp)
 
UniValue showstealthaddress (const UniValue &params, bool fHelp)
 
UniValue generateintegratedaddress (const UniValue &params, bool fHelp)
 
UniValue importkeys (const UniValue &params, bool fHelp)
 
UniValue createprivacysubaddress (const UniValue &params, bool fHelp)
 
UniValue readmasteraccount (const UniValue &params, bool fHelp)
 
UniValue decodestealthaddress (const UniValue &params, bool fHelp)
 
UniValue sendtostealthaddress (const UniValue &params, bool fHelp)
 
UniValue sendalltostealthaddress (const UniValue &params, bool fHelp)
 
UniValue setdecoyconfirmation (const UniValue &params, bool fHelp)
 
UniValue getdecoyconfirmation (const UniValue &params, bool fHelp)
 
std::string GetHex (const unsigned char *vch, int sz)
 
UniValue revealviewprivatekey (const UniValue &params, bool fHelp)
 
UniValue revealspendprivatekey (const UniValue &params, bool fHelp)
 
UniValue showtxprivatekeys (const UniValue &params, bool fHelp)
 
UniValue rescan (const UniValue &params, bool fHelp)
 
UniValue rescanwallettransactions (const UniValue &params, bool fHelp)
 
UniValue erasewallettransactions (const UniValue &params, bool fHelp)
 
UniValue revealmnemonicphrase (const UniValue &params, bool fHelp)
 
UniValue erasefromwallet (const UniValue &params, bool fHelp)
 

Variables

int64_t nWalletUnlockTime
 

Function Documentation

◆ _createmultisig_redeemScript()

CScript _createmultisig_redeemScript ( const UniValue params)

Used by addmultisigaddress / createmultisig:

Definition at line 362 of file misc.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 81 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 1211 of file rpcwallet.cpp.

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

◆ addmultisigaddress()

UniValue addmultisigaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 906 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ autocombinedust()

UniValue autocombinedust ( const UniValue params,
bool  fHelp 
)

Definition at line 2236 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ backupwallet()

UniValue backupwallet ( const UniValue params,
bool  fHelp 
)

Definition at line 1682 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ createprivacyaccount()

UniValue createprivacyaccount ( const UniValue params,
bool  fHelp 
)

Definition at line 2540 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ createprivacysubaddress()

UniValue createprivacysubaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 2681 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ createprivacywallet()

UniValue createprivacywallet ( const UniValue params,
bool  fHelp 
)

Definition at line 2518 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ decodestealthaddress()

UniValue decodestealthaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 2761 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ encryptwallet()

UniValue encryptwallet ( const UniValue params,
bool  fHelp 
)
Todo:
: get rid of this .c_str() by implementing SecureString::operator=(std::string)

Definition at line 1882 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ EnsureWallet()

void EnsureWallet ( )

Definition at line 37 of file rpcwallet.cpp.

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

◆ EnsureWalletIsUnlocked()

void EnsureWalletIsUnlocked ( bool  fAllowAnonOnly)

Definition at line 45 of file rpcwallet.cpp.

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

◆ erasefromwallet()

UniValue erasefromwallet ( const UniValue params,
bool  fHelp 
)

Definition at line 3128 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ erasewallettransactions()

UniValue erasewallettransactions ( const UniValue params,
bool  fHelp 
)

Definition at line 3062 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ generateintegratedaddress()

UniValue generateintegratedaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 2608 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getaccount()

UniValue getaccount ( const UniValue params,
bool  fHelp 
)

Definition at line 289 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getaccountaddress()

UniValue getaccountaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 201 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ GetAccountAddress()

CBitcoinAddress GetAccountAddress ( std::string  strAccount,
bool  bForceNew = false 
)

Definition at line 126 of file rpcwallet.cpp.

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

◆ GetAccountBalance() [1/2]

CAmount GetAccountBalance ( const std::string &  strAccount,
int  nMinDepth,
const isminefilter filter 
)

Definition at line 591 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ GetAccountBalance() [2/2]

CAmount GetAccountBalance ( CWalletDB walletdb,
const std::string &  strAccount,
int  nMinDepth,
const isminefilter filter 
)

Definition at line 567 of file rpcwallet.cpp.

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

◆ getaddressesbyaccount()

UniValue getaddressesbyaccount ( const UniValue params,
bool  fHelp 
)

Definition at line 316 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getbalance()

UniValue getbalance ( const UniValue params,
bool  fHelp 
)

Definition at line 597 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getbalances()

UniValue getbalances ( const UniValue params,
bool  fHelp 
)

Definition at line 666 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getdecoyconfirmation()

UniValue getdecoyconfirmation ( const UniValue params,
bool  fHelp 
)

Definition at line 2920 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ GetHDAccountAddress()

CBitcoinAddress GetHDAccountAddress ( std::string  strAccount,
uint32_t  nAccountIndex,
bool  bForceNew = false 
)

Definition at line 161 of file rpcwallet.cpp.

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

◆ GetHex()

std::string GetHex ( const unsigned char *  vch,
int  sz 
)

Definition at line 2940 of file rpcwallet.cpp.

Here is the caller graph for this function:

◆ getnewaddress()

UniValue getnewaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 89 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getrawchangeaddress()

UniValue getrawchangeaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 224 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getreceivedbyaccount()

UniValue getreceivedbyaccount ( const UniValue params,
bool  fHelp 
)

Definition at line 519 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getreceivedbyaddress()

UniValue getreceivedbyaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 469 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getstakesplitthreshold()

UniValue getstakesplitthreshold ( const UniValue params,
bool  fHelp 
)

Definition at line 2222 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ gettransaction()

UniValue gettransaction ( const UniValue params,
bool  fHelp 
)

Definition at line 1610 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ gettxcount()

UniValue gettxcount ( const UniValue params,
bool  fHelp 
)

Definition at line 2110 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getunconfirmedbalance()

UniValue getunconfirmedbalance ( const UniValue params,
bool  fHelp 
)

Definition at line 692 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ getwalletinfo()

UniValue getwalletinfo ( const UniValue params,
bool  fHelp 
)

Definition at line 2071 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ HelpRequiringPassphrase()

std::string HelpRequiringPassphrase ( )

Definition at line 32 of file rpcwallet.cpp.

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

◆ importkeys()

UniValue importkeys ( const UniValue params,
bool  fHelp 
)

Definition at line 2636 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ keypoolrefill()

UniValue keypoolrefill ( const UniValue params,
bool  fHelp 
)

Definition at line 1703 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listaccounts()

UniValue listaccounts ( const UniValue params,
bool  fHelp 
)

Definition at line 1457 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listaddressgroupings()

UniValue listaddressgroupings ( const UniValue params,
bool  fHelp 
)

Definition at line 376 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listlockunspent()

UniValue listlockunspent ( const UniValue params,
bool  fHelp 
)

Definition at line 2006 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ ListReceived()

UniValue ListReceived ( const UniValue params,
bool  fByAccounts 
)

Definition at line 964 of file rpcwallet.cpp.

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

◆ listreceivedbyaccount()

UniValue listreceivedbyaccount ( const UniValue params,
bool  fHelp 
)

Definition at line 1111 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listreceivedbyaddress()

UniValue listreceivedbyaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 1079 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listsinceblock()

UniValue listsinceblock ( const UniValue params,
bool  fHelp 
)

Definition at line 1527 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ ListTransactions()

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

Definition at line 1149 of file rpcwallet.cpp.

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

◆ listtransactions()

UniValue listtransactions ( const UniValue params,
bool  fHelp 
)

Definition at line 1227 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ listtransactionsbypaymentid()

UniValue listtransactionsbypaymentid ( const UniValue params,
bool  fHelp 
)

Definition at line 1345 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ lockunspent()

UniValue lockunspent ( const UniValue params,
bool  fHelp 
)

Definition at line 1931 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ movecmd()

UniValue movecmd ( const UniValue params,
bool  fHelp 
)

Definition at line 704 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ multisend()

UniValue multisend ( const UniValue params,
bool  fHelp 
)

Definition at line 2340 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ printAddresses()

UniValue printAddresses ( )

Definition at line 2303 of file rpcwallet.cpp.

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

◆ printMultiSend()

UniValue printMultiSend ( )

Definition at line 2275 of file rpcwallet.cpp.

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

◆ readmasteraccount()

UniValue readmasteraccount ( const UniValue params,
bool  fHelp 
)

Definition at line 2742 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ rescan()

UniValue rescan ( const UniValue params,
bool  fHelp 
)

Definition at line 3014 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ rescanwallettransactions()

UniValue rescanwallettransactions ( const UniValue params,
bool  fHelp 
)

Definition at line 3036 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ reservebalance()

UniValue reservebalance ( const UniValue params,
bool  fHelp 
)

Definition at line 2131 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ revealmnemonicphrase()

UniValue revealmnemonicphrase ( const UniValue params,
bool  fHelp 
)

Definition at line 3104 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ revealspendprivatekey()

UniValue revealspendprivatekey ( const UniValue params,
bool  fHelp 
)

Definition at line 2967 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ revealviewprivatekey()

UniValue revealviewprivatekey ( const UniValue params,
bool  fHelp 
)

Definition at line 2947 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ sendalltostealthaddress()

UniValue sendalltostealthaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 2857 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ sendfrom()

UniValue sendfrom ( const UniValue params,
bool  fHelp 
)

Definition at line 768 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ sendmany()

UniValue sendmany ( const UniValue params,
bool  fHelp 
)

Definition at line 824 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ SendMoney()

void SendMoney ( const CTxDestination address,
CAmount  nValue,
CWalletTx wtxNew,
bool  fUseIX = false 
)

Definition at line 347 of file rpcwallet.cpp.

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

◆ sendtostealthaddress()

UniValue sendtostealthaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 2797 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ setaccount()

UniValue setaccount ( const UniValue params,
bool  fHelp 
)

Definition at line 252 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ setdecoyconfirmation()

UniValue setdecoyconfirmation ( const UniValue params,
bool  fHelp 
)

Definition at line 2892 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ setstakesplitthreshold()

UniValue setstakesplitthreshold ( const UniValue params,
bool  fHelp 
)

Definition at line 2180 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ settxfee()

UniValue settxfee ( const UniValue params,
bool  fHelp 
)

Definition at line 2047 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ showstealthaddress()

UniValue showstealthaddress ( const UniValue params,
bool  fHelp 
)

Definition at line 2589 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ showtxprivatekeys()

UniValue showtxprivatekeys ( const UniValue params,
bool  fHelp 
)

Definition at line 2987 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ signmessage()

UniValue signmessage ( const UniValue params,
bool  fHelp 
)

Definition at line 420 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ sumMultiSend()

unsigned int sumMultiSend ( )

Definition at line 2332 of file rpcwallet.cpp.

◆ unlockwallet()

UniValue unlockwallet ( const UniValue params,
bool  fHelp 
)
Todo:
: get rid of this .c_str() by implementing SecureString::operator=(std::string)

Definition at line 1743 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ walletlock()

UniValue walletlock ( const UniValue params,
bool  fHelp 
)

Definition at line 1852 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ walletpassphrasechange()

UniValue walletpassphrasechange ( const UniValue params,
bool  fHelp 
)
Todo:
: get rid of these .c_str() calls by implementing SecureString::operator=(std::string)

Definition at line 1811 of file rpcwallet.cpp.

Here is the call graph for this function:

◆ WalletTxToJSON()

void WalletTxToJSON ( const CWalletTx wtx,
UniValue entry 
)

Definition at line 51 of file rpcwallet.cpp.

Here is the call graph for this function:

Variable Documentation

◆ nWalletUnlockTime

int64_t nWalletUnlockTime

Definition at line 29 of file rpcwallet.cpp.