messages.h raw

   1  // Copyright (c) 2009-2010 Satoshi Nakamoto
   2  // Copyright (c) 2009-2020 The Limenka developers
   3  // Distributed under the MIT software license, see the accompanying
   4  // file COPYING or http://www.opensource.org/licenses/mit-license.php.
   5  
   6  //! @file common/messages.h is a home for simple string functions returning
   7  //! descriptive messages that are used in RPC and GUI interfaces or log
   8  //! messages, and are called in different parts of the codebase across
   9  //! node/wallet/gui boundaries.
  10  
  11  #ifndef LIMENKA_COMMON_MESSAGES_H
  12  #define LIMENKA_COMMON_MESSAGES_H
  13  
  14  #include <string>
  15  
  16  struct bilingual_str;
  17  
  18  enum class FeeEstimateMode;
  19  enum class FeeReason;
  20  namespace node {
  21  enum class TransactionError;
  22  } // namespace node
  23  
  24  namespace common {
  25  enum class PSBTError;
  26  bool FeeModeFromString(const std::string& mode_string, FeeEstimateMode& fee_estimate_mode);
  27  std::string StringForFeeReason(FeeReason reason);
  28  std::string FeeModes(const std::string& delimiter);
  29  std::string FeeModeInfo(std::pair<std::string, FeeEstimateMode>& mode);
  30  std::string FeeModesDetail(std::string default_info);
  31  std::string InvalidEstimateModeErrorMessage();
  32  bilingual_str PSBTErrorString(PSBTError error);
  33  bilingual_str TransactionErrorString(const node::TransactionError error);
  34  bilingual_str ResolveErrMsg(const std::string& optname, const std::string& strBind);
  35  bilingual_str InvalidPortErrMsg(const std::string& optname, const std::string& strPort);
  36  bilingual_str AmountHighWarn(const std::string& optname);
  37  bilingual_str AmountErrMsg(const std::string& optname, const std::string& strValue);
  38  } // namespace common
  39  
  40  #endif // LIMENKA_COMMON_MESSAGES_H
  41