rpc: Named arguments for rawtransaction calls

This commit is contained in:
Wladimir J. van der Laan 2016-11-21 14:47:36 +01:00
parent 37a166f146
commit 8d713f761b

View File

@ -532,7 +532,7 @@ UniValue decodescript(const JSONRPCRequest& request)
{ {
if (request.fHelp || request.params.size() != 1) if (request.fHelp || request.params.size() != 1)
throw runtime_error( throw runtime_error(
"decodescript \"hex\"\n" "decodescript \"hexstring\"\n"
"\nDecode a hex-encoded script.\n" "\nDecode a hex-encoded script.\n"
"\nArguments:\n" "\nArguments:\n"
"1. \"hex\" (string) the hex encoded script\n" "1. \"hex\" (string) the hex encoded script\n"
@ -616,7 +616,7 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
" }\n" " }\n"
" ,...\n" " ,...\n"
" ]\n" " ]\n"
"3. \"privatekeys\" (string, optional) A json array of base58-encoded private keys for signing\n" "3. \"privkeys\" (string, optional) A json array of base58-encoded private keys for signing\n"
" [ (json array of strings, or 'null' if none provided)\n" " [ (json array of strings, or 'null' if none provided)\n"
" \"privatekey\" (string) private key in base58-encoding\n" " \"privatekey\" (string) private key in base58-encoding\n"
" ,...\n" " ,...\n"
@ -926,15 +926,15 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
static const CRPCCommand commands[] = static const CRPCCommand commands[] =
{ // category name actor (function) okSafeMode { // category name actor (function) okSafeMode
// --------------------- ------------------------ ----------------------- ---------- // --------------------- ------------------------ ----------------------- ----------
{ "rawtransactions", "getrawtransaction", &getrawtransaction, true }, { "rawtransactions", "getrawtransaction", &getrawtransaction, true, {"txid","verbose"} },
{ "rawtransactions", "createrawtransaction", &createrawtransaction, true }, { "rawtransactions", "createrawtransaction", &createrawtransaction, true, {"transactions","outputs","locktime"} },
{ "rawtransactions", "decoderawtransaction", &decoderawtransaction, true }, { "rawtransactions", "decoderawtransaction", &decoderawtransaction, true, {"hexstring"} },
{ "rawtransactions", "decodescript", &decodescript, true }, { "rawtransactions", "decodescript", &decodescript, true, {"hexstring"} },
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, false }, { "rawtransactions", "sendrawtransaction", &sendrawtransaction, false, {"hexstring","allowhighfees"} },
{ "rawtransactions", "signrawtransaction", &signrawtransaction, false }, /* uses wallet if enabled */ { "rawtransactions", "signrawtransaction", &signrawtransaction, false, {"hexstring","prevtxs","privkeys","sighashtype"} }, /* uses wallet if enabled */
{ "blockchain", "gettxoutproof", &gettxoutproof, true }, { "blockchain", "gettxoutproof", &gettxoutproof, true, {"txids", "blockhash"} },
{ "blockchain", "verifytxoutproof", &verifytxoutproof, true }, { "blockchain", "verifytxoutproof", &verifytxoutproof, true, {"proof"} },
}; };
void RegisterRawTransactionRPCCommands(CRPCTable &t) void RegisterRawTransactionRPCCommands(CRPCTable &t)