| 131 | } |
| 132 | |
| 133 | static RPCHelpMan help() |
| 134 | { |
| 135 | return RPCHelpMan{"help", |
| 136 | "\nList all commands, or get help for a specified command.\n", |
| 137 | { |
| 138 | {"command", RPCArg::Type::STR, RPCArg::DefaultHint{"all commands"}, "The command to get help on"}, |
| 139 | }, |
| 140 | { |
| 141 | RPCResult{RPCResult::Type::STR, "", "The help text"}, |
| 142 | RPCResult{RPCResult::Type::ANY, "", ""}, |
| 143 | }, |
| 144 | RPCExamples{""}, |
| 145 | [&](const RPCHelpMan& self, const JSONRPCRequest& jsonRequest) -> UniValue |
| 146 | { |
| 147 | std::string strCommand; |
| 148 | if (jsonRequest.params.size() > 0) { |
| 149 | strCommand = jsonRequest.params[0].get_str(); |
| 150 | } |
| 151 | if (strCommand == "dump_all_command_conversions") { |
| 152 | // Used for testing only, undocumented |
| 153 | return tableRPC.dumpArgMap(jsonRequest); |
| 154 | } |
| 155 | |
| 156 | return tableRPC.help(strCommand, jsonRequest); |
| 157 | }, |
| 158 | }; |
| 159 | } |
| 160 | |
| 161 | static RPCHelpMan stop() |
| 162 | { |
nothing calls this directly
no test coverage detected