23 int confirms =
wallet.GetTxDepthInMainChain(wtx);
24 entry.pushKV(
"confirmations", confirms);
26 entry.pushKV(
"generated",
true);
29 entry.pushKV(
"blockhash", conf->confirmed_block_hash.GetHex());
30 entry.pushKV(
"blockheight", conf->confirmed_block_height);
31 entry.pushKV(
"blockindex", conf->position_in_block);
34 entry.pushKV(
"blocktime", block_time);
38 entry.pushKV(
"txid", wtx.GetHash().GetHex());
39 entry.pushKV(
"wtxid", wtx.GetWitnessHash().GetHex());
41 for (
const Txid& conflict :
wallet.GetTxConflicts(wtx))
43 entry.pushKV(
"walletconflicts", std::move(conflicts));
45 for (
const Txid& mempool_conflict : wtx.mempool_conflicts)
47 entry.pushKV(
"mempoolconflicts", std::move(mempool_conflicts));
48 entry.pushKV(
"time", wtx.GetTxTime());
49 entry.pushKV(
"timereceived", int64_t{wtx.nTimeReceived});
52 std::string rbfStatus =
"no";
56 rbfStatus =
"unknown";
60 entry.pushKV(
"bip125-replaceable", rbfStatus);
62 for (
const std::pair<const std::string, std::string>& item : wtx.mapValue)
63 entry.pushKV(item.first, item.second);
69 int nConf{std::numeric_limits<int>::max()};
78 if (!params[0].isNull())
79 nMinDepth = params[0].getInt<
int>();
82 bool fIncludeEmpty =
false;
83 if (!params[1].isNull())
84 fIncludeEmpty = params[1].get_bool();
86 std::optional<CTxDestination> filtered_address{std::nullopt};
87 if (!by_label && !params[3].isNull() && !params[3].get_str().empty()) {
95 std::map<CTxDestination, tallyitem> mapTally;
96 for (
const auto& [
_, wtx] :
wallet.mapWallet) {
98 int nDepth =
wallet.GetTxDepthInMainChain(wtx);
99 if (nDepth < nMinDepth)
103 if ((wtx.IsCoinBase() && (nDepth < 1))
104 || (
wallet.IsTxImmatureCoinBase(wtx) && !include_immature_coinbase)) {
108 for (
const CTxOut& txout : wtx.tx->vout) {
113 if (filtered_address && !(filtered_address == address)) {
117 if (!
wallet.IsMine(address))
123 item.
txids.push_back(wtx.GetHash());
129 std::map<std::string, tallyitem> label_tally;
131 const auto& func = [&](
const CTxDestination& address,
const std::string& label,
bool is_change,
const std::optional<AddressPurpose>& purpose) {
132 if (is_change)
return;
134 auto it = mapTally.find(address);
135 if (it == mapTally.end() && !fIncludeEmpty)
139 int nConf = std::numeric_limits<int>::max();
140 if (it != mapTally.end()) {
141 nAmount = (*it).second.nAmount;
142 nConf = (*it).second.nConf;
153 obj.
pushKV(
"confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf));
154 obj.
pushKV(
"label", label);
156 if (it != mapTally.end()) {
157 for (
const Txid& _item : (*it).second.txids) {
161 obj.
pushKV(
"txids", std::move(transactions));
162 ret.push_back(std::move(obj));
166 if (filtered_address) {
167 const auto& entry =
wallet.FindAddressBookEntry(*filtered_address,
false);
168 if (entry) func(*filtered_address, entry->GetLabel(), entry->IsChange(), entry->purpose);
171 wallet.ForEachAddrBookEntry(func);
175 for (
const auto& entry : label_tally) {
176 CAmount nAmount = entry.second.nAmount;
177 int nConf = entry.second.nConf;
180 obj.
pushKV(
"confirmations", (nConf == std::numeric_limits<int>::max() ? 0 : nConf));
181 obj.
pushKV(
"label", entry.first);
182 ret.push_back(std::move(obj));
192 "listreceivedbyaddress",
193 "List balances by receiving address.\n",
208 {
RPCResult::Type::NUM,
"confirmations",
"The number of confirmations of the most recent transaction included"},
209 {
RPCResult::Type::STR,
"label",
"The label of the receiving address. The default label is \"\""},
220 +
HelpExampleCli(
"listreceivedbyaddress",
"6 true true \"\" true")
231 pwallet->BlockUntilSyncedToCurrentChain();
233 const bool include_immature_coinbase{request.params[4].isNull() ? false : request.params[4].get_bool()};
235 LOCK(pwallet->cs_wallet);
237 return ListReceived(*pwallet, request.params,
false, include_immature_coinbase);
245 "listreceivedbylabel",
246 "List received transactions by label.\n",
259 {
RPCResult::Type::NUM,
"confirmations",
"The number of confirmations of the most recent transaction included"},
260 {
RPCResult::Type::STR,
"label",
"The label of the receiving address. The default label is \"\""},
276 pwallet->BlockUntilSyncedToCurrentChain();
278 const bool include_immature_coinbase{request.params[3].isNull() ? false : request.params[3].get_bool()};
280 LOCK(pwallet->cs_wallet);
282 return ListReceived(*pwallet, request.params,
true, include_immature_coinbase);
306 Vec&
ret,
const std::optional<std::string>& filter_label,
307 bool include_change =
false)
311 std::list<COutputEntry> listReceived;
312 std::list<COutputEntry> listSent;
317 if (!filter_label.has_value())
323 entry.
pushKV(
"category",
"send");
325 const auto* address_book_entry =
wallet.FindAddressBookEntry(
s.destination);
326 if (address_book_entry) {
327 entry.
pushKV(
"label", address_book_entry->GetLabel());
334 ret.push_back(std::move(entry));
339 if (listReceived.size() > 0 &&
wallet.GetTxDepthInMainChain(wtx) >= nMinDepth) {
343 const auto* address_book_entry =
wallet.FindAddressBookEntry(r.destination);
344 if (address_book_entry) {
345 label = address_book_entry->GetLabel();
347 if (filter_label.has_value() && label != filter_label.value()) {
355 if (
wallet.GetTxDepthInMainChain(wtx) < 1)
356 entry.
pushKV(
"category",
"orphan");
357 else if (
wallet.IsTxImmatureCoinBase(wtx))
358 entry.
pushKV(
"category",
"immature");
360 entry.
pushKV(
"category",
"generate");
364 entry.
pushKV(
"category",
"receive");
367 if (address_book_entry) {
368 entry.
pushKV(
"label", label);
370 entry.
pushKV(
"vout", r.vout);
374 ret.push_back(std::move(entry));
382 return{{
RPCResult::Type::NUM,
"confirmations",
"The number of confirmations for the transaction. Negative confirmations means the\n"
383 "transaction conflicted that many blocks ago."},
384 {
RPCResult::Type::BOOL,
"generated",
true,
"Only present if the transaction's only input is a coinbase one."},
385 {
RPCResult::Type::BOOL,
"trusted",
true,
"Whether we consider the transaction to be trusted and safe to spend from.\n"
386 "Only present when the transaction has 0 confirmations (or negative confirmations, if conflicted)."},
389 {
RPCResult::Type::NUM,
"blockindex",
true,
"The index of the transaction in the block that includes it."},
393 {
RPCResult::Type::ARR,
"walletconflicts",
"Confirmed transactions that have been detected by the wallet to conflict with this transaction.",
397 {
RPCResult::Type::STR_HEX,
"replaced_by_txid",
true,
"Only if 'category' is 'send'. The txid if this tx was replaced."},
398 {
RPCResult::Type::STR_HEX,
"replaces_txid",
true,
"Only if 'category' is 'send'. The txid if this tx replaces another."},
399 {
RPCResult::Type::ARR,
"mempoolconflicts",
"Transactions in the mempool that directly conflict with either this transaction or an ancestor transaction",
406 {
RPCResult::Type::STR,
"comment",
true,
"If a comment is associated with the transaction, only present if not empty."},
407 {
RPCResult::Type::STR,
"bip125-replaceable",
"(\"yes|no|unknown\") Whether this transaction signals BIP125 replaceability or has an unconfirmed ancestor signaling BIP125 replaceability.\n"
408 "May be unknown for unconfirmed transactions not in the mempool because their unconfirmed ancestors are unknown."},
409 {
RPCResult::Type::ARR,
"parent_descs",
true,
"Only if 'category' is 'received'. List of parent descriptors for the output script of this coin.", {
419 "If a label name is provided, this will return only incoming transactions paying to addresses with the specified label.\n"
420 "\nReturns up to 'count' most recent transactions skipping the first 'from' transactions.\n",
423 "with the specified label, or \"*\" to disable filtering and return all transactions."},
433 {
RPCResult::Type::STR,
"address",
true,
"The bitcoin address of the transaction (not returned if the output does not have an address, e.g. OP_RETURN null data)."},
435 "\"send\" Transactions sent.\n"
436 "\"receive\" Non-coinbase transactions received.\n"
437 "\"generate\" Coinbase transactions received with more than 100 confirmations.\n"
438 "\"immature\" Coinbase transactions received with 100 or fewer confirmations.\n"
439 "\"orphan\" Orphaned coinbase transactions received."},
441 "for all other categories"},
445 "'send' category of transactions."},
449 {
RPCResult::Type::BOOL,
"abandoned",
"'true' if the transaction has been abandoned (inputs are respendable)."},
454 "\nList the most recent 10 transactions in the systems\n"
456 "\nList transactions 100 to 120\n"
458 "\nAs a JSON-RPC call\n"
468 pwallet->BlockUntilSyncedToCurrentChain();
470 std::optional<std::string> filter_label;
471 if (!request.params[0].isNull() && request.params[0].get_str() !=
"*") {
473 if (filter_label.value().empty()) {
478 if (!request.params[1].isNull())
479 nCount = request.params[1].getInt<
int>();
481 if (!request.params[2].isNull())
482 nFrom = request.params[2].getInt<
int>();
489 std::vector<UniValue>
ret;
491 LOCK(pwallet->cs_wallet);
496 for (CWallet::TxItems::const_reverse_iterator it = txOrdered.rbegin(); it != txOrdered.rend(); ++it)
500 if ((
int)
ret.size() >= (nCount+nFrom))
break;
506 if (nFrom > (
int)
ret.size())
508 if ((nFrom + nCount) > (
int)
ret.size())
509 nCount =
ret.size() - nFrom;
511 auto txs_rev_it{std::make_move_iterator(
ret.rend())};
513 result.push_backV(txs_rev_it - nFrom - nCount, txs_rev_it - nFrom);
523 "Get all transactions in blocks since block [blockhash], or all transactions if omitted.\n"
524 "If \"blockhash\" is no longer a part of the main chain, transactions from the fork point onward are included.\n"
525 "Additionally, if include_removed is set, transactions affecting the wallet which were removed are returned in the \"removed\" array.\n",
528 {
"target_confirmations",
RPCArg::Type::NUM,
RPCArg::Default{1},
"Return the nth block hash from the main chain. e.g. 1 would mean the best block hash. Note: this is not used as a filter, but only affects [lastblock] in the return value"},
531 "(not guaranteed to work on pruned nodes)"},
542 {
RPCResult::Type::STR,
"address",
true,
"The bitcoin address of the transaction (not returned if the output does not have an address, e.g. OP_RETURN null data)."},
544 "\"send\" Transactions sent.\n"
545 "\"receive\" Non-coinbase transactions received.\n"
546 "\"generate\" Coinbase transactions received with more than 100 confirmations.\n"
547 "\"immature\" Coinbase transactions received with 100 or fewer confirmations.\n"
548 "\"orphan\" Orphaned coinbase transactions received."},
550 "for all other categories"},
553 "'send' category of transactions."},
557 {
RPCResult::Type::BOOL,
"abandoned",
"'true' if the transaction has been abandoned (inputs are respendable)."},
561 {
RPCResult::Type::ARR,
"removed",
true,
"<structure is the same as \"transactions\" above, only present if include_removed=true>\n"
562 "Note: transactions that were re-added in the active chain will appear as-is in this array, and may thus have a positive confirmation count."
564 {
RPCResult::Type::STR_HEX,
"lastblock",
"The hash of the block (target_confirmations-1) from the best block on the main chain, or the genesis hash if the referenced block does not exist yet. This is typically used to feed back into listsinceblock the next time you call it. So you would generally use a target_confirmations of say 6, so you will be continually re-notified of transactions until they've reached 6 confirmations plus any new ones"},
569 +
HelpExampleCli(
"listsinceblock",
"\"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\" 6")
570 +
HelpExampleRpc(
"listsinceblock",
"\"000000000000000bacf66f7497b7dc45ef753ee9a7d38571037cdb1a57f663ad\", 6")
580 wallet.BlockUntilSyncedToCurrentChain();
584 std::optional<int> height;
585 std::optional<int> altheight;
586 int target_confirms = 1;
589 if (!request.params[0].isNull() && !request.params[0].get_str().empty()) {
590 blockId =
ParseHashV(request.params[0],
"blockhash");
598 if (!request.params[1].isNull()) {
599 target_confirms = request.params[1].getInt<
int>();
601 if (target_confirms < 1) {
606 bool include_removed = (request.params[3].isNull() || request.params[3].get_bool());
607 bool include_change = (!request.params[4].isNull() && request.params[4].get_bool());
610 std::optional<std::string> filter_label;
611 if (!request.params[5].isNull()) filter_label.emplace(
LabelFromValue(request.params[5]));
613 int depth = height ?
wallet.GetLastBlockHeight() + 1 - *height : -1;
617 for (
const auto& [
_, tx] :
wallet.mapWallet) {
619 if (depth == -1 || abs(
wallet.GetTxDepthInMainChain(tx)) < depth) {
627 while (include_removed && altheight && *altheight > *height) {
633 auto it =
wallet.mapWallet.find(tx->GetHash());
634 if (it !=
wallet.mapWallet.end()) {
645 target_confirms = std::min(target_confirms,
wallet.GetLastBlockHeight() + 1);
649 ret.pushKV(
"transactions", std::move(transactions));
650 if (include_removed)
ret.pushKV(
"removed", std::move(removed));
651 ret.pushKV(
"lastblock", lastblock.
GetHex());
662 "Get detailed information about in-wallet transaction <txid>\n",
667 "Whether to include a `decoded` field containing the decoded transaction (equivalent to RPC decoderawtransaction)"},
674 "'send' category of transactions."},
684 "\"send\" Transactions sent.\n"
685 "\"receive\" Non-coinbase transactions received.\n"
686 "\"generate\" Coinbase transactions received with more than 100 confirmations.\n"
687 "\"immature\" Coinbase transactions received with 100 or fewer confirmations.\n"
688 "\"orphan\" Orphaned coinbase transactions received."},
693 "'send' category of transactions."},
694 {
RPCResult::Type::BOOL,
"abandoned",
"'true' if the transaction has been abandoned (inputs are respendable)."},
695 {
RPCResult::Type::ARR,
"parent_descs",
true,
"Only if 'category' is 'received'. List of parent descriptors for the output script of this coin.", {
701 {
RPCResult::Type::OBJ,
"decoded",
true,
"The decoded transaction (only present when `verbose` is passed)",
703 {
RPCResult::Type::ELISION,
"",
"Equivalent to the RPC decoderawtransaction method, or the RPC getrawtransaction method when `verbose` is passed."},
709 HelpExampleCli(
"gettransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
710 +
HelpExampleCli(
"gettransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\" true")
711 +
HelpExampleCli(
"gettransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\" false true")
712 +
HelpExampleRpc(
"gettransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
721 pwallet->BlockUntilSyncedToCurrentChain();
723 LOCK(pwallet->cs_wallet);
727 bool verbose = request.params[2].isNull() ? false : request.params[2].get_bool();
730 auto it = pwallet->mapWallet.find(hash);
731 if (it == pwallet->mapWallet.end()) {
738 CAmount nNet = nCredit - nDebit;
749 entry.
pushKV(
"details", std::move(details));
756 entry.
pushKV(
"decoded", std::move(decoded));
768 "abandontransaction",
769 "Mark in-wallet transaction <txid> as abandoned\n"
770 "This will mark this transaction and all its in-wallet descendants as abandoned which will allow\n"
771 "for their inputs to be respent. It can be used to replace \"stuck\" or evicted transactions.\n"
772 "It only works on transactions which are not included in a block and are not currently in the mempool.\n"
773 "It has no effect on transactions which are already abandoned.\n",
779 HelpExampleCli(
"abandontransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
780 +
HelpExampleRpc(
"abandontransaction",
"\"1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d\"")
789 pwallet->BlockUntilSyncedToCurrentChain();
791 LOCK(pwallet->cs_wallet);
795 if (!pwallet->mapWallet.count(hash)) {
798 if (!pwallet->AbandonTransaction(hash)) {
811 "Rescan the local blockchain for wallet related transactions.\n"
812 "Note: Use \"getwalletinfo\" to query the scanning progress.\n"
813 "The rescan is significantly faster if block filters are available\n"
814 "(using startup option \"-blockfilterindex=1\").\n",
822 {
RPCResult::Type::NUM,
"start_height",
"The block height where the rescan started (the requested height or 0)"},
823 {
RPCResult::Type::NUM,
"stop_height",
"The height of the last rescanned block. May be null in rare cases if there was a reorg and the call didn't scan any blocks because they were already scanned in the background."},
838 wallet.BlockUntilSyncedToCurrentChain();
845 int start_height = 0;
846 std::optional<int> stop_height;
849 LOCK(pwallet->m_relock_mutex);
851 LOCK(pwallet->cs_wallet);
853 int tip_height = pwallet->GetLastBlockHeight();
855 if (!request.params[0].isNull()) {
856 start_height = request.params[0].getInt<
int>();
857 if (start_height < 0 || start_height > tip_height) {
862 if (!request.params[1].isNull()) {
863 stop_height = request.params[1].getInt<
int>();
864 if (*stop_height < 0 || *stop_height > tip_height) {
866 }
else if (*stop_height < start_height) {
872 if (!pwallet->chain().hasBlocks(pwallet->GetLastBlockHash(), start_height, stop_height)) {
873 if (pwallet->chain().havePruned() && pwallet->chain().getPruneHeight() >= start_height) {
874 throw JSONRPCError(
RPC_MISC_ERROR,
"Can't rescan beyond pruned data. Use RPC call getblockchaininfo to determine your pruned height.");
876 if (pwallet->chain().hasAssumedValidChain()) {
877 throw JSONRPCError(
RPC_MISC_ERROR,
"Failed to rescan unavailable blocks likely due to an in-progress assumeutxo background sync. Check logs or getchainstates RPC for assumeutxo background sync progress and try again later.");
879 throw JSONRPCError(
RPC_MISC_ERROR,
"Failed to rescan unavailable blocks, potentially caused by data corruption. If the issue persists you may want to reindex (see -reindex option).");
882 CHECK_NONFATAL(pwallet->chain().findAncestorByHeight(pwallet->GetLastBlockHash(), start_height,
FoundBlock().hash(start_block)));
886 pwallet->ScanForWalletTransactions(start_block, start_height, stop_height, reserver,
true,
false);
897 response.
pushKV(
"start_height", start_height);
907 "Stops current wallet rescan triggered by an RPC call, e.g. by a rescanblockchain call.\n"
908 "Note: Use \"getwalletinfo\" to query the scanning progress.\n",
912 "\nImport a private key\n"
914 "\nAbort the running wallet rescan\n"
916 "\nAs a JSON-RPC call\n"
924 if (!pwallet->IsScanning() || pwallet->IsAbortingRescan())
return false;
925 pwallet->AbortRescan();
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
Parse a scriptPubKey for the destination.
bool IsValidDestination(const CTxDestination &dest)
Check whether a CTxDestination corresponds to one with an address.
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
int64_t CAmount
Amount in satoshis (Can be negative)
#define CHECK_NONFATAL(condition)
Identity function.
std::vector< CTransactionRef > vtx
An output of a transaction.
void push_back(UniValue val)
void pushKV(std::string key, UniValue val)
std::string GetHex() const
Interface giving clients (wallet processes, maybe other analysis tools in the future) ability to acce...
virtual RBFTransactionState isRBFOptIn(const CTransaction &tx)=0
Check if transaction is RBF opt in.
virtual bool findBlock(const uint256 &hash, const FoundBlock &block={})=0
Return whether node has the block and optionally return block metadata or contents.
Helper for findBlock to selectively return pieces of block data.
std::string GetHex() const
static transaction_identifier FromUint256(const uint256 &id)
A CWallet maintains a set of transactions and balances, and provides the ability to create new transa...
std::multimap< int64_t, CWalletTx * > TxItems
A transaction with a bunch of additional info that only the owner cares about.
RAII object to check and reserve a wallet rescan.
bool reserve(bool with_passphrase=false)
std::string EncodeHexTx(const CTransaction &tx)
void TxToUniv(const CTransaction &tx, const uint256 &block_hash, UniValue &entry, bool include_hex=true, const CTxUndo *txundo=nullptr, TxVerbosity verbosity=TxVerbosity::SHOW_DETAILS)
UniValue ValueFromAmount(const CAmount amount)
const std::string CURRENCY_UNIT
bool IsValidDestinationString(const std::string &str, const CChainParams ¶ms)
CTxDestination DecodeDestination(const std::string &str, std::string &error_msg, std::vector< int > *error_locations)
std::string EncodeDestination(const CTxDestination &dest)
std::shared_ptr< CWallet > GetWalletForJSONRPCRequest(const JSONRPCRequest &request)
Figures out what wallet, if any, to use for a JSONRPCRequest.
RPCHelpMan listreceivedbyaddress()
static std::vector< RPCResult > TransactionDescriptionString()
bool CachedTxIsFromMe(const CWallet &wallet, const CWalletTx &wtx)
bool CachedTxIsTrusted(const CWallet &wallet, const CWalletTx &wtx, std::set< Txid > &trusted_parents)
static const RPCResult RESULT_LAST_PROCESSED_BLOCK
void EnsureWalletIsUnlocked(const CWallet &wallet)
void PushParentDescriptors(const CWallet &wallet, const CScript &script_pubkey, UniValue &entry)
Fetch parent descriptors of this scriptPubKey.
RPCHelpMan abandontransaction()
RPCHelpMan listtransactions()
RPCHelpMan listsinceblock()
std::string LabelFromValue(const UniValue &value)
CAmount CachedTxGetDebit(const CWallet &wallet, const CWalletTx &wtx, bool avoid_reuse)
void AppendLastProcessedBlock(UniValue &entry, const CWallet &wallet)
CAmount CachedTxGetCredit(const CWallet &wallet, const CWalletTx &wtx, bool avoid_reuse)
static UniValue ListReceived(const CWallet &wallet, const UniValue ¶ms, const bool by_label, const bool include_immature_coinbase) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
void CachedTxGetAmounts(const CWallet &wallet, const CWalletTx &wtx, std::list< COutputEntry > &listReceived, std::list< COutputEntry > &listSent, CAmount &nFee, bool include_change)
RPCHelpMan gettransaction()
static void ListTransactions(const CWallet &wallet, const CWalletTx &wtx, int nMinDepth, bool fLong, Vec &ret, const std::optional< std::string > &filter_label, bool include_change=false) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
List transactions based on the given criteria.
RPCHelpMan rescanblockchain()
static void WalletTxToJSON(const CWallet &wallet, const CWalletTx &wtx, UniValue &entry) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
RPCHelpMan listreceivedbylabel()
static void MaybePushAddress(UniValue &entry, const CTxDestination &dest)
RBFTransactionState
The rbf state of unconfirmed transactions.
@ UNKNOWN
Unconfirmed tx that does not signal rbf and is not in the mempool.
@ REPLACEABLE_BIP125
Either this tx or a mempool ancestor signals rbf.
std::shared_ptr< const CTransaction > CTransactionRef
UniValue JSONRPCError(int code, const std::string &message)
@ RPC_MISC_ERROR
General application defined errors.
@ RPC_INVALID_PARAMETER
Invalid, missing or duplicate parameter.
@ RPC_WALLET_ERROR
Wallet errors.
@ RPC_INVALID_ADDRESS_OR_KEY
Invalid address or key.
std::string HelpExampleCli(const std::string &methodname, const std::string &args)
std::string HelpExampleRpc(const std::string &methodname, const std::string &args)
const std::string UNIX_EPOCH_TIME
String used to describe UNIX epoch time in documentation, factored out to a constant for consistency.
const std::string EXAMPLE_ADDRESS[2]
Example bech32 addresses for the RPCExamples help documentation.
uint256 ParseHashV(const UniValue &v, std::string_view name)
Utilities: convert hex-encoded Values (throws error if not hex).
@ STR_HEX
Special type that is a STR with only hex chars.
@ OMITTED
Optional argument for which the default value is omitted from help text for one of two reasons:
@ ELISION
Special type to denote elision (...)
@ NUM_TIME
Special numeric to denote unix epoch time.
@ STR_HEX
Special string with only hex chars.
@ STR_AMOUNT
Special string to represent a floating point amount.
std::optional< int > last_scanned_height
enum wallet::CWallet::ScanResult::@19 status
State of transaction confirmed in a block.
std::vector< Txid > txids
#define EXCLUSIVE_LOCKS_REQUIRED(...)
consteval auto _(util::TranslatedLiteral str)
V Cat(V v1, V &&v2)
Concatenate two vectors, moving elements.