2020-02-19 16:40:00 +01:00
|
|
|
// Copyright (c) 2019-2020 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
|
|
|
|
|
|
|
|
#ifdef ENABLE_EXTERNAL_SIGNER
|
|
|
|
#include <wallet/scriptpubkeyman.h>
|
|
|
|
|
|
|
|
class ExternalSignerScriptPubKeyMan : public DescriptorScriptPubKeyMan
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ExternalSignerScriptPubKeyMan(WalletStorage& storage, WalletDescriptor& descriptor)
|
|
|
|
: DescriptorScriptPubKeyMan(storage, descriptor)
|
|
|
|
{}
|
|
|
|
ExternalSignerScriptPubKeyMan(WalletStorage& storage, bool internal)
|
|
|
|
: DescriptorScriptPubKeyMan(storage, internal)
|
|
|
|
{}
|
|
|
|
|
|
|
|
/** Provide a descriptor at setup time
|
|
|
|
* Returns false if already setup or setup fails, true if setup is successful
|
|
|
|
*/
|
|
|
|
bool SetupDescriptor(std::unique_ptr<Descriptor>desc);
|
2019-10-31 10:27:47 +01:00
|
|
|
|
|
|
|
static ExternalSigner GetExternalSigner();
|
|
|
|
|
2020-02-19 14:33:37 +01:00
|
|
|
bool DisplayAddress(const CScript scriptPubKey, const ExternalSigner &signer) const;
|
2020-02-19 16:40:00 +01:00
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
|