import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
export class LCDQueryClient {
  constructor({
    requestClient
  }) {
    _defineProperty(this, "req", void 0);
    this.req = requestClient;
    this.params = this.params.bind(this);
    this.bandRelayers = this.bandRelayers.bind(this);
    this.bandPriceStates = this.bandPriceStates.bind(this);
    this.bandIBCPriceStates = this.bandIBCPriceStates.bind(this);
    this.priceFeedPriceStates = this.priceFeedPriceStates.bind(this);
    this.coinbasePriceStates = this.coinbasePriceStates.bind(this);
    this.providerPriceState = this.providerPriceState.bind(this);
    this.oracleModuleState = this.oracleModuleState.bind(this);
    this.historicalPriceRecords = this.historicalPriceRecords.bind(this);
    this.oracleVolatility = this.oracleVolatility.bind(this);
    this.oracleProvidersInfo = this.oracleProvidersInfo.bind(this);
    this.oracleProviderPrices = this.oracleProviderPrices.bind(this);
  }
  /* Retrieves oracle params */

  async params(_params = {}) {
    const endpoint = `injective/oracle/v1beta1/params`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the band relayers */

  async bandRelayers(_params = {}) {
    const endpoint = `injective/oracle/v1beta1/band_relayers`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the state for all band price feeds */

  async bandPriceStates(_params = {}) {
    const endpoint = `injective/oracle/v1beta1/band_price_states`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the state for all band ibc price feeds */

  async bandIBCPriceStates(_params = {}) {
    const endpoint = `injective/oracle/v1beta1/band_ibc_price_states`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the state for all price feeds */

  async priceFeedPriceStates(_params = {}) {
    const endpoint = `injective/oracle/v1beta1/pricefeed_price_states`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the state for all coinbase price feeds */

  async coinbasePriceStates(_params = {}) {
    const endpoint = `injective/oracle/v1beta1/coinbase_price_states`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the state for all provider price feeds */

  async providerPriceState(params) {
    const endpoint = `injective/oracle/v1beta1/provider_price_state/${params.provider}/${params.symbol}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the entire oracle module's state */

  async oracleModuleState(_params = {}) {
    const endpoint = `injective/oracle/v1beta1/module_state`;
    return await this.req.get(endpoint);
  }
  /* Retrieves historical price records for a given OracleType and Symbol */

  async historicalPriceRecords(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.oracle) !== "undefined") {
      options.params.oracle = params.oracle;
    }
    if (typeof (params === null || params === void 0 ? void 0 : params.symbolId) !== "undefined") {
      options.params.symbol_id = params.symbolId;
    }
    const endpoint = `injective/oracle/v1beta1/historical_price_records`;
    return await this.req.get(endpoint, options);
  }
  /* Retrieves mixed volatility value for the specified pair of base/quote */

  async oracleVolatility(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.baseInfo) !== "undefined") {
      options.params.base_info = params.baseInfo;
    }
    if (typeof (params === null || params === void 0 ? void 0 : params.quoteInfo) !== "undefined") {
      options.params.quote_info = params.quoteInfo;
    }
    if (typeof (params === null || params === void 0 ? void 0 : params.oracleHistoryOptions) !== "undefined") {
      options.params.oracle_history_options = params.oracleHistoryOptions;
    }
    const endpoint = `injective/oracle/v1beta1/volatility`;
    return await this.req.get(endpoint, options);
  }
  /* OracleProvidersInfo */

  async oracleProvidersInfo(_params = {}) {
    const endpoint = `injective/oracle/v1beta1/providers`;
    return await this.req.get(endpoint);
  }
  /* OracleProviderPrices */

  async oracleProviderPrices(params) {
    const options = {
      params: {}
    };
    if (typeof (params === null || params === void 0 ? void 0 : params.provider) !== "undefined") {
      options.params.provider = params.provider;
    }
    const endpoint = `injective/oracle/v1beta1/provider_prices`;
    return await this.req.get(endpoint, options);
  }
}