LCOV - code coverage report
Current view: top level - src/interfaces - coinjoin.h (source / functions) Hit Total Coverage
Test: test_dash_coverage.info Lines: 1 2 50.0 %
Date: 2026-06-25 07:23:51 Functions: 2 8 25.0 %

          Line data    Source code
       1             : // Copyright (c) 2024-2025 The Dash 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_INTERFACES_COINJOIN_H
       6             : #define BITCOIN_INTERFACES_COINJOIN_H
       7             : 
       8             : #include <memory>
       9             : #include <string>
      10             : #include <vector>
      11             : 
      12             : namespace node {
      13             : struct NodeContext;
      14             : } // namespace node
      15             : namespace wallet {
      16             : class CWallet;
      17             : } // namespace wallet
      18             : 
      19             : class UniValue;
      20             : 
      21             : namespace interfaces {
      22             : namespace CoinJoin {
      23             : //! Interface for the wallet constrained src/coinjoin part of a dash node (dashd process).
      24             : class Client
      25             : {
      26             : public:
      27           0 :     virtual ~Client() {}
      28             :     virtual void resetCachedBlocks() = 0;
      29             :     virtual void resetPool() = 0;
      30             :     virtual int getCachedBlocks() = 0;
      31             :     virtual void getJsonInfo(UniValue& obj) = 0;
      32             :     virtual std::vector<std::string> getSessionStatuses() = 0;
      33             :     virtual std::string getSessionDenoms() = 0;
      34             :     virtual void setCachedBlocks(int nCachedBlocks) = 0;
      35             :     virtual void disableAutobackups() = 0;
      36             :     virtual bool isMixing() = 0;
      37             :     virtual bool startMixing() = 0;
      38             :     virtual void stopMixing() = 0;
      39             : };
      40             : class Loader
      41             : {
      42             : public:
      43         199 :     virtual ~Loader() {}
      44             :     //! Add new wallet to CoinJoin client manager
      45             :     virtual void AddWallet(const std::shared_ptr<wallet::CWallet>&) = 0;
      46             :     //! Remove wallet from CoinJoin client manager
      47             :     virtual void RemoveWallet(const std::string&) = 0;
      48             :     virtual void FlushWallet(const std::string&) = 0;
      49             :     virtual std::unique_ptr<CoinJoin::Client> GetClient(const std::string&) = 0;
      50             : };
      51             : } // namespace CoinJoin
      52             : 
      53             : std::unique_ptr<CoinJoin::Loader> MakeCoinJoinLoader(node::NodeContext& node);
      54             : 
      55             : } // namespace interfaces
      56             : 
      57             : #endif // BITCOIN_INTERFACES_COINJOIN_H

Generated by: LCOV version 1.16