import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import * as _m0 from "protobufjs/minimal";
import { MsgRelayProviderPrices, MsgRelayProviderPricesResponse, MsgRelayPriceFeedPrice, MsgRelayPriceFeedPriceResponse, MsgRelayBandRates, MsgRelayBandRatesResponse, MsgRequestBandIBCRates, MsgRequestBandIBCRatesResponse, MsgRelayCoinbaseMessages, MsgRelayCoinbaseMessagesResponse } from "./tx";
/** Msg defines the oracle Msg service. */

export class MsgClientImpl {
  constructor(rpc) {
    _defineProperty(this, "rpc", void 0);
    this.rpc = rpc;
    this.relayProviderPrices = this.relayProviderPrices.bind(this);
    this.relayPriceFeedPrice = this.relayPriceFeedPrice.bind(this);
    this.relayBandRates = this.relayBandRates.bind(this);
    this.requestBandIBCRates = this.requestBandIBCRates.bind(this);
    this.relayCoinbaseMessages = this.relayCoinbaseMessages.bind(this);
  }
  relayProviderPrices(request) {
    const data = MsgRelayProviderPrices.encode(request).finish();
    const promise = this.rpc.request("injective.oracle.v1beta1.Msg", "RelayProviderPrices", data);
    return promise.then(data => MsgRelayProviderPricesResponse.decode(new _m0.Reader(data)));
  }
  relayPriceFeedPrice(request) {
    const data = MsgRelayPriceFeedPrice.encode(request).finish();
    const promise = this.rpc.request("injective.oracle.v1beta1.Msg", "RelayPriceFeedPrice", data);
    return promise.then(data => MsgRelayPriceFeedPriceResponse.decode(new _m0.Reader(data)));
  }
  relayBandRates(request) {
    const data = MsgRelayBandRates.encode(request).finish();
    const promise = this.rpc.request("injective.oracle.v1beta1.Msg", "RelayBandRates", data);
    return promise.then(data => MsgRelayBandRatesResponse.decode(new _m0.Reader(data)));
  }
  requestBandIBCRates(request) {
    const data = MsgRequestBandIBCRates.encode(request).finish();
    const promise = this.rpc.request("injective.oracle.v1beta1.Msg", "RequestBandIBCRates", data);
    return promise.then(data => MsgRequestBandIBCRatesResponse.decode(new _m0.Reader(data)));
  }
  relayCoinbaseMessages(request) {
    const data = MsgRelayCoinbaseMessages.encode(request).finish();
    const promise = this.rpc.request("injective.oracle.v1beta1.Msg", "RelayCoinbaseMessages", data);
    return promise.then(data => MsgRelayCoinbaseMessagesResponse.decode(new _m0.Reader(data)));
  }
}