text: /**
   * ----------------------------------------------------------------------------------------------------
   * Get Litecoin Block Hash [Run]
   *
   * @description - Get litecoin block hash using the Tatum API
   *
   * @author    Buildable Technologies Inc.
   * @access    open
   * @license   MIT
   * @docs      https://tatum.io/apidoc.php#operation/LtcGetBlockHash
   *
   * ----------------------------------------------------------------------------------------------------
   */
  
  const axios = require("axios");
  
  /**
   * The Node’s executable function
   *
   * @param {Run} input - Data passed to your Node from the input function
   */
  const run = async (input) => {
    const { TATUM_API_KEY, TATUM_API_URL, i } = input;
  
    verifyInput(input);
  
    try {
      const { data } = await axios({
        method: "get",
        url: `${TATUM_API_URL}/v3/litecoin/block/hash/${i}`,
        headers: { "x-api-key": TATUM_API_KEY },
      });
  
      return data;
    } catch (error) {
      return {
        failed: true,
        message: error.message,
        data: error.response.data,
      };
    }
  };
  
  /**
   * Verifies the input parameters
   */
  const verifyInput = ({ TATUM_API_KEY, TATUM_API_URL, i }) => {
    const ERRORS = {
      INVALID_TATUM_API_KEY:
        "A valid TATUM_API_KEY field (string) was not provided in the input.",
      INVALID_TATUM_API_URL:
        "A valid TATUM_API_URL field (string) was not provided in the input.",
      INVALID_I: "A valid i field (number) was not provided in the input.",
    };
  
    if (typeof TATUM_API_KEY !== "string")
      throw new Error(ERRORS.INVALID_TATUM_API_KEY);
    if (typeof TATUM_API_URL !== "string")
      throw new Error(ERRORS.INVALID_TATUM_API_URL);
    if (typeof i !== "number") throw new Error(ERRORS.INVALID_I);
  };
  