run_command.h raw

   1  // Copyright (c) 2022 The Limenka 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 LIMENKA_COMMON_RUN_COMMAND_H
   6  #define LIMENKA_COMMON_RUN_COMMAND_H
   7  
   8  #include <string>
   9  
  10  class UniValue;
  11  
  12  /**
  13   * Execute a command which returns JSON, and parse the result.
  14   *
  15   * @param str_command The command to execute, including any arguments
  16   * @param str_std_in string to pass to stdin
  17   * @return parsed JSON
  18   */
  19  UniValue RunCommandParseJSON(const std::string& str_command, const std::string& str_std_in="");
  20  
  21  #endif // LIMENKA_COMMON_RUN_COMMAND_H
  22