aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/rpc/util.h
diff options
context:
space:
mode:
authorAntoine Poinsot <darosior@protonmail.com>2022-06-29 19:04:48 +0200
committerAntoine Poinsot <darosior@protonmail.com>2022-07-19 12:46:01 +0200
commitb724476158a7dfeef9edfda3f519dfd6f93202a8 (patch)
treec5b5f53acb4f58c6ddc9d155c515c877e37a186b /src/wallet/rpc/util.h
parent55a82eaf91d252a04a0cc8ad7d948d956c6cb24f (diff)
rpc: output wallet descriptors for received entries in listsinceblock
The descriptor wallets allow an application to track coins of multiple descriptors in a single wallet. However, such an application would not previously be able to (easily) tell what received coin "belongs" to what descriptor. This commit tackles this issues by adding a "wallet_desc" entry to the entries for received coins in 'listsinceblock'.
Diffstat (limited to 'src/wallet/rpc/util.h')
-rw-r--r--src/wallet/rpc/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/rpc/util.h b/src/wallet/rpc/util.h
index 7b810eb06e..2ca28914e7 100644
--- a/src/wallet/rpc/util.h
+++ b/src/wallet/rpc/util.h
@@ -5,6 +5,8 @@
#ifndef BITCOIN_WALLET_RPC_UTIL_H
#define BITCOIN_WALLET_RPC_UTIL_H
+#include <script/script.h>
+
#include <any>
#include <memory>
#include <string>
@@ -39,6 +41,8 @@ const LegacyScriptPubKeyMan& EnsureConstLegacyScriptPubKeyMan(const CWallet& wal
bool GetAvoidReuseFlag(const CWallet& wallet, const UniValue& param);
bool ParseIncludeWatchonly(const UniValue& include_watchonly, const CWallet& wallet);
std::string LabelFromValue(const UniValue& value);
+//! Fetch parent descriptors of this scriptPubKey.
+void PushParentDescriptors(const CWallet& wallet, const CScript& script_pubkey, UniValue& entry);
void HandleWalletError(const std::shared_ptr<CWallet> wallet, DatabaseStatus& status, bilingual_str& error);
} // namespace wallet