mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
-BEGIN VERIFY SCRIPT- sed --in-place --regexp-extended \ 's;( 20[0-2][0-9])(-20[0-2][0-9])? The Bitcoin Core developers;\1-present The Bitcoin Core developers;g' \ $( git grep -l 'The Bitcoin Core developers' -- ':(exclude)COPYING' ':(exclude)src/ipc/libmultiprocess' ':(exclude)src/minisketch' ) -END VERIFY SCRIPT-
43 lines
1.7 KiB
C++
43 lines
1.7 KiB
C++
// Copyright (c) 2019-present The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
|
|
#define BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
|
|
|
|
#include <wallet/scriptpubkeyman.h>
|
|
|
|
#include <memory>
|
|
#include <util/result.h>
|
|
|
|
struct bilingual_str;
|
|
|
|
namespace wallet {
|
|
class ExternalSignerScriptPubKeyMan : public DescriptorScriptPubKeyMan
|
|
{
|
|
public:
|
|
ExternalSignerScriptPubKeyMan(WalletStorage& storage, WalletDescriptor& descriptor, int64_t keypool_size)
|
|
: DescriptorScriptPubKeyMan(storage, descriptor, keypool_size)
|
|
{}
|
|
ExternalSignerScriptPubKeyMan(WalletStorage& storage, int64_t keypool_size)
|
|
: DescriptorScriptPubKeyMan(storage, keypool_size)
|
|
{}
|
|
|
|
/** Provide a descriptor at setup time
|
|
* Returns false if already setup or setup fails, true if setup is successful
|
|
*/
|
|
bool SetupDescriptor(WalletBatch& batch, std::unique_ptr<Descriptor>desc);
|
|
|
|
static util::Result<ExternalSigner> GetExternalSigner();
|
|
|
|
/**
|
|
* Display address on the device and verify that the returned value matches.
|
|
* @returns nothing or an error message
|
|
*/
|
|
util::Result<void> DisplayAddress(const CTxDestination& dest, const ExternalSigner& signer) const;
|
|
|
|
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;
|
|
};
|
|
} // namespace wallet
|
|
#endif // BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
|