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 { ProviderState } from "./oracle_pb.js";
import { ProviderInfo } from "./oracle_pb.js";
import { PriceRecord } from "./oracle_pb.js";
import { MetadataStatistics } from "./oracle_pb.js";
import { OracleInfo } from "./oracle_pb.js";
import { PriceRecords } from "./oracle_pb.js";
import { OracleType } from "./oracle_pb.js";
import { GenesisState } from "./genesis_pb.js";
import { ChainlinkDataStreamsPriceState } from "./oracle_pb.js";
import { PriceState } from "./oracle_pb.js";
import { StorkPriceState } from "./oracle_pb.js";
import { SedaFastPriceState } from "./oracle_pb.js";
import { PythProPriceState } from "./oracle_pb.js";
import { CoinbasePriceState } from "./oracle_pb.js";
import { PriceFeedState } from "./oracle_pb.js";
import { BandPriceState } from "./oracle_pb.js";
import { Params } from "./oracle_pb.js";
import { PythPriceState } from "./oracle_pb.js";
class QueryPythPriceRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryPythPriceRequest", [
      {
        no: 1,
        name: "price_id",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceId = "";
    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 price_id */
        1:
          message.priceId = 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.priceId !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.priceId);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryPythPriceRequest = new QueryPythPriceRequest$Type();
class QueryPythPriceResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryPythPriceResponse", [
      { no: 1, name: "price_state", kind: "message", T: () => PythPriceState }
    ]);
  }
  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) {
        case /* injective.oracle.v1beta1.PythPriceState price_state */
        1:
          message.priceState = PythPriceState.internalBinaryRead(reader, reader.uint32(), options, message.priceState);
          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.priceState)
      PythPriceState.internalBinaryWrite(message.priceState, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryPythPriceResponse = new QueryPythPriceResponse$Type();
class QueryParamsRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryParamsRequest", []);
  }
  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 QueryParamsRequest = new QueryParamsRequest$Type();
class QueryParamsResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryParamsResponse", [
      { no: 1, name: "params", kind: "message", T: () => Params, options: { "gogoproto.nullable": false } }
    ]);
  }
  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) {
        case /* injective.oracle.v1beta1.Params params */
        1:
          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.params)
      Params.internalBinaryWrite(message.params, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryParamsResponse = new QueryParamsResponse$Type();
class QueryBandRelayersRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryBandRelayersRequest", []);
  }
  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 QueryBandRelayersRequest = new QueryBandRelayersRequest$Type();
class QueryBandRelayersResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryBandRelayersResponse", [
      {
        no: 1,
        name: "relayers",
        kind: "scalar",
        repeat: 2,
        T: 9
        /*ScalarType.STRING*/
      }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.relayers = [];
    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 /* repeated string relayers */
        1:
          message.relayers.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) {
    for (let i = 0; i < message.relayers.length; i++)
      writer.tag(1, WireType.LengthDelimited).string(message.relayers[i]);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryBandRelayersResponse = new QueryBandRelayersResponse$Type();
class QueryBandPriceStatesRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryBandPriceStatesRequest", []);
  }
  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 QueryBandPriceStatesRequest = new QueryBandPriceStatesRequest$Type();
class QueryBandPriceStatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryBandPriceStatesResponse", [
      { no: 1, name: "price_states", kind: "message", repeat: 2, T: () => BandPriceState }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceStates = [];
    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 /* repeated injective.oracle.v1beta1.BandPriceState price_states */
        1:
          message.priceStates.push(BandPriceState.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) {
    for (let i = 0; i < message.priceStates.length; i++)
      BandPriceState.internalBinaryWrite(message.priceStates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryBandPriceStatesResponse = new QueryBandPriceStatesResponse$Type();
class QueryBandIBCPriceStatesRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryBandIBCPriceStatesRequest", []);
  }
  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 QueryBandIBCPriceStatesRequest = new QueryBandIBCPriceStatesRequest$Type();
class QueryBandIBCPriceStatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryBandIBCPriceStatesResponse", [
      { no: 1, name: "price_states", kind: "message", repeat: 2, T: () => BandPriceState }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceStates = [];
    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 /* repeated injective.oracle.v1beta1.BandPriceState price_states */
        1:
          message.priceStates.push(BandPriceState.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) {
    for (let i = 0; i < message.priceStates.length; i++)
      BandPriceState.internalBinaryWrite(message.priceStates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryBandIBCPriceStatesResponse = new QueryBandIBCPriceStatesResponse$Type();
class QueryPriceFeedPriceStatesRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryPriceFeedPriceStatesRequest", []);
  }
  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 QueryPriceFeedPriceStatesRequest = new QueryPriceFeedPriceStatesRequest$Type();
class QueryPriceFeedPriceStatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryPriceFeedPriceStatesResponse", [
      { no: 1, name: "price_states", kind: "message", repeat: 2, T: () => PriceFeedState }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceStates = [];
    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 /* repeated injective.oracle.v1beta1.PriceFeedState price_states */
        1:
          message.priceStates.push(PriceFeedState.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) {
    for (let i = 0; i < message.priceStates.length; i++)
      PriceFeedState.internalBinaryWrite(message.priceStates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryPriceFeedPriceStatesResponse = new QueryPriceFeedPriceStatesResponse$Type();
class QueryCoinbasePriceStatesRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryCoinbasePriceStatesRequest", []);
  }
  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 QueryCoinbasePriceStatesRequest = new QueryCoinbasePriceStatesRequest$Type();
class QueryCoinbasePriceStatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryCoinbasePriceStatesResponse", [
      { no: 1, name: "price_states", kind: "message", repeat: 2, T: () => CoinbasePriceState }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceStates = [];
    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 /* repeated injective.oracle.v1beta1.CoinbasePriceState price_states */
        1:
          message.priceStates.push(CoinbasePriceState.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) {
    for (let i = 0; i < message.priceStates.length; i++)
      CoinbasePriceState.internalBinaryWrite(message.priceStates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryCoinbasePriceStatesResponse = new QueryCoinbasePriceStatesResponse$Type();
class QueryPythPriceStatesRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryPythPriceStatesRequest", []);
  }
  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 QueryPythPriceStatesRequest = new QueryPythPriceStatesRequest$Type();
class QueryPythPriceStatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryPythPriceStatesResponse", [
      { no: 1, name: "price_states", kind: "message", repeat: 2, T: () => PythPriceState }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceStates = [];
    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 /* repeated injective.oracle.v1beta1.PythPriceState price_states */
        1:
          message.priceStates.push(PythPriceState.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) {
    for (let i = 0; i < message.priceStates.length; i++)
      PythPriceState.internalBinaryWrite(message.priceStates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryPythPriceStatesResponse = new QueryPythPriceStatesResponse$Type();
class QueryPythProPriceStatesRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryPythProPriceStatesRequest", []);
  }
  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 QueryPythProPriceStatesRequest = new QueryPythProPriceStatesRequest$Type();
class QueryPythProPriceStatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryPythProPriceStatesResponse", [
      { no: 1, name: "price_states", kind: "message", repeat: 2, T: () => PythProPriceState }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceStates = [];
    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 /* repeated injective.oracle.v1beta1.PythProPriceState price_states */
        1:
          message.priceStates.push(PythProPriceState.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) {
    for (let i = 0; i < message.priceStates.length; i++)
      PythProPriceState.internalBinaryWrite(message.priceStates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryPythProPriceStatesResponse = new QueryPythProPriceStatesResponse$Type();
class QuerySedaFastPriceStatesRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QuerySedaFastPriceStatesRequest", []);
  }
  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 QuerySedaFastPriceStatesRequest = new QuerySedaFastPriceStatesRequest$Type();
class QuerySedaFastPriceStatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QuerySedaFastPriceStatesResponse", [
      { no: 1, name: "price_states", kind: "message", repeat: 2, T: () => SedaFastPriceState }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceStates = [];
    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 /* repeated injective.oracle.v1beta1.SedaFastPriceState price_states */
        1:
          message.priceStates.push(SedaFastPriceState.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) {
    for (let i = 0; i < message.priceStates.length; i++)
      SedaFastPriceState.internalBinaryWrite(message.priceStates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QuerySedaFastPriceStatesResponse = new QuerySedaFastPriceStatesResponse$Type();
class QueryStorkPriceStatesRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryStorkPriceStatesRequest", []);
  }
  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 QueryStorkPriceStatesRequest = new QueryStorkPriceStatesRequest$Type();
class QueryStorkPriceStatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryStorkPriceStatesResponse", [
      { no: 1, name: "price_states", kind: "message", repeat: 2, T: () => StorkPriceState }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceStates = [];
    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 /* repeated injective.oracle.v1beta1.StorkPriceState price_states */
        1:
          message.priceStates.push(StorkPriceState.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) {
    for (let i = 0; i < message.priceStates.length; i++)
      StorkPriceState.internalBinaryWrite(message.priceStates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryStorkPriceStatesResponse = new QueryStorkPriceStatesResponse$Type();
class QueryStorkPublishersRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryStorkPublishersRequest", []);
  }
  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 QueryStorkPublishersRequest = new QueryStorkPublishersRequest$Type();
class QueryStorkPublishersResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryStorkPublishersResponse", [
      {
        no: 1,
        name: "publishers",
        kind: "scalar",
        repeat: 2,
        T: 9
        /*ScalarType.STRING*/
      }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.publishers = [];
    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 /* repeated string publishers */
        1:
          message.publishers.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) {
    for (let i = 0; i < message.publishers.length; i++)
      writer.tag(1, WireType.LengthDelimited).string(message.publishers[i]);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryStorkPublishersResponse = new QueryStorkPublishersResponse$Type();
class QueryProviderPriceStateRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryProviderPriceStateRequest", [
      {
        no: 1,
        name: "provider",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 2,
        name: "symbol",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.provider = "";
    message.symbol = "";
    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 provider */
        1:
          message.provider = reader.string();
          break;
        case /* string symbol */
        2:
          message.symbol = 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.provider !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.provider);
    if (message.symbol !== "")
      writer.tag(2, WireType.LengthDelimited).string(message.symbol);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryProviderPriceStateRequest = new QueryProviderPriceStateRequest$Type();
class QueryProviderPriceStateResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryProviderPriceStateResponse", [
      { no: 1, name: "price_state", kind: "message", T: () => PriceState }
    ]);
  }
  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) {
        case /* injective.oracle.v1beta1.PriceState price_state */
        1:
          message.priceState = PriceState.internalBinaryRead(reader, reader.uint32(), options, message.priceState);
          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.priceState)
      PriceState.internalBinaryWrite(message.priceState, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryProviderPriceStateResponse = new QueryProviderPriceStateResponse$Type();
class QueryChainlinkDataStreamsPriceStatesRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryChainlinkDataStreamsPriceStatesRequest", []);
  }
  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 QueryChainlinkDataStreamsPriceStatesRequest = new QueryChainlinkDataStreamsPriceStatesRequest$Type();
class QueryChainlinkDataStreamsPriceStatesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryChainlinkDataStreamsPriceStatesResponse", [
      { no: 1, name: "price_states", kind: "message", repeat: 2, T: () => ChainlinkDataStreamsPriceState }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceStates = [];
    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 /* repeated injective.oracle.v1beta1.ChainlinkDataStreamsPriceState price_states */
        1:
          message.priceStates.push(ChainlinkDataStreamsPriceState.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) {
    for (let i = 0; i < message.priceStates.length; i++)
      ChainlinkDataStreamsPriceState.internalBinaryWrite(message.priceStates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryChainlinkDataStreamsPriceStatesResponse = new QueryChainlinkDataStreamsPriceStatesResponse$Type();
class QueryModuleStateRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryModuleStateRequest", []);
  }
  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 QueryModuleStateRequest = new QueryModuleStateRequest$Type();
class QueryModuleStateResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryModuleStateResponse", [
      { no: 1, name: "state", kind: "message", T: () => GenesisState }
    ]);
  }
  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) {
        case /* injective.oracle.v1beta1.GenesisState state */
        1:
          message.state = GenesisState.internalBinaryRead(reader, reader.uint32(), options, message.state);
          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.state)
      GenesisState.internalBinaryWrite(message.state, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryModuleStateResponse = new QueryModuleStateResponse$Type();
class QueryHistoricalPriceRecordsRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryHistoricalPriceRecordsRequest", [
      { no: 1, name: "oracle", kind: "enum", T: () => ["injective.oracle.v1beta1.OracleType", OracleType] },
      {
        no: 2,
        name: "symbol_id",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.oracle = 0;
    message.symbolId = "";
    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 /* injective.oracle.v1beta1.OracleType oracle */
        1:
          message.oracle = reader.int32();
          break;
        case /* string symbol_id */
        2:
          message.symbolId = 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.oracle !== 0)
      writer.tag(1, WireType.Varint).int32(message.oracle);
    if (message.symbolId !== "")
      writer.tag(2, WireType.LengthDelimited).string(message.symbolId);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryHistoricalPriceRecordsRequest = new QueryHistoricalPriceRecordsRequest$Type();
class QueryHistoricalPriceRecordsResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryHistoricalPriceRecordsResponse", [
      { no: 1, name: "price_records", kind: "message", repeat: 2, T: () => PriceRecords }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.priceRecords = [];
    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 /* repeated injective.oracle.v1beta1.PriceRecords price_records */
        1:
          message.priceRecords.push(PriceRecords.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) {
    for (let i = 0; i < message.priceRecords.length; i++)
      PriceRecords.internalBinaryWrite(message.priceRecords[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryHistoricalPriceRecordsResponse = new QueryHistoricalPriceRecordsResponse$Type();
class OracleHistoryOptions$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.OracleHistoryOptions", [
      {
        no: 1,
        name: "max_age",
        kind: "scalar",
        T: 4,
        L: 0
        /*LongType.BIGINT*/
      },
      {
        no: 2,
        name: "include_raw_history",
        kind: "scalar",
        T: 8
        /*ScalarType.BOOL*/
      },
      {
        no: 3,
        name: "include_metadata",
        kind: "scalar",
        T: 8
        /*ScalarType.BOOL*/
      }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.maxAge = 0n;
    message.includeRawHistory = false;
    message.includeMetadata = false;
    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 /* uint64 max_age */
        1:
          message.maxAge = reader.uint64().toBigInt();
          break;
        case /* bool include_raw_history */
        2:
          message.includeRawHistory = reader.bool();
          break;
        case /* bool include_metadata */
        3:
          message.includeMetadata = reader.bool();
          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.maxAge !== 0n)
      writer.tag(1, WireType.Varint).uint64(message.maxAge);
    if (message.includeRawHistory !== false)
      writer.tag(2, WireType.Varint).bool(message.includeRawHistory);
    if (message.includeMetadata !== false)
      writer.tag(3, WireType.Varint).bool(message.includeMetadata);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const OracleHistoryOptions = new OracleHistoryOptions$Type();
class QueryOracleVolatilityRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryOracleVolatilityRequest", [
      { no: 1, name: "base_info", kind: "message", T: () => OracleInfo },
      { no: 2, name: "quote_info", kind: "message", T: () => OracleInfo },
      { no: 3, name: "oracle_history_options", kind: "message", T: () => OracleHistoryOptions }
    ]);
  }
  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) {
        case /* injective.oracle.v1beta1.OracleInfo base_info */
        1:
          message.baseInfo = OracleInfo.internalBinaryRead(reader, reader.uint32(), options, message.baseInfo);
          break;
        case /* injective.oracle.v1beta1.OracleInfo quote_info */
        2:
          message.quoteInfo = OracleInfo.internalBinaryRead(reader, reader.uint32(), options, message.quoteInfo);
          break;
        case /* injective.oracle.v1beta1.OracleHistoryOptions oracle_history_options */
        3:
          message.oracleHistoryOptions = OracleHistoryOptions.internalBinaryRead(reader, reader.uint32(), options, message.oracleHistoryOptions);
          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.baseInfo)
      OracleInfo.internalBinaryWrite(message.baseInfo, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    if (message.quoteInfo)
      OracleInfo.internalBinaryWrite(message.quoteInfo, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
    if (message.oracleHistoryOptions)
      OracleHistoryOptions.internalBinaryWrite(message.oracleHistoryOptions, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryOracleVolatilityRequest = new QueryOracleVolatilityRequest$Type();
class QueryOracleVolatilityResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryOracleVolatilityResponse", [
      { no: 1, name: "volatility", kind: "scalar", T: 9, options: { "gogoproto.customtype": "cosmossdk.io/math.LegacyDec" } },
      { no: 2, name: "history_metadata", kind: "message", T: () => MetadataStatistics },
      { no: 3, name: "raw_history", kind: "message", repeat: 2, T: () => PriceRecord }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.volatility = "";
    message.rawHistory = [];
    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 volatility */
        1:
          message.volatility = reader.string();
          break;
        case /* injective.oracle.v1beta1.MetadataStatistics history_metadata */
        2:
          message.historyMetadata = MetadataStatistics.internalBinaryRead(reader, reader.uint32(), options, message.historyMetadata);
          break;
        case /* repeated injective.oracle.v1beta1.PriceRecord raw_history */
        3:
          message.rawHistory.push(PriceRecord.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.volatility !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.volatility);
    if (message.historyMetadata)
      MetadataStatistics.internalBinaryWrite(message.historyMetadata, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
    for (let i = 0; i < message.rawHistory.length; i++)
      PriceRecord.internalBinaryWrite(message.rawHistory[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryOracleVolatilityResponse = new QueryOracleVolatilityResponse$Type();
class QueryOracleProvidersInfoRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryOracleProvidersInfoRequest", []);
  }
  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 QueryOracleProvidersInfoRequest = new QueryOracleProvidersInfoRequest$Type();
class QueryOracleProvidersInfoResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryOracleProvidersInfoResponse", [
      { no: 1, name: "providers", kind: "message", repeat: 2, T: () => ProviderInfo }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.providers = [];
    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 /* repeated injective.oracle.v1beta1.ProviderInfo providers */
        1:
          message.providers.push(ProviderInfo.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) {
    for (let i = 0; i < message.providers.length; i++)
      ProviderInfo.internalBinaryWrite(message.providers[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryOracleProvidersInfoResponse = new QueryOracleProvidersInfoResponse$Type();
class QueryOracleProviderPricesRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryOracleProviderPricesRequest", [
      {
        no: 1,
        name: "provider",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.provider = "";
    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 provider */
        1:
          message.provider = 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.provider !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.provider);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryOracleProviderPricesRequest = new QueryOracleProviderPricesRequest$Type();
class QueryOracleProviderPricesResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryOracleProviderPricesResponse", [
      { no: 1, name: "providerState", kind: "message", repeat: 2, T: () => ProviderState }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.providerState = [];
    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 /* repeated injective.oracle.v1beta1.ProviderState providerState */
        1:
          message.providerState.push(ProviderState.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) {
    for (let i = 0; i < message.providerState.length; i++)
      ProviderState.internalBinaryWrite(message.providerState[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryOracleProviderPricesResponse = new QueryOracleProviderPricesResponse$Type();
class ScalingOptions$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.ScalingOptions", [
      {
        no: 1,
        name: "base_decimals",
        kind: "scalar",
        T: 13
        /*ScalarType.UINT32*/
      },
      {
        no: 2,
        name: "quote_decimals",
        kind: "scalar",
        T: 13
        /*ScalarType.UINT32*/
      }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.baseDecimals = 0;
    message.quoteDecimals = 0;
    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 /* uint32 base_decimals */
        1:
          message.baseDecimals = reader.uint32();
          break;
        case /* uint32 quote_decimals */
        2:
          message.quoteDecimals = reader.uint32();
          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.baseDecimals !== 0)
      writer.tag(1, WireType.Varint).uint32(message.baseDecimals);
    if (message.quoteDecimals !== 0)
      writer.tag(2, WireType.Varint).uint32(message.quoteDecimals);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const ScalingOptions = new ScalingOptions$Type();
class QueryOraclePriceRequest$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryOraclePriceRequest", [
      { no: 1, name: "oracle_type", kind: "enum", T: () => ["injective.oracle.v1beta1.OracleType", OracleType] },
      {
        no: 2,
        name: "base",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      {
        no: 3,
        name: "quote",
        kind: "scalar",
        T: 9
        /*ScalarType.STRING*/
      },
      { no: 4, name: "scaling_options", kind: "message", T: () => ScalingOptions, options: { "gogoproto.nullable": true } }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.oracleType = 0;
    message.base = "";
    message.quote = "";
    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 /* injective.oracle.v1beta1.OracleType oracle_type */
        1:
          message.oracleType = reader.int32();
          break;
        case /* string base */
        2:
          message.base = reader.string();
          break;
        case /* string quote */
        3:
          message.quote = reader.string();
          break;
        case /* injective.oracle.v1beta1.ScalingOptions scaling_options */
        4:
          message.scalingOptions = ScalingOptions.internalBinaryRead(reader, reader.uint32(), options, message.scalingOptions);
          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.oracleType !== 0)
      writer.tag(1, WireType.Varint).int32(message.oracleType);
    if (message.base !== "")
      writer.tag(2, WireType.LengthDelimited).string(message.base);
    if (message.quote !== "")
      writer.tag(3, WireType.LengthDelimited).string(message.quote);
    if (message.scalingOptions)
      ScalingOptions.internalBinaryWrite(message.scalingOptions, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryOraclePriceRequest = new QueryOraclePriceRequest$Type();
class PricePairState$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.PricePairState", [
      { no: 1, name: "pair_price", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec" } },
      { no: 2, name: "base_price", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec" } },
      { no: 3, name: "quote_price", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec" } },
      { no: 4, name: "base_cumulative_price", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec" } },
      { no: 5, name: "quote_cumulative_price", kind: "scalar", T: 9, options: { "gogoproto.nullable": false, "gogoproto.customtype": "cosmossdk.io/math.LegacyDec" } },
      {
        no: 6,
        name: "base_timestamp",
        kind: "scalar",
        T: 3,
        L: 0
        /*LongType.BIGINT*/
      },
      {
        no: 7,
        name: "quote_timestamp",
        kind: "scalar",
        T: 3,
        L: 0
        /*LongType.BIGINT*/
      }
    ]);
  }
  create(value) {
    const message = globalThis.Object.create(this.messagePrototype);
    message.pairPrice = "";
    message.basePrice = "";
    message.quotePrice = "";
    message.baseCumulativePrice = "";
    message.quoteCumulativePrice = "";
    message.baseTimestamp = 0n;
    message.quoteTimestamp = 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 pair_price */
        1:
          message.pairPrice = reader.string();
          break;
        case /* string base_price */
        2:
          message.basePrice = reader.string();
          break;
        case /* string quote_price */
        3:
          message.quotePrice = reader.string();
          break;
        case /* string base_cumulative_price */
        4:
          message.baseCumulativePrice = reader.string();
          break;
        case /* string quote_cumulative_price */
        5:
          message.quoteCumulativePrice = reader.string();
          break;
        case /* int64 base_timestamp */
        6:
          message.baseTimestamp = reader.int64().toBigInt();
          break;
        case /* int64 quote_timestamp */
        7:
          message.quoteTimestamp = reader.int64().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.pairPrice !== "")
      writer.tag(1, WireType.LengthDelimited).string(message.pairPrice);
    if (message.basePrice !== "")
      writer.tag(2, WireType.LengthDelimited).string(message.basePrice);
    if (message.quotePrice !== "")
      writer.tag(3, WireType.LengthDelimited).string(message.quotePrice);
    if (message.baseCumulativePrice !== "")
      writer.tag(4, WireType.LengthDelimited).string(message.baseCumulativePrice);
    if (message.quoteCumulativePrice !== "")
      writer.tag(5, WireType.LengthDelimited).string(message.quoteCumulativePrice);
    if (message.baseTimestamp !== 0n)
      writer.tag(6, WireType.Varint).int64(message.baseTimestamp);
    if (message.quoteTimestamp !== 0n)
      writer.tag(7, WireType.Varint).int64(message.quoteTimestamp);
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const PricePairState = new PricePairState$Type();
class QueryOraclePriceResponse$Type extends MessageType {
  constructor() {
    super("injective.oracle.v1beta1.QueryOraclePriceResponse", [
      { no: 1, name: "price_pair_state", kind: "message", T: () => PricePairState }
    ]);
  }
  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) {
        case /* injective.oracle.v1beta1.PricePairState price_pair_state */
        1:
          message.pricePairState = PricePairState.internalBinaryRead(reader, reader.uint32(), options, message.pricePairState);
          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.pricePairState)
      PricePairState.internalBinaryWrite(message.pricePairState, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
    let u = options.writeUnknownFields;
    if (u !== false)
      (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
    return writer;
  }
}
const QueryOraclePriceResponse = new QueryOraclePriceResponse$Type();
const Query = new ServiceType("injective.oracle.v1beta1.Query", [
  { name: "Params", options: { "google.api.http": { get: "/injective/oracle/v1beta1/params" } }, I: QueryParamsRequest, O: QueryParamsResponse },
  { name: "BandRelayers", options: { "google.api.http": { get: "/injective/oracle/v1beta1/band_relayers" } }, I: QueryBandRelayersRequest, O: QueryBandRelayersResponse },
  { name: "BandPriceStates", options: { "google.api.http": { get: "/injective/oracle/v1beta1/band_price_states" } }, I: QueryBandPriceStatesRequest, O: QueryBandPriceStatesResponse },
  { name: "BandIBCPriceStates", options: { "google.api.http": { get: "/injective/oracle/v1beta1/band_ibc_price_states" } }, I: QueryBandIBCPriceStatesRequest, O: QueryBandIBCPriceStatesResponse },
  { name: "PriceFeedPriceStates", options: { "google.api.http": { get: "/injective/oracle/v1beta1/pricefeed_price_states" } }, I: QueryPriceFeedPriceStatesRequest, O: QueryPriceFeedPriceStatesResponse },
  { name: "CoinbasePriceStates", options: { "google.api.http": { get: "/injective/oracle/v1beta1/coinbase_price_states" } }, I: QueryCoinbasePriceStatesRequest, O: QueryCoinbasePriceStatesResponse },
  { name: "PythPriceStates", options: { "google.api.http": { get: "/injective/oracle/v1beta1/pyth_price_states" } }, I: QueryPythPriceStatesRequest, O: QueryPythPriceStatesResponse },
  { name: "PythProPriceStates", options: { "google.api.http": { get: "/injective/oracle/v1beta1/pyth_pro_price_states" } }, I: QueryPythProPriceStatesRequest, O: QueryPythProPriceStatesResponse },
  { name: "SedaFastPriceStates", options: { "google.api.http": { get: "/injective/oracle/v1beta1/seda_fast_price_states" } }, I: QuerySedaFastPriceStatesRequest, O: QuerySedaFastPriceStatesResponse },
  { name: "StorkPriceStates", options: { "google.api.http": { get: "/injective/oracle/v1beta1/stork_price_states" } }, I: QueryStorkPriceStatesRequest, O: QueryStorkPriceStatesResponse },
  { name: "StorkPublishers", options: { "google.api.http": { get: "/injective/oracle/v1beta1/stork_publishers" } }, I: QueryStorkPublishersRequest, O: QueryStorkPublishersResponse },
  { name: "ProviderPriceState", options: { "google.api.http": { get: "/injective/oracle/v1beta1/provider_price_state/{provider}/{symbol}" } }, I: QueryProviderPriceStateRequest, O: QueryProviderPriceStateResponse },
  { name: "ChainlinkDataStreamsPriceStates", options: { "google.api.http": { get: "/injective/oracle/v1beta1/chainlink_data_stream_price_states" } }, I: QueryChainlinkDataStreamsPriceStatesRequest, O: QueryChainlinkDataStreamsPriceStatesResponse },
  { name: "OracleModuleState", options: { "google.api.http": { get: "/injective/oracle/v1beta1/module_state" } }, I: QueryModuleStateRequest, O: QueryModuleStateResponse },
  { name: "HistoricalPriceRecords", options: { "google.api.http": { get: "/injective/oracle/v1beta1/historical_price_records" } }, I: QueryHistoricalPriceRecordsRequest, O: QueryHistoricalPriceRecordsResponse },
  { name: "OracleVolatility", options: { "google.api.http": { get: "/injective/oracle/v1beta1/volatility" } }, I: QueryOracleVolatilityRequest, O: QueryOracleVolatilityResponse },
  { name: "OracleProvidersInfo", options: { "google.api.http": { get: "/injective/oracle/v1beta1/providers" } }, I: QueryOracleProvidersInfoRequest, O: QueryOracleProvidersInfoResponse },
  { name: "OracleProviderPrices", options: { "google.api.http": { get: "/injective/oracle/v1beta1/provider_prices" } }, I: QueryOracleProviderPricesRequest, O: QueryOracleProviderPricesResponse },
  { name: "OraclePrice", options: { "google.api.http": { get: "/injective/oracle/v1beta1/price" } }, I: QueryOraclePriceRequest, O: QueryOraclePriceResponse },
  { name: "PythPrice", options: { "google.api.http": { get: "/injective/oracle/v1beta1/pyth_price" } }, I: QueryPythPriceRequest, O: QueryPythPriceResponse }
]);
export {
  OracleHistoryOptions,
  PricePairState,
  Query,
  QueryBandIBCPriceStatesRequest,
  QueryBandIBCPriceStatesResponse,
  QueryBandPriceStatesRequest,
  QueryBandPriceStatesResponse,
  QueryBandRelayersRequest,
  QueryBandRelayersResponse,
  QueryChainlinkDataStreamsPriceStatesRequest,
  QueryChainlinkDataStreamsPriceStatesResponse,
  QueryCoinbasePriceStatesRequest,
  QueryCoinbasePriceStatesResponse,
  QueryHistoricalPriceRecordsRequest,
  QueryHistoricalPriceRecordsResponse,
  QueryModuleStateRequest,
  QueryModuleStateResponse,
  QueryOraclePriceRequest,
  QueryOraclePriceResponse,
  QueryOracleProviderPricesRequest,
  QueryOracleProviderPricesResponse,
  QueryOracleProvidersInfoRequest,
  QueryOracleProvidersInfoResponse,
  QueryOracleVolatilityRequest,
  QueryOracleVolatilityResponse,
  QueryParamsRequest,
  QueryParamsResponse,
  QueryPriceFeedPriceStatesRequest,
  QueryPriceFeedPriceStatesResponse,
  QueryProviderPriceStateRequest,
  QueryProviderPriceStateResponse,
  QueryPythPriceRequest,
  QueryPythPriceResponse,
  QueryPythPriceStatesRequest,
  QueryPythPriceStatesResponse,
  QueryPythProPriceStatesRequest,
  QueryPythProPriceStatesResponse,
  QuerySedaFastPriceStatesRequest,
  QuerySedaFastPriceStatesResponse,
  QueryStorkPriceStatesRequest,
  QueryStorkPriceStatesResponse,
  QueryStorkPublishersRequest,
  QueryStorkPublishersResponse,
  ScalingOptions
};
