Skip to content

Commit

Permalink
rpc: Named arguments for rawtransaction calls
Browse files Browse the repository at this point in the history
  • Loading branch information
laanwj authored and random-zebra committed May 25, 2021
1 parent 3a93690 commit 22ee72a
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/rpc/rawtransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ UniValue createrawtransaction(const JSONRPCRequest& request)
" }\n"
" ,...\n"
" ]\n"
"2. \"addresses\" (string, required) a json object with addresses as keys and amounts as values\n"
"2. \"outputs\" (string, required) a json object with addresses as keys and amounts as values\n"
" {\n"
" \"address\": x.xxx (numeric, required) The key is the pivx address, the value is the pivx amount\n"
" ,...\n"
Expand Down Expand Up @@ -368,7 +368,7 @@ UniValue decoderawtransaction(const JSONRPCRequest& request)
"\nReturn a JSON object representing the serialized, hex-encoded transaction.\n"

"\nArguments:\n"
"1. \"hex\" (string, required) The transaction hex string\n"
"1. \"hexstring\" (string, required) The transaction hex string\n"

"\nResult:\n"
"{\n"
Expand Down Expand Up @@ -433,11 +433,11 @@ UniValue decodescript(const JSONRPCRequest& request)
{
if (request.fHelp || request.params.size() != 1)
throw std::runtime_error(
"decodescript \"hex\"\n"
"decodescript \"hexstring\"\n"
"\nDecode a hex-encoded script.\n"

"\nArguments:\n"
"1. \"hex\" (string) the hex encoded script\n"
"1. \"hexstring\" (string) the hex encoded script\n"

"\nResult:\n"
"{\n"
Expand Down Expand Up @@ -634,7 +634,7 @@ UniValue signrawtransaction(const JSONRPCRequest& request)
" }\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"
" \"privatekey\" (string) private key in base58-encoding\n"
" ,...\n"
Expand Down Expand Up @@ -995,15 +995,15 @@ UniValue sendrawtransaction(const JSONRPCRequest& request)
}

static const CRPCCommand commands[] =
{ // category name actor (function) okSafeMode
// --------------------- ------------------------ ----------------------- ----------
{ "rawtransactions", "getrawtransaction", &getrawtransaction, true },
{ "rawtransactions", "createrawtransaction", &createrawtransaction, true },
{ "rawtransactions", "decoderawtransaction", &decoderawtransaction, true },
{ "rawtransactions", "decodescript", &decodescript, true },
{ "rawtransactions", "fundrawtransaction", &fundrawtransaction, false },
{ "rawtransactions", "signrawtransaction", &signrawtransaction, false }, /* uses wallet if enabled */
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, false },
{ // category name actor (function) okSafe argNames
// --------------------- ------------------------ ----------------------- ------ --------
{ "rawtransactions", "getrawtransaction", &getrawtransaction, true, {"txid","verbose","blockhash"} },
{ "rawtransactions", "createrawtransaction", &createrawtransaction, true, {"transactions","outputs","locktime"} },
{ "rawtransactions", "decoderawtransaction", &decoderawtransaction, true, {"hexstring"} },
{ "rawtransactions", "decodescript", &decodescript, true, {"hexstring"} },
{ "rawtransactions", "fundrawtransaction", &fundrawtransaction, false, {"hexstring","options"} },
{ "rawtransactions", "signrawtransaction", &signrawtransaction, false, {"hexstring","prevtxs","privkeys","sighashtype"} }, /* uses wallet if enabled */
{ "rawtransactions", "sendrawtransaction", &sendrawtransaction, false, {"hexstring","allowhighfees"} },
};

void RegisterRawTransactionRPCCommands(CRPCTable &tableRPC)
Expand Down

0 comments on commit 22ee72a

Please sign in to comment.