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.feedConfig = this.feedConfig.bind(this);
    this.feedConfigInfo = this.feedConfigInfo.bind(this);
    this.latestRound = this.latestRound.bind(this);
    this.latestTransmissionDetails = this.latestTransmissionDetails.bind(this);
    this.owedAmount = this.owedAmount.bind(this);
    this.ocrModuleState = this.ocrModuleState.bind(this);
  }
  /* Params */

  async params(_params = {}) {
    const endpoint = `chainlink/ocr/v1beta1/params`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the OCR FeedConfig for a given FeedId */

  async feedConfig(params) {
    const endpoint = `chainlink/ocr/v1beta1/feed_config/${params.feedId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the OCR FeedConfigInfo for a given FeedId */

  async feedConfigInfo(params) {
    const endpoint = `chainlink/ocr/v1beta1/feed_config_info/${params.feedId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves latest round ID and data, including median answer for that round */

  async latestRound(params) {
    const endpoint = `chainlink/ocr/v1beta1/latest_round/${params.feedId}`;
    return await this.req.get(endpoint);
  }
  /* LatestTransmissionDetails returns details about the latest trasmission recorded on chain for the given feed ID. */

  async latestTransmissionDetails(params) {
    const endpoint = `chainlink/ocr/v1beta1/latest_transmission_details/${params.feedId}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves transmitter's owed amount */

  async owedAmount(params) {
    const endpoint = `chainlink/ocr/v1beta1/owed_amount/${params.transmitter}`;
    return await this.req.get(endpoint);
  }
  /* Retrieves the entire OCR module's state */

  async ocrModuleState(_params = {}) {
    const endpoint = `chainlink/ocr/v1beta1/module_state`;
    return await this.req.get(endpoint);
  }
}