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