Coverage Report

Created: 2025-06-10 13:21

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/bitcoin/src/wallet/external_signer_scriptpubkeyman.h
Line
Count
Source
1
// Copyright (c) 2019-2021 The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
6
#define BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
7
8
#include <wallet/scriptpubkeyman.h>
9
10
#include <memory>
11
12
struct bilingual_str;
13
14
namespace wallet {
15
class ExternalSignerScriptPubKeyMan : public DescriptorScriptPubKeyMan
16
{
17
  public:
18
  ExternalSignerScriptPubKeyMan(WalletStorage& storage, WalletDescriptor& descriptor, int64_t keypool_size)
19
0
      :   DescriptorScriptPubKeyMan(storage, descriptor, keypool_size)
20
0
      {}
21
  ExternalSignerScriptPubKeyMan(WalletStorage& storage, int64_t keypool_size)
22
0
      :   DescriptorScriptPubKeyMan(storage, keypool_size)
23
0
      {}
24
25
  /** Provide a descriptor at setup time
26
  * Returns false if already setup or setup fails, true if setup is successful
27
  */
28
  bool SetupDescriptor(WalletBatch& batch, std::unique_ptr<Descriptor>desc);
29
30
  static ExternalSigner GetExternalSigner();
31
32
  /**
33
  * Display address on the device and verify that the returned value matches.
34
  * @returns nothing or an error message
35
  */
36
 util::Result<void> DisplayAddress(const CTxDestination& dest, const ExternalSigner& signer) const;
37
38
  std::optional<common::PSBTError> FillPSBT(PartiallySignedTransaction& psbt, const PrecomputedTransactionData& txdata, std::optional<int> sighash_type = std::nullopt, bool sign = true, bool bip32derivs = false, int* n_signed = nullptr, bool finalize = true) const override;
39
};
40
} // namespace wallet
41
#endif // BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H