MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / help

Function help

src/rpc/server.cpp:119–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119static 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
145static RPCMethod stop()
146{

Callers

nothing calls this directly

Calls 3

dumpArgMapMethod · 0.80
helpMethod · 0.80
value_orMethod · 0.45

Tested by

no test coverage detected