PRCYCoin  2.0.0.7rc1
P2P Digital Currency
server.h
Go to the documentation of this file.
1 // Copyright (c) 2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2014 The Bitcoin developers
3 // Copyright (c) 2015-2018 The PIVX developers
4 // Copyright (c) 2018-2020 The DAPS Project developers
5 // Distributed under the MIT software license, see the accompanying
6 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
7 
8 #ifndef BITCOIN_RPCSERVER_H
9 #define BITCOIN_RPCSERVER_H
10 
11 #include "amount.h"
12 #include "rpc/protocol.h"
13 #include "uint256.h"
14 
15 #include <list>
16 #include <map>
17 #include <stdint.h>
18 #include <string>
19 
20 #include <boost/function.hpp>
21 
22 #include <univalue.h>
23 
24 class CRPCCommand;
25 
26 namespace RPCServer
27 {
28  void OnStarted(boost::function<void ()> slot);
29  void OnStopped(boost::function<void ()> slot);
30  void OnPreCommand(boost::function<void (const CRPCCommand&)> slot);
31  void OnPostCommand(boost::function<void (const CRPCCommand&)> slot);
32 }
33 
34 class CBlockIndex;
35 class CNetAddr;
36 
38 {
39 public:
41  std::string strMethod;
43 
45  void parse(const UniValue& valRequest);
46 };
47 
48 bool IsRPCRunning();
49 
54 void SetRPCWarmupStatus(const std::string& newStatus);
55 /* Mark warmup as done. RPC calls will be processed from now on. */
57 
58 /* returns the current warmup state. */
59 bool RPCIsInWarmup(std::string* statusOut);
60 
66 void RPCTypeCheck(const UniValue& params,
67  const std::list<UniValue::VType>& typesExpected, bool fAllowNull=false);
72 void RPCTypeCheckObj(const UniValue& o,
73  const std::map<std::string, UniValue::VType>& typesExpected, bool fAllowNull=false);
74 
80 {
81 public:
82  virtual ~RPCTimerBase() {}
83 };
84 
89 {
90 public:
91  virtual ~RPCTimerInterface() {}
93  virtual const char *Name() = 0;
100  virtual RPCTimerBase* NewTimer(boost::function<void(void)>& func, int64_t millis) = 0;
101 };
102 
109 
114 void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64_t nSeconds);
115 
116 typedef UniValue(*rpcfn_type)(const UniValue& params, bool fHelp);
117 
119 {
120 public:
121  std::string category;
122  std::string name;
126  bool reqWallet;
127 };
128 
133 {
134 private:
135  std::map<std::string, const CRPCCommand*> mapCommands;
136 
137 public:
138  CRPCTable();
139  const CRPCCommand* operator[](const std::string& name) const;
140  std::string help(std::string name) const;
141 
149  UniValue execute(const std::string &method, const UniValue &params) const;
150 
155  std::vector<std::string> listCommands() const;
156 };
157 
158 extern const CRPCTable tableRPC;
159 
164 extern uint256 ParseHashV(const UniValue& v, std::string strName);
165 extern uint256 ParseHashO(const UniValue& o, std::string strKey);
166 extern std::vector<unsigned char> ParseHexV(const UniValue& v, std::string strName);
167 extern std::vector<unsigned char> ParseHexO(const UniValue& o, std::string strKey);
168 extern int ParseInt(const UniValue& o, std::string strKey);
169 extern bool ParseBool(const UniValue& o, std::string strKey);
170 
171 extern int64_t nWalletUnlockTime;
172 extern CAmount AmountFromValue(const UniValue& value);
173 extern UniValue ValueFromAmount(const CAmount& amount);
174 extern double GetDifficulty(const CBlockIndex* blockindex = NULL);
175 extern std::string HelpRequiringPassphrase();
176 extern std::string HelpExampleCli(std::string methodname, std::string args);
177 extern std::string HelpExampleRpc(std::string methodname, std::string args);
178 
179 extern void EnsureWallet();
180 extern void EnsureWalletIsUnlocked(bool fAllowAnonOnly = false);
181 
182 extern UniValue getconnectioncount(const UniValue& params, bool fHelp); // in rpcnet.cpp
183 extern UniValue getpeerinfo(const UniValue& params, bool fHelp);
184 extern UniValue ping(const UniValue& params, bool fHelp);
185 extern UniValue addnode(const UniValue& params, bool fHelp);
186 extern UniValue disconnectnode(const UniValue& params, bool fHelp);
187 extern UniValue getaddednodeinfo(const UniValue& params, bool fHelp);
188 extern UniValue getnettotals(const UniValue& params, bool fHelp);
189 extern UniValue setban(const UniValue& params, bool fHelp);
190 extern UniValue listbanned(const UniValue& params, bool fHelp);
191 extern UniValue clearbanned(const UniValue& params, bool fHelp);
192 
193 extern UniValue dumpprivkey(const UniValue& params, bool fHelp); // in rpcdump.cpp
194 extern UniValue importprivkey(const UniValue& params, bool fHelp);
195 extern UniValue importaddress(const UniValue& params, bool fHelp);
196 extern UniValue dumpwallet(const UniValue& params, bool fHelp);
197 extern UniValue importwallet(const UniValue& params, bool fHelp);
198 extern UniValue bip38encrypt(const UniValue& params, bool fHelp);
199 extern UniValue bip38decrypt(const UniValue& params, bool fHelp);
200 
201 extern UniValue getgenerate(const UniValue& params, bool fHelp); // in rpcmining.cpp
202 extern UniValue setgenerate(const UniValue& params, bool fHelp);
203 extern UniValue generate(const UniValue& params, bool fHelp);
204 extern UniValue generatepoa(const UniValue& params, bool fHelp);
205 extern UniValue getnetworkhashps(const UniValue& params, bool fHelp);
206 extern UniValue gethashespersec(const UniValue& params, bool fHelp);
207 extern UniValue getmininginfo(const UniValue& params, bool fHelp);
208 extern UniValue prioritisetransaction(const UniValue& params, bool fHelp);
209 extern UniValue getblocktemplate(const UniValue& params, bool fHelp);
210 extern UniValue getpoablocktemplate(const UniValue& params, bool fHelp);
211 extern UniValue setminingnbits(const UniValue& params, bool fHelp);
212 extern UniValue submitblock(const UniValue& params, bool fHelp);
213 extern UniValue estimatefee(const UniValue& params, bool fHelp);
214 extern UniValue estimatepriority(const UniValue& params, bool fHelp);
215 
216 extern UniValue generateintegratedaddress(const UniValue& params, bool fHelp); // in rpcwallet.cpp
217 extern UniValue readmasteraccount(const UniValue& params, bool fHelp); // in rpcwallet.cpp
218 extern UniValue getnewaddress(const UniValue& params, bool fHelp); // in rpcwallet.cpp
219 extern UniValue getaccountaddress(const UniValue& params, bool fHelp);
220 extern UniValue getrawchangeaddress(const UniValue& params, bool fHelp);
221 extern UniValue setaccount(const UniValue& params, bool fHelp);
222 extern UniValue getaccount(const UniValue& params, bool fHelp);
223 extern UniValue getaddressesbyaccount(const UniValue& params, bool fHelp);
224 extern UniValue signmessage(const UniValue& params, bool fHelp);
225 extern UniValue getreceivedbyaddress(const UniValue& params, bool fHelp);
226 extern UniValue getreceivedbyaccount(const UniValue& params, bool fHelp);
227 extern UniValue getbalance(const UniValue& params, bool fHelp);
228 extern UniValue getbalances(const UniValue& params, bool fHelp);
229 extern UniValue getunconfirmedbalance(const UniValue& params, bool fHelp);
230 extern UniValue movecmd(const UniValue& params, bool fHelp);
231 extern UniValue sendfrom(const UniValue& params, bool fHelp);
232 extern UniValue sendmany(const UniValue& params, bool fHelp);
233 extern UniValue addmultisigaddress(const UniValue& params, bool fHelp);
234 extern UniValue listreceivedbyaddress(const UniValue& params, bool fHelp);
235 extern UniValue listreceivedbyaccount(const UniValue& params, bool fHelp);
236 extern UniValue listtransactions(const UniValue& params, bool fHelp);
237 extern UniValue listtransactionsbypaymentid(const UniValue& params, bool fHelp);
238 extern UniValue listaddressgroupings(const UniValue& params, bool fHelp);
239 extern UniValue listaccounts(const UniValue& params, bool fHelp);
240 extern UniValue listsinceblock(const UniValue& params, bool fHelp);
241 extern UniValue gettransaction(const UniValue& params, bool fHelp);
242 extern UniValue backupwallet(const UniValue& params, bool fHelp);
243 extern UniValue keypoolrefill(const UniValue& params, bool fHelp);
244 extern UniValue unlockwallet(const UniValue& params, bool fHelp);
245 extern UniValue walletpassphrasechange(const UniValue& params, bool fHelp);
246 extern UniValue walletlock(const UniValue& params, bool fHelp);
247 extern UniValue encryptwallet(const UniValue& params, bool fHelp);
248 extern UniValue createprivacywallet(const UniValue& params, bool fHelp);
249 extern UniValue createprivacyaccount(const UniValue& params, bool fHelp);
250 extern UniValue showstealthaddress(const UniValue& params, bool fHelp);
251 extern UniValue importkeys(const UniValue& params, bool fHelp);
252 extern UniValue revealviewprivatekey(const UniValue& params, bool fHelp);
253 extern UniValue revealspendprivatekey(const UniValue& params, bool fHelp);
254 extern UniValue showtxprivatekeys(const UniValue& params, bool fHelp);
255 extern UniValue rescan(const UniValue& params, bool fHelp);
256 extern UniValue rescanwallettransactions(const UniValue& params, bool fHelp);
257 extern UniValue erasewallettransactions(const UniValue& params, bool fHelp);
258 extern UniValue setdecoyconfirmation(const UniValue& params, bool fHelp);
259 extern UniValue getdecoyconfirmation(const UniValue& params, bool fHelp);
260 extern UniValue decodestealthaddress(const UniValue& params, bool fHelp);
261 extern UniValue sendtostealthaddress(const UniValue& params, bool fHelp);
262 extern UniValue sendalltostealthaddress(const UniValue& params, bool fHelp);
263 extern UniValue createprivacysubaddress(const UniValue& params, bool fHelp);
264 extern UniValue getwalletinfo(const UniValue& params, bool fHelp);
265 extern UniValue gettxcount(const UniValue& params, bool fHelp);
266 extern UniValue getblockchaininfo(const UniValue& params, bool fHelp);
267 extern UniValue getnetworkinfo(const UniValue& params, bool fHelp);
268 extern UniValue reservebalance(const UniValue& params, bool fHelp);
269 extern UniValue setstakesplitthreshold(const UniValue& params, bool fHelp);
270 extern UniValue getstakesplitthreshold(const UniValue& params, bool fHelp);
271 extern UniValue multisend(const UniValue& params, bool fHelp);
272 extern UniValue autocombinedust(const UniValue& params, bool fHelp);
273 extern UniValue revealmnemonicphrase(const UniValue& params, bool fHelp);
274 extern UniValue erasefromwallet(const UniValue& params, bool fHelp);
275 
276 extern UniValue getrawtransaction(const UniValue& params, bool fHelp); // in rcprawtransaction.cpp
277 extern UniValue getrawtransactionbyblockheight(const UniValue& params, bool fHelp); // in rcprawtransaction.cpp
278 extern UniValue listunspent(const UniValue& params, bool fHelp);
279 extern UniValue lockunspent(const UniValue& params, bool fHelp);
280 extern UniValue listlockunspent(const UniValue& params, bool fHelp);
281 extern UniValue getunspentcount(const UniValue& params, bool fHelp);
282 extern UniValue createrawtransaction(const UniValue& params, bool fHelp);
283 extern UniValue decoderawtransaction(const UniValue& params, bool fHelp);
284 extern UniValue decodescript(const UniValue& params, bool fHelp);
285 extern UniValue signrawtransaction(const UniValue& params, bool fHelp);
286 extern UniValue sendrawtransaction(const UniValue& params, bool fHelp);
287 
288 extern UniValue getsupply(const UniValue& params, bool fHelp); // in rpc/blockchain.cpp
289 extern UniValue getmaxsupply(const UniValue& params, bool fHelp); // in rpc/blockchain.cpp
290 extern UniValue getblockcount(const UniValue& params, bool fHelp); // in rpc/blockchain.cpp
291 extern UniValue getbestblockhash(const UniValue& params, bool fHelp);
292 extern UniValue waitfornewblock(const UniValue& params, bool fHelp);
293 extern UniValue waitforblock(const UniValue& params, bool fHelp);
294 extern UniValue waitforblockheight(const UniValue& params, bool fHelp);
295 extern UniValue getdifficulty(const UniValue& params, bool fHelp);
296 extern UniValue settxfee(const UniValue& params, bool fHelp);
297 extern UniValue getmempoolinfo(const UniValue& params, bool fHelp);
298 extern UniValue getrawmempool(const UniValue& params, bool fHelp);
299 extern UniValue getblockhash(const UniValue& params, bool fHelp);
300 extern UniValue getlastpoablock(const UniValue& params, bool fHelp);
301 extern UniValue getlastpoablockhash(const UniValue& params, bool fHelp);
302 extern UniValue getlastpoablockheight(const UniValue& params, bool fHelp);
303 extern UniValue getlastpoablocktime(const UniValue& params, bool fHelp);
304 extern UniValue getlastpoaauditedpos(const UniValue& params, bool fHelp);
305 extern UniValue setmaxreorgdepth(const UniValue& params, bool fHelp);
306 extern UniValue resyncfrom(const UniValue& params, bool fHelp);
307 extern UniValue getblock(const UniValue& params, bool fHelp);
308 extern UniValue getblockheader(const UniValue& params, bool fHelp);
309 extern UniValue getblockindexstats(const UniValue& params, bool fHelp);
310 extern UniValue getfeeinfo(const UniValue& params, bool fHelp);
311 extern UniValue gettxoutsetinfo(const UniValue& params, bool fHelp);
312 extern UniValue gettxout(const UniValue& params, bool fHelp);
313 extern UniValue verifychain(const UniValue& params, bool fHelp);
314 extern UniValue getchaintips(const UniValue& params, bool fHelp);
315 extern UniValue invalidateblock(const UniValue& params, bool fHelp);
316 extern UniValue reconsiderblock(const UniValue& params, bool fHelp);
317 extern UniValue getinvalid(const UniValue& params, bool fHelp);
318 extern void validaterange(const UniValue& params, int& heightStart, int& heightEnd, int minHeightStart=1);
319 
320 extern UniValue masternode(const UniValue& params, bool fHelp);
321 extern UniValue listmasternodes(const UniValue& params, bool fHelp);
322 extern UniValue getmasternodecount(const UniValue& params, bool fHelp);
323 extern UniValue createmasternodebroadcast(const UniValue& params, bool fHelp);
324 extern UniValue decodemasternodebroadcast(const UniValue& params, bool fHelp);
325 extern UniValue relaymasternodebroadcast(const UniValue& params, bool fHelp);
326 extern UniValue getcurrentseesawreward(const UniValue& params, bool fHelp);
327 extern UniValue getseesawrewardratio(const UniValue& params, bool fHelp);
328 extern UniValue getseesawrewardwithheight(const UniValue& params, bool fHelp);
329 extern UniValue masternodecurrent(const UniValue& params, bool fHelp);
330 extern UniValue startmasternode(const UniValue& params, bool fHelp);
331 extern UniValue createmasternode(const UniValue& params, bool fHelp);
332 extern UniValue createmasternodekey(const UniValue& params, bool fHelp);
333 extern UniValue getmasternodeoutputs(const UniValue& params, bool fHelp);
334 extern UniValue listmasternodeconf(const UniValue& params, bool fHelp);
335 extern UniValue getmasternodestatus(const UniValue& params, bool fHelp);
336 extern UniValue getmasternodewinners(const UniValue& params, bool fHelp);
337 extern UniValue getmasternodescores(const UniValue& params, bool fHelp);
338 
339 extern UniValue preparebudget(const UniValue& params, bool fHelp); // in rpc/budget.cpp
340 extern UniValue submitbudget(const UniValue& params, bool fHelp);
341 extern UniValue mnbudgetvote(const UniValue& params, bool fHelp);
342 extern UniValue getbudgetvotes(const UniValue& params, bool fHelp);
343 extern UniValue getnextsuperblock(const UniValue& params, bool fHelp);
344 extern UniValue getbudgetprojection(const UniValue& params, bool fHelp);
345 extern UniValue getbudgetinfo(const UniValue& params, bool fHelp);
346 extern UniValue mnbudgetrawvote(const UniValue& params, bool fHelp);
347 extern UniValue mnfinalbudget(const UniValue& params, bool fHelp);
348 extern UniValue checkbudgets(const UniValue& params, bool fHelp);
349 
350 extern UniValue getinfo(const UniValue& params, bool fHelp); // in rpcmisc.cpp
351 extern UniValue logging(const UniValue& params, bool fHelp);
352 extern UniValue getversion(const UniValue& params, bool fHelp); // in rpcmisc.cpp
353 extern UniValue mnsync(const UniValue& params, bool fHelp);
354 extern UniValue validateaddress(const UniValue& params, bool fHelp);
355 extern UniValue validatestealthaddress(const UniValue& params, bool fHelp);
356 extern UniValue createmultisig(const UniValue& params, bool fHelp);
357 extern UniValue verifymessage(const UniValue& params, bool fHelp);
358 extern UniValue setmocktime(const UniValue& params, bool fHelp);
359 extern UniValue getstakingstatus(const UniValue& params, bool fHelp);
360 
361 bool StartRPC();
362 void InterruptRPC();
363 void StopRPC();
364 std::string JSONRPCExecBatch(const UniValue& vReq);
365 void RPCNotifyBlockChange(bool fInitialDownload, const CBlockIndex* pindex);
366 
367 #endif // BITCOIN_RPCSERVER_H
getlastpoablocktime
UniValue getlastpoablocktime(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:1301
ValueFromAmount
UniValue ValueFromAmount(const CAmount &amount)
Definition: server.cpp:118
listreceivedbyaddress
UniValue listreceivedbyaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1079
StopRPC
void StopRPC()
Definition: server.cpp:482
getblockchaininfo
UniValue getblockchaininfo(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:767
sendrawtransaction
UniValue sendrawtransaction(const UniValue &params, bool fHelp)
Definition: rawtransaction.cpp:1027
AmountFromValue
CAmount AmountFromValue(const UniValue &value)
Definition: server.cpp:107
gettxoutsetinfo
UniValue gettxoutsetinfo(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:599
ParseHashO
uint256 ParseHashO(const UniValue &o, std::string strKey)
Definition: server.cpp:140
getseesawrewardwithheight
UniValue getseesawrewardwithheight(const UniValue &params, bool fHelp)
Definition: masternode.cpp:888
startmasternode
UniValue startmasternode(const UniValue &params, bool fHelp)
Definition: masternode.cpp:366
rescanwallettransactions
UniValue rescanwallettransactions(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:3036
getnettotals
UniValue getnettotals(const UniValue &params, bool fHelp)
Definition: net.cpp:289
gettxout
UniValue gettxout(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:635
tableRPC
const CRPCTable tableRPC
Definition: server.cpp:636
disconnectnode
UniValue disconnectnode(const UniValue &params, bool fHelp)
Definition: net.cpp:204
rescan
UniValue rescan(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:3014
getmininginfo
UniValue getmininginfo(const UniValue &params, bool fHelp)
Definition: mining.cpp:312
listtransactions
UniValue listtransactions(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1227
reconsiderblock
UniValue reconsiderblock(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:1057
getblockcount
UniValue getblockcount(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:194
createprivacyaccount
UniValue createprivacyaccount(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2540
revealviewprivatekey
UniValue revealviewprivatekey(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2947
gettransaction
UniValue gettransaction(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1610
walletlock
UniValue walletlock(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1852
RPCTimerInterface
RPC timer "driver".
Definition: server.h:88
getseesawrewardratio
UniValue getseesawrewardratio(const UniValue &params, bool fHelp)
Definition: masternode.cpp:924
getblockheader
UniValue getblockheader(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:548
JSONRequest::JSONRequest
JSONRequest()
Definition: server.h:44
clearbanned
UniValue clearbanned(const UniValue &params, bool fHelp)
Definition: net.cpp:475
RPCTypeCheckObj
void RPCTypeCheckObj(const UniValue &o, const std::map< std::string, UniValue::VType > &typesExpected, bool fAllowNull=false)
Check for expected keys/value types in an Object.
Definition: server.cpp:86
NullUniValue
const UniValue NullUniValue
Definition: univalue.cpp:78
CNetAddr
IP address (IPv6, or IPv4 using mapped IPv6 range (::FFFF:0:0/96))
Definition: netaddress.h:30
getnetworkhashps
UniValue getnetworkhashps(const UniValue &params, bool fHelp)
Definition: mining.cpp:77
uint256.h
createmasternodekey
UniValue createmasternodekey(const UniValue &params, bool fHelp)
Definition: masternode.cpp:555
addmultisigaddress
UniValue addmultisigaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:906
generateintegratedaddress
UniValue generateintegratedaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2608
encryptwallet
UniValue encryptwallet(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1882
RPCTimerBase
Opaque base class for timers returned by NewTimerFunc.
Definition: server.h:79
importwallet
UniValue importwallet(const UniValue &params, bool fHelp)
Definition: rpcdump.cpp:214
getmasternodecount
UniValue getmasternodecount(const UniValue &params, bool fHelp)
Definition: masternode.cpp:237
protocol.h
JSONRequest::id
UniValue id
Definition: server.h:40
getunconfirmedbalance
UniValue getunconfirmedbalance(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:692
JSONRequest
Definition: server.h:37
waitforblock
UniValue waitforblock(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:274
RPCTypeCheck
void RPCTypeCheck(const UniValue &params, const std::list< UniValue::VType > &typesExpected, bool fAllowNull=false)
Type-check arguments; throws JSONRPCError if wrong type given.
Definition: server.cpp:70
SetRPCWarmupStatus
void SetRPCWarmupStatus(const std::string &newStatus)
Set the RPC warmup status.
Definition: server.cpp:491
decodescript
UniValue decodescript(const UniValue &params, bool fHelp)
Definition: rawtransaction.cpp:722
sendalltostealthaddress
UniValue sendalltostealthaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2857
RPCUnsetTimerInterface
void RPCUnsetTimerInterface(RPCTimerInterface *iface)
Unset factory function for timers.
Definition: server.cpp:622
createprivacysubaddress
UniValue createprivacysubaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2681
ping
UniValue ping(const UniValue &params, bool fHelp)
Definition: net.cpp:39
RPCServer
Definition: server.h:26
getrawmempool
UniValue getrawmempool(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:423
decodestealthaddress
UniValue decodestealthaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2761
sendtostealthaddress
UniValue sendtostealthaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2797
setaccount
UniValue setaccount(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:252
listbanned
UniValue listbanned(const UniValue &params, bool fHelp)
Definition: net.cpp:449
getcurrentseesawreward
UniValue getcurrentseesawreward(const UniValue &params, bool fHelp)
Definition: masternode.cpp:857
HelpExampleRpc
std::string HelpExampleRpc(std::string methodname, std::string args)
Definition: server.cpp:607
getaddressesbyaccount
UniValue getaddressesbyaccount(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:316
ParseInt
int ParseInt(const UniValue &o, std::string strKey)
Definition: server.cpp:157
UniValue
Definition: univalue.h:19
JSONRequest::params
UniValue params
Definition: server.h:42
listmasternodeconf
UniValue listmasternodeconf(const UniValue &params, bool fHelp)
Definition: masternode.cpp:607
HelpRequiringPassphrase
std::string HelpRequiringPassphrase()
Definition: rpcwallet.cpp:32
nWalletUnlockTime
int64_t nWalletUnlockTime
Definition: rpcwallet.cpp:29
getsupply
UniValue getsupply(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:165
getlastpoablockheight
UniValue getlastpoablockheight(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:1276
waitforblockheight
UniValue waitforblockheight(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:319
showtxprivatekeys
UniValue showtxprivatekeys(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2987
submitblock
UniValue submitblock(const UniValue &params, bool fHelp)
Definition: mining.cpp:906
getblocktemplate
UniValue getblocktemplate(const UniValue &params, bool fHelp)
Definition: mining.cpp:405
erasefromwallet
UniValue erasefromwallet(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:3128
bip38encrypt
UniValue bip38encrypt(const UniValue &params, bool fHelp)
Definition: rpcdump.cpp:411
CRPCTable::help
std::string help(std::string name) const
Note: This interface may still be subject to change.
Definition: server.cpp:178
getbalances
UniValue getbalances(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:666
getbudgetprojection
UniValue getbudgetprojection(const UniValue &params, bool fHelp)
Definition: budget.cpp:556
CRPCTable::CRPCTable
CRPCTable()
Definition: server.cpp:451
readmasteraccount
UniValue readmasteraccount(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2742
listmasternodes
UniValue listmasternodes(const UniValue &params, bool fHelp)
Definition: masternode.cpp:153
prioritisetransaction
UniValue prioritisetransaction(const UniValue &params, bool fHelp)
Definition: mining.cpp:357
getbalance
UniValue getbalance(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:597
resyncfrom
UniValue resyncfrom(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:1022
getdifficulty
UniValue getdifficulty(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:364
getblockindexstats
UniValue getblockindexstats(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:1392
gettxcount
UniValue gettxcount(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2110
createmasternode
UniValue createmasternode(const UniValue &params, bool fHelp)
Definition: masternode.cpp:497
CRPCTable::execute
UniValue execute(const std::string &method, const UniValue &params) const
Execute a method.
Definition: server.cpp:569
RPCNotifyBlockChange
void RPCNotifyBlockChange(bool fInitialDownload, const CBlockIndex *pindex)
Definition: blockchain.cpp:224
walletpassphrasechange
UniValue walletpassphrasechange(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1811
lockunspent
UniValue lockunspent(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1931
CRPCCommand
Definition: server.h:118
getfeeinfo
UniValue getfeeinfo(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:919
invalidateblock
UniValue invalidateblock(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:986
getinfo
UniValue getinfo(const UniValue &params, bool fHelp)
Definition: misc.cpp:45
revealmnemonicphrase
UniValue revealmnemonicphrase(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:3104
setminingnbits
UniValue setminingnbits(const UniValue &params, bool fHelp)
Definition: mining.cpp:871
revealspendprivatekey
UniValue revealspendprivatekey(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2967
RPCServer::OnStopped
void OnStopped(boost::function< void()> slot)
Definition: server.cpp:58
getlastpoaauditedpos
UniValue getlastpoaauditedpos(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:1328
HelpExampleCli
std::string HelpExampleCli(std::string methodname, std::string args)
Definition: server.cpp:603
getreceivedbyaccount
UniValue getreceivedbyaccount(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:519
settxfee
UniValue settxfee(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2047
preparebudget
UniValue preparebudget(const UniValue &params, bool fHelp)
Definition: budget.cpp:54
univalue.h
listreceivedbyaccount
UniValue listreceivedbyaccount(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1111
reservebalance
UniValue reservebalance(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2131
submitbudget
UniValue submitbudget(const UniValue &params, bool fHelp)
Definition: budget.cpp:143
decodemasternodebroadcast
UniValue decodemasternodebroadcast(const UniValue &params, bool fHelp)
Definition: masternode.cpp:1080
verifychain
UniValue verifychain(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:712
CRPCCommand::okSafeMode
bool okSafeMode
Definition: server.h:124
JSONRPCExecBatch
std::string JSONRPCExecBatch(const UniValue &vReq)
Definition: server.cpp:561
CAmount
int64_t CAmount
Amount in PRCY (Can be negative)
Definition: amount.h:17
CRPCTable::listCommands
std::vector< std::string > listCommands() const
Returns a list of registered commands.
Definition: server.cpp:593
getbudgetvotes
UniValue getbudgetvotes(const UniValue &params, bool fHelp)
Definition: budget.cpp:488
createprivacywallet
UniValue createprivacywallet(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2518
getnetworkinfo
UniValue getnetworkinfo(const UniValue &params, bool fHelp)
Definition: net.cpp:332
ParseBool
bool ParseBool(const UniValue &o, std::string strKey)
Definition: server.cpp:165
SetRPCWarmupFinished
void SetRPCWarmupFinished()
Definition: server.cpp:496
CRPCCommand::actor
rpcfn_type actor
Definition: server.h:123
setdecoyconfirmation
UniValue setdecoyconfirmation(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2892
ParseHashV
uint256 ParseHashV(const UniValue &v, std::string strName)
Utilities: convert hex-encoded Values (throws error if not hex).
Definition: server.cpp:127
autocombinedust
UniValue autocombinedust(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2236
setstakesplitthreshold
UniValue setstakesplitthreshold(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2180
RPCSetTimerInterface
void RPCSetTimerInterface(RPCTimerInterface *iface)
Set factory function for timers.
Definition: server.cpp:618
checkbudgets
UniValue checkbudgets(const UniValue &params, bool fHelp)
Definition: budget.cpp:919
getrawtransactionbyblockheight
UniValue getrawtransactionbyblockheight(const UniValue &params, bool fHelp)
Definition: rawtransaction.cpp:200
getrawchangeaddress
UniValue getrawchangeaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:224
generatepoa
UniValue generatepoa(const UniValue &params, bool fHelp)
getmasternodeoutputs
UniValue getmasternodeoutputs(const UniValue &params, bool fHelp)
Definition: masternode.cpp:573
uint256
256-bit unsigned big integer.
Definition: uint256.h:38
importkeys
UniValue importkeys(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2636
RPCTimerInterface::NewTimer
virtual RPCTimerBase * NewTimer(boost::function< void(void)> &func, int64_t millis)=0
Factory function for timers.
setmaxreorgdepth
UniValue setmaxreorgdepth(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:1201
erasewallettransactions
UniValue erasewallettransactions(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:3062
multisend
UniValue multisend(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2340
getinvalid
UniValue getinvalid(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:1094
JSONRequest::parse
void parse(const UniValue &valRequest)
Definition: server.cpp:509
mnfinalbudget
UniValue mnfinalbudget(const UniValue &params, bool fHelp)
Definition: budget.cpp:743
InterruptRPC
void InterruptRPC()
Definition: server.cpp:476
movecmd
UniValue movecmd(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:704
getmasternodescores
UniValue getmasternodescores(const UniValue &params, bool fHelp)
Definition: masternode.cpp:810
listaccounts
UniValue listaccounts(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1457
logging
UniValue logging(const UniValue &params, bool fHelp)
Definition: misc.cpp:544
CRPCCommand::category
std::string category
Definition: server.h:121
getconnectioncount
UniValue getconnectioncount(const UniValue &params, bool fHelp)
Definition: net.cpp:24
RPCIsInWarmup
bool RPCIsInWarmup(std::string *statusOut)
Definition: server.cpp:502
unlockwallet
UniValue unlockwallet(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1743
RPCTimerBase::~RPCTimerBase
virtual ~RPCTimerBase()
Definition: server.h:82
RPCTimerInterface::Name
virtual const char * Name()=0
Implementation name.
getgenerate
UniValue getgenerate(const UniValue &params, bool fHelp)
CRPCTable
PRCY RPC command dispatcher.
Definition: server.h:132
createmultisig
UniValue createmultisig(const UniValue &params, bool fHelp)
Definition: misc.cpp:419
name
const char * name
Definition: rest.cpp:34
bip38decrypt
UniValue bip38decrypt(const UniValue &params, bool fHelp)
Definition: rpcdump.cpp:451
RPCServer::OnStarted
void OnStarted(boost::function< void()> slot)
Definition: server.cpp:54
getmempoolinfo
UniValue getmempoolinfo(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:969
addnode
UniValue addnode(const UniValue &params, bool fHelp)
Definition: net.cpp:160
RPCSetTimerInterfaceIfUnset
void RPCSetTimerInterfaceIfUnset(RPCTimerInterface *iface)
Set factory function for timers, but only if unset.
Definition: server.cpp:613
CRPCCommand::threadSafe
bool threadSafe
Definition: server.h:125
getwalletinfo
UniValue getwalletinfo(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2071
JSONRequest::strMethod
std::string strMethod
Definition: server.h:41
mnbudgetvote
UniValue mnbudgetvote(const UniValue &params, bool fHelp)
Definition: budget.cpp:230
dumpprivkey
UniValue dumpprivkey(const UniValue &params, bool fHelp)
Definition: rpcdump.cpp:312
EnsureWallet
void EnsureWallet()
Definition: rpcwallet.cpp:37
getversion
UniValue getversion(const UniValue &params, bool fHelp)
Definition: misc.cpp:136
waitfornewblock
UniValue waitfornewblock(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:234
showstealthaddress
UniValue showstealthaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2589
verifymessage
UniValue verifymessage(const UniValue &params, bool fHelp)
Definition: misc.cpp:460
getbestblockhash
UniValue getbestblockhash(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:209
estimatepriority
UniValue estimatepriority(const UniValue &params, bool fHelp)
Definition: mining.cpp:1013
getreceivedbyaddress
UniValue getreceivedbyaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:469
getbudgetinfo
UniValue getbudgetinfo(const UniValue &params, bool fHelp)
Definition: budget.cpp:616
EnsureWalletIsUnlocked
void EnsureWalletIsUnlocked(bool fAllowAnonOnly=false)
Definition: rpcwallet.cpp:45
getmasternodewinners
UniValue getmasternodewinners(const UniValue &params, bool fHelp)
Definition: masternode.cpp:709
gethashespersec
UniValue gethashespersec(const UniValue &params, bool fHelp)
importaddress
UniValue importaddress(const UniValue &params, bool fHelp)
Definition: rpcdump.cpp:148
importprivkey
UniValue importprivkey(const UniValue &params, bool fHelp)
Definition: rpcdump.cpp:82
getaddednodeinfo
UniValue getaddednodeinfo(const UniValue &params, bool fHelp)
Definition: net.cpp:223
listunspent
UniValue listunspent(const UniValue &params, bool fHelp)
keypoolrefill
UniValue keypoolrefill(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1703
sendfrom
UniValue sendfrom(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:768
StartRPC
bool StartRPC()
Definition: server.cpp:469
decoderawtransaction
UniValue decoderawtransaction(const UniValue &params, bool fHelp)
Definition: rawtransaction.cpp:658
dumpwallet
UniValue dumpwallet(const UniValue &params, bool fHelp)
Definition: rpcdump.cpp:344
getrawtransaction
UniValue getrawtransaction(const UniValue &params, bool fHelp)
Definition: rawtransaction.cpp:252
IsRPCRunning
bool IsRPCRunning()
Definition: server.cpp:487
relaymasternodebroadcast
UniValue relaymasternodebroadcast(const UniValue &params, bool fHelp)
Definition: masternode.cpp:1140
rpcfn_type
UniValue(* rpcfn_type)(const UniValue &params, bool fHelp)
Definition: server.h:116
CRPCTable::mapCommands
std::map< std::string, const CRPCCommand * > mapCommands
Definition: server.h:135
validatestealthaddress
UniValue validatestealthaddress(const UniValue &params, bool fHelp)
Definition: misc.cpp:326
RPCTimerInterface::~RPCTimerInterface
virtual ~RPCTimerInterface()
Definition: server.h:91
getblock
UniValue getblock(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:486
listtransactionsbypaymentid
UniValue listtransactionsbypaymentid(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1345
mnsync
UniValue mnsync(const UniValue &params, bool fHelp)
Definition: misc.cpp:154
RPCServer::OnPreCommand
void OnPreCommand(boost::function< void(const CRPCCommand &)> slot)
Definition: server.cpp:62
listaddressgroupings
UniValue listaddressgroupings(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:376
getmasternodestatus
UniValue getmasternodestatus(const UniValue &params, bool fHelp)
Definition: masternode.cpp:669
getchaintips
UniValue getchaintips(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:830
getpeerinfo
UniValue getpeerinfo(const UniValue &params, bool fHelp)
Definition: net.cpp:72
estimatefee
UniValue estimatefee(const UniValue &params, bool fHelp)
Definition: mining.cpp:982
mnbudgetrawvote
UniValue mnbudgetrawvote(const UniValue &params, bool fHelp)
Definition: budget.cpp:680
createmasternodebroadcast
UniValue createmasternodebroadcast(const UniValue &params, bool fHelp)
Definition: masternode.cpp:971
signmessage
UniValue signmessage(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:420
GetDifficulty
double GetDifficulty(const CBlockIndex *blockindex=NULL)
Definition: blockchain.cpp:39
getunspentcount
UniValue getunspentcount(const UniValue &params, bool fHelp)
CRPCCommand::reqWallet
bool reqWallet
Definition: server.h:126
CBlockIndex
The block chain is a tree shaped structure starting with the genesis block at the root,...
Definition: chain.h:162
getblockhash
UniValue getblockhash(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:463
getnextsuperblock
UniValue getnextsuperblock(const UniValue &params, bool fHelp)
Definition: budget.cpp:537
generate
UniValue generate(const UniValue &params, bool fHelp)
getstakesplitthreshold
UniValue getstakesplitthreshold(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2222
getaccount
UniValue getaccount(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:289
CRPCTable::operator[]
const CRPCCommand * operator[](const std::string &name) const
Definition: server.cpp:461
RPCRunLater
void RPCRunLater(const std::string &name, boost::function< void(void)> func, int64_t nSeconds)
Run func nSeconds from now.
Definition: server.cpp:627
validaterange
void validaterange(const UniValue &params, int &heightStart, int &heightEnd, int minHeightStart=1)
Definition: blockchain.cpp:1359
amount.h
sendmany
UniValue sendmany(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:824
masternodecurrent
UniValue masternodecurrent(const UniValue &params, bool fHelp)
Definition: masternode.cpp:274
validateaddress
UniValue validateaddress(const UniValue &params, bool fHelp)
Definition: misc.cpp:270
getstakingstatus
UniValue getstakingstatus(const UniValue &params, bool fHelp)
getlastpoablock
UniValue getlastpoablock(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:1224
setmocktime
UniValue setmocktime(const UniValue &params, bool fHelp)
Definition: misc.cpp:507
getdecoyconfirmation
UniValue getdecoyconfirmation(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2920
setban
UniValue setban(const UniValue &params, bool fHelp)
Definition: net.cpp:394
listlockunspent
UniValue listlockunspent(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:2006
RPCServer::OnPostCommand
void OnPostCommand(boost::function< void(const CRPCCommand &)> slot)
Definition: server.cpp:66
backupwallet
UniValue backupwallet(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1682
getnewaddress
UniValue getnewaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:89
signrawtransaction
UniValue signrawtransaction(const UniValue &params, bool fHelp)
Definition: rawtransaction.cpp:774
ParseHexV
std::vector< unsigned char > ParseHexV(const UniValue &v, std::string strName)
Definition: server.cpp:144
getmaxsupply
UniValue getmaxsupply(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:180
masternode
UniValue masternode(const UniValue &params, bool fHelp)
Definition: masternode.cpp:24
CRPCCommand::name
std::string name
Definition: server.h:122
ParseHexO
std::vector< unsigned char > ParseHexO(const UniValue &o, std::string strKey)
Definition: server.cpp:153
createrawtransaction
UniValue createrawtransaction(const UniValue &params, bool fHelp)
Definition: rawtransaction.cpp:557
listsinceblock
UniValue listsinceblock(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:1527
getaccountaddress
UniValue getaccountaddress(const UniValue &params, bool fHelp)
Definition: rpcwallet.cpp:201
getpoablocktemplate
UniValue getpoablocktemplate(const UniValue &params, bool fHelp)
Definition: mining.cpp:690
getlastpoablockhash
UniValue getlastpoablockhash(const UniValue &params, bool fHelp)
Definition: blockchain.cpp:1251
setgenerate
UniValue setgenerate(const UniValue &params, bool fHelp)