 |
Bitcoin Core
22.99.0
P2P Digital Currency
|
Go to the documentation of this file.
29 {
"setmocktime", 0,
"timestamp" },
30 {
"mockscheduler", 0,
"delta_time" },
31 {
"utxoupdatepsbt", 1,
"descriptors" },
32 {
"generatetoaddress", 0,
"nblocks" },
33 {
"generatetoaddress", 2,
"maxtries" },
34 {
"generatetodescriptor", 0,
"num_blocks" },
35 {
"generatetodescriptor", 2,
"maxtries" },
36 {
"generateblock", 1,
"transactions" },
37 {
"getnetworkhashps", 0,
"nblocks" },
38 {
"getnetworkhashps", 1,
"height" },
39 {
"sendtoaddress", 1,
"amount" },
40 {
"sendtoaddress", 4,
"subtractfeefromamount" },
41 {
"sendtoaddress", 5 ,
"replaceable" },
42 {
"sendtoaddress", 6 ,
"conf_target" },
43 {
"sendtoaddress", 8,
"avoid_reuse" },
44 {
"sendtoaddress", 9,
"fee_rate"},
45 {
"sendtoaddress", 10,
"verbose"},
46 {
"settxfee", 0,
"amount" },
47 {
"sethdseed", 0,
"newkeypool" },
48 {
"getreceivedbyaddress", 1,
"minconf" },
49 {
"getreceivedbyaddress", 2,
"include_immature_coinbase" },
50 {
"getreceivedbylabel", 1,
"minconf" },
51 {
"getreceivedbylabel", 2,
"include_immature_coinbase" },
52 {
"listreceivedbyaddress", 0,
"minconf" },
53 {
"listreceivedbyaddress", 1,
"include_empty" },
54 {
"listreceivedbyaddress", 2,
"include_watchonly" },
55 {
"listreceivedbyaddress", 4,
"include_immature_coinbase" },
56 {
"listreceivedbylabel", 0,
"minconf" },
57 {
"listreceivedbylabel", 1,
"include_empty" },
58 {
"listreceivedbylabel", 2,
"include_watchonly" },
59 {
"listreceivedbylabel", 3,
"include_immature_coinbase" },
60 {
"getbalance", 1,
"minconf" },
61 {
"getbalance", 2,
"include_watchonly" },
62 {
"getbalance", 3,
"avoid_reuse" },
63 {
"getblockfrompeer", 1,
"peer_id" },
64 {
"getblockhash", 0,
"height" },
65 {
"waitforblockheight", 0,
"height" },
66 {
"waitforblockheight", 1,
"timeout" },
67 {
"waitforblock", 1,
"timeout" },
68 {
"waitfornewblock", 0,
"timeout" },
69 {
"listtransactions", 1,
"count" },
70 {
"listtransactions", 2,
"skip" },
71 {
"listtransactions", 3,
"include_watchonly" },
72 {
"walletpassphrase", 1,
"timeout" },
73 {
"getblocktemplate", 0,
"template_request" },
74 {
"listsinceblock", 1,
"target_confirmations" },
75 {
"listsinceblock", 2,
"include_watchonly" },
76 {
"listsinceblock", 3,
"include_removed" },
77 {
"sendmany", 1,
"amounts" },
78 {
"sendmany", 2,
"minconf" },
79 {
"sendmany", 4,
"subtractfeefrom" },
80 {
"sendmany", 5 ,
"replaceable" },
81 {
"sendmany", 6 ,
"conf_target" },
82 {
"sendmany", 8,
"fee_rate"},
83 {
"sendmany", 9,
"verbose" },
84 {
"deriveaddresses", 1,
"range" },
85 {
"scantxoutset", 1,
"scanobjects" },
86 {
"addmultisigaddress", 0,
"nrequired" },
87 {
"addmultisigaddress", 1,
"keys" },
88 {
"createmultisig", 0,
"nrequired" },
89 {
"createmultisig", 1,
"keys" },
90 {
"listunspent", 0,
"minconf" },
91 {
"listunspent", 1,
"maxconf" },
92 {
"listunspent", 2,
"addresses" },
93 {
"listunspent", 3,
"include_unsafe" },
94 {
"listunspent", 4,
"query_options" },
95 {
"getblock", 1,
"verbosity" },
96 {
"getblock", 1,
"verbose" },
97 {
"getblockheader", 1,
"verbose" },
98 {
"getchaintxstats", 0,
"nblocks" },
99 {
"gettransaction", 1,
"include_watchonly" },
100 {
"gettransaction", 2,
"verbose" },
101 {
"getrawtransaction", 1,
"verbose" },
102 {
"createrawtransaction", 0,
"inputs" },
103 {
"createrawtransaction", 1,
"outputs" },
104 {
"createrawtransaction", 2,
"locktime" },
105 {
"createrawtransaction", 3,
"replaceable" },
106 {
"decoderawtransaction", 1,
"iswitness" },
107 {
"signrawtransactionwithkey", 1,
"privkeys" },
108 {
"signrawtransactionwithkey", 2,
"prevtxs" },
109 {
"signrawtransactionwithwallet", 1,
"prevtxs" },
110 {
"sendrawtransaction", 1,
"maxfeerate" },
111 {
"testmempoolaccept", 0,
"rawtxs" },
112 {
"testmempoolaccept", 1,
"maxfeerate" },
113 {
"combinerawtransaction", 0,
"txs" },
114 {
"fundrawtransaction", 1,
"options" },
115 {
"fundrawtransaction", 2,
"iswitness" },
116 {
"walletcreatefundedpsbt", 0,
"inputs" },
117 {
"walletcreatefundedpsbt", 1,
"outputs" },
118 {
"walletcreatefundedpsbt", 2,
"locktime" },
119 {
"walletcreatefundedpsbt", 3,
"options" },
120 {
"walletcreatefundedpsbt", 4,
"bip32derivs" },
121 {
"walletprocesspsbt", 1,
"sign" },
122 {
"walletprocesspsbt", 3,
"bip32derivs" },
123 {
"walletprocesspsbt", 4,
"finalize" },
124 {
"createpsbt", 0,
"inputs" },
125 {
"createpsbt", 1,
"outputs" },
126 {
"createpsbt", 2,
"locktime" },
127 {
"createpsbt", 3,
"replaceable" },
128 {
"combinepsbt", 0,
"txs"},
129 {
"joinpsbts", 0,
"txs"},
130 {
"finalizepsbt", 1,
"extract"},
131 {
"converttopsbt", 1,
"permitsigdata"},
132 {
"converttopsbt", 2,
"iswitness"},
133 {
"gettxout", 1,
"n" },
134 {
"gettxout", 2,
"include_mempool" },
135 {
"gettxoutproof", 0,
"txids" },
136 {
"gettxoutsetinfo", 1,
"hash_or_height" },
137 {
"gettxoutsetinfo", 2,
"use_index"},
138 {
"lockunspent", 0,
"unlock" },
139 {
"lockunspent", 1,
"transactions" },
140 {
"lockunspent", 2,
"persistent" },
141 {
"send", 0,
"outputs" },
142 {
"send", 1,
"conf_target" },
143 {
"send", 3,
"fee_rate"},
144 {
"send", 4,
"options" },
145 {
"importprivkey", 2,
"rescan" },
146 {
"importaddress", 2,
"rescan" },
147 {
"importaddress", 3,
"p2sh" },
148 {
"importpubkey", 2,
"rescan" },
149 {
"importmulti", 0,
"requests" },
150 {
"importmulti", 1,
"options" },
151 {
"importdescriptors", 0,
"requests" },
152 {
"listdescriptors", 0,
"private" },
153 {
"verifychain", 0,
"checklevel" },
154 {
"verifychain", 1,
"nblocks" },
155 {
"getblockstats", 0,
"hash_or_height" },
156 {
"getblockstats", 1,
"stats" },
157 {
"pruneblockchain", 0,
"height" },
158 {
"keypoolrefill", 0,
"newsize" },
159 {
"getrawmempool", 0,
"verbose" },
160 {
"getrawmempool", 1,
"mempool_sequence" },
161 {
"estimatesmartfee", 0,
"conf_target" },
162 {
"estimaterawfee", 0,
"conf_target" },
163 {
"estimaterawfee", 1,
"threshold" },
164 {
"prioritisetransaction", 1,
"dummy" },
165 {
"prioritisetransaction", 2,
"fee_delta" },
166 {
"setban", 2,
"bantime" },
167 {
"setban", 3,
"absolute" },
168 {
"setnetworkactive", 0,
"state" },
169 {
"setwalletflag", 1,
"value" },
170 {
"getmempoolancestors", 1,
"verbose" },
171 {
"getmempooldescendants", 1,
"verbose" },
172 {
"bumpfee", 1,
"options" },
173 {
"psbtbumpfee", 1,
"options" },
174 {
"logging", 0,
"include" },
175 {
"logging", 1,
"exclude" },
176 {
"disconnectnode", 1,
"nodeid" },
177 {
"upgradewallet", 0,
"version" },
179 {
"echojson", 0,
"arg0" },
180 {
"echojson", 1,
"arg1" },
181 {
"echojson", 2,
"arg2" },
182 {
"echojson", 3,
"arg3" },
183 {
"echojson", 4,
"arg4" },
184 {
"echojson", 5,
"arg5" },
185 {
"echojson", 6,
"arg6" },
186 {
"echojson", 7,
"arg7" },
187 {
"echojson", 8,
"arg8" },
188 {
"echojson", 9,
"arg9" },
189 {
"rescanblockchain", 0,
"start_height"},
190 {
"rescanblockchain", 1,
"stop_height"},
191 {
"createwallet", 1,
"disable_private_keys"},
192 {
"createwallet", 2,
"blank"},
193 {
"createwallet", 4,
"avoid_reuse"},
194 {
"createwallet", 5,
"descriptors"},
195 {
"createwallet", 6,
"load_on_startup"},
196 {
"createwallet", 7,
"external_signer"},
197 {
"restorewallet", 2,
"load_on_startup"},
198 {
"loadwallet", 1,
"load_on_startup"},
199 {
"unloadwallet", 1,
"load_on_startup"},
200 {
"getnodeaddresses", 0,
"count"},
201 {
"addpeeraddress", 1,
"port"},
202 {
"addpeeraddress", 2,
"tried"},
203 {
"stop", 0,
"wait" },
210 std::set<std::pair<std::string, int>>
members;
216 bool convert(
const std::string& method,
int idx) {
217 return (
members.count(std::make_pair(method, idx)) > 0);
219 bool convert(
const std::string& method,
const std::string&
name) {
227 members.emplace(cp.methodName, cp.paramIdx);
240 if (!jVal.
read(std::string(
"[")+strVal+std::string(
"]")) ||
242 throw std::runtime_error(std::string(
"Error parsing JSON: ") + strVal);
250 for (
unsigned int idx = 0; idx < strParams.size(); idx++) {
251 const std::string& strVal = strParams[idx];
269 for (
const std::string &s: strParams) {
270 size_t pos = s.find(
'=');
271 if (pos == std::string::npos) {
272 throw(std::runtime_error(
"No '=' in named argument '"+s+
"', this needs to be present for every argument (even if it is empty)"));
275 std::string
name = s.substr(0, pos);
276 std::string value = s.substr(pos+1);
std::string methodName
method whose params want conversion
bool convert(const std::string &method, int idx)
std::set< std::pair< std::string, int > > members
std::set< std::pair< std::string, std::string > > membersByName
bool read(const char *raw, size_t len)
UniValue RPCConvertValues(const std::string &strMethod, const std::vector< std::string > &strParams)
Convert positional arguments to command-specific RPC representation.
bool pushKV(const std::string &key, const UniValue &val)
UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector< std::string > &strParams)
Convert named arguments to command-specific RPC representation.
static CRPCConvertTable rpcCvtTable
int paramIdx
0-based idx of param to convert
bool convert(const std::string &method, const std::string &name)
static const CRPCConvertParam vRPCConvertParams[]
Specify a (method, idx, name) here if the argument is a non-string RPC argument and needs to be conve...
bool push_back(const UniValue &val)
UniValue ParseNonRFCJSONValue(const std::string &strVal)
Non-RFC4627 JSON parser, accepts internal values (such as numbers, true, false, null) as well as obje...
std::string paramName
parameter name