"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.registry = exports.load = exports.MessageComposer = void 0;
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _tx = require("./tx");
var registry = exports.registry = [["/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", _tx.MsgSetWithdrawAddress], ["/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", _tx.MsgWithdrawDelegatorReward], ["/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission", _tx.MsgWithdrawValidatorCommission], ["/cosmos.distribution.v1beta1.MsgFundCommunityPool", _tx.MsgFundCommunityPool]];
var load = exports.load = function load(protoRegistry) {
  registry.forEach(function (_ref) {
    var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
      typeUrl = _ref2[0],
      mod = _ref2[1];
    protoRegistry.register(typeUrl, mod);
  });
};
var MessageComposer = exports.MessageComposer = {
  encoded: {
    setWithdrawAddress: function setWithdrawAddress(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
        value: _tx.MsgSetWithdrawAddress.encode(value).finish()
      };
    },
    withdrawDelegatorReward: function withdrawDelegatorReward(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
        value: _tx.MsgWithdrawDelegatorReward.encode(value).finish()
      };
    },
    withdrawValidatorCommission: function withdrawValidatorCommission(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
        value: _tx.MsgWithdrawValidatorCommission.encode(value).finish()
      };
    },
    fundCommunityPool: function fundCommunityPool(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool",
        value: _tx.MsgFundCommunityPool.encode(value).finish()
      };
    }
  },
  withTypeUrl: {
    setWithdrawAddress: function setWithdrawAddress(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
        value: value
      };
    },
    withdrawDelegatorReward: function withdrawDelegatorReward(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
        value: value
      };
    },
    withdrawValidatorCommission: function withdrawValidatorCommission(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
        value: value
      };
    },
    fundCommunityPool: function fundCommunityPool(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool",
        value: value
      };
    }
  },
  fromJSON: {
    setWithdrawAddress: function setWithdrawAddress(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
        value: _tx.MsgSetWithdrawAddress.fromJSON(value)
      };
    },
    withdrawDelegatorReward: function withdrawDelegatorReward(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
        value: _tx.MsgWithdrawDelegatorReward.fromJSON(value)
      };
    },
    withdrawValidatorCommission: function withdrawValidatorCommission(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
        value: _tx.MsgWithdrawValidatorCommission.fromJSON(value)
      };
    },
    fundCommunityPool: function fundCommunityPool(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool",
        value: _tx.MsgFundCommunityPool.fromJSON(value)
      };
    }
  },
  fromPartial: {
    setWithdrawAddress: function setWithdrawAddress(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgSetWithdrawAddress",
        value: _tx.MsgSetWithdrawAddress.fromPartial(value)
      };
    },
    withdrawDelegatorReward: function withdrawDelegatorReward(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward",
        value: _tx.MsgWithdrawDelegatorReward.fromPartial(value)
      };
    },
    withdrawValidatorCommission: function withdrawValidatorCommission(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission",
        value: _tx.MsgWithdrawValidatorCommission.fromPartial(value)
      };
    },
    fundCommunityPool: function fundCommunityPool(value) {
      return {
        typeUrl: "/cosmos.distribution.v1beta1.MsgFundCommunityPool",
        value: _tx.MsgFundCommunityPool.fromPartial(value)
      };
    }
  }
};