RPC help formatting updates (#1670)

- Convert satoshis to duffs
 - Correct order of fields in GetAddressUtxos
 - Add missing field from GetAddressDeltas (blockindex)
 - Add HelpExamples to gettxoutproof and verifytxoutproof
This commit is contained in:
thephez 2017-10-09 14:24:56 -04:00 committed by UdjinM6
parent 11afd7cfd3
commit ece884994e
2 changed files with 17 additions and 7 deletions

View File

@ -600,7 +600,7 @@ UniValue getaddressmempool(const UniValue& params, bool fHelp)
" \"address\" (string) The base58check encoded address\n"
" \"txid\" (string) The related txid\n"
" \"index\" (number) The related input or output index\n"
" \"satoshis\" (number) The difference of satoshis\n"
" \"duffs\" (number) The difference of duffs\n"
" \"timestamp\" (number) The time the transaction entered the mempool (seconds)\n"
" \"prevtxid\" (string) The previous txid (if spending)\n"
" \"prevout\" (string) The previous transaction output index (if spending)\n"
@ -670,10 +670,10 @@ UniValue getaddressutxos(const UniValue& params, bool fHelp)
" {\n"
" \"address\" (string) The address base58check encoded\n"
" \"txid\" (string) The output txid\n"
" \"height\" (number) The block height\n"
" \"outputIndex\" (number) The output index\n"
" \"script\" (strin) The script hex encoded\n"
" \"satoshis\" (number) The number of satoshis of the output\n"
" \"script\" (string) The script hex encoded\n"
" \"duffs\" (number) The number of duffs of the output\n"
" \"height\" (number) The block height\n"
" }\n"
"]\n"
"\nExamples:\n"
@ -737,9 +737,10 @@ UniValue getaddressdeltas(const UniValue& params, bool fHelp)
"\nResult:\n"
"[\n"
" {\n"
" \"satoshis\" (number) The difference of satoshis\n"
" \"duffs\" (number) The difference of duffs\n"
" \"txid\" (string) The related txid\n"
" \"index\" (number) The related input or output index\n"
" \"blockindex\" (number) The related block index\n"
" \"height\" (number) The block height\n"
" \"address\" (string) The base58check encoded address\n"
" }\n"
@ -821,8 +822,8 @@ UniValue getaddressbalance(const UniValue& params, bool fHelp)
"}\n"
"\nResult:\n"
"{\n"
" \"balance\" (string) The current balance in satoshis\n"
" \"received\" (string) The total number of satoshis received (including change)\n"
" \"balance\" (string) The current balance in duffs\n"
" \"received\" (string) The total number of duffs received (including change)\n"
"}\n"
"\nExamples:\n"
+ HelpExampleCli("getaddressbalance", "'{\"addresses\": [\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\"]}'")

View File

@ -252,6 +252,11 @@ UniValue gettxoutproof(const UniValue& params, bool fHelp)
"2. \"block hash\" (string, optional) If specified, looks for txid in the block with this hash\n"
"\nResult:\n"
"\"data\" (string) A string that is a serialized, hex-encoded data for the proof.\n"
"\nExamples:\n"
+ HelpExampleCli("gettxoutproof", "'[\"mytxid\",...]'")
+ HelpExampleCli("gettxoutproof", "'[\"mytxid\",...]' \"blockhash\"")
+ HelpExampleRpc("gettxoutproof", "[\"mytxid\",...], \"blockhash\"")
);
set<uint256> setTxids;
@ -324,6 +329,10 @@ UniValue verifytxoutproof(const UniValue& params, bool fHelp)
"1. \"proof\" (string, required) The hex-encoded proof generated by gettxoutproof\n"
"\nResult:\n"
"[\"txid\"] (array, strings) The txid(s) which the proof commits to, or empty array if the proof is invalid\n"
"\nExamples:\n"
+ HelpExampleCli("verifytxoutproof", "\"proof\"")
+ HelpExampleRpc("gettxoutproof", "\"proof\"")
);
CDataStream ssMB(ParseHexV(params[0], "proof"), SER_NETWORK, PROTOCOL_VERSION);