| 193 | } |
| 194 | |
| 195 | std::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 |
| 207 | CPubKey HexToPubKey(const std::string& hex_in) |