Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 3,102 Lines • ▼ Show 20 Lines | if (request.fHelp || request.params.size() > 4) { | ||||
" \"txid\" : \"txid\", (string) the transaction id \n" | " \"txid\" : \"txid\", (string) the transaction id \n" | ||||
" \"vout\" : n, (numeric) the vout value\n" | " \"vout\" : n, (numeric) the vout value\n" | ||||
" \"address\" : \"address\", (string) the bitcoin address\n" | " \"address\" : \"address\", (string) the bitcoin address\n" | ||||
" \"account\" : \"account\", (string) DEPRECATED. The " | " \"account\" : \"account\", (string) DEPRECATED. The " | ||||
"associated account, or \"\" for the default account\n" | "associated account, or \"\" for the default account\n" | ||||
" \"scriptPubKey\" : \"key\", (string) the script key\n" | " \"scriptPubKey\" : \"key\", (string) the script key\n" | ||||
" \"amount\" : x.xxx, (numeric) the transaction output " | " \"amount\" : x.xxx, (numeric) the transaction output " | ||||
"amount in " + | "amount in " + | ||||
CURRENCY_UNIT + "\n" | CURRENCY_UNIT + | ||||
" \"confirmations\" : n, (numeric) The " | "\n" | ||||
"number of confirmations\n" | " \"confirmations\" : n, (numeric) The number of " | ||||
" \"redeemScript\" : n (string) The " | "confirmations\n" | ||||
"redeemScript if scriptPubKey is P2SH\n" | " \"redeemScript\" : n (string) The redeemScript if " | ||||
" \"spendable\" : xxx, (bool) Whether we " | "scriptPubKey is P2SH\n" | ||||
"have the private keys to spend this output\n" | " \"spendable\" : xxx, (bool) Whether we have the " | ||||
" \"solvable\" : xxx (bool) Whether we " | "private keys to spend this output\n" | ||||
"know how to spend this output, ignoring the lack " | " \"solvable\" : xxx, (bool) Whether we know how to " | ||||
"of keys\n" | "spend this output, ignoring the lack of keys\n" | ||||
" \"safe\" : xxx (bool) Whether this output is " | |||||
"considered safe to spend. Unconfirmed transactions\n" | |||||
" from outside keys are considered " | |||||
"unsafe and are not eligible for spending by\n" | |||||
" fundrawtransaction and " | |||||
"sendtoaddress.\n" | |||||
" }\n" | " }\n" | ||||
" ,...\n" | " ,...\n" | ||||
"]\n" | "]\n" | ||||
"\nExamples\n" + | "\nExamples\n" + | ||||
HelpExampleCli("listunspent", "") + | HelpExampleCli("listunspent", "") + | ||||
HelpExampleCli("listunspent", | HelpExampleCli("listunspent", | ||||
"6 9999999 " | "6 9999999 " | ||||
"\"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\"," | "\"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\"," | ||||
"\\\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"") + | "\\\"1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP\\\"]\"") + | ||||
HelpExampleRpc("listunspent", | HelpExampleRpc("listunspent", | ||||
"6, 9999999 " | "6, 9999999 " | ||||
"\"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\"," | "\"[\\\"1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg\\\"," | ||||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | for (const COutput &out : vecOutputs) { | ||||
entry.push_back(Pair("scriptPubKey", | entry.push_back(Pair("scriptPubKey", | ||||
HexStr(scriptPubKey.begin(), scriptPubKey.end()))); | HexStr(scriptPubKey.begin(), scriptPubKey.end()))); | ||||
entry.push_back( | entry.push_back( | ||||
Pair("amount", ValueFromAmount(out.tx->tx->vout[out.i].nValue))); | Pair("amount", ValueFromAmount(out.tx->tx->vout[out.i].nValue))); | ||||
entry.push_back(Pair("confirmations", out.nDepth)); | entry.push_back(Pair("confirmations", out.nDepth)); | ||||
entry.push_back(Pair("spendable", out.fSpendable)); | entry.push_back(Pair("spendable", out.fSpendable)); | ||||
entry.push_back(Pair("solvable", out.fSolvable)); | entry.push_back(Pair("solvable", out.fSolvable)); | ||||
entry.push_back(Pair("safe", out.fSafe)); | |||||
results.push_back(entry); | results.push_back(entry); | ||||
} | } | ||||
return results; | return results; | ||||
} | } | ||||
static UniValue fundrawtransaction(const Config &config, | static UniValue fundrawtransaction(const Config &config, | ||||
const JSONRPCRequest &request) { | const JSONRPCRequest &request) { | ||||
▲ Show 20 Lines • Show All 321 Lines • Show Last 20 Lines |