Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
#include <base58.h>
#include <chain.h>
#include <clientversion.h>
#include <core_io.h>
#include <init.h>
#include <httpserver.h>
#include <net.h>
#include <netbase.h>
#include <rpc/blockchain.h>
#include <rpc/server.h>
#include <rpc/util.h>
#include <timedata.h>
#include <txmempool.h>
#include <utilstrencodings.h>
#include <validation.h>
#include <warnings.h>
#include <masternode/masternode-sync.h>
#include <spork.h>
#include <stdint.h>
#include <boost/algorithm/string.hpp>
#include <univalue.h>
Go to the source code of this file.
Variables | |
static const CRPCCommand | commands [] |
Function Documentation
◆ createmultisig()
UniValue createmultisig | ( | const JSONRPCRequest & | request | ) |
Definition at line 337 of file misc.cpp.
References AddrToPubKey(), prevector< N, T, Size, Diff >::begin(), CreateMultisigRedeemscript(), EncodeDestination(), prevector< N, T, Size, Diff >::end(), EnsureWalletIsAvailable(), JSONRPCRequest::fHelp, UniValue::get_array(), UniValue::get_int(), UniValue::get_str(), GetWalletForJSONRPCRequest(), HelpExampleCli(), HelpExampleRpc(), HexStr(), HexToPubKey(), IsDeprecatedRPCEnabled(), IsHex(), JSONRPCError(), Pair(), JSONRPCRequest::params, UniValue::push_back(), RPC_INVALID_ADDRESS_OR_KEY, UniValue::size(), strprintf, and UniValue::VOBJ.
◆ debug()
UniValue debug | ( | const JSONRPCRequest & | request | ) |
Definition at line 42 of file misc.cpp.
References JSONRPCRequest::fHelp, UniValue::get_str(), GetLogCategory(), HelpExampleCli(), HelpExampleRpc(), ListActiveLogCategoriesString(), ListLogCategories(), logCategories, BCLog::NONE, JSONRPCRequest::params, and UniValue::size().
◆ echo()
UniValue echo | ( | const JSONRPCRequest & | request | ) |
Definition at line 1176 of file misc.cpp.
References JSONRPCRequest::fHelp, and JSONRPCRequest::params.
◆ getaddressbalance()
UniValue getaddressbalance | ( | const JSONRPCRequest & | request | ) |
Definition at line 823 of file misc.cpp.
References JSONRPCRequest::fHelp, getAddressesFromParams(), GetAddressIndex(), HelpExampleCli(), HelpExampleRpc(), JSONRPCError(), Pair(), JSONRPCRequest::params, UniValue::push_back(), RPC_INVALID_ADDRESS_OR_KEY, UniValue::size(), and UniValue::VOBJ.
◆ getaddressdeltas()
UniValue getaddressdeltas | ( | const JSONRPCRequest & | request | ) |
Definition at line 735 of file misc.cpp.
References JSONRPCRequest::fHelp, find_value(), UniValue::get_int(), UniValue::get_obj(), getAddressesFromParams(), getAddressFromIndex(), GetAddressIndex(), HelpExampleCli(), HelpExampleRpc(), UniValue::isNum(), UniValue::isObject(), JSONRPCError(), Pair(), JSONRPCRequest::params, UniValue::push_back(), RPC_INVALID_ADDRESS_OR_KEY, UniValue::size(), UniValue::VARR, and UniValue::VOBJ.
◆ getAddressesFromParams()
bool getAddressesFromParams | ( | const UniValue & | params, |
std::vector< std::pair< uint160, int > > & | addresses | ||
) |
Definition at line 553 of file misc.cpp.
References find_value(), getIndexKey(), UniValue::getValues(), UniValue::isArray(), JSONRPCError(), and RPC_INVALID_ADDRESS_OR_KEY.
Referenced by getaddressbalance(), getaddressdeltas(), getaddressmempool(), getaddresstxids(), and getaddressutxos().
◆ getAddressFromIndex()
bool getAddressFromIndex | ( | const int & | type, |
const uint160 & | hash, | ||
std::string & | address | ||
) |
Definition at line 527 of file misc.cpp.
References EncodeDestination().
Referenced by getaddressdeltas(), getaddressmempool(), and getaddressutxos().
◆ getaddressmempool()
UniValue getaddressmempool | ( | const JSONRPCRequest & | request | ) |
Definition at line 597 of file misc.cpp.
References JSONRPCRequest::fHelp, getAddressesFromParams(), getAddressFromIndex(), CTxMemPool::getAddressIndex(), HelpExampleCli(), HelpExampleRpc(), JSONRPCError(), mempool, Pair(), JSONRPCRequest::params, UniValue::push_back(), RPC_INVALID_ADDRESS_OR_KEY, UniValue::size(), timestampSort(), UniValue::VARR, and UniValue::VOBJ.
◆ getaddresstxids()
UniValue getaddresstxids | ( | const JSONRPCRequest & | request | ) |
Definition at line 879 of file misc.cpp.
References JSONRPCRequest::fHelp, find_value(), UniValue::get_int(), UniValue::get_obj(), getAddressesFromParams(), GetAddressIndex(), HelpExampleCli(), HelpExampleRpc(), UniValue::isNum(), UniValue::isObject(), JSONRPCError(), JSONRPCRequest::params, UniValue::push_back(), RPC_INVALID_ADDRESS_OR_KEY, UniValue::size(), and UniValue::VARR.
◆ getaddressutxos()
UniValue getaddressutxos | ( | const JSONRPCRequest & | request | ) |
Definition at line 668 of file misc.cpp.
References JSONRPCRequest::fHelp, getAddressesFromParams(), getAddressFromIndex(), GetAddressUnspent(), heightSort(), HelpExampleCli(), HelpExampleRpc(), HexStr(), JSONRPCError(), Pair(), JSONRPCRequest::params, UniValue::push_back(), RPC_INVALID_ADDRESS_OR_KEY, UniValue::size(), UniValue::VARR, and UniValue::VOBJ.
◆ getCategoryMask()
uint64_t getCategoryMask | ( | UniValue | cats | ) |
Definition at line 1088 of file misc.cpp.
References UniValue::get_array(), UniValue::get_str(), GetLogCategory(), JSONRPCError(), immer::detail::hamts::mask, BCLog::NONE, RPC_INVALID_PARAMETER, and UniValue::size().
Referenced by logging().
◆ getIndexKey()
bool getIndexKey | ( | const std::string & | str, |
uint160 & | hashBytes, | ||
int & | type | ||
) |
Definition at line 539 of file misc.cpp.
References DecodeDestination(), and IsValidDestination().
Referenced by getAddressesFromParams().
◆ getinfo_deprecated()
|
static |
Definition at line 1189 of file misc.cpp.
References JSONRPCError(), and RPC_METHOD_NOT_FOUND.
◆ getmemoryinfo()
UniValue getmemoryinfo | ( | const JSONRPCRequest & | request | ) |
Definition at line 1041 of file misc.cpp.
References JSONRPCRequest::fHelp, UniValue::get_str(), HelpExampleCli(), HelpExampleRpc(), UniValue::isNull(), JSONRPCError(), Pair(), JSONRPCRequest::params, UniValue::push_back(), RPC_INVALID_PARAMETER, RPCLockedMemoryInfo(), UniValue::size(), and UniValue::VOBJ.
◆ getspentinfo()
UniValue getspentinfo | ( | const JSONRPCRequest & | request | ) |
Definition at line 962 of file misc.cpp.
References CSpentIndexValue::blockHeight, JSONRPCRequest::fHelp, find_value(), UniValue::get_obj(), base_blob< BITS >::GetHex(), GetSpentIndex(), HelpExampleCli(), HelpExampleRpc(), CSpentIndexValue::inputIndex, UniValue::isObject(), UniValue::isStr(), JSONRPCError(), Pair(), JSONRPCRequest::params, ParseHashV(), UniValue::push_back(), RPC_INVALID_ADDRESS_OR_KEY, UniValue::size(), CSpentIndexValue::txid, and UniValue::VOBJ.
◆ heightSort()
bool heightSort | ( | std::pair< CAddressUnspentKey, CAddressUnspentValue > | a, |
std::pair< CAddressUnspentKey, CAddressUnspentValue > | b | ||
) |
Definition at line 587 of file misc.cpp.
Referenced by getaddressutxos().
◆ logging()
UniValue logging | ( | const JSONRPCRequest & | request | ) |
Definition at line 1105 of file misc.cpp.
References JSONRPCRequest::fHelp, getCategoryMask(), HelpExampleCli(), HelpExampleRpc(), UniValue::isArray(), JSONRPCError(), BCLog::LIBEVENT, ListActiveLogCategories(), ListLogCategories(), logCategories, JSONRPCRequest::params, UniValue::pushKV(), RPC_INVALID_PARAMETER, UniValue::size(), UpdateHTTPServerLogging(), and UniValue::VOBJ.
◆ mnsync()
UniValue mnsync | ( | const JSONRPCRequest & | request | ) |
Definition at line 82 of file misc.cpp.
References JSONRPCRequest::fHelp, g_connman, UniValue::get_str(), CMasternodeSync::GetAssetID(), CMasternodeSync::GetAssetName(), CMasternodeSync::GetAssetStartTime(), CMasternodeSync::GetAttempt(), CMasternodeSync::IsBlockchainSynced(), CMasternodeSync::IsSynced(), masternodeSync, Pair(), JSONRPCRequest::params, UniValue::push_back(), CMasternodeSync::Reset(), UniValue::size(), CMasternodeSync::SwitchToNextAsset(), and UniValue::VOBJ.
◆ RegisterMiscRPCCommands()
void RegisterMiscRPCCommands | ( | CRPCTable & | t | ) |
Register miscellaneous RPC commands.
Definition at line 1231 of file misc.cpp.
References CRPCTable::appendCommand(), ARRAYLEN, commands, and CRPCCommand::name.
Referenced by RegisterAllCoreRPCCommands().
◆ RPCLockedMemoryInfo()
|
static |
Definition at line 1009 of file misc.cpp.
References LockedPool::Stats::chunks_free, LockedPool::Stats::chunks_used, LockedPool::Stats::free, LockedPoolManager::Instance(), LockedPool::Stats::locked, Pair(), UniValue::push_back(), LockedPool::stats(), LockedPool::Stats::total, LockedPool::Stats::used, and UniValue::VOBJ.
Referenced by getmemoryinfo().
◆ setmocktime()
UniValue setmocktime | ( | const JSONRPCRequest & | request | ) |
Definition at line 500 of file misc.cpp.
References cs_main, JSONRPCRequest::fHelp, UniValue::get_int64(), LOCK, CChainParams::MineBlocksOnDemand(), NullUniValue, JSONRPCRequest::params, Params(), RPCTypeCheck(), SetMockTime(), and UniValue::size().
◆ signmessagewithprivkey()
UniValue signmessagewithprivkey | ( | const JSONRPCRequest & | request | ) |
Definition at line 458 of file misc.cpp.
References EncodeBase64(), JSONRPCRequest::fHelp, UniValue::get_str(), CHashWriter::GetHash(), CBitcoinSecret::GetKey(), HelpExampleCli(), HelpExampleRpc(), CKey::IsValid(), JSONRPCError(), JSONRPCRequest::params, RPC_INVALID_ADDRESS_OR_KEY, SER_GETHASH, CBitcoinSecret::SetString(), CKey::SignCompact(), UniValue::size(), and strMessageMagic.
◆ spork()
UniValue spork | ( | const JSONRPCRequest & | request | ) |
Definition at line 165 of file misc.cpp.
References JSONRPCRequest::fHelp, g_connman, UniValue::get_int64(), UniValue::get_str(), CSporkManager::GetSporkIDByName(), CSporkManager::GetSporkValue(), HelpExampleCli(), HelpExampleRpc(), CSporkManager::IsSporkActive(), JSONRPCError(), Pair(), JSONRPCRequest::params, UniValue::push_back(), RPC_CLIENT_P2P_DISABLED, RPC_INVALID_PARAMETER, UniValue::size(), SPORK_INVALID, sporkDefs, sporkManager, CSporkManager::UpdateSpork(), and UniValue::VOBJ.
Referenced by AlreadyHave(), ProcessGetData(), CSporkManager::ProcessSpork(), CSporkManager::SetPrivKey(), and CSporkManager::UpdateSpork().
◆ timestampSort()
bool timestampSort | ( | std::pair< CMempoolAddressDeltaKey, CMempoolAddressDelta > | a, |
std::pair< CMempoolAddressDeltaKey, CMempoolAddressDelta > | b | ||
) |
Definition at line 592 of file misc.cpp.
Referenced by getaddressmempool().
◆ validateaddress()
UniValue validateaddress | ( | const JSONRPCRequest & | request | ) |
Definition at line 238 of file misc.cpp.
References prevector< N, T, Size, Diff >::begin(), cs_main, CWallet::cs_wallet, DecodeDestination(), EncodeDestination(), prevector< N, T, Size, Diff >::end(), JSONRPCRequest::fHelp, UniValue::get_str(), CCryptoKeyStore::GetHDChain(), base_blob< BITS >::GetHex(), CHDChain::GetID(), GetScriptForDestination(), GetWalletForJSONRPCRequest(), HelpExampleCli(), HelpExampleRpc(), HexStr(), IsMine(), ISMINE_NO, ISMINE_SPENDABLE, ISMINE_WATCH_ONLY, IsValidDestination(), LOCK, LOCK2, CWallet::m_script_metadata, CWallet::mapAddressBook, CWallet::mapHdPubKeys, CWallet::mapKeyMetadata, CKeyMetadata::nCreateTime, Pair(), JSONRPCRequest::params, UniValue::push_back(), UniValue::pushKVs(), UniValue::size(), and UniValue::VOBJ.
◆ verifymessage()
UniValue verifymessage | ( | const JSONRPCRequest & | request | ) |
Definition at line 402 of file misc.cpp.
References cs_main, DecodeBase64(), DecodeDestination(), JSONRPCRequest::fHelp, UniValue::get_str(), CHashWriter::GetHash(), CPubKey::GetID(), HelpExampleCli(), HelpExampleRpc(), IsValidDestination(), JSONRPCError(), LOCK, JSONRPCRequest::params, CPubKey::RecoverCompact(), RPC_INVALID_ADDRESS_OR_KEY, RPC_TYPE_ERROR, SER_GETHASH, UniValue::size(), and strMessageMagic.
Variable Documentation
◆ commands
|
static |
Definition at line 1201 of file misc.cpp.
Referenced by RegisterMiscRPCCommands().