mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
[rpc] listunspent: clarify that the asset type matters for default case, and do some formatting fixes.
This commit is contained in:
parent
cff526d387
commit
3832bd46e0
1 changed files with 22 additions and 22 deletions
|
|
@ -2555,45 +2555,45 @@ UniValue listunspent(const JSONRPCRequest& request)
|
|||
if (request.fHelp || request.params.size() > 5)
|
||||
throw runtime_error(
|
||||
"listunspent ( minconf maxconf [\"addresses\",...] [include_unsafe] asset )\n"
|
||||
"\nReturns array of unspent transaction outputs\n"
|
||||
"with between minconf and maxconf (inclusive) confirmations.\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. include_unsafe (bool, optional, default=true) Include outputs that are not safe to spend\n"
|
||||
" because they come from unconfirmed untrusted transactions or unconfirmed\n"
|
||||
" replacement transactions (cases where we are less sure that a conflicting\n"
|
||||
" transaction won't be mined).\n"
|
||||
"5. \"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"
|
||||
"5. \"asset\" (string, optional, default=bitcoin) The hex asset id or label to filter for. \"*\" is used to list all results.\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"
|
||||
" \"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 output 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"
|
||||
" \"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