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

Function HelpExampleRpcNamed

src/rpc/util.cpp:207–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207std::string HelpExampleRpcNamed(const std::string& methodname, const RPCArgList& args)
208{
209 UniValue params(UniValue::VOBJ);
210 for (const auto& param: args) {
211 params.pushKV(param.first, param.second);
212 }
213
214 return "> curl --user myusername --data-binary '{\"jsonrpc\": \"2.0\", \"id\": \"curltest\", "
215 "\"method\": \"" + methodname + "\", \"params\": " + params.write() + "}' -H 'content-type: application/json' http://127.0.0.1:8332/\n";
216}
217
218// Converts a hex string to a public key if possible
219CPubKey HexToPubKey(const std::string& hex_in)

Callers 4

restorewalletFunction · 0.85
createwalletFunction · 0.85
gethdkeysFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 2

pushKVMethod · 0.80
writeMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68