| 117 | } |
| 118 | |
| 119 | static RPCMethod help() |
| 120 | { |
| 121 | return RPCMethod{ |
| 122 | "help", |
| 123 | "List all commands, or get help for a specified command.\n", |
| 124 | { |
| 125 | {"command", RPCArg::Type::STR, RPCArg::DefaultHint{"all commands"}, "The command to get help on"}, |
| 126 | }, |
| 127 | { |
| 128 | RPCResult{RPCResult::Type::STR, "", "The help text"}, |
| 129 | RPCResult{RPCResult::Type::ANY, "", ""}, |
| 130 | }, |
| 131 | RPCExamples{""}, |
| 132 | [](const RPCMethod& self, const JSONRPCRequest& jsonRequest) -> UniValue |
| 133 | { |
| 134 | auto command{self.MaybeArg<std::string_view>("command")}; |
| 135 | if (command == "dump_all_command_conversions") { |
| 136 | // Used for testing only, undocumented |
| 137 | return tableRPC.dumpArgMap(jsonRequest); |
| 138 | } |
| 139 | |
| 140 | return tableRPC.help(command.value_or(""), jsonRequest); |
| 141 | }, |
| 142 | }; |
| 143 | } |
| 144 | |
| 145 | static RPCMethod stop() |
| 146 | { |
nothing calls this directly
no test coverage detected