mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
[rpc] listunspent: clarify that the asset type matters for default case, and do some formatting fixes.
This commit is contained in:
parent
99009edd7b
commit
bb7496b2da
1 changed files with 25 additions and 24 deletions
|
|
@ -2499,42 +2499,43 @@ UniValue listunspent(const UniValue& params, bool fHelp)
|
|||
|
||||
if (fHelp || params.size() > 4)
|
||||
throw runtime_error(
|
||||
"listunspent ( minconf maxconf [\"address\",...] asset)\n"
|
||||
"\nReturns array of unspent transaction outputs\n"
|
||||
"with between minconf and maxconf (inclusive) confirmations.\n"
|
||||
"listunspent ( minconf maxconf [\"address\",...] asset )\n"
|
||||
"\nReturns array of unspent transaction outputs with between minconf and maxconf (inclusive) confirmations of the given asset type, or bitcoin if not provided.\n"
|
||||
"Optionally filter to only include txouts paid to specified addresses.\n"
|
||||
"\nArguments:\n"
|
||||
"1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n"
|
||||
"2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
|
||||
"3. \"addresses\" (string) A json array of bitcoin addresses to filter\n"
|
||||
"1. minconf (numeric, optional, default=1) The minimum confirmations to filter\n"
|
||||
"2. maxconf (numeric, optional, default=9999999) The maximum confirmations to filter\n"
|
||||
"3. \"addresses\" (optional) A json array of bitcoin addresses to filter\n"
|
||||
" [\n"
|
||||
" \"address\" (string) bitcoin address\n"
|
||||
" \"address\" (string) bitcoin address\n"
|
||||
" ,...\n"
|
||||
" ]\n"
|
||||
"4. \"asset\" (string, optional, default=bitcoin) The hex asset id or label to filter for. \"*\" is used to list all results.\n"
|
||||
"\nResult\n"
|
||||
"[ (array of json object)\n"
|
||||
"4. \"asset\" (string, optional, default=bitcoin) The hex asset id or label to filter for. \"*\" is used to list all results.\n"
|
||||
"\nResult:\n"
|
||||
"[ (array of json object)\n"
|
||||
" {\n"
|
||||
" \"txid\" : \"txid\", (string) the transaction id \n"
|
||||
" \"vout\" : n, (numeric) the vout value\n"
|
||||
" \"address\" : \"address\", (string) the bitcoin address\n"
|
||||
" \"account\" : \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n"
|
||||
" \"scriptPubKey\" : \"key\", (string) the script key\n"
|
||||
" \"amount\" : x.xxx, (numeric) the transaction amount in " + CURRENCY_UNIT + "\n"
|
||||
" \"assetid\": \"hex\" (string) the asset id for this output"
|
||||
" \"confirmations\" : n, (numeric) The number of confirmations\n"
|
||||
" \"serValue\" : \"hex\", (string) the output's value commitment\n"
|
||||
" \"blinder\" : \"blind\" (string) The blinding factor used for a confidential output (or \"\")\n"
|
||||
" \"redeemScript\" : n (string) The redeemScript if scriptPubKey is P2SH\n"
|
||||
" \"spendable\" : xxx, (bool) Whether we have the private keys to spend this output\n"
|
||||
" \"solvable\" : xxx (bool) Whether we know how to spend this output, ignoring the lack of keys\n"
|
||||
" \"txid\": \"txid\", (string) the transaction id \n"
|
||||
" \"vout\": n, (numeric) the vout value\n"
|
||||
" \"address\": \"address\", (string) the bitcoin address\n"
|
||||
" \"account\": \"account\", (string) DEPRECATED. The associated account, or \"\" for the default account\n"
|
||||
" \"scriptPubKey\": \"key\", (string) the script key\n"
|
||||
" \"amount\": x.xxx, (numeric) the transaction amount in " + CURRENCY_UNIT + "\n"
|
||||
" \"assetid\": \"hex\" (string) the asset id for this output\n"
|
||||
" \"confirmations\": n, (numeric) The number of confirmations\n"
|
||||
" \"serValue\": \"hex\", (string) the output's value commitment\n"
|
||||
" \"blinder\": \"blind\" (string) The blinding factor used for a confidential output (or \"\")\n"
|
||||
" \"redeemScript\": n (string) The redeemScript if scriptPubKey is P2SH\n"
|
||||
" \"spendable\": xxx, (bool) Whether we have the private keys to spend this output\n"
|
||||
" \"solvable\": xxx (bool) Whether we know how to spend this output, ignoring the lack of keys\n"
|
||||
" }\n"
|
||||
" ,...\n"
|
||||
"]\n"
|
||||
|
||||
"\nExamples\n"
|
||||
"\nExamples:\n"
|
||||
+ HelpExampleCli("listunspent", "")
|
||||
+ HelpExampleCli("listunspent", "6 9999999 \"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"")
|
||||
+ HelpExampleCli("listunspent", "6 9999999 \"[]\" \"myassetid\"")
|
||||
+ HelpExampleCli("listunspent", "6 9999999 \"[]\" \"*\"")
|
||||
+ HelpExampleRpc("listunspent", "6, 9999999 \"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\",\\\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"")
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue