![]() |
Bitcoin Core 30.99.0
P2P Digital Currency
|
Go to the source code of this file.
Functions | |
| UniValue | RPCConvertValues (const std::string &strMethod, const std::vector< std::string > &strParams) |
| Convert positional arguments to command-specific RPC representation. More... | |
| UniValue | RPCConvertNamedValues (const std::string &strMethod, const std::vector< std::string > &strParams) |
| Convert named arguments to command-specific RPC representation. More... | |
| UniValue RPCConvertNamedValues | ( | const std::string & | strMethod, |
| const std::vector< std::string > & | strParams | ||
| ) |
Convert named arguments to command-specific RPC representation.
Convert named arguments to command-specific RPC representation.
The -named syntax accepts named arguments in NAME=VALUE format, as well as positional arguments without names. The syntax is inherently ambiguous if names are omitted and values contain '=', so a heuristic is used to disambiguate:
For example, the command bitcoin-cli -named createwallet "my=wallet", the parser initially sees "my=wallet" and attempts to process it as a parameter named "my". When it finds that "my" is not a valid named parameter parameter for this method, it falls back to checking the rule for the next available positional parameter (index 0). Because it finds the rule that this parameter is a ParamFormat::STRING, it correctly treats the entire "my=wallet" as a single positional string, successfully creating a wallet with that literal name.
Definition at line 473 of file client.cpp.
| UniValue RPCConvertValues | ( | const std::string & | strMethod, |
| const std::vector< std::string > & | strParams | ||
| ) |
Convert positional arguments to command-specific RPC representation.
Convert positional arguments to command-specific RPC representation.
Definition at line 433 of file client.cpp.