Changeset View
Changeset View
Standalone View
Standalone View
src/wallet/rpcwallet.cpp
Show First 20 Lines • Show All 1,345 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"Whether to include watch-only addresses (see 'importaddress')."}, | "Whether to include watch-only addresses (see 'importaddress')."}, | ||||
{"address_filter", RPCArg::Type::STR, | {"address_filter", RPCArg::Type::STR, | ||||
RPCArg::Optional::OMITTED_NAMED_ARG, | RPCArg::Optional::OMITTED_NAMED_ARG, | ||||
"If present, only return information on this address."}, | "If present, only return information on this address."}, | ||||
}, | }, | ||||
RPCResult{ | RPCResult{ | ||||
"[\n" | "[\n" | ||||
" {\n" | " {\n" | ||||
" \"involvesWatchonly\" : true, (bool) Only returned if " | " \"involvesWatchonly\" : true, (bool) Only returns true " | ||||
"imported addresses were involved in transaction\n" | "if imported addresses were involved in transaction\n" | ||||
" \"address\" : \"receivingaddress\", (string) The receiving " | " \"address\" : \"receivingaddress\", (string) The receiving " | ||||
"address\n" | "address\n" | ||||
" \"amount\" : x.xxx, (numeric) The total " | " \"amount\" : x.xxx, (numeric) The total " | ||||
"amount in " + | "amount in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
" received by the address\n" | " received by the address\n" | ||||
" \"confirmations\" : n, (numeric) The number of " | " \"confirmations\" : n, (numeric) The number of " | ||||
"confirmations of the most recent transaction included\n" | "confirmations of the most recent transaction included\n" | ||||
▲ Show 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
{"include_empty", RPCArg::Type::BOOL, /* default */ "false", | {"include_empty", RPCArg::Type::BOOL, /* default */ "false", | ||||
"Whether to include labels that haven't received any payments."}, | "Whether to include labels that haven't received any payments."}, | ||||
{"include_watchonly", RPCArg::Type::BOOL, | {"include_watchonly", RPCArg::Type::BOOL, | ||||
/* default */ "true for watch-only wallets, otherwise false", | /* default */ "true for watch-only wallets, otherwise false", | ||||
"Whether to include watch-only addresses (see 'importaddress')."}, | "Whether to include watch-only addresses (see 'importaddress')."}, | ||||
}, | }, | ||||
RPCResult{"[\n" | RPCResult{"[\n" | ||||
" {\n" | " {\n" | ||||
" \"involvesWatchonly\" : true, (bool) Only returned if " | " \"involvesWatchonly\" : true, (bool) Only returns " | ||||
"imported addresses were involved in transaction\n" | "true if imported addresses were involved in transaction\n" | ||||
" \"amount\" : x.xxx, (numeric) The total " | " \"amount\" : x.xxx, (numeric) The total " | ||||
"amount received by addresses with this label\n" | "amount received by addresses with this label\n" | ||||
" \"confirmations\" : n, (numeric) The number of " | " \"confirmations\" : n, (numeric) The number of " | ||||
"confirmations of the most recent transaction included\n" | "confirmations of the most recent transaction included\n" | ||||
" \"label\" : \"label\" (string) The label of " | " \"label\" : \"label\" (string) The label of " | ||||
"the receiving address. The default label is \"\".\n" | "the receiving address. The default label is \"\".\n" | ||||
" }\n" | " }\n" | ||||
" ,...\n" | " ,...\n" | ||||
▲ Show 20 Lines • Show All 113 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static const std::string TransactionDescriptionString() { | static const std::string TransactionDescriptionString() { | ||||
return " \"confirmations\": n, (numeric) The " | return " \"confirmations\": n, (numeric) The " | ||||
"number of confirmations for the transaction. Negative " | "number of confirmations for the transaction. Negative " | ||||
"confirmations means the\n" | "confirmations means the\n" | ||||
" transaction " | " transaction " | ||||
"conflicted that many blocks ago.\n" | "conflicted that many blocks ago.\n" | ||||
" \"trusted\": xxx, (bool) Whether we " | " \"generated\": xxx, (bool) Only " | ||||
"consider the outputs of this unconfirmed transaction safe to " | "present if transaction only input is a coinbase one.\n" | ||||
"spend.\n" | " \"trusted\": xxx, (bool) Only " | ||||
"present if we consider transaction to be trusted and so safe to " | |||||
"spend from.\n" | |||||
" \"blockhash\": \"hashvalue\", (string) The " | " \"blockhash\": \"hashvalue\", (string) The " | ||||
"block hash containing the transaction.\n" | "block hash containing the transaction.\n" | ||||
" \"blockindex\": n, (numeric) The " | " \"blockindex\": n, (numeric) The " | ||||
"index of the transaction in the block that includes it.\n" | "index of the transaction in the block that includes it.\n" | ||||
" \"blocktime\": xxx, (numeric) The " | " \"blocktime\": xxx, (numeric) The " | ||||
"block time in seconds since epoch (1 Jan 1970 GMT).\n" | "block time in seconds since epoch (1 Jan 1970 GMT).\n" | ||||
" \"txid\": \"transactionid\", (string) The " | " \"txid\": \"transactionid\", (string) The " | ||||
"transaction id.\n" | "transaction id.\n" | ||||
" \"walletconflicts\": [ (array) " | |||||
"Conflicting transaction ids.\n" | |||||
" \"txid\", (string) The " | |||||
"transaction id.\n" | |||||
" ...\n" | |||||
" ],\n" | |||||
" \"time\": xxx, (numeric) The " | " \"time\": xxx, (numeric) The " | ||||
"transaction time in seconds since epoch (midnight Jan 1 1970 " | "transaction time in seconds since epoch (midnight Jan 1 1970 " | ||||
"GMT).\n" | "GMT).\n" | ||||
" \"timereceived\": xxx, (numeric) The " | " \"timereceived\": xxx, (numeric) The " | ||||
"time received in seconds since epoch (midnight Jan 1 1970 GMT).\n" | "time received in seconds since epoch (midnight Jan 1 1970 GMT).\n" | ||||
" \"comment\": \"...\", (string) If a " | " \"comment\": \"...\", (string) If a " | ||||
"comment is associated with the transaction, only present if not " | "comment is associated with the transaction, only present if not " | ||||
"empty.\n"; | "empty.\n"; | ||||
Show All 25 Lines | RPCHelpMan{ | ||||
{"include_watchonly", RPCArg::Type::BOOL, | {"include_watchonly", RPCArg::Type::BOOL, | ||||
/* default */ "true for watch-only wallets, otherwise false", | /* default */ "true for watch-only wallets, otherwise false", | ||||
"Include transactions to watch-only addresses (see " | "Include transactions to watch-only addresses (see " | ||||
"'importaddress')"}, | "'importaddress')"}, | ||||
}, | }, | ||||
RPCResult{ | RPCResult{ | ||||
"[\n" | "[\n" | ||||
" {\n" | " {\n" | ||||
" \"involvesWatchonly\": xxx, (bool) Only returns true if " | |||||
"imported addresses were involved in transaction.\n" | |||||
" \"address\":\"address\", (string) The bitcoin address of " | " \"address\":\"address\", (string) The bitcoin address of " | ||||
"the transaction.\n" | "the transaction.\n" | ||||
" \"category\": (string) The transaction " | " \"category\": (string) The transaction " | ||||
"category.\n" | "category.\n" | ||||
" \"send\" Transactions sent.\n" | " \"send\" Transactions sent.\n" | ||||
" \"receive\" Non-coinbase " | " \"receive\" Non-coinbase " | ||||
"transactions received.\n" | "transactions received.\n" | ||||
" \"generate\" Coinbase transactions " | " \"generate\" Coinbase transactions " | ||||
▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"Show transactions that were removed due to a reorg in the " | "Show transactions that were removed due to a reorg in the " | ||||
"\"removed\" array\n" | "\"removed\" array\n" | ||||
" (not " | " (not " | ||||
"guaranteed to work on pruned nodes)"}, | "guaranteed to work on pruned nodes)"}, | ||||
}, | }, | ||||
RPCResult{ | RPCResult{ | ||||
"{\n" | "{\n" | ||||
" \"transactions\": [\n" | " \"transactions\": [\n" | ||||
" \"involvesWatchonly\": xxx, (bool) Only returns true if " | |||||
"imported addresses were involved in transaction.\n" | |||||
" \"address\":\"address\", (string) The bitcoin address of " | " \"address\":\"address\", (string) The bitcoin address of " | ||||
"the transaction.\n" | "the transaction.\n" | ||||
" \"category\": (string) The transaction " | " \"category\": (string) The transaction " | ||||
"category.\n" | "category.\n" | ||||
" \"send\" Transactions sent.\n" | " \"send\" Transactions sent.\n" | ||||
" \"receive\" Non-coinbase " | " \"receive\" Non-coinbase " | ||||
"transactions received.\n" | "transactions received.\n" | ||||
" \"generate\" Coinbase transactions " | " \"generate\" Coinbase transactions " | ||||
▲ Show 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | RPCHelpMan{ | ||||
"Whether to include watch-only addresses in balance calculation " | "Whether to include watch-only addresses in balance calculation " | ||||
"and details[]"}, | "and details[]"}, | ||||
{"verbose", RPCArg::Type::BOOL, /* default */ "false", | {"verbose", RPCArg::Type::BOOL, /* default */ "false", | ||||
"Whether to include a `decoded` field containing the decoded " | "Whether to include a `decoded` field containing the decoded " | ||||
"transaction (equivalent to RPC decoderawtransaction)"}, | "transaction (equivalent to RPC decoderawtransaction)"}, | ||||
}, | }, | ||||
RPCResult{ | RPCResult{ | ||||
"{\n" | "{\n" | ||||
" \"amount\" : x.xxx, (numeric) The transaction amount " | " \"amount\" : x.xxx, (numeric) The transaction amount " | ||||
"in " + | "in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
"\n" | "\n" | ||||
" \"fee\": x.xxx, (numeric) The amount of the fee in " + | " \"fee\": x.xxx, (numeric) The amount of the fee " | ||||
"in " + | |||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
". This is negative and only available for the \n" | ". This is negative and only available for the \n" | ||||
" 'send' category of transactions.\n" + | " 'send' category of transactions.\n" + | ||||
TransactionDescriptionString() + | TransactionDescriptionString() + | ||||
" \"details\" : [\n" | +" \"details\" : [\n" | ||||
" {\n" | " {\n" | ||||
" \"involvesWatchonly\": xxx, (bool) Only returns " | |||||
"true if imported addresses were involved in transaction.\n" | |||||
" \"address\" : \"address\", (string) The bitcoin " | " \"address\" : \"address\", (string) The bitcoin " | ||||
"address involved in the transaction\n" | "address involved in the transaction\n" | ||||
" \"category\" : (string) The " | " \"category\" : (string) The " | ||||
"transaction category.\n" | "transaction category.\n" | ||||
" \"send\" Transactions sent.\n" | " \"send\" Transactions " | ||||
"sent.\n" | |||||
" \"receive\" Non-coinbase " | " \"receive\" Non-coinbase " | ||||
"transactions received.\n" | "transactions received.\n" | ||||
" \"generate\" Coinbase " | " \"generate\" Coinbase " | ||||
"transactions received with more than 100 confirmations.\n" | "transactions received with more than 100 confirmations.\n" | ||||
" \"immature\" Coinbase " | " \"immature\" Coinbase " | ||||
"transactions received with 100 or fewer confirmations.\n" | "transactions received with 100 or fewer confirmations.\n" | ||||
" \"orphan\" Orphaned coinbase " | " \"orphan\" Orphaned coinbase " | ||||
"transactions received.\n" | "transactions received.\n" | ||||
" \"amount\" : x.xxx, (numeric) The amount " | " \"amount\" : x.xxx, (numeric) The amount " | ||||
"in " + | "in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
"\n" | "\n" | ||||
" \"label\" : \"label\", (string) A comment for " | " \"label\" : \"label\", (string) A comment " | ||||
"the address/transaction, if any\n" | "for the address/transaction, if any\n" | ||||
" \"vout\" : n, (numeric) the vout " | " \"vout\" : n, (numeric) the vout " | ||||
"value\n" | "value\n" | ||||
" \"fee\": x.xxx, (numeric) The amount of " | " \"fee\": x.xxx, (numeric) The amount " | ||||
"the fee in " + | "of the fee in " + | ||||
CURRENCY_UNIT + | CURRENCY_UNIT + | ||||
". This is negative and only available for the \n" | ". This is negative and only available for the \n" | ||||
" 'send' category of " | " 'send' category of " | ||||
"transactions.\n" | "transactions.\n" | ||||
" \"abandoned\": xxx (bool) 'true' if the " | " \"abandoned\": xxx (bool) 'true' if the " | ||||
"transaction has been abandoned (inputs are respendable). Only " | "transaction has been abandoned (inputs are respendable). Only " | ||||
"available for the \n" | "available for the \n" | ||||
" 'send' category of " | " 'send' category of " | ||||
"transactions.\n" | "transactions.\n" | ||||
" }\n" | " }\n" | ||||
" ,...\n" | " ,...\n" | ||||
" ],\n" | " ],\n" | ||||
" \"hex\" : \"data\" (string) Raw data for transaction\n" | " \"hex\" : \"data\" (string) Raw data for transaction\n" | ||||
" \"decoded\" : transaction (json object) Optional, the " | " \"decoded\" : transaction (json object) Optional, the " | ||||
"decoded transaction (only present when `verbose` is passed), " | "decoded transaction (only present when `verbose` is passed), " | ||||
"equivalent to the\n" | "equivalent to the\n" | ||||
" RPC " | " RPC " | ||||
"decoderawtransaction method, or the RPC getrawtransaction method " | "decoderawtransaction method, or the RPC getrawtransaction method " | ||||
"when `verbose` is passed.\n" | "when `verbose` is passed.\n" | ||||
"}\n"}, | "}\n"}, | ||||
RPCExamples{HelpExampleCli("gettransaction", | RPCExamples{HelpExampleCli("gettransaction", | ||||
"\"1075db55d416d3ca199f55b6084e2115b9345e16c" | "\"1075db55d416d3ca199f55b6084e2115b9345e16c" | ||||
"5cf302fc80e9d5fbf5d48d\"") + | "5cf302fc80e9d5fbf5d48d\"") + | ||||
HelpExampleCli("gettransaction", | HelpExampleCli("gettransaction", | ||||
"\"1075db55d416d3ca199f55b6084e2115b9345e16c" | "\"1075db55d416d3ca199f55b6084e2115b9345e16c" | ||||
▲ Show 20 Lines • Show All 2,800 Lines • Show Last 20 Lines |