"use strict";

var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.MsgRequestBandIBCRatesResponse = exports.MsgRequestBandIBCRates = exports.MsgRelayProviderPricesResponse = exports.MsgRelayProviderPrices = exports.MsgRelayPriceFeedPriceResponse = exports.MsgRelayPriceFeedPrice = exports.MsgRelayCoinbaseMessagesResponse = exports.MsgRelayCoinbaseMessages = exports.MsgRelayBandRatesResponse = exports.MsgRelayBandRates = void 0;
var _m0 = _interopRequireWildcard(require("protobufjs/minimal"));
var _helpers = require("../../../helpers");
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, 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 normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function createBaseMsgRelayProviderPrices() {
  return {
    sender: "",
    provider: "",
    symbols: [],
    prices: []
  };
}
var MsgRelayProviderPrices = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.sender !== "") {
      writer.uint32(10).string(message.sender);
    }
    if (message.provider !== "") {
      writer.uint32(18).string(message.provider);
    }
    var _iterator = _createForOfIteratorHelper(message.symbols),
      _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.prices),
      _step2;
    try {
      for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
        var _v = _step2.value;
        writer.uint32(34).string(_v);
      }
    } catch (err) {
      _iterator2.e(err);
    } finally {
      _iterator2.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 = createBaseMsgRelayProviderPrices();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.sender = reader.string();
          break;
        case 2:
          message.provider = reader.string();
          break;
        case 3:
          message.symbols.push(reader.string());
          break;
        case 4:
          message.prices.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$sender, _object$provider, _object$symbols, _object$prices;
    var message = createBaseMsgRelayProviderPrices();
    message.sender = (_object$sender = object.sender) !== null && _object$sender !== void 0 ? _object$sender : "";
    message.provider = (_object$provider = object.provider) !== null && _object$provider !== void 0 ? _object$provider : "";
    message.symbols = ((_object$symbols = object.symbols) === null || _object$symbols === void 0 ? void 0 : _object$symbols.map(function (e) {
      return e;
    })) || [];
    message.prices = ((_object$prices = object.prices) === null || _object$prices === void 0 ? void 0 : _object$prices.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.MsgRelayProviderPrices = MsgRelayProviderPrices;
function createBaseMsgRelayProviderPricesResponse() {
  return {};
}
var MsgRelayProviderPricesResponse = {
  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 = createBaseMsgRelayProviderPricesResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseMsgRelayProviderPricesResponse();
    return message;
  }
};
exports.MsgRelayProviderPricesResponse = MsgRelayProviderPricesResponse;
function createBaseMsgRelayPriceFeedPrice() {
  return {
    sender: "",
    base: [],
    quote: [],
    price: []
  };
}
var MsgRelayPriceFeedPrice = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.sender !== "") {
      writer.uint32(10).string(message.sender);
    }
    var _iterator3 = _createForOfIteratorHelper(message.base),
      _step3;
    try {
      for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
        var v = _step3.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator3.e(err);
    } finally {
      _iterator3.f();
    }
    var _iterator4 = _createForOfIteratorHelper(message.quote),
      _step4;
    try {
      for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
        var _v2 = _step4.value;
        writer.uint32(26).string(_v2);
      }
    } catch (err) {
      _iterator4.e(err);
    } finally {
      _iterator4.f();
    }
    var _iterator5 = _createForOfIteratorHelper(message.price),
      _step5;
    try {
      for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
        var _v3 = _step5.value;
        writer.uint32(34).string(_v3);
      }
    } catch (err) {
      _iterator5.e(err);
    } finally {
      _iterator5.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 = createBaseMsgRelayPriceFeedPrice();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.sender = reader.string();
          break;
        case 2:
          message.base.push(reader.string());
          break;
        case 3:
          message.quote.push(reader.string());
          break;
        case 4:
          message.price.push(reader.string());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$sender2, _object$base, _object$quote, _object$price;
    var message = createBaseMsgRelayPriceFeedPrice();
    message.sender = (_object$sender2 = object.sender) !== null && _object$sender2 !== void 0 ? _object$sender2 : "";
    message.base = ((_object$base = object.base) === null || _object$base === void 0 ? void 0 : _object$base.map(function (e) {
      return e;
    })) || [];
    message.quote = ((_object$quote = object.quote) === null || _object$quote === void 0 ? void 0 : _object$quote.map(function (e) {
      return e;
    })) || [];
    message.price = ((_object$price = object.price) === null || _object$price === void 0 ? void 0 : _object$price.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.MsgRelayPriceFeedPrice = MsgRelayPriceFeedPrice;
function createBaseMsgRelayPriceFeedPriceResponse() {
  return {};
}
var MsgRelayPriceFeedPriceResponse = {
  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 = createBaseMsgRelayPriceFeedPriceResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseMsgRelayPriceFeedPriceResponse();
    return message;
  }
};
exports.MsgRelayPriceFeedPriceResponse = MsgRelayPriceFeedPriceResponse;
function createBaseMsgRelayBandRates() {
  return {
    relayer: "",
    symbols: [],
    rates: [],
    resolveTimes: [],
    requestIDs: []
  };
}
var MsgRelayBandRates = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.relayer !== "") {
      writer.uint32(10).string(message.relayer);
    }
    var _iterator6 = _createForOfIteratorHelper(message.symbols),
      _step6;
    try {
      for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
        var v = _step6.value;
        writer.uint32(18).string(v);
      }
    } catch (err) {
      _iterator6.e(err);
    } finally {
      _iterator6.f();
    }
    writer.uint32(26).fork();
    var _iterator7 = _createForOfIteratorHelper(message.rates),
      _step7;
    try {
      for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
        var _v4 = _step7.value;
        writer.uint64(_v4);
      }
    } catch (err) {
      _iterator7.e(err);
    } finally {
      _iterator7.f();
    }
    writer.ldelim();
    writer.uint32(34).fork();
    var _iterator8 = _createForOfIteratorHelper(message.resolveTimes),
      _step8;
    try {
      for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {
        var _v5 = _step8.value;
        writer.uint64(_v5);
      }
    } catch (err) {
      _iterator8.e(err);
    } finally {
      _iterator8.f();
    }
    writer.ldelim();
    writer.uint32(42).fork();
    var _iterator9 = _createForOfIteratorHelper(message.requestIDs),
      _step9;
    try {
      for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {
        var _v6 = _step9.value;
        writer.uint64(_v6);
      }
    } catch (err) {
      _iterator9.e(err);
    } finally {
      _iterator9.f();
    }
    writer.ldelim();
    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 = createBaseMsgRelayBandRates();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.relayer = reader.string();
          break;
        case 2:
          message.symbols.push(reader.string());
          break;
        case 3:
          if ((tag & 7) === 2) {
            var end2 = reader.uint32() + reader.pos;
            while (reader.pos < end2) {
              message.rates.push(reader.uint64());
            }
          } else {
            message.rates.push(reader.uint64());
          }
          break;
        case 4:
          if ((tag & 7) === 2) {
            var _end = reader.uint32() + reader.pos;
            while (reader.pos < _end) {
              message.resolveTimes.push(reader.uint64());
            }
          } else {
            message.resolveTimes.push(reader.uint64());
          }
          break;
        case 5:
          if ((tag & 7) === 2) {
            var _end2 = reader.uint32() + reader.pos;
            while (reader.pos < _end2) {
              message.requestIDs.push(reader.uint64());
            }
          } else {
            message.requestIDs.push(reader.uint64());
          }
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$relayer, _object$symbols2, _object$rates, _object$resolveTimes, _object$requestIDs;
    var message = createBaseMsgRelayBandRates();
    message.relayer = (_object$relayer = object.relayer) !== null && _object$relayer !== void 0 ? _object$relayer : "";
    message.symbols = ((_object$symbols2 = object.symbols) === null || _object$symbols2 === void 0 ? void 0 : _object$symbols2.map(function (e) {
      return e;
    })) || [];
    message.rates = ((_object$rates = object.rates) === null || _object$rates === void 0 ? void 0 : _object$rates.map(function (e) {
      return _helpers.Long.fromValue(e);
    })) || [];
    message.resolveTimes = ((_object$resolveTimes = object.resolveTimes) === null || _object$resolveTimes === void 0 ? void 0 : _object$resolveTimes.map(function (e) {
      return _helpers.Long.fromValue(e);
    })) || [];
    message.requestIDs = ((_object$requestIDs = object.requestIDs) === null || _object$requestIDs === void 0 ? void 0 : _object$requestIDs.map(function (e) {
      return _helpers.Long.fromValue(e);
    })) || [];
    return message;
  }
};
exports.MsgRelayBandRates = MsgRelayBandRates;
function createBaseMsgRelayBandRatesResponse() {
  return {};
}
var MsgRelayBandRatesResponse = {
  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 = createBaseMsgRelayBandRatesResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseMsgRelayBandRatesResponse();
    return message;
  }
};
exports.MsgRelayBandRatesResponse = MsgRelayBandRatesResponse;
function createBaseMsgRelayCoinbaseMessages() {
  return {
    sender: "",
    messages: [],
    signatures: []
  };
}
var MsgRelayCoinbaseMessages = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.sender !== "") {
      writer.uint32(10).string(message.sender);
    }
    var _iterator10 = _createForOfIteratorHelper(message.messages),
      _step10;
    try {
      for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {
        var v = _step10.value;
        writer.uint32(18).bytes(v);
      }
    } catch (err) {
      _iterator10.e(err);
    } finally {
      _iterator10.f();
    }
    var _iterator11 = _createForOfIteratorHelper(message.signatures),
      _step11;
    try {
      for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {
        var _v7 = _step11.value;
        writer.uint32(26).bytes(_v7);
      }
    } catch (err) {
      _iterator11.e(err);
    } finally {
      _iterator11.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 = createBaseMsgRelayCoinbaseMessages();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.sender = reader.string();
          break;
        case 2:
          message.messages.push(reader.bytes());
          break;
        case 3:
          message.signatures.push(reader.bytes());
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$sender3, _object$messages, _object$signatures;
    var message = createBaseMsgRelayCoinbaseMessages();
    message.sender = (_object$sender3 = object.sender) !== null && _object$sender3 !== void 0 ? _object$sender3 : "";
    message.messages = ((_object$messages = object.messages) === null || _object$messages === void 0 ? void 0 : _object$messages.map(function (e) {
      return e;
    })) || [];
    message.signatures = ((_object$signatures = object.signatures) === null || _object$signatures === void 0 ? void 0 : _object$signatures.map(function (e) {
      return e;
    })) || [];
    return message;
  }
};
exports.MsgRelayCoinbaseMessages = MsgRelayCoinbaseMessages;
function createBaseMsgRelayCoinbaseMessagesResponse() {
  return {};
}
var MsgRelayCoinbaseMessagesResponse = {
  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 = createBaseMsgRelayCoinbaseMessagesResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseMsgRelayCoinbaseMessagesResponse();
    return message;
  }
};
exports.MsgRelayCoinbaseMessagesResponse = MsgRelayCoinbaseMessagesResponse;
function createBaseMsgRequestBandIBCRates() {
  return {
    sender: "",
    requestId: _helpers.Long.UZERO
  };
}
var MsgRequestBandIBCRates = {
  encode: function encode(message) {
    var writer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _m0.Writer.create();
    if (message.sender !== "") {
      writer.uint32(10).string(message.sender);
    }
    if (!message.requestId.isZero()) {
      writer.uint32(16).uint64(message.requestId);
    }
    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 = createBaseMsgRequestBandIBCRates();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        case 1:
          message.sender = reader.string();
          break;
        case 2:
          message.requestId = reader.uint64();
          break;
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(object) {
    var _object$sender4;
    var message = createBaseMsgRequestBandIBCRates();
    message.sender = (_object$sender4 = object.sender) !== null && _object$sender4 !== void 0 ? _object$sender4 : "";
    message.requestId = object.requestId !== undefined && object.requestId !== null ? _helpers.Long.fromValue(object.requestId) : _helpers.Long.UZERO;
    return message;
  }
};
exports.MsgRequestBandIBCRates = MsgRequestBandIBCRates;
function createBaseMsgRequestBandIBCRatesResponse() {
  return {};
}
var MsgRequestBandIBCRatesResponse = {
  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 = createBaseMsgRequestBandIBCRatesResponse();
    while (reader.pos < end) {
      var tag = reader.uint32();
      switch (tag >>> 3) {
        default:
          reader.skipType(tag & 7);
          break;
      }
    }
    return message;
  },
  fromPartial: function fromPartial(_) {
    var message = createBaseMsgRequestBandIBCRatesResponse();
    return message;
  }
};
exports.MsgRequestBandIBCRatesResponse = MsgRequestBandIBCRatesResponse;