MCPcopy Create free account
hub / github.com/ElementsProject/elements / help

Function help

src/rpc/server.cpp:133–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133static 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
161static RPCHelpMan stop()
162{

Callers

nothing calls this directly

Calls 3

dumpArgMapMethod · 0.80
helpMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected