2021-12-30 14:36:57 -03:00
|
|
|
// Copyright (c) 2019-2021 The Bitcoin Core developers
|
2020-02-19 12:40:00 -03:00
|
|
|
// 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>
|
|
|
|
|
2021-04-13 03:02:10 -04:00
|
|
|
#include <memory>
|
|
|
|
|
2020-02-19 12:40:00 -03:00
|
|
|
class ExternalSignerScriptPubKeyMan : public DescriptorScriptPubKeyMan
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ExternalSignerScriptPubKeyMan(WalletStorage& storage, WalletDescriptor& descriptor)
|
|
|
|
: DescriptorScriptPubKeyMan(storage, descriptor)
|
|
|
|
{}
|
2021-06-29 02:29:25 -04:00
|
|
|
ExternalSignerScriptPubKeyMan(WalletStorage& storage)
|
|
|
|
: DescriptorScriptPubKeyMan(storage)
|
2020-02-19 12:40:00 -03:00
|
|
|
{}
|
|
|
|
|
|
|
|
/** 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 06:27:47 -03:00
|
|
|
|
|
|
|
static ExternalSigner GetExternalSigner();
|
|
|
|
|
2020-02-19 10:33:37 -03:00
|
|
|
bool DisplayAddress(const CScript scriptPubKey, const ExternalSigner &signer) const;
|
2019-08-04 17:26:01 -04:00
|
|
|
|
2021-07-20 21:24:56 -04:00
|
|
|
TransactionError FillPSBT(PartiallySignedTransaction& psbt, const PrecomputedTransactionData& txdata, int sighash_type = 1 /* SIGHASH_ALL */, bool sign = true, bool bip32derivs = false, int* n_signed = nullptr, bool finalize = true) const override;
|
2020-02-19 12:40:00 -03:00
|
|
|
};
|
|
|
|
#endif // BITCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
|