import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import * as _m0 from "protobufjs/minimal";
import { MsgCreateSchedule, MsgCreateScheduleResponse, MsgTerminateSchedules, MsgTerminateSchedulesResponse } from "./tx";
/** Msg defines the incentives module's Msg service */

export class MsgClientImpl {
  constructor(rpc) {
    _defineProperty(this, "rpc", void 0);
    this.rpc = rpc;
    this.createSchedule = this.createSchedule.bind(this);
    this.terminateSchedules = this.terminateSchedules.bind(this);
  }
  createSchedule(request) {
    const data = MsgCreateSchedule.encode(request).finish();
    const promise = this.rpc.request("mars.incentives.v1beta1.Msg", "CreateSchedule", data);
    return promise.then(data => MsgCreateScheduleResponse.decode(new _m0.Reader(data)));
  }
  terminateSchedules(request) {
    const data = MsgTerminateSchedules.encode(request).finish();
    const promise = this.rpc.request("mars.incentives.v1beta1.Msg", "TerminateSchedules", data);
    return promise.then(data => MsgTerminateSchedulesResponse.decode(new _m0.Reader(data)));
  }
}