"use strict";

var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MsgUpdateEntityVerifiedResponse = exports.MsgUpdateEntityVerified = exports.MsgUpdateEntityResponse = exports.MsgUpdateEntity = exports.MsgTransferEntityResponse = exports.MsgTransferEntity = exports.MsgRevokeEntityAccountAuthzResponse = exports.MsgRevokeEntityAccountAuthz = exports.MsgGrantEntityAccountAuthzResponse = exports.MsgGrantEntityAccountAuthz = exports.MsgCreateEntityResponse = exports.MsgCreateEntityAccountResponse = exports.MsgCreateEntityAccount = exports.MsgCreateEntity = void 0;
var _types = require("../../iid/v1beta1/types");
var _tx = require("../../iid/v1beta1/tx");
var _timestamp = require("../../../google/protobuf/timestamp");
var _authz = require("../../../cosmos/authz/v1beta1/authz");
var _m0 = _interopRequireWildcard(require("protobufjs/minimal"));
var _helpers = require("../../../helpers");
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); }
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } //@ts-nocheck
/**
 * Updates the entity with all the fields, so if field empty will be updated
 * with default go type, aka never null
 */

/**
 * Updates the entity with all the fields, so if field empty will be updated
 * with default go type, aka never null
 */

/** Only relayer nodes can update entity field 'entityVerified' */

/** Only relayer nodes can update entity field 'entityVerified' */

/** create a module account for an entity */

/** create a module account for an entity */

/**
 * Create a authz grant from entity account (as grantor) to recipient in msg as
 * grantee for the specific authorization
 */

/**
 * Create a authz grant from entity account (as grantor) to recipient in msg as
 * grantee for the specific authorization
 */

/** Revoke an existing authz grant from entity account (as grantor) to recipient */

/** Revoke an existing authz grant from entity account (as grantor) to recipient */

function createBaseMsgCreateEntity() {
  return {
    entityType: "",
    entityStatus: 0,
    controller: [],
    context: [],
    verification: [],
    service: [],
    accordedRight: [],
    linkedResource: [],
    linkedEntity: [],
    startDate: undefined,
    endDate: undefined,
    relayerNode: "",
    credentials: [],
    ownerDid: "",
    ownerAddress: "",
    data: new Uint8Array(),
    alsoKnownAs: "",
    linkedClaim: []
  };
}
var MsgCreateEntity = exports.MsgCreateEntity = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.entityType !== "") {
      writer.uint32(10).string(message.entityType);
    }
    if (message.entityStatus !== 0) {
      writer.uint32(16).int32(message.entityStatus);
    }
    var _iterator = _createForOfIteratorHelper(message.controller),
      _step;
    try {
      for (_iterator.s(); !(_step = _iterator.n()).done;) {
        var v = _step.value;
        writer.uint32(26).string(v);
      }
    } catch (err) {
      _iterator.e(err);
    } finally {
      _iterator.f();
    }
    var _iterator2 = _createForOfIteratorHelper(message.context),
      _step2;
    try {
      for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
        var _v = _step2.value;
        _types.Context.encode(_v, writer.uint32(34).fork()).ldelim();
      }
    } catch (err) {
      _iterator2.e(err);
    } finally {
      _iterator2.f();
    }
    var _iterator3 = _createForOfIteratorHelper(message.verification),
      _step3;
    try {
      for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
        var _v2 = _step3.value;
        _tx.Verification.encode(_v2, writer.uint32(42).fork()).ldelim();
      }
    } catch (err) {
      _iterator3.e(err);
    } finally {
      _iterator3.f();
    }
    var _iterator4 = _createForOfIteratorHelper(message.service),
      _step4;
    try {
      for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
        var _v3 = _step4.value;
        _types.Service.encode(_v3, writer.uint32(50).fork()).ldelim();
      }
    } catch (err) {
      _iterator4.e(err);
    } finally {
      _iterator4.f();
    }
    var _iterator5 = _createForOfIteratorHelper(message.accordedRight),
      _step5;
    try {
      for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
        var _v4 = _step5.value;
        _types.AccordedRight.encode(_v4, writer.uint32(58).fork()).ldelim();
      }
    } catch (err) {
      _iterator5.e(err);
    } finally {
      _iterator5.f();
    }
    var _iterator6 = _createForOfIteratorHelper(message.linkedResource),
      _step6;
    try {
      for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
        var _v5 = _step6.value;
        _types.LinkedResource.encode(_v5, writer.uint32(66).fork()).ldelim();
      }
    } catch (err) {
      _iterator6.e(err);
    } finally {
      _iterator6.f();
    }
    var _iterator7 = _createForOfIteratorHelper(message.linkedEntity),
      _step7;
    try {
      for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
        var _v6 = _step7.value;
        _types.LinkedEntity.encode(_v6, writer.uint32(74).fork()).ldelim();
      }
    } catch (err) {
      _iterator7.e(err);
    } finally {
      _iterator7.f();
    }
    if (message.startDate !== undefined) {
      _timestamp.Timestamp.encode(message.startDate, writer.uint32(82).fork()).ldelim();
    }
    if (message.endDate !== undefined) {
      _timestamp.Timestamp.encode(message.endDate, writer.uint32(90).fork()).ldelim();
    }
    if (message.relayerNode !== "") {
      writer.uint32(98).string(message.relayerNode);
    }
    var _iterator8 = _createForOfIteratorHelper(message.credentials),
      _step8;
    try {
      for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
        var _v7 = _step8.value;
        writer.uint32(106).string(_v7);
      }
    } catch (err) {
      _iterator8.e(err);
    } finally {
      _iterator8.f();
    }
    if (message.ownerDid !== "") {
      writer.uint32(114).string(message.ownerDid);
    }
    if (message.ownerAddress !== "") {
      writer.uint32(122).string(message.ownerAddress);
    }
    if (message.data.length !== 0) {
      writer.uint32(130).bytes(message.data);
    }
    if (message.alsoKnownAs !== "") {
      writer.uint32(138).string(message.alsoKnownAs);
    }
    var _iterator9 = _createForOfIteratorHelper(message.linkedClaim),
      _step9;
    try {
      for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
        var _v8 = _step9.value;
        _types.LinkedClaim.encode(_v8, writer.uint32(146).fork()).ldelim();
      }
    } catch (err) {
      _iterator9.e(err);
    } finally {
      _iterator9.f();
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgCreateEntity();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.entityType = reader.string();
          break;
        case 2:
          message.entityStatus = reader.int32();
          break;
        case 3:
          message.controller.push(reader.string());
          break;
        case 4:
          message.context.push(_types.Context.decode(reader, reader.uint32()));
          break;
        case 5:
          message.verification.push(_tx.Verification.decode(reader, reader.uint32()));
          break;
        case 6:
          message.service.push(_types.Service.decode(reader, reader.uint32()));
          break;
        case 7:
          message.accordedRight.push(_types.AccordedRight.decode(reader, reader.uint32()));
          break;
        case 8:
          message.linkedResource.push(_types.LinkedResource.decode(reader, reader.uint32()));
          break;
        case 9:
          message.linkedEntity.push(_types.LinkedEntity.decode(reader, reader.uint32()));
          break;
        case 10:
          message.startDate = _timestamp.Timestamp.decode(reader, reader.uint32());
          break;
        case 11:
          message.endDate = _timestamp.Timestamp.decode(reader, reader.uint32());
          break;
        case 12:
          message.relayerNode = reader.string();
          break;
        case 13:
          message.credentials.push(reader.string());
          break;
        case 14:
          message.ownerDid = reader.string();
          break;
        case 15:
          message.ownerAddress = reader.string();
          break;
        case 16:
          message.data = reader.bytes();
          break;
        case 17:
          message.alsoKnownAs = reader.string();
          break;
        case 18:
          message.linkedClaim.push(_types.LinkedClaim.decode(reader, reader.uint32()));
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      entityType: (0, _helpers.isSet)(object.entityType) ? String(object.entityType) : "",
      entityStatus: (0, _helpers.isSet)(object.entityStatus) ? Number(object.entityStatus) : 0,
      controller: Array.isArray(object === null || object === void 0 ? void 0 : object.controller) ? object.controller.map(function (e) {
        return String(e);
      }) : [],
      context: Array.isArray(object === null || object === void 0 ? void 0 : object.context) ? object.context.map(function (e) {
        return _types.Context.fromJSON(e);
      }) : [],
      verification: Array.isArray(object === null || object === void 0 ? void 0 : object.verification) ? object.verification.map(function (e) {
        return _tx.Verification.fromJSON(e);
      }) : [],
      service: Array.isArray(object === null || object === void 0 ? void 0 : object.service) ? object.service.map(function (e) {
        return _types.Service.fromJSON(e);
      }) : [],
      accordedRight: Array.isArray(object === null || object === void 0 ? void 0 : object.accordedRight) ? object.accordedRight.map(function (e) {
        return _types.AccordedRight.fromJSON(e);
      }) : [],
      linkedResource: Array.isArray(object === null || object === void 0 ? void 0 : object.linkedResource) ? object.linkedResource.map(function (e) {
        return _types.LinkedResource.fromJSON(e);
      }) : [],
      linkedEntity: Array.isArray(object === null || object === void 0 ? void 0 : object.linkedEntity) ? object.linkedEntity.map(function (e) {
        return _types.LinkedEntity.fromJSON(e);
      }) : [],
      startDate: (0, _helpers.isSet)(object.startDate) ? (0, _helpers.fromJsonTimestamp)(object.startDate) : undefined,
      endDate: (0, _helpers.isSet)(object.endDate) ? (0, _helpers.fromJsonTimestamp)(object.endDate) : undefined,
      relayerNode: (0, _helpers.isSet)(object.relayerNode) ? String(object.relayerNode) : "",
      credentials: Array.isArray(object === null || object === void 0 ? void 0 : object.credentials) ? object.credentials.map(function (e) {
        return String(e);
      }) : [],
      ownerDid: (0, _helpers.isSet)(object.ownerDid) ? String(object.ownerDid) : "",
      ownerAddress: (0, _helpers.isSet)(object.ownerAddress) ? String(object.ownerAddress) : "",
      data: (0, _helpers.isSet)(object.data) ? (0, _helpers.bytesFromBase64)(object.data) : new Uint8Array(),
      alsoKnownAs: (0, _helpers.isSet)(object.alsoKnownAs) ? String(object.alsoKnownAs) : "",
      linkedClaim: Array.isArray(object === null || object === void 0 ? void 0 : object.linkedClaim) ? object.linkedClaim.map(function (e) {
        return _types.LinkedClaim.fromJSON(e);
      }) : []
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.entityType !== undefined && (obj.entityType = message.entityType);
    message.entityStatus !== undefined && (obj.entityStatus = Math.round(message.entityStatus));
    if (message.controller) {
      obj.controller = message.controller.map(function (e) {
        return e;
      });
    } else {
      obj.controller = [];
    }
    if (message.context) {
      obj.context = message.context.map(function (e) {
        return e ? _types.Context.toJSON(e) : undefined;
      });
    } else {
      obj.context = [];
    }
    if (message.verification) {
      obj.verification = message.verification.map(function (e) {
        return e ? _tx.Verification.toJSON(e) : undefined;
      });
    } else {
      obj.verification = [];
    }
    if (message.service) {
      obj.service = message.service.map(function (e) {
        return e ? _types.Service.toJSON(e) : undefined;
      });
    } else {
      obj.service = [];
    }
    if (message.accordedRight) {
      obj.accordedRight = message.accordedRight.map(function (e) {
        return e ? _types.AccordedRight.toJSON(e) : undefined;
      });
    } else {
      obj.accordedRight = [];
    }
    if (message.linkedResource) {
      obj.linkedResource = message.linkedResource.map(function (e) {
        return e ? _types.LinkedResource.toJSON(e) : undefined;
      });
    } else {
      obj.linkedResource = [];
    }
    if (message.linkedEntity) {
      obj.linkedEntity = message.linkedEntity.map(function (e) {
        return e ? _types.LinkedEntity.toJSON(e) : undefined;
      });
    } else {
      obj.linkedEntity = [];
    }
    message.startDate !== undefined && (obj.startDate = (0, _helpers.fromTimestamp)(message.startDate).toISOString());
    message.endDate !== undefined && (obj.endDate = (0, _helpers.fromTimestamp)(message.endDate).toISOString());
    message.relayerNode !== undefined && (obj.relayerNode = message.relayerNode);
    if (message.credentials) {
      obj.credentials = message.credentials.map(function (e) {
        return e;
      });
    } else {
      obj.credentials = [];
    }
    message.ownerDid !== undefined && (obj.ownerDid = message.ownerDid);
    message.ownerAddress !== undefined && (obj.ownerAddress = message.ownerAddress);
    message.data !== undefined && (obj.data = (0, _helpers.base64FromBytes)(message.data !== undefined ? message.data : new Uint8Array()));
    message.alsoKnownAs !== undefined && (obj.alsoKnownAs = message.alsoKnownAs);
    if (message.linkedClaim) {
      obj.linkedClaim = message.linkedClaim.map(function (e) {
        return e ? _types.LinkedClaim.toJSON(e) : undefined;
      });
    } else {
      obj.linkedClaim = [];
    }
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$entityType, _object$entityStatus, _object$controller, _object$context, _object$verification, _object$service, _object$accordedRight, _object$linkedResourc, _object$linkedEntity, _object$relayerNode, _object$credentials, _object$ownerDid, _object$ownerAddress, _object$data, _object$alsoKnownAs, _object$linkedClaim;
    var message = createBaseMsgCreateEntity();
    message.entityType = (_object$entityType = object.entityType) !== null && _object$entityType !== void 0 ? _object$entityType : "";
    message.entityStatus = (_object$entityStatus = object.entityStatus) !== null && _object$entityStatus !== void 0 ? _object$entityStatus : 0;
    message.controller = ((_object$controller = object.controller) === null || _object$controller === void 0 ? void 0 : _object$controller.map(function (e) {
      return e;
    })) || [];
    message.context = ((_object$context = object.context) === null || _object$context === void 0 ? void 0 : _object$context.map(function (e) {
      return _types.Context.fromPartial(e);
    })) || [];
    message.verification = ((_object$verification = object.verification) === null || _object$verification === void 0 ? void 0 : _object$verification.map(function (e) {
      return _tx.Verification.fromPartial(e);
    })) || [];
    message.service = ((_object$service = object.service) === null || _object$service === void 0 ? void 0 : _object$service.map(function (e) {
      return _types.Service.fromPartial(e);
    })) || [];
    message.accordedRight = ((_object$accordedRight = object.accordedRight) === null || _object$accordedRight === void 0 ? void 0 : _object$accordedRight.map(function (e) {
      return _types.AccordedRight.fromPartial(e);
    })) || [];
    message.linkedResource = ((_object$linkedResourc = object.linkedResource) === null || _object$linkedResourc === void 0 ? void 0 : _object$linkedResourc.map(function (e) {
      return _types.LinkedResource.fromPartial(e);
    })) || [];
    message.linkedEntity = ((_object$linkedEntity = object.linkedEntity) === null || _object$linkedEntity === void 0 ? void 0 : _object$linkedEntity.map(function (e) {
      return _types.LinkedEntity.fromPartial(e);
    })) || [];
    message.startDate = object.startDate !== undefined && object.startDate !== null ? _timestamp.Timestamp.fromPartial(object.startDate) : undefined;
    message.endDate = object.endDate !== undefined && object.endDate !== null ? _timestamp.Timestamp.fromPartial(object.endDate) : undefined;
    message.relayerNode = (_object$relayerNode = object.relayerNode) !== null && _object$relayerNode !== void 0 ? _object$relayerNode : "";
    message.credentials = ((_object$credentials = object.credentials) === null || _object$credentials === void 0 ? void 0 : _object$credentials.map(function (e) {
      return e;
    })) || [];
    message.ownerDid = (_object$ownerDid = object.ownerDid) !== null && _object$ownerDid !== void 0 ? _object$ownerDid : "";
    message.ownerAddress = (_object$ownerAddress = object.ownerAddress) !== null && _object$ownerAddress !== void 0 ? _object$ownerAddress : "";
    message.data = (_object$data = object.data) !== null && _object$data !== void 0 ? _object$data : new Uint8Array();
    message.alsoKnownAs = (_object$alsoKnownAs = object.alsoKnownAs) !== null && _object$alsoKnownAs !== void 0 ? _object$alsoKnownAs : "";
    message.linkedClaim = ((_object$linkedClaim = object.linkedClaim) === null || _object$linkedClaim === void 0 ? void 0 : _object$linkedClaim.map(function (e) {
      return _types.LinkedClaim.fromPartial(e);
    })) || [];
    return message;
  }
};
function createBaseMsgCreateEntityResponse() {
  return {
    entityId: "",
    entityType: "",
    entityStatus: 0
  };
}
var MsgCreateEntityResponse = exports.MsgCreateEntityResponse = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.entityId !== "") {
      writer.uint32(10).string(message.entityId);
    }
    if (message.entityType !== "") {
      writer.uint32(18).string(message.entityType);
    }
    if (message.entityStatus !== 0) {
      writer.uint32(24).int32(message.entityStatus);
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgCreateEntityResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.entityId = reader.string();
          break;
        case 2:
          message.entityType = reader.string();
          break;
        case 3:
          message.entityStatus = reader.int32();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      entityId: (0, _helpers.isSet)(object.entityId) ? String(object.entityId) : "",
      entityType: (0, _helpers.isSet)(object.entityType) ? String(object.entityType) : "",
      entityStatus: (0, _helpers.isSet)(object.entityStatus) ? Number(object.entityStatus) : 0
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.entityId !== undefined && (obj.entityId = message.entityId);
    message.entityType !== undefined && (obj.entityType = message.entityType);
    message.entityStatus !== undefined && (obj.entityStatus = Math.round(message.entityStatus));
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$entityId, _object$entityType2, _object$entityStatus2;
    var message = createBaseMsgCreateEntityResponse();
    message.entityId = (_object$entityId = object.entityId) !== null && _object$entityId !== void 0 ? _object$entityId : "";
    message.entityType = (_object$entityType2 = object.entityType) !== null && _object$entityType2 !== void 0 ? _object$entityType2 : "";
    message.entityStatus = (_object$entityStatus2 = object.entityStatus) !== null && _object$entityStatus2 !== void 0 ? _object$entityStatus2 : 0;
    return message;
  }
};
function createBaseMsgUpdateEntity() {
  return {
    id: "",
    entityStatus: 0,
    startDate: undefined,
    endDate: undefined,
    credentials: [],
    controllerDid: "",
    controllerAddress: ""
  };
}
var MsgUpdateEntity = exports.MsgUpdateEntity = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.entityStatus !== 0) {
      writer.uint32(16).int32(message.entityStatus);
    }
    if (message.startDate !== undefined) {
      _timestamp.Timestamp.encode(message.startDate, writer.uint32(26).fork()).ldelim();
    }
    if (message.endDate !== undefined) {
      _timestamp.Timestamp.encode(message.endDate, writer.uint32(34).fork()).ldelim();
    }
    var _iterator0 = _createForOfIteratorHelper(message.credentials),
      _step0;
    try {
      for (_iterator0.s(); !(_step0 = _iterator0.n()).done;) {
        var v = _step0.value;
        writer.uint32(42).string(v);
      }
    } catch (err) {
      _iterator0.e(err);
    } finally {
      _iterator0.f();
    }
    if (message.controllerDid !== "") {
      writer.uint32(50).string(message.controllerDid);
    }
    if (message.controllerAddress !== "") {
      writer.uint32(58).string(message.controllerAddress);
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgUpdateEntity();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.entityStatus = reader.int32();
          break;
        case 3:
          message.startDate = _timestamp.Timestamp.decode(reader, reader.uint32());
          break;
        case 4:
          message.endDate = _timestamp.Timestamp.decode(reader, reader.uint32());
          break;
        case 5:
          message.credentials.push(reader.string());
          break;
        case 6:
          message.controllerDid = reader.string();
          break;
        case 7:
          message.controllerAddress = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      id: (0, _helpers.isSet)(object.id) ? String(object.id) : "",
      entityStatus: (0, _helpers.isSet)(object.entityStatus) ? Number(object.entityStatus) : 0,
      startDate: (0, _helpers.isSet)(object.startDate) ? (0, _helpers.fromJsonTimestamp)(object.startDate) : undefined,
      endDate: (0, _helpers.isSet)(object.endDate) ? (0, _helpers.fromJsonTimestamp)(object.endDate) : undefined,
      credentials: Array.isArray(object === null || object === void 0 ? void 0 : object.credentials) ? object.credentials.map(function (e) {
        return String(e);
      }) : [],
      controllerDid: (0, _helpers.isSet)(object.controllerDid) ? String(object.controllerDid) : "",
      controllerAddress: (0, _helpers.isSet)(object.controllerAddress) ? String(object.controllerAddress) : ""
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.entityStatus !== undefined && (obj.entityStatus = Math.round(message.entityStatus));
    message.startDate !== undefined && (obj.startDate = (0, _helpers.fromTimestamp)(message.startDate).toISOString());
    message.endDate !== undefined && (obj.endDate = (0, _helpers.fromTimestamp)(message.endDate).toISOString());
    if (message.credentials) {
      obj.credentials = message.credentials.map(function (e) {
        return e;
      });
    } else {
      obj.credentials = [];
    }
    message.controllerDid !== undefined && (obj.controllerDid = message.controllerDid);
    message.controllerAddress !== undefined && (obj.controllerAddress = message.controllerAddress);
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$id, _object$entityStatus3, _object$credentials2, _object$controllerDid, _object$controllerAdd;
    var message = createBaseMsgUpdateEntity();
    message.id = (_object$id = object.id) !== null && _object$id !== void 0 ? _object$id : "";
    message.entityStatus = (_object$entityStatus3 = object.entityStatus) !== null && _object$entityStatus3 !== void 0 ? _object$entityStatus3 : 0;
    message.startDate = object.startDate !== undefined && object.startDate !== null ? _timestamp.Timestamp.fromPartial(object.startDate) : undefined;
    message.endDate = object.endDate !== undefined && object.endDate !== null ? _timestamp.Timestamp.fromPartial(object.endDate) : undefined;
    message.credentials = ((_object$credentials2 = object.credentials) === null || _object$credentials2 === void 0 ? void 0 : _object$credentials2.map(function (e) {
      return e;
    })) || [];
    message.controllerDid = (_object$controllerDid = object.controllerDid) !== null && _object$controllerDid !== void 0 ? _object$controllerDid : "";
    message.controllerAddress = (_object$controllerAdd = object.controllerAddress) !== null && _object$controllerAdd !== void 0 ? _object$controllerAdd : "";
    return message;
  }
};
function createBaseMsgUpdateEntityResponse() {
  return {};
}
var MsgUpdateEntityResponse = exports.MsgUpdateEntityResponse = {
  encode: function encode(_) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgUpdateEntityResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(_) {
    return {};
  },
  toJSON: function toJSON(_) {
    var obj = {};
    return obj;
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseMsgUpdateEntityResponse();
    return message;
  }
};
function createBaseMsgUpdateEntityVerified() {
  return {
    id: "",
    entityVerified: false,
    relayerNodeDid: "",
    relayerNodeAddress: ""
  };
}
var MsgUpdateEntityVerified = exports.MsgUpdateEntityVerified = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.entityVerified === true) {
      writer.uint32(16).bool(message.entityVerified);
    }
    if (message.relayerNodeDid !== "") {
      writer.uint32(26).string(message.relayerNodeDid);
    }
    if (message.relayerNodeAddress !== "") {
      writer.uint32(34).string(message.relayerNodeAddress);
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgUpdateEntityVerified();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.entityVerified = reader.bool();
          break;
        case 3:
          message.relayerNodeDid = reader.string();
          break;
        case 4:
          message.relayerNodeAddress = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      id: (0, _helpers.isSet)(object.id) ? String(object.id) : "",
      entityVerified: (0, _helpers.isSet)(object.entityVerified) ? Boolean(object.entityVerified) : false,
      relayerNodeDid: (0, _helpers.isSet)(object.relayerNodeDid) ? String(object.relayerNodeDid) : "",
      relayerNodeAddress: (0, _helpers.isSet)(object.relayerNodeAddress) ? String(object.relayerNodeAddress) : ""
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.entityVerified !== undefined && (obj.entityVerified = message.entityVerified);
    message.relayerNodeDid !== undefined && (obj.relayerNodeDid = message.relayerNodeDid);
    message.relayerNodeAddress !== undefined && (obj.relayerNodeAddress = message.relayerNodeAddress);
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$id2, _object$entityVerifie, _object$relayerNodeDi, _object$relayerNodeAd;
    var message = createBaseMsgUpdateEntityVerified();
    message.id = (_object$id2 = object.id) !== null && _object$id2 !== void 0 ? _object$id2 : "";
    message.entityVerified = (_object$entityVerifie = object.entityVerified) !== null && _object$entityVerifie !== void 0 ? _object$entityVerifie : false;
    message.relayerNodeDid = (_object$relayerNodeDi = object.relayerNodeDid) !== null && _object$relayerNodeDi !== void 0 ? _object$relayerNodeDi : "";
    message.relayerNodeAddress = (_object$relayerNodeAd = object.relayerNodeAddress) !== null && _object$relayerNodeAd !== void 0 ? _object$relayerNodeAd : "";
    return message;
  }
};
function createBaseMsgUpdateEntityVerifiedResponse() {
  return {};
}
var MsgUpdateEntityVerifiedResponse = exports.MsgUpdateEntityVerifiedResponse = {
  encode: function encode(_) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgUpdateEntityVerifiedResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(_) {
    return {};
  },
  toJSON: function toJSON(_) {
    var obj = {};
    return obj;
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseMsgUpdateEntityVerifiedResponse();
    return message;
  }
};
function createBaseMsgTransferEntity() {
  return {
    id: "",
    ownerDid: "",
    ownerAddress: "",
    recipientDid: ""
  };
}
var MsgTransferEntity = exports.MsgTransferEntity = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.ownerDid !== "") {
      writer.uint32(18).string(message.ownerDid);
    }
    if (message.ownerAddress !== "") {
      writer.uint32(26).string(message.ownerAddress);
    }
    if (message.recipientDid !== "") {
      writer.uint32(34).string(message.recipientDid);
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgTransferEntity();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.ownerDid = reader.string();
          break;
        case 3:
          message.ownerAddress = reader.string();
          break;
        case 4:
          message.recipientDid = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      id: (0, _helpers.isSet)(object.id) ? String(object.id) : "",
      ownerDid: (0, _helpers.isSet)(object.ownerDid) ? String(object.ownerDid) : "",
      ownerAddress: (0, _helpers.isSet)(object.ownerAddress) ? String(object.ownerAddress) : "",
      recipientDid: (0, _helpers.isSet)(object.recipientDid) ? String(object.recipientDid) : ""
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.ownerDid !== undefined && (obj.ownerDid = message.ownerDid);
    message.ownerAddress !== undefined && (obj.ownerAddress = message.ownerAddress);
    message.recipientDid !== undefined && (obj.recipientDid = message.recipientDid);
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$id3, _object$ownerDid2, _object$ownerAddress2, _object$recipientDid;
    var message = createBaseMsgTransferEntity();
    message.id = (_object$id3 = object.id) !== null && _object$id3 !== void 0 ? _object$id3 : "";
    message.ownerDid = (_object$ownerDid2 = object.ownerDid) !== null && _object$ownerDid2 !== void 0 ? _object$ownerDid2 : "";
    message.ownerAddress = (_object$ownerAddress2 = object.ownerAddress) !== null && _object$ownerAddress2 !== void 0 ? _object$ownerAddress2 : "";
    message.recipientDid = (_object$recipientDid = object.recipientDid) !== null && _object$recipientDid !== void 0 ? _object$recipientDid : "";
    return message;
  }
};
function createBaseMsgTransferEntityResponse() {
  return {};
}
var MsgTransferEntityResponse = exports.MsgTransferEntityResponse = {
  encode: function encode(_) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgTransferEntityResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(_) {
    return {};
  },
  toJSON: function toJSON(_) {
    var obj = {};
    return obj;
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseMsgTransferEntityResponse();
    return message;
  }
};
function createBaseMsgCreateEntityAccount() {
  return {
    id: "",
    name: "",
    ownerAddress: ""
  };
}
var MsgCreateEntityAccount = exports.MsgCreateEntityAccount = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.name !== "") {
      writer.uint32(18).string(message.name);
    }
    if (message.ownerAddress !== "") {
      writer.uint32(26).string(message.ownerAddress);
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgCreateEntityAccount();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.name = reader.string();
          break;
        case 3:
          message.ownerAddress = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      id: (0, _helpers.isSet)(object.id) ? String(object.id) : "",
      name: (0, _helpers.isSet)(object.name) ? String(object.name) : "",
      ownerAddress: (0, _helpers.isSet)(object.ownerAddress) ? String(object.ownerAddress) : ""
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.name !== undefined && (obj.name = message.name);
    message.ownerAddress !== undefined && (obj.ownerAddress = message.ownerAddress);
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$id4, _object$name, _object$ownerAddress3;
    var message = createBaseMsgCreateEntityAccount();
    message.id = (_object$id4 = object.id) !== null && _object$id4 !== void 0 ? _object$id4 : "";
    message.name = (_object$name = object.name) !== null && _object$name !== void 0 ? _object$name : "";
    message.ownerAddress = (_object$ownerAddress3 = object.ownerAddress) !== null && _object$ownerAddress3 !== void 0 ? _object$ownerAddress3 : "";
    return message;
  }
};
function createBaseMsgCreateEntityAccountResponse() {
  return {
    account: ""
  };
}
var MsgCreateEntityAccountResponse = exports.MsgCreateEntityAccountResponse = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.account !== "") {
      writer.uint32(10).string(message.account);
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgCreateEntityAccountResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.account = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      account: (0, _helpers.isSet)(object.account) ? String(object.account) : ""
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.account !== undefined && (obj.account = message.account);
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$account;
    var message = createBaseMsgCreateEntityAccountResponse();
    message.account = (_object$account = object.account) !== null && _object$account !== void 0 ? _object$account : "";
    return message;
  }
};
function createBaseMsgGrantEntityAccountAuthz() {
  return {
    id: "",
    name: "",
    granteeAddress: "",
    grant: undefined,
    ownerAddress: ""
  };
}
var MsgGrantEntityAccountAuthz = exports.MsgGrantEntityAccountAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.name !== "") {
      writer.uint32(18).string(message.name);
    }
    if (message.granteeAddress !== "") {
      writer.uint32(26).string(message.granteeAddress);
    }
    if (message.grant !== undefined) {
      _authz.Grant.encode(message.grant, writer.uint32(34).fork()).ldelim();
    }
    if (message.ownerAddress !== "") {
      writer.uint32(42).string(message.ownerAddress);
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgGrantEntityAccountAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.name = reader.string();
          break;
        case 3:
          message.granteeAddress = reader.string();
          break;
        case 4:
          message.grant = _authz.Grant.decode(reader, reader.uint32());
          break;
        case 5:
          message.ownerAddress = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      id: (0, _helpers.isSet)(object.id) ? String(object.id) : "",
      name: (0, _helpers.isSet)(object.name) ? String(object.name) : "",
      granteeAddress: (0, _helpers.isSet)(object.granteeAddress) ? String(object.granteeAddress) : "",
      grant: (0, _helpers.isSet)(object.grant) ? _authz.Grant.fromJSON(object.grant) : undefined,
      ownerAddress: (0, _helpers.isSet)(object.ownerAddress) ? String(object.ownerAddress) : ""
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.name !== undefined && (obj.name = message.name);
    message.granteeAddress !== undefined && (obj.granteeAddress = message.granteeAddress);
    message.grant !== undefined && (obj.grant = message.grant ? _authz.Grant.toJSON(message.grant) : undefined);
    message.ownerAddress !== undefined && (obj.ownerAddress = message.ownerAddress);
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$id5, _object$name2, _object$granteeAddres, _object$ownerAddress4;
    var message = createBaseMsgGrantEntityAccountAuthz();
    message.id = (_object$id5 = object.id) !== null && _object$id5 !== void 0 ? _object$id5 : "";
    message.name = (_object$name2 = object.name) !== null && _object$name2 !== void 0 ? _object$name2 : "";
    message.granteeAddress = (_object$granteeAddres = object.granteeAddress) !== null && _object$granteeAddres !== void 0 ? _object$granteeAddres : "";
    message.grant = object.grant !== undefined && object.grant !== null ? _authz.Grant.fromPartial(object.grant) : undefined;
    message.ownerAddress = (_object$ownerAddress4 = object.ownerAddress) !== null && _object$ownerAddress4 !== void 0 ? _object$ownerAddress4 : "";
    return message;
  }
};
function createBaseMsgGrantEntityAccountAuthzResponse() {
  return {};
}
var MsgGrantEntityAccountAuthzResponse = exports.MsgGrantEntityAccountAuthzResponse = {
  encode: function encode(_) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgGrantEntityAccountAuthzResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(_) {
    return {};
  },
  toJSON: function toJSON(_) {
    var obj = {};
    return obj;
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseMsgGrantEntityAccountAuthzResponse();
    return message;
  }
};
function createBaseMsgRevokeEntityAccountAuthz() {
  return {
    id: "",
    name: "",
    granteeAddress: "",
    msgTypeUrl: "",
    ownerAddress: ""
  };
}
var MsgRevokeEntityAccountAuthz = exports.MsgRevokeEntityAccountAuthz = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.id !== "") {
      writer.uint32(10).string(message.id);
    }
    if (message.name !== "") {
      writer.uint32(18).string(message.name);
    }
    if (message.granteeAddress !== "") {
      writer.uint32(26).string(message.granteeAddress);
    }
    if (message.msgTypeUrl !== "") {
      writer.uint32(34).string(message.msgTypeUrl);
    }
    if (message.ownerAddress !== "") {
      writer.uint32(42).string(message.ownerAddress);
    }
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgRevokeEntityAccountAuthz();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.id = reader.string();
          break;
        case 2:
          message.name = reader.string();
          break;
        case 3:
          message.granteeAddress = reader.string();
          break;
        case 4:
          message.msgTypeUrl = reader.string();
          break;
        case 5:
          message.ownerAddress = reader.string();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      id: (0, _helpers.isSet)(object.id) ? String(object.id) : "",
      name: (0, _helpers.isSet)(object.name) ? String(object.name) : "",
      granteeAddress: (0, _helpers.isSet)(object.granteeAddress) ? String(object.granteeAddress) : "",
      msgTypeUrl: (0, _helpers.isSet)(object.msgTypeUrl) ? String(object.msgTypeUrl) : "",
      ownerAddress: (0, _helpers.isSet)(object.ownerAddress) ? String(object.ownerAddress) : ""
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.id !== undefined && (obj.id = message.id);
    message.name !== undefined && (obj.name = message.name);
    message.granteeAddress !== undefined && (obj.granteeAddress = message.granteeAddress);
    message.msgTypeUrl !== undefined && (obj.msgTypeUrl = message.msgTypeUrl);
    message.ownerAddress !== undefined && (obj.ownerAddress = message.ownerAddress);
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$id6, _object$name3, _object$granteeAddres2, _object$msgTypeUrl, _object$ownerAddress5;
    var message = createBaseMsgRevokeEntityAccountAuthz();
    message.id = (_object$id6 = object.id) !== null && _object$id6 !== void 0 ? _object$id6 : "";
    message.name = (_object$name3 = object.name) !== null && _object$name3 !== void 0 ? _object$name3 : "";
    message.granteeAddress = (_object$granteeAddres2 = object.granteeAddress) !== null && _object$granteeAddres2 !== void 0 ? _object$granteeAddres2 : "";
    message.msgTypeUrl = (_object$msgTypeUrl = object.msgTypeUrl) !== null && _object$msgTypeUrl !== void 0 ? _object$msgTypeUrl : "";
    message.ownerAddress = (_object$ownerAddress5 = object.ownerAddress) !== null && _object$ownerAddress5 !== void 0 ? _object$ownerAddress5 : "";
    return message;
  }
};
function createBaseMsgRevokeEntityAccountAuthzResponse() {
  return {};
}
var MsgRevokeEntityAccountAuthzResponse = exports.MsgRevokeEntityAccountAuthzResponse = {
  encode: function encode(_) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    return writer;
  },
  decode: function decode(input, length) {
    var reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
    var end = length === undefined ? reader.len : reader.pos + length;
    var message = createBaseMsgRevokeEntityAccountAuthzResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(_) {
    return {};
  },
  toJSON: function toJSON(_) {
    var obj = {};
    return obj;
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseMsgRevokeEntityAccountAuthzResponse();
    return message;
  }
};