"use strict";

var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MsgStoreCodeResponse = exports.MsgStoreCode = exports.MsgRemoveChecksumResponse = exports.MsgRemoveChecksum = exports.MsgMigrateContractResponse = exports.MsgMigrateContract = void 0;
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); }
//@ts-nocheck

/** MsgStoreCode defines the request type for the StoreCode rpc. */

/** MsgStoreCode defines the request type for the StoreCode rpc. */

/** MsgStoreCodeResponse defines the response type for the StoreCode rpc */

/** MsgStoreCodeResponse defines the response type for the StoreCode rpc */

/** MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc. */

/** MsgRemoveChecksum defines the request type for the MsgRemoveChecksum rpc. */

/** MsgStoreChecksumResponse defines the response type for the StoreCode rpc */

/** MsgStoreChecksumResponse defines the response type for the StoreCode rpc */

/** MsgMigrateContract defines the request type for the MigrateContract rpc. */

/** MsgMigrateContract defines the request type for the MigrateContract rpc. */

/** MsgMigrateContractResponse defines the response type for the MigrateContract rpc */

/** MsgMigrateContractResponse defines the response type for the MigrateContract rpc */

function createBaseMsgStoreCode() {
  return {
    signer: "",
    wasmByteCode: new Uint8Array()
  };
}
var MsgStoreCode = exports.MsgStoreCode = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.signer !== "") {
      writer.uint32(10).string(message.signer);
    }
    if (message.wasmByteCode.length !== 0) {
      writer.uint32(18).bytes(message.wasmByteCode);
    }
    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 = createBaseMsgStoreCode();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.signer = reader.string();
          break;
        case 2:
          message.wasmByteCode = reader.bytes();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      signer: (0, _helpers.isSet)(object.signer) ? String(object.signer) : "",
      wasmByteCode: (0, _helpers.isSet)(object.wasmByteCode) ? (0, _helpers.bytesFromBase64)(object.wasmByteCode) : new Uint8Array()
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.signer !== undefined && (obj.signer = message.signer);
    message.wasmByteCode !== undefined && (obj.wasmByteCode = (0, _helpers.base64FromBytes)(message.wasmByteCode !== undefined ? message.wasmByteCode : new Uint8Array()));
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$signer, _object$wasmByteCode;
    var message = createBaseMsgStoreCode();
    message.signer = (_object$signer = object.signer) !== null && _object$signer !== void 0 ? _object$signer : "";
    message.wasmByteCode = (_object$wasmByteCode = object.wasmByteCode) !== null && _object$wasmByteCode !== void 0 ? _object$wasmByteCode : new Uint8Array();
    return message;
  }
};
function createBaseMsgStoreCodeResponse() {
  return {
    checksum: new Uint8Array()
  };
}
var MsgStoreCodeResponse = exports.MsgStoreCodeResponse = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.checksum.length !== 0) {
      writer.uint32(10).bytes(message.checksum);
    }
    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 = createBaseMsgStoreCodeResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.checksum = reader.bytes();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      checksum: (0, _helpers.isSet)(object.checksum) ? (0, _helpers.bytesFromBase64)(object.checksum) : new Uint8Array()
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.checksum !== undefined && (obj.checksum = (0, _helpers.base64FromBytes)(message.checksum !== undefined ? message.checksum : new Uint8Array()));
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$checksum;
    var message = createBaseMsgStoreCodeResponse();
    message.checksum = (_object$checksum = object.checksum) !== null && _object$checksum !== void 0 ? _object$checksum : new Uint8Array();
    return message;
  }
};
function createBaseMsgRemoveChecksum() {
  return {
    signer: "",
    checksum: new Uint8Array()
  };
}
var MsgRemoveChecksum = exports.MsgRemoveChecksum = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.signer !== "") {
      writer.uint32(10).string(message.signer);
    }
    if (message.checksum.length !== 0) {
      writer.uint32(18).bytes(message.checksum);
    }
    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 = createBaseMsgRemoveChecksum();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.signer = reader.string();
          break;
        case 2:
          message.checksum = reader.bytes();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      signer: (0, _helpers.isSet)(object.signer) ? String(object.signer) : "",
      checksum: (0, _helpers.isSet)(object.checksum) ? (0, _helpers.bytesFromBase64)(object.checksum) : new Uint8Array()
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.signer !== undefined && (obj.signer = message.signer);
    message.checksum !== undefined && (obj.checksum = (0, _helpers.base64FromBytes)(message.checksum !== undefined ? message.checksum : new Uint8Array()));
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$signer2, _object$checksum2;
    var message = createBaseMsgRemoveChecksum();
    message.signer = (_object$signer2 = object.signer) !== null && _object$signer2 !== void 0 ? _object$signer2 : "";
    message.checksum = (_object$checksum2 = object.checksum) !== null && _object$checksum2 !== void 0 ? _object$checksum2 : new Uint8Array();
    return message;
  }
};
function createBaseMsgRemoveChecksumResponse() {
  return {};
}
var MsgRemoveChecksumResponse = exports.MsgRemoveChecksumResponse = {
  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 = createBaseMsgRemoveChecksumResponse();
    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 = createBaseMsgRemoveChecksumResponse();
    return message;
  }
};
function createBaseMsgMigrateContract() {
  return {
    signer: "",
    clientId: "",
    checksum: new Uint8Array(),
    msg: new Uint8Array()
  };
}
var MsgMigrateContract = exports.MsgMigrateContract = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.signer !== "") {
      writer.uint32(10).string(message.signer);
    }
    if (message.clientId !== "") {
      writer.uint32(18).string(message.clientId);
    }
    if (message.checksum.length !== 0) {
      writer.uint32(26).bytes(message.checksum);
    }
    if (message.msg.length !== 0) {
      writer.uint32(34).bytes(message.msg);
    }
    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 = createBaseMsgMigrateContract();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.signer = reader.string();
          break;
        case 2:
          message.clientId = reader.string();
          break;
        case 3:
          message.checksum = reader.bytes();
          break;
        case 4:
          message.msg = reader.bytes();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromJSON: function fromJSON(object) {
    return {
      signer: (0, _helpers.isSet)(object.signer) ? String(object.signer) : "",
      clientId: (0, _helpers.isSet)(object.clientId) ? String(object.clientId) : "",
      checksum: (0, _helpers.isSet)(object.checksum) ? (0, _helpers.bytesFromBase64)(object.checksum) : new Uint8Array(),
      msg: (0, _helpers.isSet)(object.msg) ? (0, _helpers.bytesFromBase64)(object.msg) : new Uint8Array()
    };
  },
  toJSON: function toJSON(message) {
    var obj = {};
    message.signer !== undefined && (obj.signer = message.signer);
    message.clientId !== undefined && (obj.clientId = message.clientId);
    message.checksum !== undefined && (obj.checksum = (0, _helpers.base64FromBytes)(message.checksum !== undefined ? message.checksum : new Uint8Array()));
    message.msg !== undefined && (obj.msg = (0, _helpers.base64FromBytes)(message.msg !== undefined ? message.msg : new Uint8Array()));
    return obj;
  },
  fromPartial: function fromPartial(object) {
    var _object$signer3, _object$clientId, _object$checksum3, _object$msg;
    var message = createBaseMsgMigrateContract();
    message.signer = (_object$signer3 = object.signer) !== null && _object$signer3 !== void 0 ? _object$signer3 : "";
    message.clientId = (_object$clientId = object.clientId) !== null && _object$clientId !== void 0 ? _object$clientId : "";
    message.checksum = (_object$checksum3 = object.checksum) !== null && _object$checksum3 !== void 0 ? _object$checksum3 : new Uint8Array();
    message.msg = (_object$msg = object.msg) !== null && _object$msg !== void 0 ? _object$msg : new Uint8Array();
    return message;
  }
};
function createBaseMsgMigrateContractResponse() {
  return {};
}
var MsgMigrateContractResponse = exports.MsgMigrateContractResponse = {
  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 = createBaseMsgMigrateContractResponse();
    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 = createBaseMsgMigrateContractResponse();
    return message;
  }
};