text: // Copyright (c) 2019-2020 The Garliccoin Core developers
  // Distributed under the MIT software license, see the accompanying
  // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  
  #ifndef GARLICCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
  #define GARLICCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
  
  #ifdef ENABLE_EXTERNAL_SIGNER
  #include <wallet/scriptpubkeyman.h>
  
  #include <memory>
  
  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);
  
    static ExternalSigner GetExternalSigner();
  
    bool DisplayAddress(const CScript scriptPubKey, const ExternalSigner &signer) const;
  
    TransactionError FillPSBT(PartiallySignedTransaction& psbt, int sighash_type = 1 /* SIGHASH_ALL */, bool sign = true, bool bip32derivs = false, int* n_signed = nullptr) const override;
  };
  #endif
  
  #endif // GARLICCOIN_WALLET_EXTERNAL_SIGNER_SCRIPTPUBKEYMAN_H
  