"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MsgClientImpl = void 0;
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _m0 = _interopRequireWildcard(require("protobufjs/minimal"));
var _tx = require("./tx");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
//@ts-nocheck
/** Msg defines the liquid staking Msg service. */
var MsgClientImpl = exports.MsgClientImpl = /*#__PURE__*/function () {
  function MsgClientImpl(rpc) {
    (0, _classCallCheck2["default"])(this, MsgClientImpl);
    (0, _defineProperty2["default"])(this, "rpc", void 0);
    this.rpc = rpc;
    this.liquidStake = this.liquidStake.bind(this);
    this.liquidUnstake = this.liquidUnstake.bind(this);
    this.updateParams = this.updateParams.bind(this);
    this.updateWhitelistedValidators = this.updateWhitelistedValidators.bind(this);
    this.updateWeightedRewardsReceivers = this.updateWeightedRewardsReceivers.bind(this);
    this.setModulePaused = this.setModulePaused.bind(this);
    this.burn = this.burn.bind(this);
  }
  return (0, _createClass2["default"])(MsgClientImpl, [{
    key: "liquidStake",
    value: function liquidStake(request) {
      var data = _tx.MsgLiquidStake.encode(request).finish();
      var promise = this.rpc.request("ixo.liquidstake.v1beta1.Msg", "LiquidStake", data);
      return promise.then(function (data) {
        return _tx.MsgLiquidStakeResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "liquidUnstake",
    value: function liquidUnstake(request) {
      var data = _tx.MsgLiquidUnstake.encode(request).finish();
      var promise = this.rpc.request("ixo.liquidstake.v1beta1.Msg", "LiquidUnstake", data);
      return promise.then(function (data) {
        return _tx.MsgLiquidUnstakeResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "updateParams",
    value: function updateParams(request) {
      var data = _tx.MsgUpdateParams.encode(request).finish();
      var promise = this.rpc.request("ixo.liquidstake.v1beta1.Msg", "UpdateParams", data);
      return promise.then(function (data) {
        return _tx.MsgUpdateParamsResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "updateWhitelistedValidators",
    value: function updateWhitelistedValidators(request) {
      var data = _tx.MsgUpdateWhitelistedValidators.encode(request).finish();
      var promise = this.rpc.request("ixo.liquidstake.v1beta1.Msg", "UpdateWhitelistedValidators", data);
      return promise.then(function (data) {
        return _tx.MsgUpdateWhitelistedValidatorsResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "updateWeightedRewardsReceivers",
    value: function updateWeightedRewardsReceivers(request) {
      var data = _tx.MsgUpdateWeightedRewardsReceivers.encode(request).finish();
      var promise = this.rpc.request("ixo.liquidstake.v1beta1.Msg", "UpdateWeightedRewardsReceivers", data);
      return promise.then(function (data) {
        return _tx.MsgUpdateWeightedRewardsReceiversResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "setModulePaused",
    value: function setModulePaused(request) {
      var data = _tx.MsgSetModulePaused.encode(request).finish();
      var promise = this.rpc.request("ixo.liquidstake.v1beta1.Msg", "SetModulePaused", data);
      return promise.then(function (data) {
        return _tx.MsgSetModulePausedResponse.decode(new _m0.Reader(data));
      });
    }
  }, {
    key: "burn",
    value: function burn(request) {
      var data = _tx.MsgBurn.encode(request).finish();
      var promise = this.rpc.request("ixo.liquidstake.v1beta1.Msg", "Burn", data);
      return promise.then(function (data) {
        return _tx.MsgBurnResponse.decode(new _m0.Reader(data));
      });
    }
  }]);
}();