| 205 | } |
| 206 | |
| 207 | std::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 |
| 219 | CPubKey HexToPubKey(const std::string& hex_in) |