14 #include <boost/algorithm/string/case_conv.hpp> 29 {
"getaddednodeinfo", 0 },
33 {
"getnetworkhashps", 0 },
34 {
"getnetworkhashps", 1 },
35 {
"sendtoaddress", 1 },
36 {
"sendtoaddress", 4 },
37 {
"sendtoaddress", 5 },
38 {
"sendtoaddress", 6 },
39 {
"instantsendtoaddress", 1 },
40 {
"instantsendtoaddress", 4 },
42 {
"getreceivedbyaddress", 1 },
43 {
"getreceivedbyaddress", 2 },
44 {
"getreceivedbyaccount", 1 },
45 {
"getreceivedbyaccount", 2 },
46 {
"listreceivedbyaddress", 0 },
47 {
"listreceivedbyaddress", 1 },
48 {
"listreceivedbyaddress", 2 },
49 {
"listreceivedbyaddress", 3 },
50 {
"listreceivedbyaccount", 0 },
51 {
"listreceivedbyaccount", 1 },
52 {
"listreceivedbyaccount", 2 },
53 {
"listreceivedbyaccount", 3 },
57 {
"getchaintips", 0 },
58 {
"getchaintips", 1 },
59 {
"getblockhash", 0 },
60 {
"getsuperblockbudget", 0 },
66 {
"listtransactions", 1 },
67 {
"listtransactions", 2 },
68 {
"listtransactions", 3 },
69 {
"listaccounts", 0 },
70 {
"listaccounts", 1 },
71 {
"listaccounts", 2 },
72 {
"walletpassphrase", 1 },
73 {
"walletpassphrase", 2 },
74 {
"getblocktemplate", 0 },
75 {
"listsinceblock", 1 },
76 {
"listsinceblock", 2 },
83 {
"addmultisigaddress", 0 },
84 {
"addmultisigaddress", 1 },
85 {
"createmultisig", 0 },
86 {
"createmultisig", 1 },
91 {
"getblockheader", 1 },
92 {
"getblockheaders", 1 },
93 {
"getblockheaders", 2 },
94 {
"gettransaction", 1 },
95 {
"getrawtransaction", 1 },
96 {
"createrawtransaction", 0 },
97 {
"createrawtransaction", 1 },
98 {
"createrawtransaction", 2 },
99 {
"signrawtransaction", 1 },
100 {
"signrawtransaction", 2 },
101 {
"sendrawtransaction", 1 },
102 {
"sendrawtransaction", 2 },
103 {
"fundrawtransaction", 1 },
106 {
"gettxoutproof", 0 },
107 {
"lockunspent", 0 },
108 {
"lockunspent", 1 },
109 {
"importprivkey", 2 },
110 {
"importelectrumwallet", 1 },
111 {
"importaddress", 2 },
112 {
"importaddress", 3 },
113 {
"importpubkey", 2 },
114 {
"verifychain", 0 },
115 {
"verifychain", 1 },
116 {
"keypoolrefill", 0 },
117 {
"getrawmempool", 0 },
118 {
"estimatefee", 0 },
119 {
"estimatepriority", 0 },
120 {
"estimatesmartfee", 0 },
121 {
"estimatesmartpriority", 0 },
122 {
"prioritisetransaction", 1 },
123 {
"prioritisetransaction", 2 },
126 {
"setnetworkactive", 0 },
130 {
"getblockhashes", 0 },
131 {
"getblockhashes", 1 },
132 {
"getspentinfo", 0},
133 {
"getaddresstxids", 0},
134 {
"getaddressbalance", 0},
135 {
"getaddressdeltas", 0},
136 {
"getaddressutxos", 0},
137 {
"getaddressmempool", 0},
143 std::set<std::pair<std::string, int> >
members;
148 bool convert(
const std::string& method,
int idx) {
149 return (members.count(std::make_pair(method, idx)) > 0);
155 const unsigned int n_elem =
158 for (
unsigned int i = 0; i < n_elem; i++) {
172 if (!jVal.
read(std::string(
"[")+strVal+std::string(
"]")) ||
174 throw runtime_error(
string(
"Error parsing JSON:")+strVal);
183 for (
unsigned int idx = 0; idx < strParams.size(); idx++) {
184 const std::string& strVal = strParams[idx];
std::set< std::pair< std::string, int > > members
static CRPCConvertTable rpcCvtTable
bool push_back(const UniValue &val)
int paramIdx
method whose params want conversion
UniValue RPCConvertValues(const std::string &strMethod, const std::vector< std::string > &strParams)
UniValue ParseNonRFCJSONValue(const std::string &strVal)
static const CRPCConvertParam vRPCConvertParams[]
bool read(const char *raw)
bool convert(const std::string &method, int idx)