Bitcoin Core 31.99.0
P2P Digital Currency
client.cpp
Go to the documentation of this file.
1// Copyright (c) 2010 Satoshi Nakamoto
2// Copyright (c) 2009-present The Bitcoin Core developers
3// Distributed under the MIT software license, see the accompanying
4// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6#include <common/args.h>
7#include <rpc/client.h>
8#include <tinyformat.h>
9
10#include <cstdint>
11#include <set>
12#include <string>
13#include <string_view>
14
18
20{
21public:
22 std::string methodName;
24 std::string paramName;
26};
27
28// clang-format off
58{
59 { "setmocktime", 0, "timestamp" },
60 { "mockscheduler", 0, "delta_time" },
61 { "utxoupdatepsbt", 0, "psbt", ParamFormat::STRING },
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" },
71 { "sendtoaddress", 0, "address", ParamFormat::STRING },
72 { "sendtoaddress", 1, "amount" },
73 { "sendtoaddress", 2, "comment", ParamFormat::STRING },
74 { "sendtoaddress", 3, "comment_to", ParamFormat::STRING },
75 { "sendtoaddress", 4, "subtractfeefromamount" },
76 { "sendtoaddress", 5 , "replaceable" },
77 { "sendtoaddress", 6 , "conf_target" },
78 { "sendtoaddress", 7, "estimate_mode", ParamFormat::STRING },
79 { "sendtoaddress", 8, "avoid_reuse" },
80 { "sendtoaddress", 9, "fee_rate"},
81 { "sendtoaddress", 10, "verbose"},
82 { "getreceivedbyaddress", 1, "minconf" },
83 { "getreceivedbyaddress", 2, "include_immature_coinbase" },
84 { "getreceivedbylabel", 0, "label", ParamFormat::STRING },
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" },
104 { "listtransactions", 0, "label", ParamFormat::STRING },
105 { "listtransactions", 1, "count" },
106 { "listtransactions", 2, "skip" },
107 { "listtransactions", 3, "include_watchonly" },
108 { "walletpassphrase", 0, "passphrase", ParamFormat::STRING },
109 { "walletpassphrase", 1, "timeout" },
110 { "getblocktemplate", 0, "template_request" },
111 { "listsinceblock", 0, "blockhash", ParamFormat::STRING },
112 { "listsinceblock", 1, "target_confirmations" },
113 { "listsinceblock", 2, "include_watchonly" },
114 { "listsinceblock", 3, "include_removed" },
115 { "listsinceblock", 4, "include_change" },
116 { "listsinceblock", 5, "label", ParamFormat::STRING },
117 { "sendmany", 0, "dummy", ParamFormat::STRING },
118 { "sendmany", 1, "amounts" },
119 { "sendmany", 2, "minconf" },
120 { "sendmany", 3, "comment", ParamFormat::STRING },
121 { "sendmany", 4, "subtractfeefrom" },
122 { "sendmany", 5 , "replaceable" },
123 { "sendmany", 6 , "conf_target" },
124 { "sendmany", 7, "estimate_mode", ParamFormat::STRING },
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" },
211 { "walletcreatefundedpsbt", 6, "psbt_version" },
212 { "walletprocesspsbt", 0, "psbt", ParamFormat::STRING },
213 { "walletprocesspsbt", 1, "sign" },
214 { "walletprocesspsbt", 2, "sighashtype", ParamFormat::STRING },
215 { "walletprocesspsbt", 3, "bip32derivs" },
216 { "walletprocesspsbt", 4, "finalize" },
217 { "descriptorprocesspsbt", 0, "psbt", ParamFormat::STRING },
218 { "descriptorprocesspsbt", 1, "descriptors"},
219 { "descriptorprocesspsbt", 2, "sighashtype", ParamFormat::STRING },
220 { "descriptorprocesspsbt", 3, "bip32derivs" },
221 { "descriptorprocesspsbt", 4, "finalize" },
222 { "createpsbt", 0, "inputs" },
223 { "createpsbt", 1, "outputs" },
224 { "createpsbt", 2, "locktime" },
225 { "createpsbt", 3, "replaceable" },
226 { "createpsbt", 4, "version" },
227 { "createpsbt", 5, "psbt_version" },
228 { "combinepsbt", 0, "txs"},
229 { "joinpsbts", 0, "txs"},
230 { "finalizepsbt", 0, "psbt", ParamFormat::STRING },
231 { "finalizepsbt", 1, "extract"},
232 { "converttopsbt", 1, "permitsigdata"},
233 { "converttopsbt", 2, "iswitness"},
234 { "converttopsbt", 3, "psbt_version"},
235 { "gettxout", 1, "n" },
236 { "gettxout", 2, "include_mempool" },
237 { "gettxoutproof", 0, "txids" },
238 { "gettxoutsetinfo", 1, "hash_or_height", ParamFormat::JSON_OR_STRING },
239 { "gettxoutsetinfo", 2, "use_index"},
240 { "dumptxoutset", 0, "path", ParamFormat::STRING },
241 { "dumptxoutset", 1, "type", ParamFormat::STRING },
242 { "dumptxoutset", 2, "options" },
243 { "dumptxoutset", 2, "rollback", ParamFormat::JSON_OR_STRING },
244 { "dumptxoutset", 2, "in_memory" },
245 { "lockunspent", 0, "unlock" },
246 { "lockunspent", 1, "transactions" },
247 { "lockunspent", 2, "persistent" },
248 { "send", 0, "outputs" },
249 { "send", 1, "conf_target" },
250 { "send", 3, "fee_rate"},
251 { "send", 4, "options" },
252 { "send", 4, "add_inputs"},
253 { "send", 4, "include_unsafe"},
254 { "send", 4, "minconf"},
255 { "send", 4, "maxconf"},
256 { "send", 4, "add_to_wallet"},
257 { "send", 4, "change_position"},
258 { "send", 4, "fee_rate"},
259 { "send", 4, "include_watching"},
260 { "send", 4, "inputs"},
261 { "send", 4, "locktime"},
262 { "send", 4, "lock_unspents"},
263 { "send", 4, "psbt"},
264 { "send", 4, "subtract_fee_from_outputs"},
265 { "send", 4, "conf_target"},
266 { "send", 4, "replaceable"},
267 { "send", 4, "solving_data"},
268 { "send", 4, "max_tx_weight"},
269 { "send", 5, "version"},
270 { "sendall", 0, "recipients" },
271 { "sendall", 1, "conf_target" },
272 { "sendall", 3, "fee_rate"},
273 { "sendall", 4, "options" },
274 { "sendall", 4, "add_to_wallet"},
275 { "sendall", 4, "fee_rate"},
276 { "sendall", 4, "include_watching"},
277 { "sendall", 4, "inputs"},
278 { "sendall", 4, "locktime"},
279 { "sendall", 4, "lock_unspents"},
280 { "sendall", 4, "psbt"},
281 { "sendall", 4, "send_max"},
282 { "sendall", 4, "minconf"},
283 { "sendall", 4, "maxconf"},
284 { "sendall", 4, "conf_target"},
285 { "sendall", 4, "replaceable"},
286 { "sendall", 4, "solving_data"},
287 { "sendall", 4, "version"},
288 { "simulaterawtransaction", 0, "rawtxs" },
289 { "simulaterawtransaction", 1, "options" },
290 { "simulaterawtransaction", 1, "include_watchonly"},
291 { "importmempool", 0, "filepath", ParamFormat::STRING },
292 { "importmempool", 1, "options" },
293 { "importmempool", 1, "apply_fee_delta_priority" },
294 { "importmempool", 1, "use_current_time" },
295 { "importmempool", 1, "apply_unbroadcast_set" },
296 { "importdescriptors", 0, "requests" },
297 { "listdescriptors", 0, "private" },
298 { "verifychain", 0, "checklevel" },
299 { "verifychain", 1, "nblocks" },
300 { "getblockstats", 0, "hash_or_height", ParamFormat::JSON_OR_STRING },
301 { "getblockstats", 1, "stats" },
302 { "pruneblockchain", 0, "height" },
303 { "keypoolrefill", 0, "newsize" },
304 { "getrawmempool", 0, "verbose" },
305 { "getrawmempool", 1, "mempool_sequence" },
306 { "getorphantxs", 0, "verbosity" },
307 { "estimatesmartfee", 0, "conf_target" },
308 { "estimaterawfee", 0, "conf_target" },
309 { "estimaterawfee", 1, "threshold" },
310 { "prioritisetransaction", 1, "dummy" },
311 { "prioritisetransaction", 2, "fee_delta" },
312 { "setban", 2, "bantime" },
313 { "setban", 3, "absolute" },
314 { "setnetworkactive", 0, "state" },
315 { "setwalletflag", 1, "value" },
316 { "getmempoolancestors", 1, "verbose" },
317 { "getmempooldescendants", 1, "verbose" },
318 { "gettxspendingprevout", 0, "outputs" },
319 { "gettxspendingprevout", 1, "options" },
320 { "gettxspendingprevout", 1, "mempool_only" },
321 { "gettxspendingprevout", 1, "return_spending_tx" },
322 { "bumpfee", 1, "options" },
323 { "bumpfee", 1, "conf_target"},
324 { "bumpfee", 1, "fee_rate"},
325 { "bumpfee", 1, "replaceable"},
326 { "bumpfee", 1, "outputs"},
327 { "bumpfee", 1, "original_change_index"},
328 { "psbtbumpfee", 1, "options" },
329 { "psbtbumpfee", 1, "conf_target"},
330 { "psbtbumpfee", 1, "fee_rate"},
331 { "psbtbumpfee", 1, "replaceable"},
332 { "psbtbumpfee", 1, "outputs"},
333 { "psbtbumpfee", 1, "original_change_index"},
334 { "psbtbumpfee", 1, "psbt_version"},
335 { "logging", 0, "include" },
336 { "logging", 1, "exclude" },
337 { "disconnectnode", 1, "nodeid" },
338 { "gethdkeys", 0, "active_only" },
339 { "gethdkeys", 0, "options" },
340 { "gethdkeys", 0, "private" },
341 { "createwalletdescriptor", 1, "options" },
342 { "createwalletdescriptor", 1, "internal" },
343 // Echo with conversion (For testing only)
344 { "echojson", 0, "arg0" },
345 { "echojson", 1, "arg1" },
346 { "echojson", 2, "arg2" },
347 { "echojson", 3, "arg3" },
348 { "echojson", 4, "arg4" },
349 { "echojson", 5, "arg5" },
350 { "echojson", 6, "arg6" },
351 { "echojson", 7, "arg7" },
352 { "echojson", 8, "arg8" },
353 { "echojson", 9, "arg9" },
354 { "rescanblockchain", 0, "start_height"},
355 { "rescanblockchain", 1, "stop_height"},
356 { "createwallet", 0, "wallet_name", ParamFormat::STRING },
357 { "createwallet", 1, "disable_private_keys"},
358 { "createwallet", 2, "blank"},
359 { "createwallet", 3, "passphrase", ParamFormat::STRING },
360 { "createwallet", 4, "avoid_reuse"},
361 { "createwallet", 5, "descriptors"},
362 { "createwallet", 6, "load_on_startup"},
363 { "createwallet", 7, "external_signer"},
364 { "restorewallet", 0, "wallet_name", ParamFormat::STRING },
365 { "restorewallet", 1, "backup_file", ParamFormat::STRING },
366 { "restorewallet", 2, "load_on_startup"},
367 { "loadwallet", 0, "filename", ParamFormat::STRING },
368 { "loadwallet", 1, "load_on_startup"},
369 { "unloadwallet", 0, "wallet_name", ParamFormat::STRING },
370 { "unloadwallet", 1, "load_on_startup"},
371 { "getnodeaddresses", 0, "count"},
372 { "addpeeraddress", 1, "port"},
373 { "addpeeraddress", 2, "tried"},
374 { "sendmsgtopeer", 0, "peer_id" },
375 { "stop", 0, "wait" },
376 { "addnode", 2, "v2transport" },
377 { "addconnection", 2, "v2transport" },
378 { "decodepsbt", 0, "psbt", ParamFormat::STRING },
379 { "analyzepsbt", 0, "psbt", ParamFormat::STRING},
380 { "verifymessage", 1, "signature", ParamFormat::STRING },
381 { "verifymessage", 2, "message", ParamFormat::STRING },
382 { "getnewaddress", 0, "label", ParamFormat::STRING },
383 { "getnewaddress", 1, "address_type", ParamFormat::STRING },
384 { "backupwallet", 0, "destination", ParamFormat::STRING },
385 { "echoipc", 0, "arg", ParamFormat::STRING },
386 { "encryptwallet", 0, "passphrase", ParamFormat::STRING },
387 { "getaddressesbylabel", 0, "label", ParamFormat::STRING },
388 { "loadtxoutset", 0, "path", ParamFormat::STRING },
389 { "migratewallet", 0, "wallet_name", ParamFormat::STRING },
390 { "migratewallet", 1, "passphrase", ParamFormat::STRING },
391 { "setlabel", 1, "label", ParamFormat::STRING },
392 { "signmessage", 1, "message", ParamFormat::STRING },
393 { "signmessagewithprivkey", 1, "message", ParamFormat::STRING },
394 { "walletpassphrasechange", 0, "oldpassphrase", ParamFormat::STRING },
395 { "walletpassphrasechange", 1, "newpassphrase", ParamFormat::STRING },
396};
397// clang-format on
398
400static UniValue Parse(std::string_view raw, ParamFormat format = ParamFormat::JSON)
401{
402 UniValue parsed;
403 if (!parsed.read(raw)) {
404 if (format != ParamFormat::JSON_OR_STRING) throw std::runtime_error(tfm::format("Error parsing JSON: %s", raw));
405 return UniValue(std::string(raw));
406 }
407 return parsed;
408}
409
410namespace rpc_convert
411{
412const CRPCConvertParam* FromPosition(std::string_view method, size_t pos)
413{
414 auto it = std::ranges::find_if(vRPCConvertParams, [&](const auto& p) {
415 return p.methodName == method && p.paramIdx == static_cast<int>(pos);
416 });
417
418 return it == std::end(vRPCConvertParams) ? nullptr : &*it;
419}
420
421const CRPCConvertParam* FromName(std::string_view method, std::string_view name)
422{
423 auto it = std::ranges::find_if(vRPCConvertParams, [&](const auto& p) {
424 return p.methodName == method && p.paramName == name;
425 });
426
427 return it == std::end(vRPCConvertParams) ? nullptr : &*it;
428}
429} // namespace rpc_convert
430
431static UniValue ParseParam(const CRPCConvertParam* param, std::string_view raw)
432{
433 // Only parse parameters which have the JSON or JSON_OR_STRING format; otherwise, treat them as strings.
434 return (param && (param->format == ParamFormat::JSON || param->format == ParamFormat::JSON_OR_STRING)) ? Parse(raw, param->format) : UniValue(std::string(raw));
435}
436
440UniValue RPCConvertValues(const std::string &strMethod, const std::vector<std::string> &strParams)
441{
442 UniValue params(UniValue::VARR);
443
444 for (std::string_view s : strParams) {
445 params.push_back(ParseParam(rpc_convert::FromPosition(strMethod, params.size()), s));
446 }
447
448 return params;
449}
450
480UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector<std::string> &strParams)
481{
482 UniValue params(UniValue::VOBJ);
483 UniValue positional_args{UniValue::VARR};
484
485 for (std::string_view s: strParams) {
486 size_t pos = s.find('=');
487 if (pos == std::string_view::npos) {
488 positional_args.push_back(ParseParam(rpc_convert::FromPosition(strMethod, positional_args.size()), s));
489 continue;
490 }
491
492 std::string name{s.substr(0, pos)};
493 std::string_view value{s.substr(pos+1)};
494
495 const CRPCConvertParam* named_param{rpc_convert::FromName(strMethod, name)};
496 if (!named_param) {
497 const CRPCConvertParam* positional_param = rpc_convert::FromPosition(strMethod, positional_args.size());
498 UniValue parsed_value;
499 if (positional_param && positional_param->format == ParamFormat::JSON && parsed_value.read(s)) {
500 positional_args.push_back(std::move(parsed_value));
501 continue;
502 } else if (positional_param && positional_param->format == ParamFormat::STRING) {
503 positional_args.push_back(s);
504 continue;
505 }
506 }
507
508 // Intentionally overwrite earlier named values with later ones as a
509 // convenience for scripts and command line users that want to merge
510 // options.
511 params.pushKV(name, ParseParam(named_param, value));
512 }
513
514 if (!positional_args.empty()) {
515 // Use pushKVEnd instead of pushKV to avoid overwriting an explicit
516 // "args" value with an implicit one. Let the RPC server handle the
517 // request as given.
518 params.pushKVEnd("args", std::move(positional_args));
519 }
520
521 return params;
522}
std::string methodName
method whose params want conversion
Definition: client.cpp:22
int paramIdx
0-based idx of param to convert
Definition: client.cpp:23
std::string paramName
parameter name
Definition: client.cpp:24
ParamFormat format
parameter format
Definition: client.cpp:25
void push_back(UniValue val)
Definition: univalue.cpp:103
@ VOBJ
Definition: univalue.h:24
@ VARR
Definition: univalue.h:24
size_t size() const
Definition: univalue.h:71
void pushKVEnd(std::string key, UniValue val)
Definition: univalue.cpp:117
bool read(std::string_view raw)
void pushKV(std::string key, UniValue val)
Definition: univalue.cpp:125
UniValue RPCConvertValues(const std::string &strMethod, const std::vector< std::string > &strParams)
Convert command lines arguments to params object when -named is disabled.
Definition: client.cpp:440
static UniValue ParseParam(const CRPCConvertParam *param, std::string_view raw)
Definition: client.cpp:431
static UniValue Parse(std::string_view raw, ParamFormat format=ParamFormat::JSON)
Parse string to UniValue or throw runtime_error if string contains invalid JSON.
Definition: client.cpp:400
UniValue RPCConvertNamedValues(const std::string &strMethod, const std::vector< std::string > &strParams)
Convert command line arguments to params object when -named is enabled.
Definition: client.cpp:480
ParamFormat
Specify whether parameter should be parsed by bitcoin-cli as a JSON value, or passed unchanged as a s...
Definition: client.cpp:17
@ JSON_OR_STRING
Definition: client.cpp:17
@ JSON
Definition: client.cpp:17
@ STRING
Definition: client.cpp:17
static const CRPCConvertParam vRPCConvertParams[]
Specify a (method, idx, name, format) here if the argument is a non-string RPC argument and needs to ...
Definition: client.cpp:57
const CRPCConvertParam * FromPosition(std::string_view method, size_t pos)
Definition: client.cpp:412
const CRPCConvertParam * FromName(std::string_view method, std::string_view name)
Definition: client.cpp:421
void format(std::ostream &out, FormatStringCheck< sizeof...(Args)> fmt, const Args &... args)
Format list of arguments to the stream according to given format string.
Definition: tinyformat.h:1079
const char * name
Definition: rest.cpp:49