import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import * as _m0 from "protobufjs/minimal";
import { MsgCreateFeed, MsgCreateFeedResponse, MsgUpdateFeed, MsgUpdateFeedResponse, MsgTransmit, MsgTransmitResponse, MsgFundFeedRewardPool, MsgFundFeedRewardPoolResponse, MsgWithdrawFeedRewardPool, MsgWithdrawFeedRewardPoolResponse, MsgSetPayees, MsgSetPayeesResponse, MsgTransferPayeeship, MsgTransferPayeeshipResponse, MsgAcceptPayeeship, MsgAcceptPayeeshipResponse } from "./tx";
/** Msg defines the OCR Msg service. */

export class MsgClientImpl {
  constructor(rpc) {
    _defineProperty(this, "rpc", void 0);
    this.rpc = rpc;
    this.createFeed = this.createFeed.bind(this);
    this.updateFeed = this.updateFeed.bind(this);
    this.transmit = this.transmit.bind(this);
    this.fundFeedRewardPool = this.fundFeedRewardPool.bind(this);
    this.withdrawFeedRewardPool = this.withdrawFeedRewardPool.bind(this);
    this.setPayees = this.setPayees.bind(this);
    this.transferPayeeship = this.transferPayeeship.bind(this);
    this.acceptPayeeship = this.acceptPayeeship.bind(this);
  }
  createFeed(request) {
    const data = MsgCreateFeed.encode(request).finish();
    const promise = this.rpc.request("injective.ocr.v1beta1.Msg", "CreateFeed", data);
    return promise.then(data => MsgCreateFeedResponse.decode(new _m0.Reader(data)));
  }
  updateFeed(request) {
    const data = MsgUpdateFeed.encode(request).finish();
    const promise = this.rpc.request("injective.ocr.v1beta1.Msg", "UpdateFeed", data);
    return promise.then(data => MsgUpdateFeedResponse.decode(new _m0.Reader(data)));
  }
  transmit(request) {
    const data = MsgTransmit.encode(request).finish();
    const promise = this.rpc.request("injective.ocr.v1beta1.Msg", "Transmit", data);
    return promise.then(data => MsgTransmitResponse.decode(new _m0.Reader(data)));
  }
  fundFeedRewardPool(request) {
    const data = MsgFundFeedRewardPool.encode(request).finish();
    const promise = this.rpc.request("injective.ocr.v1beta1.Msg", "FundFeedRewardPool", data);
    return promise.then(data => MsgFundFeedRewardPoolResponse.decode(new _m0.Reader(data)));
  }
  withdrawFeedRewardPool(request) {
    const data = MsgWithdrawFeedRewardPool.encode(request).finish();
    const promise = this.rpc.request("injective.ocr.v1beta1.Msg", "WithdrawFeedRewardPool", data);
    return promise.then(data => MsgWithdrawFeedRewardPoolResponse.decode(new _m0.Reader(data)));
  }
  setPayees(request) {
    const data = MsgSetPayees.encode(request).finish();
    const promise = this.rpc.request("injective.ocr.v1beta1.Msg", "SetPayees", data);
    return promise.then(data => MsgSetPayeesResponse.decode(new _m0.Reader(data)));
  }
  transferPayeeship(request) {
    const data = MsgTransferPayeeship.encode(request).finish();
    const promise = this.rpc.request("injective.ocr.v1beta1.Msg", "TransferPayeeship", data);
    return promise.then(data => MsgTransferPayeeshipResponse.decode(new _m0.Reader(data)));
  }
  acceptPayeeship(request) {
    const data = MsgAcceptPayeeship.encode(request).finish();
    const promise = this.rpc.request("injective.ocr.v1beta1.Msg", "AcceptPayeeship", data);
    return promise.then(data => MsgAcceptPayeeshipResponse.decode(new _m0.Reader(data)));
  }
}