// @generated by protobuf-ts 2.11.1 with parameter add_pb_suffix
// @generated from protobuf file "injective/oracle/v1beta1/genesis.proto" (package "injective.oracle.v1beta1", syntax proto3)
// tslint:disable
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import { WireType } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { reflectionMergePartial } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
import { SedaFastPriceState } from "./oracle_pb";
import { PythProPriceState } from "./oracle_pb";
import { ChainlinkDataStreamsPriceState } from "./oracle_pb";
import { StorkPriceState } from "./oracle_pb";
import { PythPriceState } from "./oracle_pb";
import { ProviderState } from "./oracle_pb";
import { PriceRecords } from "./oracle_pb";
import { ChainlinkPriceState } from "./oracle_pb";
import { BandIBCParams } from "./oracle_pb";
import { BandOracleRequest } from "./oracle_pb";
import { CoinbasePriceState } from "./oracle_pb";
import { PriceFeedState } from "./oracle_pb";
import { BandPriceState } from "./oracle_pb";
import { Params } from "./oracle_pb";
/**
 * GenesisState defines the oracle module's genesis state.
 *
 * @generated from protobuf message injective.oracle.v1beta1.GenesisState
 */
export interface GenesisState {
    /**
     * params defines all the parameters of related to oracle.
     *
     * @generated from protobuf field: injective.oracle.v1beta1.Params params = 1
     */
    params?: Params;
    /**
     * @deprecated
     * @generated from protobuf field: repeated string band_relayers = 2 [deprecated = true]
     */
    bandRelayers: string[];
    /**
     * @deprecated
     * @generated from protobuf field: repeated injective.oracle.v1beta1.BandPriceState band_price_states = 3 [deprecated = true]
     */
    bandPriceStates: BandPriceState[];
    /**
     * @generated from protobuf field: repeated injective.oracle.v1beta1.PriceFeedState price_feed_price_states = 4
     */
    priceFeedPriceStates: PriceFeedState[];
    /**
     * @generated from protobuf field: repeated injective.oracle.v1beta1.CoinbasePriceState coinbase_price_states = 5
     */
    coinbasePriceStates: CoinbasePriceState[];
    /**
     * @deprecated
     * @generated from protobuf field: repeated injective.oracle.v1beta1.BandPriceState band_ibc_price_states = 6 [deprecated = true]
     */
    bandIbcPriceStates: BandPriceState[];
    /**
     * @deprecated
     * @generated from protobuf field: repeated injective.oracle.v1beta1.BandOracleRequest band_ibc_oracle_requests = 7 [deprecated = true]
     */
    bandIbcOracleRequests: BandOracleRequest[];
    /**
     * @deprecated
     * @generated from protobuf field: injective.oracle.v1beta1.BandIBCParams band_ibc_params = 8 [deprecated = true]
     */
    bandIbcParams?: BandIBCParams;
    /**
     * @deprecated
     * @generated from protobuf field: uint64 band_ibc_latest_client_id = 9 [deprecated = true]
     */
    bandIbcLatestClientId: bigint;
    /**
     * @deprecated
     * @generated from protobuf field: repeated injective.oracle.v1beta1.CalldataRecord calldata_records = 10 [deprecated = true]
     */
    calldataRecords: CalldataRecord[];
    /**
     * @deprecated
     * @generated from protobuf field: uint64 band_ibc_latest_request_id = 11 [deprecated = true]
     */
    bandIbcLatestRequestId: bigint;
    /**
     * @deprecated
     * @generated from protobuf field: repeated injective.oracle.v1beta1.ChainlinkPriceState chainlink_price_states = 12 [deprecated = true]
     */
    chainlinkPriceStates: ChainlinkPriceState[];
    /**
     * @generated from protobuf field: repeated injective.oracle.v1beta1.PriceRecords historical_price_records = 13
     */
    historicalPriceRecords: PriceRecords[];
    /**
     * @generated from protobuf field: repeated injective.oracle.v1beta1.ProviderState provider_states = 14
     */
    providerStates: ProviderState[];
    /**
     * @generated from protobuf field: repeated injective.oracle.v1beta1.PythPriceState pyth_price_states = 15
     */
    pythPriceStates: PythPriceState[];
    /**
     * @generated from protobuf field: repeated injective.oracle.v1beta1.StorkPriceState stork_price_states = 16
     */
    storkPriceStates: StorkPriceState[];
    /**
     * @generated from protobuf field: repeated string stork_publishers = 17
     */
    storkPublishers: string[];
    /**
     * @generated from protobuf field: repeated injective.oracle.v1beta1.ChainlinkDataStreamsPriceState chainlink_data_streams_price_states = 18
     */
    chainlinkDataStreamsPriceStates: ChainlinkDataStreamsPriceState[];
    /**
     * pyth_pro_price_states defines the persisted PythPro feed price states at
     * genesis.
     *
     * @generated from protobuf field: repeated injective.oracle.v1beta1.PythProPriceState pyth_pro_price_states = 19
     */
    pythProPriceStates: PythProPriceState[];
    /**
     * seda_fast_price_states defines the persisted SEDA Fast feed price states
     * at genesis, keyed by feed_id (hex-encoded execInputs).
     *
     * @generated from protobuf field: repeated injective.oracle.v1beta1.SedaFastPriceState seda_fast_price_states = 20
     */
    sedaFastPriceStates: SedaFastPriceState[];
}
/**
 * @generated from protobuf message injective.oracle.v1beta1.CalldataRecord
 */
export interface CalldataRecord {
    /**
     * @generated from protobuf field: uint64 client_id = 1
     */
    clientId: bigint;
    /**
     * @generated from protobuf field: bytes calldata = 2
     */
    calldata: Uint8Array;
}
// @generated message type with reflection information, may provide speed optimized methods
class GenesisState$Type extends MessageType<GenesisState> {
    constructor() {
        super("injective.oracle.v1beta1.GenesisState", [
            { no: 1, name: "params", kind: "message", T: () => Params, options: { "gogoproto.nullable": false } },
            { no: 2, name: "band_relayers", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
            { no: 3, name: "band_price_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BandPriceState },
            { no: 4, name: "price_feed_price_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PriceFeedState },
            { no: 5, name: "coinbase_price_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CoinbasePriceState },
            { no: 6, name: "band_ibc_price_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BandPriceState },
            { no: 7, name: "band_ibc_oracle_requests", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => BandOracleRequest },
            { no: 8, name: "band_ibc_params", kind: "message", T: () => BandIBCParams, options: { "gogoproto.nullable": false } },
            { no: 9, name: "band_ibc_latest_client_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
            { no: 10, name: "calldata_records", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => CalldataRecord },
            { no: 11, name: "band_ibc_latest_request_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
            { no: 12, name: "chainlink_price_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ChainlinkPriceState },
            { no: 13, name: "historical_price_records", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PriceRecords },
            { no: 14, name: "provider_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ProviderState },
            { no: 15, name: "pyth_price_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PythPriceState },
            { no: 16, name: "stork_price_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => StorkPriceState },
            { no: 17, name: "stork_publishers", kind: "scalar", repeat: 2 /*RepeatType.UNPACKED*/, T: 9 /*ScalarType.STRING*/ },
            { no: 18, name: "chainlink_data_streams_price_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => ChainlinkDataStreamsPriceState },
            { no: 19, name: "pyth_pro_price_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => PythProPriceState },
            { no: 20, name: "seda_fast_price_states", kind: "message", repeat: 2 /*RepeatType.UNPACKED*/, T: () => SedaFastPriceState }
        ]);
    }
    create(value?: PartialMessage<GenesisState>): GenesisState {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.bandRelayers = [];
        message.bandPriceStates = [];
        message.priceFeedPriceStates = [];
        message.coinbasePriceStates = [];
        message.bandIbcPriceStates = [];
        message.bandIbcOracleRequests = [];
        message.bandIbcLatestClientId = 0n;
        message.calldataRecords = [];
        message.bandIbcLatestRequestId = 0n;
        message.chainlinkPriceStates = [];
        message.historicalPriceRecords = [];
        message.providerStates = [];
        message.pythPriceStates = [];
        message.storkPriceStates = [];
        message.storkPublishers = [];
        message.chainlinkDataStreamsPriceStates = [];
        message.pythProPriceStates = [];
        message.sedaFastPriceStates = [];
        if (value !== undefined)
            reflectionMergePartial<GenesisState>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: GenesisState): GenesisState {
        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;
                case /* repeated string band_relayers = 2 [deprecated = true] */ 2:
                    message.bandRelayers.push(reader.string());
                    break;
                case /* repeated injective.oracle.v1beta1.BandPriceState band_price_states = 3 [deprecated = true] */ 3:
                    message.bandPriceStates.push(BandPriceState.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated injective.oracle.v1beta1.PriceFeedState price_feed_price_states */ 4:
                    message.priceFeedPriceStates.push(PriceFeedState.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated injective.oracle.v1beta1.CoinbasePriceState coinbase_price_states */ 5:
                    message.coinbasePriceStates.push(CoinbasePriceState.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated injective.oracle.v1beta1.BandPriceState band_ibc_price_states = 6 [deprecated = true] */ 6:
                    message.bandIbcPriceStates.push(BandPriceState.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated injective.oracle.v1beta1.BandOracleRequest band_ibc_oracle_requests = 7 [deprecated = true] */ 7:
                    message.bandIbcOracleRequests.push(BandOracleRequest.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* injective.oracle.v1beta1.BandIBCParams band_ibc_params = 8 [deprecated = true] */ 8:
                    message.bandIbcParams = BandIBCParams.internalBinaryRead(reader, reader.uint32(), options, message.bandIbcParams);
                    break;
                case /* uint64 band_ibc_latest_client_id = 9 [deprecated = true] */ 9:
                    message.bandIbcLatestClientId = reader.uint64().toBigInt();
                    break;
                case /* repeated injective.oracle.v1beta1.CalldataRecord calldata_records = 10 [deprecated = true] */ 10:
                    message.calldataRecords.push(CalldataRecord.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* uint64 band_ibc_latest_request_id = 11 [deprecated = true] */ 11:
                    message.bandIbcLatestRequestId = reader.uint64().toBigInt();
                    break;
                case /* repeated injective.oracle.v1beta1.ChainlinkPriceState chainlink_price_states = 12 [deprecated = true] */ 12:
                    message.chainlinkPriceStates.push(ChainlinkPriceState.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated injective.oracle.v1beta1.PriceRecords historical_price_records */ 13:
                    message.historicalPriceRecords.push(PriceRecords.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated injective.oracle.v1beta1.ProviderState provider_states */ 14:
                    message.providerStates.push(ProviderState.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated injective.oracle.v1beta1.PythPriceState pyth_price_states */ 15:
                    message.pythPriceStates.push(PythPriceState.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated injective.oracle.v1beta1.StorkPriceState stork_price_states */ 16:
                    message.storkPriceStates.push(StorkPriceState.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated string stork_publishers */ 17:
                    message.storkPublishers.push(reader.string());
                    break;
                case /* repeated injective.oracle.v1beta1.ChainlinkDataStreamsPriceState chainlink_data_streams_price_states */ 18:
                    message.chainlinkDataStreamsPriceStates.push(ChainlinkDataStreamsPriceState.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated injective.oracle.v1beta1.PythProPriceState pyth_pro_price_states */ 19:
                    message.pythProPriceStates.push(PythProPriceState.internalBinaryRead(reader, reader.uint32(), options));
                    break;
                case /* repeated injective.oracle.v1beta1.SedaFastPriceState seda_fast_price_states */ 20:
                    message.sedaFastPriceStates.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: GenesisState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* injective.oracle.v1beta1.Params params = 1; */
        if (message.params)
            Params.internalBinaryWrite(message.params, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
        /* repeated string band_relayers = 2 [deprecated = true]; */
        for (let i = 0; i < message.bandRelayers.length; i++)
            writer.tag(2, WireType.LengthDelimited).string(message.bandRelayers[i]);
        /* repeated injective.oracle.v1beta1.BandPriceState band_price_states = 3 [deprecated = true]; */
        for (let i = 0; i < message.bandPriceStates.length; i++)
            BandPriceState.internalBinaryWrite(message.bandPriceStates[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
        /* repeated injective.oracle.v1beta1.PriceFeedState price_feed_price_states = 4; */
        for (let i = 0; i < message.priceFeedPriceStates.length; i++)
            PriceFeedState.internalBinaryWrite(message.priceFeedPriceStates[i], writer.tag(4, WireType.LengthDelimited).fork(), options).join();
        /* repeated injective.oracle.v1beta1.CoinbasePriceState coinbase_price_states = 5; */
        for (let i = 0; i < message.coinbasePriceStates.length; i++)
            CoinbasePriceState.internalBinaryWrite(message.coinbasePriceStates[i], writer.tag(5, WireType.LengthDelimited).fork(), options).join();
        /* repeated injective.oracle.v1beta1.BandPriceState band_ibc_price_states = 6 [deprecated = true]; */
        for (let i = 0; i < message.bandIbcPriceStates.length; i++)
            BandPriceState.internalBinaryWrite(message.bandIbcPriceStates[i], writer.tag(6, WireType.LengthDelimited).fork(), options).join();
        /* repeated injective.oracle.v1beta1.BandOracleRequest band_ibc_oracle_requests = 7 [deprecated = true]; */
        for (let i = 0; i < message.bandIbcOracleRequests.length; i++)
            BandOracleRequest.internalBinaryWrite(message.bandIbcOracleRequests[i], writer.tag(7, WireType.LengthDelimited).fork(), options).join();
        /* injective.oracle.v1beta1.BandIBCParams band_ibc_params = 8 [deprecated = true]; */
        if (message.bandIbcParams)
            BandIBCParams.internalBinaryWrite(message.bandIbcParams, writer.tag(8, WireType.LengthDelimited).fork(), options).join();
        /* uint64 band_ibc_latest_client_id = 9 [deprecated = true]; */
        if (message.bandIbcLatestClientId !== 0n)
            writer.tag(9, WireType.Varint).uint64(message.bandIbcLatestClientId);
        /* repeated injective.oracle.v1beta1.CalldataRecord calldata_records = 10 [deprecated = true]; */
        for (let i = 0; i < message.calldataRecords.length; i++)
            CalldataRecord.internalBinaryWrite(message.calldataRecords[i], writer.tag(10, WireType.LengthDelimited).fork(), options).join();
        /* uint64 band_ibc_latest_request_id = 11 [deprecated = true]; */
        if (message.bandIbcLatestRequestId !== 0n)
            writer.tag(11, WireType.Varint).uint64(message.bandIbcLatestRequestId);
        /* repeated injective.oracle.v1beta1.ChainlinkPriceState chainlink_price_states = 12 [deprecated = true]; */
        for (let i = 0; i < message.chainlinkPriceStates.length; i++)
            ChainlinkPriceState.internalBinaryWrite(message.chainlinkPriceStates[i], writer.tag(12, WireType.LengthDelimited).fork(), options).join();
        /* repeated injective.oracle.v1beta1.PriceRecords historical_price_records = 13; */
        for (let i = 0; i < message.historicalPriceRecords.length; i++)
            PriceRecords.internalBinaryWrite(message.historicalPriceRecords[i], writer.tag(13, WireType.LengthDelimited).fork(), options).join();
        /* repeated injective.oracle.v1beta1.ProviderState provider_states = 14; */
        for (let i = 0; i < message.providerStates.length; i++)
            ProviderState.internalBinaryWrite(message.providerStates[i], writer.tag(14, WireType.LengthDelimited).fork(), options).join();
        /* repeated injective.oracle.v1beta1.PythPriceState pyth_price_states = 15; */
        for (let i = 0; i < message.pythPriceStates.length; i++)
            PythPriceState.internalBinaryWrite(message.pythPriceStates[i], writer.tag(15, WireType.LengthDelimited).fork(), options).join();
        /* repeated injective.oracle.v1beta1.StorkPriceState stork_price_states = 16; */
        for (let i = 0; i < message.storkPriceStates.length; i++)
            StorkPriceState.internalBinaryWrite(message.storkPriceStates[i], writer.tag(16, WireType.LengthDelimited).fork(), options).join();
        /* repeated string stork_publishers = 17; */
        for (let i = 0; i < message.storkPublishers.length; i++)
            writer.tag(17, WireType.LengthDelimited).string(message.storkPublishers[i]);
        /* repeated injective.oracle.v1beta1.ChainlinkDataStreamsPriceState chainlink_data_streams_price_states = 18; */
        for (let i = 0; i < message.chainlinkDataStreamsPriceStates.length; i++)
            ChainlinkDataStreamsPriceState.internalBinaryWrite(message.chainlinkDataStreamsPriceStates[i], writer.tag(18, WireType.LengthDelimited).fork(), options).join();
        /* repeated injective.oracle.v1beta1.PythProPriceState pyth_pro_price_states = 19; */
        for (let i = 0; i < message.pythProPriceStates.length; i++)
            PythProPriceState.internalBinaryWrite(message.pythProPriceStates[i], writer.tag(19, WireType.LengthDelimited).fork(), options).join();
        /* repeated injective.oracle.v1beta1.SedaFastPriceState seda_fast_price_states = 20; */
        for (let i = 0; i < message.sedaFastPriceStates.length; i++)
            SedaFastPriceState.internalBinaryWrite(message.sedaFastPriceStates[i], writer.tag(20, WireType.LengthDelimited).fork(), options).join();
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message injective.oracle.v1beta1.GenesisState
 */
export const GenesisState = new GenesisState$Type();
// @generated message type with reflection information, may provide speed optimized methods
class CalldataRecord$Type extends MessageType<CalldataRecord> {
    constructor() {
        super("injective.oracle.v1beta1.CalldataRecord", [
            { no: 1, name: "client_id", kind: "scalar", T: 4 /*ScalarType.UINT64*/, L: 0 /*LongType.BIGINT*/ },
            { no: 2, name: "calldata", kind: "scalar", T: 12 /*ScalarType.BYTES*/ }
        ]);
    }
    create(value?: PartialMessage<CalldataRecord>): CalldataRecord {
        const message = globalThis.Object.create((this.messagePrototype!));
        message.clientId = 0n;
        message.calldata = new Uint8Array(0);
        if (value !== undefined)
            reflectionMergePartial<CalldataRecord>(this, message, value);
        return message;
    }
    internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: CalldataRecord): CalldataRecord {
        let message = target ?? this.create(), end = reader.pos + length;
        while (reader.pos < end) {
            let [fieldNo, wireType] = reader.tag();
            switch (fieldNo) {
                case /* uint64 client_id */ 1:
                    message.clientId = reader.uint64().toBigInt();
                    break;
                case /* bytes calldata */ 2:
                    message.calldata = 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: CalldataRecord, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
        /* uint64 client_id = 1; */
        if (message.clientId !== 0n)
            writer.tag(1, WireType.Varint).uint64(message.clientId);
        /* bytes calldata = 2; */
        if (message.calldata.length)
            writer.tag(2, WireType.LengthDelimited).bytes(message.calldata);
        let u = options.writeUnknownFields;
        if (u !== false)
            (u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
        return writer;
    }
}
/**
 * @generated MessageType for protobuf message injective.oracle.v1beta1.CalldataRecord
 */
export const CalldataRecord = new CalldataRecord$Type();
