import { ServiceType } from "@protobuf-ts/runtime-rpc";
import { WireType } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { Params } from "./oracle_pb.js";
import { ChainlinkReport } from "./oracle_pb.js";
import { PriceAttestation } from "./oracle_pb.js";
import { AssetPair } from "./oracle_pb.js";
class MsgRelayProviderPrices$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayProviderPrices", [
      {
        no: 1,
        name: "sender",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 2,
        name: "provider",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 3,
        name: "symbols",
        kind: "scalar",
        repeat: 2,
        T: 9
        /*ScalarType.STRING*/
      },
      { no: 4, name: "prices", kind: "scalar", repeat: 2, T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec" } }
    ], { "gogoproto.goproto_getters": false, "gogoproto.equal": false, "amino.name": "oracle/MsgRelayProviderPrices", "cosmos.msg.v1.signer": ["sender"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.sender = "";
    message.provider = "";
    message.symbols = [];
    message.prices = [];
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string sender */
        1:
          message.sender = reader.string();
          break;
        case /* string provider */
        2:
          message.provider = reader.string();
          break;
        case /* repeated string symbols */
        3:
          message.symbols.push(reader.string());
          break;
        case /* repeated string prices */
        4:
          message.prices.push(reader.string());
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.sender !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.sender);
    if (message.provider !== "")
      writer.tag(2, WireType.LengthDelimited).string(message.provider);
    for (let i = 0; i < message.symbols.length; i++)
      writer.tag(3, WireType.LengthDelimited).string(message.symbols[i]);
    for (let i = 0; i < message.prices.length; i++)
      writer.tag(4, WireType.LengthDelimited).string(message.prices[i]);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayProviderPrices = new MsgRelayProviderPrices$Type();
class MsgRelayProviderPricesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayProviderPricesResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayProviderPricesResponse = new MsgRelayProviderPricesResponse$Type();
class MsgRelayPriceFeedPrice$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayPriceFeedPrice", [
      {
        no: 1,
        name: "sender",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 2,
        name: "base",
        kind: "scalar",
        repeat: 2,
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 3,
        name: "quote",
        kind: "scalar",
        repeat: 2,
        T: 9
        /*ScalarType.STRING*/
      },
      { no: 4, name: "price", kind: "scalar", repeat: 2, T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec" } }
    ], { "gogoproto.goproto_getters": false, "gogoproto.equal": false, "amino.name": "oracle/MsgRelayPriceFeedPrice", "cosmos.msg.v1.signer": ["sender"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.sender = "";
    message.base = [];
    message.quote = [];
    message.price = [];
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string sender */
        1:
          message.sender = reader.string();
          break;
        case /* repeated string base */
        2:
          message.base.push(reader.string());
          break;
        case /* repeated string quote */
        3:
          message.quote.push(reader.string());
          break;
        case /* repeated string price */
        4:
          message.price.push(reader.string());
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.sender !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.sender);
    for (let i = 0; i < message.base.length; i++)
      writer.tag(2, WireType.LengthDelimited).string(message.base[i]);
    for (let i = 0; i < message.quote.length; i++)
      writer.tag(3, WireType.LengthDelimited).string(message.quote[i]);
    for (let i = 0; i < message.price.length; i++)
      writer.tag(4, WireType.LengthDelimited).string(message.price[i]);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayPriceFeedPrice = new MsgRelayPriceFeedPrice$Type();
class MsgRelayPriceFeedPriceResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayPriceFeedPriceResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayPriceFeedPriceResponse = new MsgRelayPriceFeedPriceResponse$Type();
class MsgRelayBandRates$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayBandRates", [
      {
        no: 1,
        name: "relayer",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 2,
        name: "symbols",
        kind: "scalar",
        repeat: 2,
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 3,
        name: "rates",
        kind: "scalar",
        repeat: 1,
        T: 4,
        L: 0
        /*LongType.BIGINT*/
      },
      {
        no: 4,
        name: "resolve_times",
        kind: "scalar",
        repeat: 1,
        T: 4,
        L: 0
        /*LongType.BIGINT*/
      },
      {
        no: 5,
        name: "requestIDs",
        kind: "scalar",
        repeat: 1,
        T: 4,
        L: 0
        /*LongType.BIGINT*/
      }
    ], { "amino.name": "oracle/MsgRelayBandRates", "cosmos.msg.v1.signer": ["relayer"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.relayer = "";
    message.symbols = [];
    message.rates = [];
    message.resolveTimes = [];
    message.requestIDs = [];
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string relayer */
        1:
          message.relayer = reader.string();
          break;
        case /* repeated string symbols */
        2:
          message.symbols.push(reader.string());
          break;
        case /* repeated uint64 rates */
        3:
          if (wireType === WireType.LengthDelimited)
            for (let e = reader.int32() + reader.pos; reader.pos < e; )
              message.rates.push(reader.uint64().toBigInt());
          else
            message.rates.push(reader.uint64().toBigInt());
          break;
        case /* repeated uint64 resolve_times */
        4:
          if (wireType === WireType.LengthDelimited)
            for (let e = reader.int32() + reader.pos; reader.pos < e; )
              message.resolveTimes.push(reader.uint64().toBigInt());
          else
            message.resolveTimes.push(reader.uint64().toBigInt());
          break;
        case /* repeated uint64 requestIDs */
        5:
          if (wireType === WireType.LengthDelimited)
            for (let e = reader.int32() + reader.pos; reader.pos < e; )
              message.requestIDs.push(reader.uint64().toBigInt());
          else
            message.requestIDs.push(reader.uint64().toBigInt());
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.relayer !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.relayer);
    for (let i = 0; i < message.symbols.length; i++)
      writer.tag(2, WireType.LengthDelimited).string(message.symbols[i]);
    if (message.rates.length) {
      writer.tag(3, WireType.LengthDelimited).fork();
      for (let i = 0; i < message.rates.length; i++)
        writer.uint64(message.rates[i]);
      writer.join();
    }
    if (message.resolveTimes.length) {
      writer.tag(4, WireType.LengthDelimited).fork();
      for (let i = 0; i < message.resolveTimes.length; i++)
        writer.uint64(message.resolveTimes[i]);
      writer.join();
    }
    if (message.requestIDs.length) {
      writer.tag(5, WireType.LengthDelimited).fork();
      for (let i = 0; i < message.requestIDs.length; i++)
        writer.uint64(message.requestIDs[i]);
      writer.join();
    }
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayBandRates = new MsgRelayBandRates$Type();
class MsgRelayBandRatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayBandRatesResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayBandRatesResponse = new MsgRelayBandRatesResponse$Type();
class MsgRelayCoinbaseMessages$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayCoinbaseMessages", [
      {
        no: 1,
        name: "sender",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 2,
        name: "messages",
        kind: "scalar",
        repeat: 2,
        T: 12
        /*ScalarType.BYTES*/
      },
      {
        no: 3,
        name: "signatures",
        kind: "scalar",
        repeat: 2,
        T: 12
        /*ScalarType.BYTES*/
      }
    ], { "gogoproto.goproto_getters": false, "gogoproto.equal": false, "amino.name": "oracle/MsgRelayCoinbaseMessages", "cosmos.msg.v1.signer": ["sender"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.sender = "";
    message.messages = [];
    message.signatures = [];
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string sender */
        1:
          message.sender = reader.string();
          break;
        case /* repeated bytes messages */
        2:
          message.messages.push(reader.bytes());
          break;
        case /* repeated bytes signatures */
        3:
          message.signatures.push(reader.bytes());
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.sender !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.sender);
    for (let i = 0; i < message.messages.length; i++)
      writer.tag(2, WireType.LengthDelimited).bytes(message.messages[i]);
    for (let i = 0; i < message.signatures.length; i++)
      writer.tag(3, WireType.LengthDelimited).bytes(message.signatures[i]);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayCoinbaseMessages = new MsgRelayCoinbaseMessages$Type();
class MsgRelayCoinbaseMessagesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayCoinbaseMessagesResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayCoinbaseMessagesResponse = new MsgRelayCoinbaseMessagesResponse$Type();
class MsgRelayStorkPrices$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayStorkPrices", [
      {
        no: 1,
        name: "sender",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      { no: 2, name: "asset_pairs", kind: "message", repeat: 2, T: () => AssetPair }
    ], { "gogoproto.goproto_getters": false, "gogoproto.equal": false, "cosmos.msg.v1.signer": ["sender"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.sender = "";
    message.assetPairs = [];
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string sender */
        1:
          message.sender = reader.string();
          break;
        case /* repeated injective.oracle.v1beta1.AssetPair asset_pairs */
        2:
          message.assetPairs.push(AssetPair.internalBinaryRead(reader, reader.uint32(), options));
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.sender !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.sender);
    for (let i = 0; i < message.assetPairs.length; i++)
      AssetPair.internalBinaryWrite(message.assetPairs[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayStorkPrices = new MsgRelayStorkPrices$Type();
class MsgRelayStorkPricesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayStorkPricesResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayStorkPricesResponse = new MsgRelayStorkPricesResponse$Type();
class MsgRequestBandIBCRates$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRequestBandIBCRates", [
      {
        no: 1,
        name: "sender",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 2,
        name: "request_id",
        kind: "scalar",
        T: 4,
        L: 0
        /*LongType.BIGINT*/
      }
    ], { "gogoproto.goproto_getters": false, "gogoproto.equal": false, "amino.name": "oracle/MsgRequestBandIBCRates", "cosmos.msg.v1.signer": ["sender"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.sender = "";
    message.requestId = 0n;
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string sender */
        1:
          message.sender = reader.string();
          break;
        case /* uint64 request_id */
        2:
          message.requestId = reader.uint64().toBigInt();
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.sender !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.sender);
    if (message.requestId !== 0n)
      writer.tag(2, WireType.Varint).uint64(message.requestId);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRequestBandIBCRates = new MsgRequestBandIBCRates$Type();
class MsgRequestBandIBCRatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRequestBandIBCRatesResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRequestBandIBCRatesResponse = new MsgRequestBandIBCRatesResponse$Type();
class MsgRelayPythPrices$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayPythPrices", [
      {
        no: 1,
        name: "sender",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      { no: 2, name: "price_attestations", kind: "message", repeat: 2, T: () => PriceAttestation }
    ], { "gogoproto.goproto_getters": false, "gogoproto.equal": false, "amino.name": "oracle/MsgRelayPythPrices", "cosmos.msg.v1.signer": ["sender"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.sender = "";
    message.priceAttestations = [];
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string sender */
        1:
          message.sender = reader.string();
          break;
        case /* repeated injective.oracle.v1beta1.PriceAttestation price_attestations */
        2:
          message.priceAttestations.push(PriceAttestation.internalBinaryRead(reader, reader.uint32(), options));
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.sender !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.sender);
    for (let i = 0; i < message.priceAttestations.length; i++)
      PriceAttestation.internalBinaryWrite(message.priceAttestations[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayPythPrices = new MsgRelayPythPrices$Type();
class MsgRelayPythPricesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayPythPricesResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayPythPricesResponse = new MsgRelayPythPricesResponse$Type();
class MsgRelayChainlinkPrices$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayChainlinkPrices", [
      {
        no: 1,
        name: "sender",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      { no: 2, name: "reports", kind: "message", repeat: 2, T: () => ChainlinkReport }
    ], { "gogoproto.goproto_getters": false, "gogoproto.equal": false, "amino.name": "oracle/MsgRelayChainlinkPrices", "cosmos.msg.v1.signer": ["sender"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.sender = "";
    message.reports = [];
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string sender */
        1:
          message.sender = reader.string();
          break;
        case /* repeated injective.oracle.v1beta1.ChainlinkReport reports */
        2:
          message.reports.push(ChainlinkReport.internalBinaryRead(reader, reader.uint32(), options));
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.sender !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.sender);
    for (let i = 0; i < message.reports.length; i++)
      ChainlinkReport.internalBinaryWrite(message.reports[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayChainlinkPrices = new MsgRelayChainlinkPrices$Type();
class MsgRelayChainlinkPricesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayChainlinkPricesResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayChainlinkPricesResponse = new MsgRelayChainlinkPricesResponse$Type();
class MsgRelayPythProPrices$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayPythProPrices", [
      {
        no: 1,
        name: "sender",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 2,
        name: "updates",
        kind: "scalar",
        repeat: 2,
        T: 12
        /*ScalarType.BYTES*/
      }
    ], { "gogoproto.goproto_getters": false, "gogoproto.equal": false, "amino.name": "oracle/MsgRelayPythProPrices", "cosmos.msg.v1.signer": ["sender"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.sender = "";
    message.updates = [];
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string sender */
        1:
          message.sender = reader.string();
          break;
        case /* repeated bytes updates */
        2:
          message.updates.push(reader.bytes());
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.sender !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.sender);
    for (let i = 0; i < message.updates.length; i++)
      writer.tag(2, WireType.LengthDelimited).bytes(message.updates[i]);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayPythProPrices = new MsgRelayPythProPrices$Type();
class MsgRelayPythProPricesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelayPythProPricesResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelayPythProPricesResponse = new MsgRelayPythProPricesResponse$Type();
class MsgRelaySedaFastPrices$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelaySedaFastPrices", [
      {
        no: 1,
        name: "sender",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 2,
        name: "updates",
        kind: "scalar",
        repeat: 2,
        T: 12
        /*ScalarType.BYTES*/
      }
    ], { "gogoproto.goproto_getters": false, "gogoproto.equal": false, "amino.name": "oracle/MsgRelaySedaFastPrices", "cosmos.msg.v1.signer": ["sender"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.sender = "";
    message.updates = [];
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string sender */
        1:
          message.sender = reader.string();
          break;
        case /* repeated bytes updates */
        2:
          message.updates.push(reader.bytes());
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.sender !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.sender);
    for (let i = 0; i < message.updates.length; i++)
      writer.tag(2, WireType.LengthDelimited).bytes(message.updates[i]);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelaySedaFastPrices = new MsgRelaySedaFastPrices$Type();
class MsgRelaySedaFastPricesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgRelaySedaFastPricesResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgRelaySedaFastPricesResponse = new MsgRelaySedaFastPricesResponse$Type();
class MsgUpdateParams$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgUpdateParams", [
      { no: 1, name: "authority", kind: "scalar", T: 9, options: { "cosmos_proto.scalar": "cosmos.AddressString" } },
      { no: 2, name: "params", kind: "message", T: () => Params, options: { "gogoproto.nullable": false } }
    ], { "amino.name": "oracle/MsgUpdateParams", "cosmos.msg.v1.signer": ["authority"] });
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.authority = "";
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        case /* string authority */
        1:
          message.authority = reader.string();
          break;
        case /* injective.oracle.v1beta1.Params params */
        2:
          message.params = Params.internalBinaryRead(reader, reader.uint32(), options, message.params);
          break;
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    if (message.authority !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.authority);
    if (message.params)
      Params.internalBinaryWrite(message.params, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgUpdateParams = new MsgUpdateParams$Type();
class MsgUpdateParamsResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.MsgUpdateParamsResponse", []);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    if (value !== void 0)
      reflectionMergePartial(this, message, value);
    return message;
  }
  internalBinaryRead(reader, length, options, target) {
    let message = target ?? this.create(), end = reader.pos + length;
    while (reader.pos < end) {
      let [fieldNo, wireType] = reader.tag();
      switch (fieldNo) {
        default:
          let u = options.readUnknownField;
          if (u === "throw")
            throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
          let d = reader.skip(wireType);
          if (u !== false)
            (u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
      }
    }
    return message;
  }
  internalBinaryWrite(message, writer, options) {
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const MsgUpdateParamsResponse = new MsgUpdateParamsResponse$Type();
const Msg = new ServiceType("injective.oracle.v1beta1.Msg", [
  { name: "RelayProviderPrices", options: {}, I: MsgRelayProviderPrices, O: MsgRelayProviderPricesResponse },
  { name: "RelayPriceFeedPrice", options: {}, I: MsgRelayPriceFeedPrice, O: MsgRelayPriceFeedPriceResponse },
  { name: "RelayCoinbaseMessages", options: {}, I: MsgRelayCoinbaseMessages, O: MsgRelayCoinbaseMessagesResponse },
  { name: "RelayStorkMessage", options: {}, I: MsgRelayStorkPrices, O: MsgRelayStorkPricesResponse },
  { name: "RelayPythPrices", options: {}, I: MsgRelayPythPrices, O: MsgRelayPythPricesResponse },
  { name: "RelayChainlinkPrices", options: {}, I: MsgRelayChainlinkPrices, O: MsgRelayChainlinkPricesResponse },
  { name: "RelayPythProPrices", options: {}, I: MsgRelayPythProPrices, O: MsgRelayPythProPricesResponse },
  { name: "RelaySedaFastPrices", options: {}, I: MsgRelaySedaFastPrices, O: MsgRelaySedaFastPricesResponse },
  { name: "UpdateParams", options: {}, I: MsgUpdateParams, O: MsgUpdateParamsResponse }
], { "cosmos.msg.v1.service": true });
export {
  Msg,
  MsgRelayBandRates,
  MsgRelayBandRatesResponse,
  MsgRelayChainlinkPrices,
  MsgRelayChainlinkPricesResponse,
  MsgRelayCoinbaseMessages,
  MsgRelayCoinbaseMessagesResponse,
  MsgRelayPriceFeedPrice,
  MsgRelayPriceFeedPriceResponse,
  MsgRelayProviderPrices,
  MsgRelayProviderPricesResponse,
  MsgRelayPythPrices,
  MsgRelayPythPricesResponse,
  MsgRelayPythProPrices,
  MsgRelayPythProPricesResponse,
  MsgRelaySedaFastPrices,
  MsgRelaySedaFastPricesResponse,
  MsgRelayStorkPrices,
  MsgRelayStorkPricesResponse,
  MsgRequestBandIBCRates,
  MsgRequestBandIBCRatesResponse,
  MsgUpdateParams,
  MsgUpdateParamsResponse
};
