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

Function HelpExampleRpcNamed

src/rpc/util.cpp:195–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193}
194
195std::string HelpExampleRpcNamed(const std::string& methodname, const RPCArgList& args)
196{
197 UniValue params(UniValue::VOBJ);
198 for (const auto& param: args) {
199 params.pushKV(param.first, param.second);
200 }
201
202 return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\": \"curltest\", "
203 "\"method\": \"" + methodname + "\", \"params\": " + params.write() + "}' -H 'content-type: text/plain;' http://127.0.0.1:8332/\n";
204}
205
206// Converts a hex string to a public key if possible
207CPubKey HexToPubKey(const std::string& hex_in)

Callers 3

restorewalletFunction · 0.85
createwalletFunction · 0.85
BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 2

pushKVMethod · 0.45
writeMethod · 0.45

Tested by 1

BOOST_AUTO_TEST_CASEFunction · 0.68