59 {
"setmocktime", 0,
"timestamp" },
60 {
"mockscheduler", 0,
"delta_time" },
62 {
"utxoupdatepsbt", 1,
"descriptors" },
63 {
"generatetoaddress", 0,
"nblocks" },
64 {
"generatetoaddress", 2,
"maxtries" },
65 {
"generatetodescriptor", 0,
"num_blocks" },
66 {
"generatetodescriptor", 2,
"maxtries" },
67 {
"generateblock", 1,
"transactions" },
68 {
"generateblock", 2,
"submit" },
69 {
"getnetworkhashps", 0,
"nblocks" },
70 {
"getnetworkhashps", 1,
"height" },
72 {
"sendtoaddress", 1,
"amount" },
75 {
"sendtoaddress", 4,
"subtractfeefromamount" },
76 {
"sendtoaddress", 5 ,
"replaceable" },
77 {
"sendtoaddress", 6 ,
"conf_target" },
79 {
"sendtoaddress", 8,
"avoid_reuse" },
80 {
"sendtoaddress", 9,
"fee_rate"},
81 {
"sendtoaddress", 10,
"verbose"},
82 {
"getreceivedbyaddress", 1,
"minconf" },
83 {
"getreceivedbyaddress", 2,
"include_immature_coinbase" },
85 {
"getreceivedbylabel", 1,
"minconf" },
86 {
"getreceivedbylabel", 2,
"include_immature_coinbase" },
87 {
"listreceivedbyaddress", 0,
"minconf" },
88 {
"listreceivedbyaddress", 1,
"include_empty" },
89 {
"listreceivedbyaddress", 2,
"include_watchonly" },
90 {
"listreceivedbyaddress", 4,
"include_immature_coinbase" },
91 {
"listreceivedbylabel", 0,
"minconf" },
92 {
"listreceivedbylabel", 1,
"include_empty" },
93 {
"listreceivedbylabel", 2,
"include_watchonly" },
94 {
"listreceivedbylabel", 3,
"include_immature_coinbase" },
95 {
"getbalance", 1,
"minconf" },
96 {
"getbalance", 2,
"include_watchonly" },
97 {
"getbalance", 3,
"avoid_reuse" },
98 {
"getblockfrompeer", 1,
"peer_id" },
99 {
"getblockhash", 0,
"height" },
100 {
"waitforblockheight", 0,
"height" },
101 {
"waitforblockheight", 1,
"timeout" },
102 {
"waitforblock", 1,
"timeout" },
103 {
"waitfornewblock", 0,
"timeout" },
105 {
"listtransactions", 1,
"count" },
106 {
"listtransactions", 2,
"skip" },
107 {
"listtransactions", 3,
"include_watchonly" },
109 {
"walletpassphrase", 1,
"timeout" },
110 {
"getblocktemplate", 0,
"template_request" },
112 {
"listsinceblock", 1,
"target_confirmations" },
113 {
"listsinceblock", 2,
"include_watchonly" },
114 {
"listsinceblock", 3,
"include_removed" },
115 {
"listsinceblock", 4,
"include_change" },
118 {
"sendmany", 1,
"amounts" },
119 {
"sendmany", 2,
"minconf" },
121 {
"sendmany", 4,
"subtractfeefrom" },
122 {
"sendmany", 5 ,
"replaceable" },
123 {
"sendmany", 6 ,
"conf_target" },
125 {
"sendmany", 8,
"fee_rate"},
126 {
"sendmany", 9,
"verbose" },
127 {
"deriveaddresses", 1,
"range" },
128 {
"scanblocks", 1,
"scanobjects" },
129 {
"scanblocks", 2,
"start_height" },
130 {
"scanblocks", 3,
"stop_height" },
131 {
"scanblocks", 5,
"options" },
132 {
"scanblocks", 5,
"filter_false_positives" },
133 {
"getdescriptoractivity", 0,
"blockhashes" },
134 {
"getdescriptoractivity", 1,
"scanobjects" },
135 {
"getdescriptoractivity", 2,
"include_mempool" },
136 {
"scantxoutset", 1,
"scanobjects" },
137 {
"createmultisig", 0,
"nrequired" },
138 {
"createmultisig", 1,
"keys" },
139 {
"listunspent", 0,
"minconf" },
140 {
"listunspent", 1,
"maxconf" },
141 {
"listunspent", 2,
"addresses" },
142 {
"listunspent", 3,
"include_unsafe" },
143 {
"listunspent", 4,
"query_options" },
144 {
"listunspent", 4,
"minimumAmount" },
145 {
"listunspent", 4,
"maximumAmount" },
146 {
"listunspent", 4,
"maximumCount" },
147 {
"listunspent", 4,
"minimumSumAmount" },
148 {
"listunspent", 4,
"include_immature_coinbase" },
149 {
"getblock", 1,
"verbosity" },
150 {
"getblock", 1,
"verbose" },
151 {
"getblockheader", 1,
"verbose" },
152 {
"getchaintxstats", 0,
"nblocks" },
153 {
"gettransaction", 1,
"include_watchonly" },
154 {
"gettransaction", 2,
"verbose" },
155 {
"getrawtransaction", 1,
"verbosity" },
156 {
"getrawtransaction", 1,
"verbose" },
157 {
"createrawtransaction", 0,
"inputs" },
158 {
"createrawtransaction", 1,
"outputs" },
159 {
"createrawtransaction", 2,
"locktime" },
160 {
"createrawtransaction", 3,
"replaceable" },
161 {
"createrawtransaction", 4,
"version" },
162 {
"decoderawtransaction", 1,
"iswitness" },
163 {
"signrawtransactionwithkey", 1,
"privkeys" },
164 {
"signrawtransactionwithkey", 2,
"prevtxs" },
165 {
"signrawtransactionwithwallet", 1,
"prevtxs" },
166 {
"sendrawtransaction", 1,
"maxfeerate" },
167 {
"sendrawtransaction", 2,
"maxburnamount" },
168 {
"testmempoolaccept", 0,
"rawtxs" },
169 {
"testmempoolaccept", 1,
"maxfeerate" },
170 {
"submitpackage", 0,
"package" },
171 {
"submitpackage", 1,
"maxfeerate" },
172 {
"submitpackage", 2,
"maxburnamount" },
173 {
"combinerawtransaction", 0,
"txs" },
174 {
"fundrawtransaction", 1,
"options" },
175 {
"fundrawtransaction", 1,
"add_inputs"},
176 {
"fundrawtransaction", 1,
"include_unsafe"},
177 {
"fundrawtransaction", 1,
"minconf"},
178 {
"fundrawtransaction", 1,
"maxconf"},
179 {
"fundrawtransaction", 1,
"changePosition"},
180 {
"fundrawtransaction", 1,
"includeWatching"},
181 {
"fundrawtransaction", 1,
"lockUnspents"},
182 {
"fundrawtransaction", 1,
"fee_rate"},
183 {
"fundrawtransaction", 1,
"feeRate"},
184 {
"fundrawtransaction", 1,
"subtractFeeFromOutputs"},
185 {
"fundrawtransaction", 1,
"input_weights"},
186 {
"fundrawtransaction", 1,
"conf_target"},
187 {
"fundrawtransaction", 1,
"replaceable"},
188 {
"fundrawtransaction", 1,
"solving_data"},
189 {
"fundrawtransaction", 1,
"max_tx_weight"},
190 {
"fundrawtransaction", 2,
"iswitness" },
191 {
"walletcreatefundedpsbt", 0,
"inputs" },
192 {
"walletcreatefundedpsbt", 1,
"outputs" },
193 {
"walletcreatefundedpsbt", 2,
"locktime" },
194 {
"walletcreatefundedpsbt", 3,
"options" },
195 {
"walletcreatefundedpsbt", 3,
"add_inputs"},
196 {
"walletcreatefundedpsbt", 3,
"include_unsafe"},
197 {
"walletcreatefundedpsbt", 3,
"minconf"},
198 {
"walletcreatefundedpsbt", 3,
"maxconf"},
199 {
"walletcreatefundedpsbt", 3,
"changePosition"},
200 {
"walletcreatefundedpsbt", 3,
"includeWatching"},
201 {
"walletcreatefundedpsbt", 3,
"lockUnspents"},
202 {
"walletcreatefundedpsbt", 3,
"fee_rate"},
203 {
"walletcreatefundedpsbt", 3,
"feeRate"},
204 {
"walletcreatefundedpsbt", 3,
"subtractFeeFromOutputs"},
205 {
"walletcreatefundedpsbt", 3,
"conf_target"},
206 {
"walletcreatefundedpsbt", 3,
"replaceable"},
207 {
"walletcreatefundedpsbt", 3,
"solving_data"},
208 {
"walletcreatefundedpsbt", 3,
"max_tx_weight"},
209 {
"walletcreatefundedpsbt", 4,
"bip32derivs" },
210 {
"walletcreatefundedpsbt", 5,
"version" },
212 {
"walletprocesspsbt", 1,
"sign" },
214 {
"walletprocesspsbt", 3,
"bip32derivs" },
215 {
"walletprocesspsbt", 4,
"finalize" },
217 {
"descriptorprocesspsbt", 1,
"descriptors"},
219 {
"descriptorprocesspsbt", 3,
"bip32derivs" },
220 {
"descriptorprocesspsbt", 4,
"finalize" },
221 {
"createpsbt", 0,
"inputs" },
222 {
"createpsbt", 1,
"outputs" },
223 {
"createpsbt", 2,
"locktime" },
224 {
"createpsbt", 3,
"replaceable" },
225 {
"createpsbt", 4,
"version" },
226 {
"combinepsbt", 0,
"txs"},
227 {
"joinpsbts", 0,
"txs"},
229 {
"finalizepsbt", 1,
"extract"},
230 {
"converttopsbt", 1,
"permitsigdata"},
231 {
"converttopsbt", 2,
"iswitness"},
232 {
"gettxout", 1,
"n" },
233 {
"gettxout", 2,
"include_mempool" },
234 {
"gettxoutproof", 0,
"txids" },
236 {
"gettxoutsetinfo", 2,
"use_index"},
239 {
"dumptxoutset", 2,
"options" },
241 {
"lockunspent", 0,
"unlock" },
242 {
"lockunspent", 1,
"transactions" },
243 {
"lockunspent", 2,
"persistent" },
244 {
"send", 0,
"outputs" },
245 {
"send", 1,
"conf_target" },
246 {
"send", 3,
"fee_rate"},
247 {
"send", 4,
"options" },
248 {
"send", 4,
"add_inputs"},
249 {
"send", 4,
"include_unsafe"},
250 {
"send", 4,
"minconf"},
251 {
"send", 4,
"maxconf"},
252 {
"send", 4,
"add_to_wallet"},
253 {
"send", 4,
"change_position"},
254 {
"send", 4,
"fee_rate"},
255 {
"send", 4,
"include_watching"},
256 {
"send", 4,
"inputs"},
257 {
"send", 4,
"locktime"},
258 {
"send", 4,
"lock_unspents"},
259 {
"send", 4,
"psbt"},
260 {
"send", 4,
"subtract_fee_from_outputs"},
261 {
"send", 4,
"conf_target"},
262 {
"send", 4,
"replaceable"},
263 {
"send", 4,
"solving_data"},
264 {
"send", 4,
"max_tx_weight"},
265 {
"send", 5,
"version"},
266 {
"sendall", 0,
"recipients" },
267 {
"sendall", 1,
"conf_target" },
268 {
"sendall", 3,
"fee_rate"},
269 {
"sendall", 4,
"options" },
270 {
"sendall", 4,
"add_to_wallet"},
271 {
"sendall", 4,
"fee_rate"},
272 {
"sendall", 4,
"include_watching"},
273 {
"sendall", 4,
"inputs"},
274 {
"sendall", 4,
"locktime"},
275 {
"sendall", 4,
"lock_unspents"},
276 {
"sendall", 4,
"psbt"},
277 {
"sendall", 4,
"send_max"},
278 {
"sendall", 4,
"minconf"},
279 {
"sendall", 4,
"maxconf"},
280 {
"sendall", 4,
"conf_target"},
281 {
"sendall", 4,
"replaceable"},
282 {
"sendall", 4,
"solving_data"},
283 {
"sendall", 4,
"version"},
284 {
"simulaterawtransaction", 0,
"rawtxs" },
285 {
"simulaterawtransaction", 1,
"options" },
286 {
"simulaterawtransaction", 1,
"include_watchonly"},
288 {
"importmempool", 1,
"options" },
289 {
"importmempool", 1,
"apply_fee_delta_priority" },
290 {
"importmempool", 1,
"use_current_time" },
291 {
"importmempool", 1,
"apply_unbroadcast_set" },
292 {
"importdescriptors", 0,
"requests" },
293 {
"listdescriptors", 0,
"private" },
294 {
"verifychain", 0,
"checklevel" },
295 {
"verifychain", 1,
"nblocks" },
297 {
"getblockstats", 1,
"stats" },
298 {
"pruneblockchain", 0,
"height" },
299 {
"keypoolrefill", 0,
"newsize" },
300 {
"getrawmempool", 0,
"verbose" },
301 {
"getrawmempool", 1,
"mempool_sequence" },
302 {
"getorphantxs", 0,
"verbosity" },
303 {
"estimatesmartfee", 0,
"conf_target" },
304 {
"estimaterawfee", 0,
"conf_target" },
305 {
"estimaterawfee", 1,
"threshold" },
306 {
"prioritisetransaction", 1,
"dummy" },
307 {
"prioritisetransaction", 2,
"fee_delta" },
308 {
"setban", 2,
"bantime" },
309 {
"setban", 3,
"absolute" },
310 {
"setnetworkactive", 0,
"state" },
311 {
"setwalletflag", 1,
"value" },
312 {
"getmempoolancestors", 1,
"verbose" },
313 {
"getmempooldescendants", 1,
"verbose" },
314 {
"gettxspendingprevout", 0,
"outputs" },
315 {
"gettxspendingprevout", 1,
"options" },
316 {
"gettxspendingprevout", 1,
"mempool_only" },
317 {
"gettxspendingprevout", 1,
"return_spending_tx" },
318 {
"bumpfee", 1,
"options" },
319 {
"bumpfee", 1,
"conf_target"},
320 {
"bumpfee", 1,
"fee_rate"},
321 {
"bumpfee", 1,
"replaceable"},
322 {
"bumpfee", 1,
"outputs"},
323 {
"bumpfee", 1,
"original_change_index"},
324 {
"psbtbumpfee", 1,
"options" },
325 {
"psbtbumpfee", 1,
"conf_target"},
326 {
"psbtbumpfee", 1,
"fee_rate"},
327 {
"psbtbumpfee", 1,
"replaceable"},
328 {
"psbtbumpfee", 1,
"outputs"},
329 {
"psbtbumpfee", 1,
"original_change_index"},
330 {
"logging", 0,
"include" },
331 {
"logging", 1,
"exclude" },
332 {
"disconnectnode", 1,
"nodeid" },
333 {
"gethdkeys", 0,
"active_only" },
334 {
"gethdkeys", 0,
"options" },
335 {
"gethdkeys", 0,
"private" },
336 {
"createwalletdescriptor", 1,
"options" },
337 {
"createwalletdescriptor", 1,
"internal" },
339 {
"echojson", 0,
"arg0" },
340 {
"echojson", 1,
"arg1" },
341 {
"echojson", 2,
"arg2" },
342 {
"echojson", 3,
"arg3" },
343 {
"echojson", 4,
"arg4" },
344 {
"echojson", 5,
"arg5" },
345 {
"echojson", 6,
"arg6" },
346 {
"echojson", 7,
"arg7" },
347 {
"echojson", 8,
"arg8" },
348 {
"echojson", 9,
"arg9" },
349 {
"rescanblockchain", 0,
"start_height"},
350 {
"rescanblockchain", 1,
"stop_height"},
352 {
"createwallet", 1,
"disable_private_keys"},
353 {
"createwallet", 2,
"blank"},
355 {
"createwallet", 4,
"avoid_reuse"},
356 {
"createwallet", 5,
"descriptors"},
357 {
"createwallet", 6,
"load_on_startup"},
358 {
"createwallet", 7,
"external_signer"},
361 {
"restorewallet", 2,
"load_on_startup"},
363 {
"loadwallet", 1,
"load_on_startup"},
365 {
"unloadwallet", 1,
"load_on_startup"},
366 {
"getnodeaddresses", 0,
"count"},
367 {
"addpeeraddress", 1,
"port"},
368 {
"addpeeraddress", 2,
"tried"},
369 {
"sendmsgtopeer", 0,
"peer_id" },
370 {
"stop", 0,
"wait" },
371 {
"addnode", 2,
"v2transport" },
372 {
"addconnection", 2,
"v2transport" },
398 if (!parsed.
read(raw)) {
410 return p.
methodName == method && p.paramIdx ==
static_cast<int>(pos);
439 for (std::string_view
s : strParams) {
480 for (std::string_view
s: strParams) {
481 size_t pos =
s.find(
'=');
482 if (pos == std::string_view::npos) {
487 std::string
name{
s.substr(0, pos)};
488 std::string_view value{
s.substr(pos+1)};
495 positional_args.
push_back(std::move(parsed_value));
498 positional_args.push_back(
s);
509 if (!positional_args.empty()) {
513 params.
pushKVEnd(
"args", std::move(positional_args));
std::string methodName
method whose params want conversion
int paramIdx
0-based idx of param to convert
std::string paramName
parameter name
ParamFormat format
parameter format
void push_back(UniValue val)
void pushKVEnd(std::string key, UniValue val)
bool read(std::string_view raw)
void pushKV(std::string key, UniValue val)
UniValue RPCConvertValues(const std::string &strMethod, const std::vector< std::string > &strParams)
Convert command lines arguments to params object when -named is disabled.
static UniValue ParseParam(const CRPCConvertParam *param, std::string_view raw)
static UniValue Parse(std::string_view raw, ParamFormat format=ParamFormat::JSON)
Parse string to UniValue or throw runtime_error if string contains invalid JSON.
UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector< std::string > &strParams)
Convert command line arguments to params object when -named is enabled.
ParamFormat
Specify whether parameter should be parsed by bitcoin-cli as a JSON value, or passed unchanged as a s...
static const CRPCConvertParam vRPCConvertParams[]
Specify a (method, idx, name, format) here if the argument is a non-string RPC argument and needs to ...
const CRPCConvertParam * FromPosition(std::string_view method, size_t pos)
const CRPCConvertParam * FromName(std::string_view method, std::string_view name)