// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: ibc/core/client/v1/query.proto

package types

import (
	context "context"
	fmt "fmt"
	types "git.cw.tr/mukan-network/mukan-sdk/codec/types"
	query "git.cw.tr/mukan-network/mukan-sdk/types/query"
	_ "github.com/cosmos/gogoproto/gogoproto"
	grpc1 "github.com/cosmos/gogoproto/grpc"
	proto "github.com/cosmos/gogoproto/proto"
	v2 "git.cw.tr/mukan-network/mukan-ibc/modules/core/23-commitment/types/v2"
	_ "google.golang.org/genproto/googleapis/api/annotations"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
	io "io"
	math "math"
	math_bits "math/bits"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf

// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package

// QueryClientStateRequest is the request type for the Query/ClientState RPC
// method
type QueryClientStateRequest struct {
	// client state unique identifier
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
}

func (m *QueryClientStateRequest) Reset()         { *m = QueryClientStateRequest{} }
func (m *QueryClientStateRequest) String() string { return proto.CompactTextString(m) }
func (*QueryClientStateRequest) ProtoMessage()    {}
func (*QueryClientStateRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{0}
}
func (m *QueryClientStateRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryClientStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryClientStateRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryClientStateRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryClientStateRequest.Merge(m, src)
}
func (m *QueryClientStateRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryClientStateRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryClientStateRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryClientStateRequest proto.InternalMessageInfo

func (m *QueryClientStateRequest) GetClientId() string {
	if m != nil {
		return m.ClientId
	}
	return ""
}

// QueryClientStateResponse is the response type for the Query/ClientState RPC
// method. Besides the client state, it includes a proof and the height from
// which the proof was retrieved.
type QueryClientStateResponse struct {
	// client state associated with the request identifier
	ClientState *types.Any `protobuf:"bytes,1,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"`
	// merkle proof of existence
	Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
	// height at which the proof was retrieved
	ProofHeight Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"`
}

func (m *QueryClientStateResponse) Reset()         { *m = QueryClientStateResponse{} }
func (m *QueryClientStateResponse) String() string { return proto.CompactTextString(m) }
func (*QueryClientStateResponse) ProtoMessage()    {}
func (*QueryClientStateResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{1}
}
func (m *QueryClientStateResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryClientStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryClientStateResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryClientStateResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryClientStateResponse.Merge(m, src)
}
func (m *QueryClientStateResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryClientStateResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryClientStateResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryClientStateResponse proto.InternalMessageInfo

func (m *QueryClientStateResponse) GetClientState() *types.Any {
	if m != nil {
		return m.ClientState
	}
	return nil
}

func (m *QueryClientStateResponse) GetProof() []byte {
	if m != nil {
		return m.Proof
	}
	return nil
}

func (m *QueryClientStateResponse) GetProofHeight() Height {
	if m != nil {
		return m.ProofHeight
	}
	return Height{}
}

// QueryClientStatesRequest is the request type for the Query/ClientStates RPC
// method
type QueryClientStatesRequest struct {
	// pagination request
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (m *QueryClientStatesRequest) Reset()         { *m = QueryClientStatesRequest{} }
func (m *QueryClientStatesRequest) String() string { return proto.CompactTextString(m) }
func (*QueryClientStatesRequest) ProtoMessage()    {}
func (*QueryClientStatesRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{2}
}
func (m *QueryClientStatesRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryClientStatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryClientStatesRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryClientStatesRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryClientStatesRequest.Merge(m, src)
}
func (m *QueryClientStatesRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryClientStatesRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryClientStatesRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryClientStatesRequest proto.InternalMessageInfo

func (m *QueryClientStatesRequest) GetPagination() *query.PageRequest {
	if m != nil {
		return m.Pagination
	}
	return nil
}

// QueryClientStatesResponse is the response type for the Query/ClientStates RPC
// method.
type QueryClientStatesResponse struct {
	// list of stored ClientStates of the chain.
	ClientStates IdentifiedClientStates `protobuf:"bytes,1,rep,name=client_states,json=clientStates,proto3,castrepeated=IdentifiedClientStates" json:"client_states"`
	// pagination response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (m *QueryClientStatesResponse) Reset()         { *m = QueryClientStatesResponse{} }
func (m *QueryClientStatesResponse) String() string { return proto.CompactTextString(m) }
func (*QueryClientStatesResponse) ProtoMessage()    {}
func (*QueryClientStatesResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{3}
}
func (m *QueryClientStatesResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryClientStatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryClientStatesResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryClientStatesResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryClientStatesResponse.Merge(m, src)
}
func (m *QueryClientStatesResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryClientStatesResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryClientStatesResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryClientStatesResponse proto.InternalMessageInfo

func (m *QueryClientStatesResponse) GetClientStates() IdentifiedClientStates {
	if m != nil {
		return m.ClientStates
	}
	return nil
}

func (m *QueryClientStatesResponse) GetPagination() *query.PageResponse {
	if m != nil {
		return m.Pagination
	}
	return nil
}

// QueryConsensusStateRequest is the request type for the Query/ConsensusState
// RPC method. Besides the consensus state, it includes a proof and the height
// from which the proof was retrieved.
type QueryConsensusStateRequest struct {
	// client identifier
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// consensus state revision number
	RevisionNumber uint64 `protobuf:"varint,2,opt,name=revision_number,json=revisionNumber,proto3" json:"revision_number,omitempty"`
	// consensus state revision height
	RevisionHeight uint64 `protobuf:"varint,3,opt,name=revision_height,json=revisionHeight,proto3" json:"revision_height,omitempty"`
	// latest_height overrides the height field and queries the latest stored
	// ConsensusState
	LatestHeight bool `protobuf:"varint,4,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height,omitempty"`
}

func (m *QueryConsensusStateRequest) Reset()         { *m = QueryConsensusStateRequest{} }
func (m *QueryConsensusStateRequest) String() string { return proto.CompactTextString(m) }
func (*QueryConsensusStateRequest) ProtoMessage()    {}
func (*QueryConsensusStateRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{4}
}
func (m *QueryConsensusStateRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryConsensusStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryConsensusStateRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryConsensusStateRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryConsensusStateRequest.Merge(m, src)
}
func (m *QueryConsensusStateRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryConsensusStateRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryConsensusStateRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryConsensusStateRequest proto.InternalMessageInfo

func (m *QueryConsensusStateRequest) GetClientId() string {
	if m != nil {
		return m.ClientId
	}
	return ""
}

func (m *QueryConsensusStateRequest) GetRevisionNumber() uint64 {
	if m != nil {
		return m.RevisionNumber
	}
	return 0
}

func (m *QueryConsensusStateRequest) GetRevisionHeight() uint64 {
	if m != nil {
		return m.RevisionHeight
	}
	return 0
}

func (m *QueryConsensusStateRequest) GetLatestHeight() bool {
	if m != nil {
		return m.LatestHeight
	}
	return false
}

// QueryConsensusStateResponse is the response type for the Query/ConsensusState
// RPC method
type QueryConsensusStateResponse struct {
	// consensus state associated with the client identifier at the given height
	ConsensusState *types.Any `protobuf:"bytes,1,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"`
	// merkle proof of existence
	Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
	// height at which the proof was retrieved
	ProofHeight Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"`
}

func (m *QueryConsensusStateResponse) Reset()         { *m = QueryConsensusStateResponse{} }
func (m *QueryConsensusStateResponse) String() string { return proto.CompactTextString(m) }
func (*QueryConsensusStateResponse) ProtoMessage()    {}
func (*QueryConsensusStateResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{5}
}
func (m *QueryConsensusStateResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryConsensusStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryConsensusStateResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryConsensusStateResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryConsensusStateResponse.Merge(m, src)
}
func (m *QueryConsensusStateResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryConsensusStateResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryConsensusStateResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryConsensusStateResponse proto.InternalMessageInfo

func (m *QueryConsensusStateResponse) GetConsensusState() *types.Any {
	if m != nil {
		return m.ConsensusState
	}
	return nil
}

func (m *QueryConsensusStateResponse) GetProof() []byte {
	if m != nil {
		return m.Proof
	}
	return nil
}

func (m *QueryConsensusStateResponse) GetProofHeight() Height {
	if m != nil {
		return m.ProofHeight
	}
	return Height{}
}

// QueryConsensusStatesRequest is the request type for the Query/ConsensusStates
// RPC method.
type QueryConsensusStatesRequest struct {
	// client identifier
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// pagination request
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (m *QueryConsensusStatesRequest) Reset()         { *m = QueryConsensusStatesRequest{} }
func (m *QueryConsensusStatesRequest) String() string { return proto.CompactTextString(m) }
func (*QueryConsensusStatesRequest) ProtoMessage()    {}
func (*QueryConsensusStatesRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{6}
}
func (m *QueryConsensusStatesRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryConsensusStatesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryConsensusStatesRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryConsensusStatesRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryConsensusStatesRequest.Merge(m, src)
}
func (m *QueryConsensusStatesRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryConsensusStatesRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryConsensusStatesRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryConsensusStatesRequest proto.InternalMessageInfo

func (m *QueryConsensusStatesRequest) GetClientId() string {
	if m != nil {
		return m.ClientId
	}
	return ""
}

func (m *QueryConsensusStatesRequest) GetPagination() *query.PageRequest {
	if m != nil {
		return m.Pagination
	}
	return nil
}

// QueryConsensusStatesResponse is the response type for the
// Query/ConsensusStates RPC method
type QueryConsensusStatesResponse struct {
	// consensus states associated with the identifier
	ConsensusStates []ConsensusStateWithHeight `protobuf:"bytes,1,rep,name=consensus_states,json=consensusStates,proto3" json:"consensus_states"`
	// pagination response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (m *QueryConsensusStatesResponse) Reset()         { *m = QueryConsensusStatesResponse{} }
func (m *QueryConsensusStatesResponse) String() string { return proto.CompactTextString(m) }
func (*QueryConsensusStatesResponse) ProtoMessage()    {}
func (*QueryConsensusStatesResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{7}
}
func (m *QueryConsensusStatesResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryConsensusStatesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryConsensusStatesResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryConsensusStatesResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryConsensusStatesResponse.Merge(m, src)
}
func (m *QueryConsensusStatesResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryConsensusStatesResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryConsensusStatesResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryConsensusStatesResponse proto.InternalMessageInfo

func (m *QueryConsensusStatesResponse) GetConsensusStates() []ConsensusStateWithHeight {
	if m != nil {
		return m.ConsensusStates
	}
	return nil
}

func (m *QueryConsensusStatesResponse) GetPagination() *query.PageResponse {
	if m != nil {
		return m.Pagination
	}
	return nil
}

// QueryConsensusStateHeightsRequest is the request type for Query/ConsensusStateHeights
// RPC method.
type QueryConsensusStateHeightsRequest struct {
	// client identifier
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// pagination request
	Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (m *QueryConsensusStateHeightsRequest) Reset()         { *m = QueryConsensusStateHeightsRequest{} }
func (m *QueryConsensusStateHeightsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryConsensusStateHeightsRequest) ProtoMessage()    {}
func (*QueryConsensusStateHeightsRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{8}
}
func (m *QueryConsensusStateHeightsRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryConsensusStateHeightsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryConsensusStateHeightsRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryConsensusStateHeightsRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryConsensusStateHeightsRequest.Merge(m, src)
}
func (m *QueryConsensusStateHeightsRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryConsensusStateHeightsRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryConsensusStateHeightsRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryConsensusStateHeightsRequest proto.InternalMessageInfo

func (m *QueryConsensusStateHeightsRequest) GetClientId() string {
	if m != nil {
		return m.ClientId
	}
	return ""
}

func (m *QueryConsensusStateHeightsRequest) GetPagination() *query.PageRequest {
	if m != nil {
		return m.Pagination
	}
	return nil
}

// QueryConsensusStateHeightsResponse is the response type for the
// Query/ConsensusStateHeights RPC method
type QueryConsensusStateHeightsResponse struct {
	// consensus state heights
	ConsensusStateHeights []Height `protobuf:"bytes,1,rep,name=consensus_state_heights,json=consensusStateHeights,proto3" json:"consensus_state_heights"`
	// pagination response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

func (m *QueryConsensusStateHeightsResponse) Reset()         { *m = QueryConsensusStateHeightsResponse{} }
func (m *QueryConsensusStateHeightsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryConsensusStateHeightsResponse) ProtoMessage()    {}
func (*QueryConsensusStateHeightsResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{9}
}
func (m *QueryConsensusStateHeightsResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryConsensusStateHeightsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryConsensusStateHeightsResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryConsensusStateHeightsResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryConsensusStateHeightsResponse.Merge(m, src)
}
func (m *QueryConsensusStateHeightsResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryConsensusStateHeightsResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryConsensusStateHeightsResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryConsensusStateHeightsResponse proto.InternalMessageInfo

func (m *QueryConsensusStateHeightsResponse) GetConsensusStateHeights() []Height {
	if m != nil {
		return m.ConsensusStateHeights
	}
	return nil
}

func (m *QueryConsensusStateHeightsResponse) GetPagination() *query.PageResponse {
	if m != nil {
		return m.Pagination
	}
	return nil
}

// QueryClientStatusRequest is the request type for the Query/ClientStatus RPC
// method
type QueryClientStatusRequest struct {
	// client unique identifier
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
}

func (m *QueryClientStatusRequest) Reset()         { *m = QueryClientStatusRequest{} }
func (m *QueryClientStatusRequest) String() string { return proto.CompactTextString(m) }
func (*QueryClientStatusRequest) ProtoMessage()    {}
func (*QueryClientStatusRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{10}
}
func (m *QueryClientStatusRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryClientStatusRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryClientStatusRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryClientStatusRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryClientStatusRequest.Merge(m, src)
}
func (m *QueryClientStatusRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryClientStatusRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryClientStatusRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryClientStatusRequest proto.InternalMessageInfo

func (m *QueryClientStatusRequest) GetClientId() string {
	if m != nil {
		return m.ClientId
	}
	return ""
}

// QueryClientStatusResponse is the response type for the Query/ClientStatus RPC
// method. It returns the current status of the IBC client.
type QueryClientStatusResponse struct {
	Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
}

func (m *QueryClientStatusResponse) Reset()         { *m = QueryClientStatusResponse{} }
func (m *QueryClientStatusResponse) String() string { return proto.CompactTextString(m) }
func (*QueryClientStatusResponse) ProtoMessage()    {}
func (*QueryClientStatusResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{11}
}
func (m *QueryClientStatusResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryClientStatusResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryClientStatusResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryClientStatusResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryClientStatusResponse.Merge(m, src)
}
func (m *QueryClientStatusResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryClientStatusResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryClientStatusResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryClientStatusResponse proto.InternalMessageInfo

func (m *QueryClientStatusResponse) GetStatus() string {
	if m != nil {
		return m.Status
	}
	return ""
}

// QueryClientParamsRequest is the request type for the Query/ClientParams RPC
// method.
type QueryClientParamsRequest struct {
}

func (m *QueryClientParamsRequest) Reset()         { *m = QueryClientParamsRequest{} }
func (m *QueryClientParamsRequest) String() string { return proto.CompactTextString(m) }
func (*QueryClientParamsRequest) ProtoMessage()    {}
func (*QueryClientParamsRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{12}
}
func (m *QueryClientParamsRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryClientParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryClientParamsRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryClientParamsRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryClientParamsRequest.Merge(m, src)
}
func (m *QueryClientParamsRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryClientParamsRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryClientParamsRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryClientParamsRequest proto.InternalMessageInfo

// QueryClientParamsResponse is the response type for the Query/ClientParams RPC
// method.
type QueryClientParamsResponse struct {
	// params defines the parameters of the module.
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}

func (m *QueryClientParamsResponse) Reset()         { *m = QueryClientParamsResponse{} }
func (m *QueryClientParamsResponse) String() string { return proto.CompactTextString(m) }
func (*QueryClientParamsResponse) ProtoMessage()    {}
func (*QueryClientParamsResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{13}
}
func (m *QueryClientParamsResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryClientParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryClientParamsResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryClientParamsResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryClientParamsResponse.Merge(m, src)
}
func (m *QueryClientParamsResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryClientParamsResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryClientParamsResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryClientParamsResponse proto.InternalMessageInfo

func (m *QueryClientParamsResponse) GetParams() *Params {
	if m != nil {
		return m.Params
	}
	return nil
}

// QueryClientCreatorRequest is the request type for the Query/ClientCreator RPC
// method.
type QueryClientCreatorRequest struct {
	// client unique identifier
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
}

func (m *QueryClientCreatorRequest) Reset()         { *m = QueryClientCreatorRequest{} }
func (m *QueryClientCreatorRequest) String() string { return proto.CompactTextString(m) }
func (*QueryClientCreatorRequest) ProtoMessage()    {}
func (*QueryClientCreatorRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{14}
}
func (m *QueryClientCreatorRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryClientCreatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryClientCreatorRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryClientCreatorRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryClientCreatorRequest.Merge(m, src)
}
func (m *QueryClientCreatorRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryClientCreatorRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryClientCreatorRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryClientCreatorRequest proto.InternalMessageInfo

func (m *QueryClientCreatorRequest) GetClientId() string {
	if m != nil {
		return m.ClientId
	}
	return ""
}

// QueryClientCreatorResponse is the response type for the Query/ClientCreator RPC
// method.
type QueryClientCreatorResponse struct {
	// creator of the client
	Creator string `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
}

func (m *QueryClientCreatorResponse) Reset()         { *m = QueryClientCreatorResponse{} }
func (m *QueryClientCreatorResponse) String() string { return proto.CompactTextString(m) }
func (*QueryClientCreatorResponse) ProtoMessage()    {}
func (*QueryClientCreatorResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{15}
}
func (m *QueryClientCreatorResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryClientCreatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryClientCreatorResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryClientCreatorResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryClientCreatorResponse.Merge(m, src)
}
func (m *QueryClientCreatorResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryClientCreatorResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryClientCreatorResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryClientCreatorResponse proto.InternalMessageInfo

func (m *QueryClientCreatorResponse) GetCreator() string {
	if m != nil {
		return m.Creator
	}
	return ""
}

// QueryUpgradedClientStateRequest is the request type for the
// Query/UpgradedClientState RPC method
type QueryUpgradedClientStateRequest struct {
}

func (m *QueryUpgradedClientStateRequest) Reset()         { *m = QueryUpgradedClientStateRequest{} }
func (m *QueryUpgradedClientStateRequest) String() string { return proto.CompactTextString(m) }
func (*QueryUpgradedClientStateRequest) ProtoMessage()    {}
func (*QueryUpgradedClientStateRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{16}
}
func (m *QueryUpgradedClientStateRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryUpgradedClientStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryUpgradedClientStateRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryUpgradedClientStateRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryUpgradedClientStateRequest.Merge(m, src)
}
func (m *QueryUpgradedClientStateRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryUpgradedClientStateRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryUpgradedClientStateRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryUpgradedClientStateRequest proto.InternalMessageInfo

// QueryUpgradedClientStateResponse is the response type for the
// Query/UpgradedClientState RPC method.
type QueryUpgradedClientStateResponse struct {
	// client state associated with the request identifier
	UpgradedClientState *types.Any `protobuf:"bytes,1,opt,name=upgraded_client_state,json=upgradedClientState,proto3" json:"upgraded_client_state,omitempty"`
}

func (m *QueryUpgradedClientStateResponse) Reset()         { *m = QueryUpgradedClientStateResponse{} }
func (m *QueryUpgradedClientStateResponse) String() string { return proto.CompactTextString(m) }
func (*QueryUpgradedClientStateResponse) ProtoMessage()    {}
func (*QueryUpgradedClientStateResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{17}
}
func (m *QueryUpgradedClientStateResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryUpgradedClientStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryUpgradedClientStateResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryUpgradedClientStateResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryUpgradedClientStateResponse.Merge(m, src)
}
func (m *QueryUpgradedClientStateResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryUpgradedClientStateResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryUpgradedClientStateResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryUpgradedClientStateResponse proto.InternalMessageInfo

func (m *QueryUpgradedClientStateResponse) GetUpgradedClientState() *types.Any {
	if m != nil {
		return m.UpgradedClientState
	}
	return nil
}

// QueryUpgradedConsensusStateRequest is the request type for the
// Query/UpgradedConsensusState RPC method
type QueryUpgradedConsensusStateRequest struct {
}

func (m *QueryUpgradedConsensusStateRequest) Reset()         { *m = QueryUpgradedConsensusStateRequest{} }
func (m *QueryUpgradedConsensusStateRequest) String() string { return proto.CompactTextString(m) }
func (*QueryUpgradedConsensusStateRequest) ProtoMessage()    {}
func (*QueryUpgradedConsensusStateRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{18}
}
func (m *QueryUpgradedConsensusStateRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryUpgradedConsensusStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryUpgradedConsensusStateRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryUpgradedConsensusStateRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryUpgradedConsensusStateRequest.Merge(m, src)
}
func (m *QueryUpgradedConsensusStateRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryUpgradedConsensusStateRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryUpgradedConsensusStateRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryUpgradedConsensusStateRequest proto.InternalMessageInfo

// QueryUpgradedConsensusStateResponse is the response type for the
// Query/UpgradedConsensusState RPC method.
type QueryUpgradedConsensusStateResponse struct {
	// Consensus state associated with the request identifier
	UpgradedConsensusState *types.Any `protobuf:"bytes,1,opt,name=upgraded_consensus_state,json=upgradedConsensusState,proto3" json:"upgraded_consensus_state,omitempty"`
}

func (m *QueryUpgradedConsensusStateResponse) Reset()         { *m = QueryUpgradedConsensusStateResponse{} }
func (m *QueryUpgradedConsensusStateResponse) String() string { return proto.CompactTextString(m) }
func (*QueryUpgradedConsensusStateResponse) ProtoMessage()    {}
func (*QueryUpgradedConsensusStateResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{19}
}
func (m *QueryUpgradedConsensusStateResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryUpgradedConsensusStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryUpgradedConsensusStateResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryUpgradedConsensusStateResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryUpgradedConsensusStateResponse.Merge(m, src)
}
func (m *QueryUpgradedConsensusStateResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryUpgradedConsensusStateResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryUpgradedConsensusStateResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryUpgradedConsensusStateResponse proto.InternalMessageInfo

func (m *QueryUpgradedConsensusStateResponse) GetUpgradedConsensusState() *types.Any {
	if m != nil {
		return m.UpgradedConsensusState
	}
	return nil
}

// QueryVerifyMembershipRequest is the request type for the Query/VerifyMembership RPC method
type QueryVerifyMembershipRequest struct {
	// client unique identifier.
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
	// the proof to be verified by the client.
	Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
	// the height of the commitment root at which the proof is verified.
	ProofHeight Height `protobuf:"bytes,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"`
	// the value which is proven.
	Value []byte `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
	// optional time delay
	TimeDelay uint64 `protobuf:"varint,6,opt,name=time_delay,json=timeDelay,proto3" json:"time_delay,omitempty"`
	// optional block delay
	BlockDelay uint64 `protobuf:"varint,7,opt,name=block_delay,json=blockDelay,proto3" json:"block_delay,omitempty"`
	// the commitment key path.
	MerklePath v2.MerklePath `protobuf:"bytes,8,opt,name=merkle_path,json=merklePath,proto3" json:"merkle_path"`
}

func (m *QueryVerifyMembershipRequest) Reset()         { *m = QueryVerifyMembershipRequest{} }
func (m *QueryVerifyMembershipRequest) String() string { return proto.CompactTextString(m) }
func (*QueryVerifyMembershipRequest) ProtoMessage()    {}
func (*QueryVerifyMembershipRequest) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{20}
}
func (m *QueryVerifyMembershipRequest) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryVerifyMembershipRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryVerifyMembershipRequest.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryVerifyMembershipRequest) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryVerifyMembershipRequest.Merge(m, src)
}
func (m *QueryVerifyMembershipRequest) XXX_Size() int {
	return m.Size()
}
func (m *QueryVerifyMembershipRequest) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryVerifyMembershipRequest.DiscardUnknown(m)
}

var xxx_messageInfo_QueryVerifyMembershipRequest proto.InternalMessageInfo

func (m *QueryVerifyMembershipRequest) GetClientId() string {
	if m != nil {
		return m.ClientId
	}
	return ""
}

func (m *QueryVerifyMembershipRequest) GetProof() []byte {
	if m != nil {
		return m.Proof
	}
	return nil
}

func (m *QueryVerifyMembershipRequest) GetProofHeight() Height {
	if m != nil {
		return m.ProofHeight
	}
	return Height{}
}

func (m *QueryVerifyMembershipRequest) GetValue() []byte {
	if m != nil {
		return m.Value
	}
	return nil
}

func (m *QueryVerifyMembershipRequest) GetTimeDelay() uint64 {
	if m != nil {
		return m.TimeDelay
	}
	return 0
}

func (m *QueryVerifyMembershipRequest) GetBlockDelay() uint64 {
	if m != nil {
		return m.BlockDelay
	}
	return 0
}

func (m *QueryVerifyMembershipRequest) GetMerklePath() v2.MerklePath {
	if m != nil {
		return m.MerklePath
	}
	return v2.MerklePath{}
}

// QueryVerifyMembershipResponse is the response type for the Query/VerifyMembership RPC method
type QueryVerifyMembershipResponse struct {
	// boolean indicating success or failure of proof verification.
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
}

func (m *QueryVerifyMembershipResponse) Reset()         { *m = QueryVerifyMembershipResponse{} }
func (m *QueryVerifyMembershipResponse) String() string { return proto.CompactTextString(m) }
func (*QueryVerifyMembershipResponse) ProtoMessage()    {}
func (*QueryVerifyMembershipResponse) Descriptor() ([]byte, []int) {
	return fileDescriptor_dc42cdfd1d52d76e, []int{21}
}
func (m *QueryVerifyMembershipResponse) XXX_Unmarshal(b []byte) error {
	return m.Unmarshal(b)
}
func (m *QueryVerifyMembershipResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
	if deterministic {
		return xxx_messageInfo_QueryVerifyMembershipResponse.Marshal(b, m, deterministic)
	} else {
		b = b[:cap(b)]
		n, err := m.MarshalToSizedBuffer(b)
		if err != nil {
			return nil, err
		}
		return b[:n], nil
	}
}
func (m *QueryVerifyMembershipResponse) XXX_Merge(src proto.Message) {
	xxx_messageInfo_QueryVerifyMembershipResponse.Merge(m, src)
}
func (m *QueryVerifyMembershipResponse) XXX_Size() int {
	return m.Size()
}
func (m *QueryVerifyMembershipResponse) XXX_DiscardUnknown() {
	xxx_messageInfo_QueryVerifyMembershipResponse.DiscardUnknown(m)
}

var xxx_messageInfo_QueryVerifyMembershipResponse proto.InternalMessageInfo

func (m *QueryVerifyMembershipResponse) GetSuccess() bool {
	if m != nil {
		return m.Success
	}
	return false
}

func init() {
	proto.RegisterType((*QueryClientStateRequest)(nil), "ibc.core.client.v1.QueryClientStateRequest")
	proto.RegisterType((*QueryClientStateResponse)(nil), "ibc.core.client.v1.QueryClientStateResponse")
	proto.RegisterType((*QueryClientStatesRequest)(nil), "ibc.core.client.v1.QueryClientStatesRequest")
	proto.RegisterType((*QueryClientStatesResponse)(nil), "ibc.core.client.v1.QueryClientStatesResponse")
	proto.RegisterType((*QueryConsensusStateRequest)(nil), "ibc.core.client.v1.QueryConsensusStateRequest")
	proto.RegisterType((*QueryConsensusStateResponse)(nil), "ibc.core.client.v1.QueryConsensusStateResponse")
	proto.RegisterType((*QueryConsensusStatesRequest)(nil), "ibc.core.client.v1.QueryConsensusStatesRequest")
	proto.RegisterType((*QueryConsensusStatesResponse)(nil), "ibc.core.client.v1.QueryConsensusStatesResponse")
	proto.RegisterType((*QueryConsensusStateHeightsRequest)(nil), "ibc.core.client.v1.QueryConsensusStateHeightsRequest")
	proto.RegisterType((*QueryConsensusStateHeightsResponse)(nil), "ibc.core.client.v1.QueryConsensusStateHeightsResponse")
	proto.RegisterType((*QueryClientStatusRequest)(nil), "ibc.core.client.v1.QueryClientStatusRequest")
	proto.RegisterType((*QueryClientStatusResponse)(nil), "ibc.core.client.v1.QueryClientStatusResponse")
	proto.RegisterType((*QueryClientParamsRequest)(nil), "ibc.core.client.v1.QueryClientParamsRequest")
	proto.RegisterType((*QueryClientParamsResponse)(nil), "ibc.core.client.v1.QueryClientParamsResponse")
	proto.RegisterType((*QueryClientCreatorRequest)(nil), "ibc.core.client.v1.QueryClientCreatorRequest")
	proto.RegisterType((*QueryClientCreatorResponse)(nil), "ibc.core.client.v1.QueryClientCreatorResponse")
	proto.RegisterType((*QueryUpgradedClientStateRequest)(nil), "ibc.core.client.v1.QueryUpgradedClientStateRequest")
	proto.RegisterType((*QueryUpgradedClientStateResponse)(nil), "ibc.core.client.v1.QueryUpgradedClientStateResponse")
	proto.RegisterType((*QueryUpgradedConsensusStateRequest)(nil), "ibc.core.client.v1.QueryUpgradedConsensusStateRequest")
	proto.RegisterType((*QueryUpgradedConsensusStateResponse)(nil), "ibc.core.client.v1.QueryUpgradedConsensusStateResponse")
	proto.RegisterType((*QueryVerifyMembershipRequest)(nil), "ibc.core.client.v1.QueryVerifyMembershipRequest")
	proto.RegisterType((*QueryVerifyMembershipResponse)(nil), "ibc.core.client.v1.QueryVerifyMembershipResponse")
}

func init() { proto.RegisterFile("ibc/core/client/v1/query.proto", fileDescriptor_dc42cdfd1d52d76e) }

var fileDescriptor_dc42cdfd1d52d76e = []byte{
	// 1308 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x6f, 0x1b, 0x45,
	0x14, 0xcf, 0xa4, 0x49, 0x9a, 0x3e, 0xbb, 0x4d, 0x35, 0x6d, 0x53, 0x77, 0x93, 0x3a, 0xc9, 0x06,
	0x48, 0x1a, 0x92, 0xdd, 0xd8, 0xa1, 0x49, 0x5a, 0x09, 0x09, 0x12, 0x54, 0x1a, 0xa4, 0x96, 0xe0,
	0x8a, 0x0f, 0x21, 0x21, 0x6b, 0xbd, 0x9e, 0xd8, 0xab, 0xda, 0xbb, 0xee, 0xce, 0xae, 0xa5, 0xa8,
	0xca, 0xa5, 0xa7, 0xde, 0x40, 0x42, 0xe2, 0x8a, 0xc4, 0x81, 0x03, 0x48, 0x55, 0x0f, 0x48, 0x9c,
	0x90, 0x38, 0x41, 0x8e, 0x95, 0xe0, 0xc0, 0x89, 0xa2, 0x04, 0x89, 0x7f, 0x03, 0xed, 0xcc, 0xac,
	0xbd, 0x6b, 0x8f, 0xe3, 0x35, 0x6a, 0xb9, 0x79, 0xde, 0xe7, 0xef, 0x7d, 0xec, 0x7b, 0x4f, 0x86,
	0xac, 0x55, 0x32, 0x75, 0xd3, 0x71, 0x89, 0x6e, 0xd6, 0x2c, 0x62, 0x7b, 0x7a, 0x33, 0xa7, 0x3f,
	0xf0, 0x89, 0xbb, 0xaf, 0x35, 0x5c, 0xc7, 0x73, 0x30, 0xb6, 0x4a, 0xa6, 0x16, 0xf0, 0x35, 0xce,
	0xd7, 0x9a, 0x39, 0x65, 0xc9, 0x74, 0x68, 0xdd, 0xa1, 0x7a, 0xc9, 0xa0, 0x84, 0x0b, 0xeb, 0xcd,
	0x5c, 0x89, 0x78, 0x46, 0x4e, 0x6f, 0x18, 0x15, 0xcb, 0x36, 0x3c, 0xcb, 0xb1, 0xb9, 0xbe, 0x32,
	0x25, 0x64, 0x43, 0xb1, 0xa8, 0x71, 0x65, 0x46, 0xe2, 0x5c, 0xb8, 0xe1, 0x02, 0x0b, 0x6d, 0x01,
	0xa7, 0x5e, 0xb7, 0xbc, 0x3a, 0x13, 0xca, 0x47, 0x5e, 0x42, 0xf0, 0x4a, 0xc5, 0x71, 0x2a, 0x35,
	0xa2, 0xb3, 0x57, 0xc9, 0xdf, 0xd3, 0x0d, 0x3b, 0x74, 0x32, 0x2d, 0x58, 0x46, 0xc3, 0xd2, 0x0d,
	0xdb, 0x76, 0x3c, 0x06, 0x8f, 0x0a, 0xee, 0xc5, 0x8a, 0x53, 0x71, 0xd8, 0x4f, 0x3d, 0xf8, 0xc5,
	0xa9, 0xea, 0x3a, 0x5c, 0xfe, 0x20, 0xc0, 0xb9, 0xcd, 0xc0, 0xdc, 0xf3, 0x0c, 0x8f, 0x14, 0xc8,
	0x03, 0x9f, 0x50, 0x0f, 0x4f, 0xc1, 0x19, 0x0e, 0xb1, 0x68, 0x95, 0x33, 0x68, 0x16, 0x2d, 0x9e,
	0x29, 0x8c, 0x73, 0xc2, 0x4e, 0x59, 0x7d, 0x82, 0x20, 0xd3, 0xad, 0x48, 0x1b, 0x8e, 0x4d, 0x09,
	0xde, 0x80, 0xb4, 0xd0, 0xa4, 0x01, 0x9d, 0x29, 0xa7, 0xf2, 0x17, 0x35, 0x8e, 0x4f, 0x0b, 0xa1,
	0x6b, 0x6f, 0xdb, 0xfb, 0x85, 0x94, 0xd9, 0x36, 0x80, 0x2f, 0xc2, 0x68, 0xc3, 0x75, 0x9c, 0xbd,
	0xcc, 0xf0, 0x2c, 0x5a, 0x4c, 0x17, 0xf8, 0x03, 0x6f, 0x43, 0x9a, 0xfd, 0x28, 0x56, 0x89, 0x55,
	0xa9, 0x7a, 0x99, 0x53, 0xcc, 0x9c, 0xa2, 0x75, 0x17, 0x4c, 0xbb, 0xcd, 0x24, 0xb6, 0x46, 0x0e,
	0xff, 0x9c, 0x19, 0x2a, 0xa4, 0x98, 0x16, 0x27, 0xa9, 0xa5, 0x6e, 0xbc, 0x34, 0x8c, 0xf4, 0x16,
	0x40, 0xbb, 0x9c, 0x02, 0xed, 0x6b, 0x1a, 0xaf, 0xa7, 0x16, 0xd4, 0x5e, 0xe3, 0xb5, 0x14, 0xb5,
	0xd7, 0x76, 0x8d, 0x4a, 0x98, 0xa5, 0x42, 0x44, 0x53, 0xfd, 0x1d, 0xc1, 0x15, 0x89, 0x13, 0x91,
	0x15, 0x1b, 0xce, 0x46, 0xb3, 0x42, 0x33, 0x68, 0xf6, 0xd4, 0x62, 0x2a, 0x7f, 0x4d, 0x16, 0xc7,
	0x4e, 0x99, 0xd8, 0x9e, 0xb5, 0x67, 0x91, 0x72, 0xc4, 0xd4, 0x56, 0x36, 0x08, 0xeb, 0xbb, 0xe7,
	0x33, 0x93, 0x52, 0x36, 0x2d, 0xa4, 0x23, 0xb9, 0xa4, 0xf8, 0xdd, 0x58, 0x54, 0xc3, 0x2c, 0xaa,
	0x85, 0xbe, 0x51, 0x71, 0xb0, 0xb1, 0xb0, 0x9e, 0x22, 0x50, 0x78, 0x58, 0x01, 0xcb, 0xa6, 0x3e,
	0x4d, 0xdc, 0x27, 0x78, 0x01, 0x26, 0x5c, 0xd2, 0xb4, 0xa8, 0xe5, 0xd8, 0x45, 0xdb, 0xaf, 0x97,
	0x88, 0xcb, 0x90, 0x8c, 0x14, 0xce, 0x85, 0xe4, 0xbb, 0x8c, 0x1a, 0x13, 0x8c, 0xd4, 0x39, 0x22,
	0xc8, 0x0b, 0x89, 0xe7, 0xe1, 0x6c, 0x2d, 0x88, 0xcf, 0x0b, 0xc5, 0x46, 0x66, 0xd1, 0xe2, 0x78,
	0x21, 0xcd, 0x89, 0xa2, 0xda, 0x3f, 0x22, 0x98, 0x92, 0x42, 0x16, 0xb5, 0x78, 0x13, 0x26, 0xcc,
	0x90, 0x93, 0xa0, 0x49, 0xcf, 0x99, 0x31, 0x33, 0x2f, 0xb3, 0x4f, 0x1f, 0xc9, 0x91, 0xd3, 0x44,
	0xd9, 0xbe, 0x25, 0x29, 0xf9, 0x7f, 0x69, 0xe4, 0x5f, 0x10, 0x4c, 0xcb, 0x41, 0x88, 0xfc, 0x7d,
	0x06, 0xe7, 0x3b, 0xf2, 0x17, 0xb6, 0xf3, 0xb2, 0x2c, 0xdc, 0xb8, 0x99, 0x8f, 0x2d, 0xaf, 0x1a,
	0x4b, 0xc0, 0x44, 0x3c, 0xbd, 0x2f, 0xb0, 0x75, 0x1f, 0x23, 0x98, 0x93, 0x04, 0xc2, 0xbd, 0xff,
	0xbf, 0x39, 0xfd, 0x15, 0x81, 0x7a, 0x12, 0x14, 0x91, 0xd9, 0x4f, 0xe0, 0x72, 0x47, 0x66, 0x45,
	0x3b, 0x85, 0x09, 0xee, 0xdf, 0x4f, 0x97, 0x4c, 0x99, 0x87, 0x17, 0x97, 0xd4, 0x8d, 0xae, 0x51,
	0xea, 0x27, 0x4a, 0xa5, 0xba, 0xd6, 0x35, 0x1e, 0xfd, 0x76, 0xe0, 0x93, 0x30, 0x46, 0x19, 0x45,
	0xa8, 0x89, 0x97, 0xaa, 0xc4, 0xbc, 0xed, 0x1a, 0xae, 0x51, 0x0f, 0xbd, 0xa9, 0xef, 0xc7, 0x0c,
	0x86, 0x3c, 0x61, 0x30, 0x0f, 0x63, 0x0d, 0x46, 0x11, 0x9f, 0xb6, 0x34, 0x71, 0x42, 0x47, 0x48,
	0xaa, 0x9b, 0x31, 0x83, 0xdb, 0x2e, 0x31, 0x3c, 0xc7, 0x4d, 0x14, 0xdb, 0x7a, 0x38, 0x23, 0xe3,
	0x9a, 0x02, 0x4b, 0x06, 0x4e, 0x9b, 0x9c, 0x24, 0x14, 0xc3, 0xa7, 0x3a, 0x07, 0x33, 0x4c, 0xef,
	0xc3, 0x46, 0xc5, 0x35, 0xca, 0xb1, 0x81, 0x1e, 0x46, 0x59, 0x83, 0xd9, 0xde, 0x22, 0xc2, 0xc1,
	0x6d, 0xb8, 0xe4, 0x0b, 0x76, 0x31, 0xf1, 0xee, 0xbd, 0xe0, 0x77, 0x5b, 0x54, 0x5f, 0x11, 0x6d,
	0xda, 0xf2, 0x26, 0x1b, 0xfa, 0xaa, 0x0f, 0xf3, 0x27, 0x4a, 0x09, 0x58, 0x77, 0x21, 0xd3, 0x86,
	0x35, 0xc0, 0xc0, 0x9d, 0xf4, 0xa5, 0x76, 0xd5, 0x9f, 0x86, 0xc5, 0x60, 0xfa, 0x88, 0xb8, 0xd6,
	0xde, 0xfe, 0x1d, 0x12, 0xec, 0x0e, 0x5a, 0xb5, 0x1a, 0x89, 0x3e, 0xe5, 0x97, 0x37, 0xb6, 0x03,
	0xd3, 0x4d, 0xa3, 0xe6, 0x93, 0xcc, 0x28, 0x37, 0xcd, 0x1e, 0xf8, 0x2a, 0x80, 0x67, 0xd5, 0x49,
	0xb1, 0x4c, 0x6a, 0xc6, 0x7e, 0x66, 0x8c, 0xed, 0xb3, 0x33, 0x01, 0xe5, 0x9d, 0x80, 0x80, 0x67,
	0x20, 0x55, 0xaa, 0x39, 0xe6, 0x7d, 0xc1, 0x3f, 0xcd, 0xf8, 0xc0, 0x48, 0x5c, 0x60, 0x07, 0x52,
	0x75, 0xe2, 0xde, 0xaf, 0x91, 0x62, 0xc3, 0xf0, 0xaa, 0x99, 0x71, 0x86, 0x4c, 0x8d, 0x20, 0x6b,
	0x5f, 0x87, 0xcd, 0xbc, 0x76, 0x87, 0x89, 0xee, 0x1a, 0x5e, 0x55, 0x20, 0x84, 0x7a, 0x8b, 0xf2,
	0xde, 0xc8, 0xf8, 0xc8, 0xf9, 0x51, 0xf5, 0x06, 0x5c, 0xed, 0x91, 0xbe, 0x76, 0xa3, 0x52, 0xdf,
	0x34, 0x09, 0xe5, 0x5f, 0xcd, 0x78, 0x21, 0x7c, 0xe6, 0xbf, 0x9f, 0x80, 0x51, 0xa6, 0x8b, 0xbf,
	0x46, 0x90, 0x8a, 0x74, 0x0c, 0x7e, 0x5d, 0x96, 0xaa, 0x1e, 0x57, 0xa5, 0xb2, 0x9c, 0x4c, 0x98,
	0xc3, 0x51, 0xaf, 0x3f, 0xfa, 0xed, 0xef, 0x2f, 0x87, 0x75, 0xbc, 0xa2, 0xf7, 0x3c, 0xa0, 0xc5,
	0xfa, 0xd1, 0x1f, 0xb6, 0xea, 0x7e, 0x80, 0xbf, 0x42, 0x90, 0x8e, 0x5e, 0x46, 0x38, 0x91, 0xd7,
	0x70, 0xac, 0x28, 0x2b, 0x09, 0xa5, 0x05, 0xc8, 0x6b, 0x0c, 0xe4, 0x3c, 0x9e, 0xeb, 0x0b, 0x12,
	0x3f, 0x47, 0x70, 0x2e, 0xde, 0xd2, 0x58, 0xeb, 0xed, 0x4c, 0xf6, 0xe5, 0x29, 0x7a, 0x62, 0x79,
	0x01, 0xaf, 0xc6, 0xe0, 0xed, 0xe1, 0xb2, 0x14, 0x5e, 0xc7, 0x16, 0x8f, 0xa6, 0x51, 0x0f, 0x2f,
	0x2f, 0xfd, 0x61, 0xc7, 0x0d, 0x77, 0xa0, 0xf3, 0x6f, 0x25, 0xc2, 0xe0, 0x84, 0x03, 0xfc, 0x04,
	0xc1, 0x44, 0xc7, 0xd5, 0x80, 0x93, 0x42, 0x6e, 0x15, 0x60, 0x35, 0xb9, 0x82, 0x08, 0x72, 0x93,
	0x05, 0x99, 0xc7, 0xab, 0x83, 0x06, 0x89, 0x0f, 0x11, 0x5c, 0x92, 0xae, 0x64, 0x7c, 0x3d, 0x21,
	0x8a, 0xf8, 0x35, 0xa1, 0xac, 0x0f, 0xaa, 0x26, 0x42, 0x78, 0x8b, 0x85, 0x70, 0x13, 0x6f, 0x0e,
	0x5c, 0x27, 0x71, 0x20, 0xe0, 0x6f, 0x62, 0x6d, 0xef, 0x27, 0x6b, 0x7b, 0x7f, 0xa0, 0xb6, 0x6f,
	0x2f, 0xec, 0xc4, 0xdf, 0xa6, 0x1f, 0xcf, 0xf7, 0xe7, 0x2d, 0x90, 0x7c, 0xf7, 0xf6, 0x05, 0x19,
	0x5b, 0xf9, 0x7d, 0x41, 0xc6, 0x8f, 0x00, 0x55, 0x65, 0x20, 0xa7, 0xb1, 0x22, 0x03, 0xc9, 0x97,
	0x3e, 0xfe, 0x16, 0xc1, 0xd9, 0xd8, 0xda, 0xc6, 0xfd, 0x9c, 0xc4, 0x0f, 0x03, 0x45, 0x4b, 0x2a,
	0x2e, 0x40, 0xad, 0x33, 0x50, 0xab, 0x58, 0x3b, 0x21, 0x73, 0xe2, 0x3e, 0x88, 0xa5, 0xee, 0x07,
	0x04, 0x17, 0x24, 0x47, 0x00, 0x5e, 0xeb, 0xe9, 0xbf, 0xf7, 0x55, 0xa1, 0xbc, 0x31, 0x98, 0x92,
	0x80, 0x9e, 0x67, 0xd0, 0x97, 0xf1, 0x92, 0x0c, 0xba, 0xf4, 0x02, 0xa1, 0xf8, 0x67, 0x04, 0x93,
	0xf2, 0x3b, 0x01, 0xaf, 0xf7, 0x07, 0x21, 0x1d, 0x82, 0x1b, 0x03, 0xeb, 0x25, 0x69, 0xda, 0x5e,
	0xa7, 0x0a, 0x0d, 0xa6, 0xda, 0xf9, 0xce, 0x9d, 0x89, 0x7b, 0x4f, 0xa9, 0x1e, 0xd7, 0x89, 0x92,
	0x1b, 0x40, 0x23, 0x04, 0xfc, 0xf8, 0x9f, 0xa7, 0x4b, 0x88, 0xa1, 0x5e, 0xba, 0x89, 0x96, 0xd4,
	0x57, 0x65, 0xc0, 0x9b, 0x4c, 0xbb, 0x58, 0x6f, 0xa9, 0x6f, 0xdd, 0x3b, 0x3c, 0xca, 0xa2, 0x67,
	0x47, 0x59, 0xf4, 0xd7, 0x51, 0x16, 0x7d, 0x71, 0x9c, 0x1d, 0x7a, 0x76, 0x9c, 0x1d, 0xfa, 0xe3,
	0x38, 0x3b, 0xf4, 0xe9, 0x8d, 0x8a, 0xe5, 0x55, 0xfd, 0x52, 0x70, 0x3b, 0xe8, 0xe2, 0x2f, 0x2b,
	0xab, 0x64, 0xae, 0x54, 0x1c, 0xbd, 0x99, 0x5b, 0xd5, 0xeb, 0x4e, 0xd9, 0xaf, 0x11, 0xca, 0x1d,
	0xac, 0xe6, 0x57, 0x84, 0x0f, 0x6f, 0xbf, 0x41, 0x68, 0x69, 0x8c, 0xdd, 0x68, 0x6b, 0xff, 0x06,
	0x00, 0x00, 0xff, 0xff, 0x33, 0xfb, 0x80, 0xbf, 0x4b, 0x13, 0x00, 0x00,
}

// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4

// QueryClient is the client API for Query service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type QueryClient interface {
	// ClientState queries an IBC light client.
	ClientState(ctx context.Context, in *QueryClientStateRequest, opts ...grpc.CallOption) (*QueryClientStateResponse, error)
	// ClientStates queries all the IBC light clients of a chain.
	ClientStates(ctx context.Context, in *QueryClientStatesRequest, opts ...grpc.CallOption) (*QueryClientStatesResponse, error)
	// ConsensusState queries a consensus state associated with a client state at
	// a given height.
	ConsensusState(ctx context.Context, in *QueryConsensusStateRequest, opts ...grpc.CallOption) (*QueryConsensusStateResponse, error)
	// ConsensusStates queries all the consensus state associated with a given
	// client.
	ConsensusStates(ctx context.Context, in *QueryConsensusStatesRequest, opts ...grpc.CallOption) (*QueryConsensusStatesResponse, error)
	// ConsensusStateHeights queries the height of every consensus states associated with a given client.
	ConsensusStateHeights(ctx context.Context, in *QueryConsensusStateHeightsRequest, opts ...grpc.CallOption) (*QueryConsensusStateHeightsResponse, error)
	// Status queries the status of an IBC client.
	ClientStatus(ctx context.Context, in *QueryClientStatusRequest, opts ...grpc.CallOption) (*QueryClientStatusResponse, error)
	// ClientParams queries all parameters of the ibc client submodule.
	ClientParams(ctx context.Context, in *QueryClientParamsRequest, opts ...grpc.CallOption) (*QueryClientParamsResponse, error)
	// ClientCreator queries the creator of a given client.
	ClientCreator(ctx context.Context, in *QueryClientCreatorRequest, opts ...grpc.CallOption) (*QueryClientCreatorResponse, error)
	// UpgradedClientState queries an Upgraded IBC light client.
	UpgradedClientState(ctx context.Context, in *QueryUpgradedClientStateRequest, opts ...grpc.CallOption) (*QueryUpgradedClientStateResponse, error)
	// UpgradedConsensusState queries an Upgraded IBC consensus state.
	UpgradedConsensusState(ctx context.Context, in *QueryUpgradedConsensusStateRequest, opts ...grpc.CallOption) (*QueryUpgradedConsensusStateResponse, error)
	// VerifyMembership queries an IBC light client for proof verification of a value at a given key path.
	VerifyMembership(ctx context.Context, in *QueryVerifyMembershipRequest, opts ...grpc.CallOption) (*QueryVerifyMembershipResponse, error)
}

type queryClient struct {
	cc grpc1.ClientConn
}

func NewQueryClient(cc grpc1.ClientConn) QueryClient {
	return &queryClient{cc}
}

func (c *queryClient) ClientState(ctx context.Context, in *QueryClientStateRequest, opts ...grpc.CallOption) (*QueryClientStateResponse, error) {
	out := new(QueryClientStateResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ClientState", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ClientStates(ctx context.Context, in *QueryClientStatesRequest, opts ...grpc.CallOption) (*QueryClientStatesResponse, error) {
	out := new(QueryClientStatesResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ClientStates", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ConsensusState(ctx context.Context, in *QueryConsensusStateRequest, opts ...grpc.CallOption) (*QueryConsensusStateResponse, error) {
	out := new(QueryConsensusStateResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ConsensusState", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ConsensusStates(ctx context.Context, in *QueryConsensusStatesRequest, opts ...grpc.CallOption) (*QueryConsensusStatesResponse, error) {
	out := new(QueryConsensusStatesResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ConsensusStates", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ConsensusStateHeights(ctx context.Context, in *QueryConsensusStateHeightsRequest, opts ...grpc.CallOption) (*QueryConsensusStateHeightsResponse, error) {
	out := new(QueryConsensusStateHeightsResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ConsensusStateHeights", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ClientStatus(ctx context.Context, in *QueryClientStatusRequest, opts ...grpc.CallOption) (*QueryClientStatusResponse, error) {
	out := new(QueryClientStatusResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ClientStatus", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ClientParams(ctx context.Context, in *QueryClientParamsRequest, opts ...grpc.CallOption) (*QueryClientParamsResponse, error) {
	out := new(QueryClientParamsResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ClientParams", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) ClientCreator(ctx context.Context, in *QueryClientCreatorRequest, opts ...grpc.CallOption) (*QueryClientCreatorResponse, error) {
	out := new(QueryClientCreatorResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/ClientCreator", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) UpgradedClientState(ctx context.Context, in *QueryUpgradedClientStateRequest, opts ...grpc.CallOption) (*QueryUpgradedClientStateResponse, error) {
	out := new(QueryUpgradedClientStateResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/UpgradedClientState", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) UpgradedConsensusState(ctx context.Context, in *QueryUpgradedConsensusStateRequest, opts ...grpc.CallOption) (*QueryUpgradedConsensusStateResponse, error) {
	out := new(QueryUpgradedConsensusStateResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/UpgradedConsensusState", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *queryClient) VerifyMembership(ctx context.Context, in *QueryVerifyMembershipRequest, opts ...grpc.CallOption) (*QueryVerifyMembershipResponse, error) {
	out := new(QueryVerifyMembershipResponse)
	err := c.cc.Invoke(ctx, "/ibc.core.client.v1.Query/VerifyMembership", in, out, opts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// QueryServer is the server API for Query service.
type QueryServer interface {
	// ClientState queries an IBC light client.
	ClientState(context.Context, *QueryClientStateRequest) (*QueryClientStateResponse, error)
	// ClientStates queries all the IBC light clients of a chain.
	ClientStates(context.Context, *QueryClientStatesRequest) (*QueryClientStatesResponse, error)
	// ConsensusState queries a consensus state associated with a client state at
	// a given height.
	ConsensusState(context.Context, *QueryConsensusStateRequest) (*QueryConsensusStateResponse, error)
	// ConsensusStates queries all the consensus state associated with a given
	// client.
	ConsensusStates(context.Context, *QueryConsensusStatesRequest) (*QueryConsensusStatesResponse, error)
	// ConsensusStateHeights queries the height of every consensus states associated with a given client.
	ConsensusStateHeights(context.Context, *QueryConsensusStateHeightsRequest) (*QueryConsensusStateHeightsResponse, error)
	// Status queries the status of an IBC client.
	ClientStatus(context.Context, *QueryClientStatusRequest) (*QueryClientStatusResponse, error)
	// ClientParams queries all parameters of the ibc client submodule.
	ClientParams(context.Context, *QueryClientParamsRequest) (*QueryClientParamsResponse, error)
	// ClientCreator queries the creator of a given client.
	ClientCreator(context.Context, *QueryClientCreatorRequest) (*QueryClientCreatorResponse, error)
	// UpgradedClientState queries an Upgraded IBC light client.
	UpgradedClientState(context.Context, *QueryUpgradedClientStateRequest) (*QueryUpgradedClientStateResponse, error)
	// UpgradedConsensusState queries an Upgraded IBC consensus state.
	UpgradedConsensusState(context.Context, *QueryUpgradedConsensusStateRequest) (*QueryUpgradedConsensusStateResponse, error)
	// VerifyMembership queries an IBC light client for proof verification of a value at a given key path.
	VerifyMembership(context.Context, *QueryVerifyMembershipRequest) (*QueryVerifyMembershipResponse, error)
}

// UnimplementedQueryServer can be embedded to have forward compatible implementations.
type UnimplementedQueryServer struct {
}

func (*UnimplementedQueryServer) ClientState(ctx context.Context, req *QueryClientStateRequest) (*QueryClientStateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ClientState not implemented")
}
func (*UnimplementedQueryServer) ClientStates(ctx context.Context, req *QueryClientStatesRequest) (*QueryClientStatesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ClientStates not implemented")
}
func (*UnimplementedQueryServer) ConsensusState(ctx context.Context, req *QueryConsensusStateRequest) (*QueryConsensusStateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ConsensusState not implemented")
}
func (*UnimplementedQueryServer) ConsensusStates(ctx context.Context, req *QueryConsensusStatesRequest) (*QueryConsensusStatesResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ConsensusStates not implemented")
}
func (*UnimplementedQueryServer) ConsensusStateHeights(ctx context.Context, req *QueryConsensusStateHeightsRequest) (*QueryConsensusStateHeightsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ConsensusStateHeights not implemented")
}
func (*UnimplementedQueryServer) ClientStatus(ctx context.Context, req *QueryClientStatusRequest) (*QueryClientStatusResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ClientStatus not implemented")
}
func (*UnimplementedQueryServer) ClientParams(ctx context.Context, req *QueryClientParamsRequest) (*QueryClientParamsResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ClientParams not implemented")
}
func (*UnimplementedQueryServer) ClientCreator(ctx context.Context, req *QueryClientCreatorRequest) (*QueryClientCreatorResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method ClientCreator not implemented")
}
func (*UnimplementedQueryServer) UpgradedClientState(ctx context.Context, req *QueryUpgradedClientStateRequest) (*QueryUpgradedClientStateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpgradedClientState not implemented")
}
func (*UnimplementedQueryServer) UpgradedConsensusState(ctx context.Context, req *QueryUpgradedConsensusStateRequest) (*QueryUpgradedConsensusStateResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method UpgradedConsensusState not implemented")
}
func (*UnimplementedQueryServer) VerifyMembership(ctx context.Context, req *QueryVerifyMembershipRequest) (*QueryVerifyMembershipResponse, error) {
	return nil, status.Errorf(codes.Unimplemented, "method VerifyMembership not implemented")
}

func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
	s.RegisterService(&_Query_serviceDesc, srv)
}

func _Query_ClientState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryClientStateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).ClientState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/ClientState",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).ClientState(ctx, req.(*QueryClientStateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_ClientStates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryClientStatesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).ClientStates(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/ClientStates",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).ClientStates(ctx, req.(*QueryClientStatesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_ConsensusState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryConsensusStateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).ConsensusState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/ConsensusState",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).ConsensusState(ctx, req.(*QueryConsensusStateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_ConsensusStates_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryConsensusStatesRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).ConsensusStates(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/ConsensusStates",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).ConsensusStates(ctx, req.(*QueryConsensusStatesRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_ConsensusStateHeights_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryConsensusStateHeightsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).ConsensusStateHeights(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/ConsensusStateHeights",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).ConsensusStateHeights(ctx, req.(*QueryConsensusStateHeightsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_ClientStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryClientStatusRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).ClientStatus(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/ClientStatus",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).ClientStatus(ctx, req.(*QueryClientStatusRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_ClientParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryClientParamsRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).ClientParams(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/ClientParams",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).ClientParams(ctx, req.(*QueryClientParamsRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_ClientCreator_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryClientCreatorRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).ClientCreator(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/ClientCreator",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).ClientCreator(ctx, req.(*QueryClientCreatorRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_UpgradedClientState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryUpgradedClientStateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).UpgradedClientState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/UpgradedClientState",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).UpgradedClientState(ctx, req.(*QueryUpgradedClientStateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_UpgradedConsensusState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryUpgradedConsensusStateRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).UpgradedConsensusState(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/UpgradedConsensusState",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).UpgradedConsensusState(ctx, req.(*QueryUpgradedConsensusStateRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Query_VerifyMembership_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(QueryVerifyMembershipRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(QueryServer).VerifyMembership(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: "/ibc.core.client.v1.Query/VerifyMembership",
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(QueryServer).VerifyMembership(ctx, req.(*QueryVerifyMembershipRequest))
	}
	return interceptor(ctx, in, info, handler)
}

var _Query_serviceDesc = grpc.ServiceDesc{
	ServiceName: "ibc.core.client.v1.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ClientState",
			Handler:    _Query_ClientState_Handler,
		},
		{
			MethodName: "ClientStates",
			Handler:    _Query_ClientStates_Handler,
		},
		{
			MethodName: "ConsensusState",
			Handler:    _Query_ConsensusState_Handler,
		},
		{
			MethodName: "ConsensusStates",
			Handler:    _Query_ConsensusStates_Handler,
		},
		{
			MethodName: "ConsensusStateHeights",
			Handler:    _Query_ConsensusStateHeights_Handler,
		},
		{
			MethodName: "ClientStatus",
			Handler:    _Query_ClientStatus_Handler,
		},
		{
			MethodName: "ClientParams",
			Handler:    _Query_ClientParams_Handler,
		},
		{
			MethodName: "ClientCreator",
			Handler:    _Query_ClientCreator_Handler,
		},
		{
			MethodName: "UpgradedClientState",
			Handler:    _Query_UpgradedClientState_Handler,
		},
		{
			MethodName: "UpgradedConsensusState",
			Handler:    _Query_UpgradedConsensusState_Handler,
		},
		{
			MethodName: "VerifyMembership",
			Handler:    _Query_VerifyMembership_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "ibc/core/client/v1/query.proto",
}

func (m *QueryClientStateRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryClientStateRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryClientStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.ClientId) > 0 {
		i -= len(m.ClientId)
		copy(dAtA[i:], m.ClientId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.ClientId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryClientStateResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryClientStateResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryClientStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintQuery(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	if len(m.Proof) > 0 {
		i -= len(m.Proof)
		copy(dAtA[i:], m.Proof)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Proof)))
		i--
		dAtA[i] = 0x12
	}
	if m.ClientState != nil {
		{
			size, err := m.ClientState.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryClientStatesRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryClientStatesRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryClientStatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Pagination != nil {
		{
			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryClientStatesResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryClientStatesResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryClientStatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Pagination != nil {
		{
			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	if len(m.ClientStates) > 0 {
		for iNdEx := len(m.ClientStates) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.ClientStates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintQuery(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func (m *QueryConsensusStateRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryConsensusStateRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryConsensusStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.LatestHeight {
		i--
		if m.LatestHeight {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i--
		dAtA[i] = 0x20
	}
	if m.RevisionHeight != 0 {
		i = encodeVarintQuery(dAtA, i, uint64(m.RevisionHeight))
		i--
		dAtA[i] = 0x18
	}
	if m.RevisionNumber != 0 {
		i = encodeVarintQuery(dAtA, i, uint64(m.RevisionNumber))
		i--
		dAtA[i] = 0x10
	}
	if len(m.ClientId) > 0 {
		i -= len(m.ClientId)
		copy(dAtA[i:], m.ClientId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.ClientId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryConsensusStateResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryConsensusStateResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintQuery(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	if len(m.Proof) > 0 {
		i -= len(m.Proof)
		copy(dAtA[i:], m.Proof)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Proof)))
		i--
		dAtA[i] = 0x12
	}
	if m.ConsensusState != nil {
		{
			size, err := m.ConsensusState.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryConsensusStatesRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryConsensusStatesRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryConsensusStatesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Pagination != nil {
		{
			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	if len(m.ClientId) > 0 {
		i -= len(m.ClientId)
		copy(dAtA[i:], m.ClientId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.ClientId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryConsensusStatesResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryConsensusStatesResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryConsensusStatesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Pagination != nil {
		{
			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	if len(m.ConsensusStates) > 0 {
		for iNdEx := len(m.ConsensusStates) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.ConsensusStates[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintQuery(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func (m *QueryConsensusStateHeightsRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryConsensusStateHeightsRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryConsensusStateHeightsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Pagination != nil {
		{
			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	if len(m.ClientId) > 0 {
		i -= len(m.ClientId)
		copy(dAtA[i:], m.ClientId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.ClientId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryConsensusStateHeightsResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryConsensusStateHeightsResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryConsensusStateHeightsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Pagination != nil {
		{
			size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0x12
	}
	if len(m.ConsensusStateHeights) > 0 {
		for iNdEx := len(m.ConsensusStateHeights) - 1; iNdEx >= 0; iNdEx-- {
			{
				size, err := m.ConsensusStateHeights[iNdEx].MarshalToSizedBuffer(dAtA[:i])
				if err != nil {
					return 0, err
				}
				i -= size
				i = encodeVarintQuery(dAtA, i, uint64(size))
			}
			i--
			dAtA[i] = 0xa
		}
	}
	return len(dAtA) - i, nil
}

func (m *QueryClientStatusRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryClientStatusRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryClientStatusRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.ClientId) > 0 {
		i -= len(m.ClientId)
		copy(dAtA[i:], m.ClientId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.ClientId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryClientStatusResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryClientStatusResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryClientStatusResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Status) > 0 {
		i -= len(m.Status)
		copy(dAtA[i:], m.Status)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Status)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryClientParamsRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryClientParamsRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryClientParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	return len(dAtA) - i, nil
}

func (m *QueryClientParamsResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryClientParamsResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryClientParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Params != nil {
		{
			size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryClientCreatorRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryClientCreatorRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryClientCreatorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.ClientId) > 0 {
		i -= len(m.ClientId)
		copy(dAtA[i:], m.ClientId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.ClientId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryClientCreatorResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryClientCreatorResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryClientCreatorResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if len(m.Creator) > 0 {
		i -= len(m.Creator)
		copy(dAtA[i:], m.Creator)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Creator)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryUpgradedClientStateRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryUpgradedClientStateRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryUpgradedClientStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	return len(dAtA) - i, nil
}

func (m *QueryUpgradedClientStateResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryUpgradedClientStateResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryUpgradedClientStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.UpgradedClientState != nil {
		{
			size, err := m.UpgradedClientState.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryUpgradedConsensusStateRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryUpgradedConsensusStateRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryUpgradedConsensusStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	return len(dAtA) - i, nil
}

func (m *QueryUpgradedConsensusStateResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryUpgradedConsensusStateResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryUpgradedConsensusStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.UpgradedConsensusState != nil {
		{
			size, err := m.UpgradedConsensusState.MarshalToSizedBuffer(dAtA[:i])
			if err != nil {
				return 0, err
			}
			i -= size
			i = encodeVarintQuery(dAtA, i, uint64(size))
		}
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryVerifyMembershipRequest) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryVerifyMembershipRequest) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryVerifyMembershipRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	{
		size, err := m.MerklePath.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintQuery(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x42
	if m.BlockDelay != 0 {
		i = encodeVarintQuery(dAtA, i, uint64(m.BlockDelay))
		i--
		dAtA[i] = 0x38
	}
	if m.TimeDelay != 0 {
		i = encodeVarintQuery(dAtA, i, uint64(m.TimeDelay))
		i--
		dAtA[i] = 0x30
	}
	if len(m.Value) > 0 {
		i -= len(m.Value)
		copy(dAtA[i:], m.Value)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Value)))
		i--
		dAtA[i] = 0x2a
	}
	{
		size, err := m.ProofHeight.MarshalToSizedBuffer(dAtA[:i])
		if err != nil {
			return 0, err
		}
		i -= size
		i = encodeVarintQuery(dAtA, i, uint64(size))
	}
	i--
	dAtA[i] = 0x1a
	if len(m.Proof) > 0 {
		i -= len(m.Proof)
		copy(dAtA[i:], m.Proof)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.Proof)))
		i--
		dAtA[i] = 0x12
	}
	if len(m.ClientId) > 0 {
		i -= len(m.ClientId)
		copy(dAtA[i:], m.ClientId)
		i = encodeVarintQuery(dAtA, i, uint64(len(m.ClientId)))
		i--
		dAtA[i] = 0xa
	}
	return len(dAtA) - i, nil
}

func (m *QueryVerifyMembershipResponse) Marshal() (dAtA []byte, err error) {
	size := m.Size()
	dAtA = make([]byte, size)
	n, err := m.MarshalToSizedBuffer(dAtA[:size])
	if err != nil {
		return nil, err
	}
	return dAtA[:n], nil
}

func (m *QueryVerifyMembershipResponse) MarshalTo(dAtA []byte) (int, error) {
	size := m.Size()
	return m.MarshalToSizedBuffer(dAtA[:size])
}

func (m *QueryVerifyMembershipResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
	i := len(dAtA)
	_ = i
	var l int
	_ = l
	if m.Success {
		i--
		if m.Success {
			dAtA[i] = 1
		} else {
			dAtA[i] = 0
		}
		i--
		dAtA[i] = 0x8
	}
	return len(dAtA) - i, nil
}

func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
	offset -= sovQuery(v)
	base := offset
	for v >= 1<<7 {
		dAtA[offset] = uint8(v&0x7f | 0x80)
		v >>= 7
		offset++
	}
	dAtA[offset] = uint8(v)
	return base
}
func (m *QueryClientStateRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClientId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryClientStateResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.ClientState != nil {
		l = m.ClientState.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.Proof)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = m.ProofHeight.Size()
	n += 1 + l + sovQuery(uint64(l))
	return n
}

func (m *QueryClientStatesRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Pagination != nil {
		l = m.Pagination.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryClientStatesResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.ClientStates) > 0 {
		for _, e := range m.ClientStates {
			l = e.Size()
			n += 1 + l + sovQuery(uint64(l))
		}
	}
	if m.Pagination != nil {
		l = m.Pagination.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryConsensusStateRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClientId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	if m.RevisionNumber != 0 {
		n += 1 + sovQuery(uint64(m.RevisionNumber))
	}
	if m.RevisionHeight != 0 {
		n += 1 + sovQuery(uint64(m.RevisionHeight))
	}
	if m.LatestHeight {
		n += 2
	}
	return n
}

func (m *QueryConsensusStateResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.ConsensusState != nil {
		l = m.ConsensusState.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.Proof)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = m.ProofHeight.Size()
	n += 1 + l + sovQuery(uint64(l))
	return n
}

func (m *QueryConsensusStatesRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClientId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	if m.Pagination != nil {
		l = m.Pagination.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryConsensusStatesResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.ConsensusStates) > 0 {
		for _, e := range m.ConsensusStates {
			l = e.Size()
			n += 1 + l + sovQuery(uint64(l))
		}
	}
	if m.Pagination != nil {
		l = m.Pagination.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryConsensusStateHeightsRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClientId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	if m.Pagination != nil {
		l = m.Pagination.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryConsensusStateHeightsResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if len(m.ConsensusStateHeights) > 0 {
		for _, e := range m.ConsensusStateHeights {
			l = e.Size()
			n += 1 + l + sovQuery(uint64(l))
		}
	}
	if m.Pagination != nil {
		l = m.Pagination.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryClientStatusRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClientId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryClientStatusResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Status)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryClientParamsRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	return n
}

func (m *QueryClientParamsResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Params != nil {
		l = m.Params.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryClientCreatorRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClientId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryClientCreatorResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.Creator)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryUpgradedClientStateRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	return n
}

func (m *QueryUpgradedClientStateResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.UpgradedClientState != nil {
		l = m.UpgradedClientState.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryUpgradedConsensusStateRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	return n
}

func (m *QueryUpgradedConsensusStateResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.UpgradedConsensusState != nil {
		l = m.UpgradedConsensusState.Size()
		n += 1 + l + sovQuery(uint64(l))
	}
	return n
}

func (m *QueryVerifyMembershipRequest) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	l = len(m.ClientId)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = len(m.Proof)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	l = m.ProofHeight.Size()
	n += 1 + l + sovQuery(uint64(l))
	l = len(m.Value)
	if l > 0 {
		n += 1 + l + sovQuery(uint64(l))
	}
	if m.TimeDelay != 0 {
		n += 1 + sovQuery(uint64(m.TimeDelay))
	}
	if m.BlockDelay != 0 {
		n += 1 + sovQuery(uint64(m.BlockDelay))
	}
	l = m.MerklePath.Size()
	n += 1 + l + sovQuery(uint64(l))
	return n
}

func (m *QueryVerifyMembershipResponse) Size() (n int) {
	if m == nil {
		return 0
	}
	var l int
	_ = l
	if m.Success {
		n += 2
	}
	return n
}

func sovQuery(x uint64) (n int) {
	return (math_bits.Len64(x|1) + 6) / 7
}
func sozQuery(x uint64) (n int) {
	return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *QueryClientStateRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryClientStateRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientStateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClientId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryClientStateResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryClientStateResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientStateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientState", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.ClientState == nil {
				m.ClientState = &types.Any{}
			}
			if err := m.ClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...)
			if m.Proof == nil {
				m.Proof = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryClientStatesRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryClientStatesRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientStatesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Pagination == nil {
				m.Pagination = &query.PageRequest{}
			}
			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryClientStatesResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryClientStatesResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientStatesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientStates", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClientStates = append(m.ClientStates, IdentifiedClientState{})
			if err := m.ClientStates[len(m.ClientStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Pagination == nil {
				m.Pagination = &query.PageResponse{}
			}
			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryConsensusStateRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryConsensusStateRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConsensusStateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClientId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field RevisionNumber", wireType)
			}
			m.RevisionNumber = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.RevisionNumber |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 3:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field RevisionHeight", wireType)
			}
			m.RevisionHeight = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.RevisionHeight |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 4:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field LatestHeight", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.LatestHeight = bool(v != 0)
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryConsensusStateResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryConsensusStateResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConsensusStateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ConsensusState", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.ConsensusState == nil {
				m.ConsensusState = &types.Any{}
			}
			if err := m.ConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...)
			if m.Proof == nil {
				m.Proof = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryConsensusStatesRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryConsensusStatesRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConsensusStatesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClientId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Pagination == nil {
				m.Pagination = &query.PageRequest{}
			}
			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryConsensusStatesResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryConsensusStatesResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConsensusStatesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ConsensusStates", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ConsensusStates = append(m.ConsensusStates, ConsensusStateWithHeight{})
			if err := m.ConsensusStates[len(m.ConsensusStates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Pagination == nil {
				m.Pagination = &query.PageResponse{}
			}
			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryConsensusStateHeightsRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryConsensusStateHeightsRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConsensusStateHeightsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClientId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Pagination == nil {
				m.Pagination = &query.PageRequest{}
			}
			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryConsensusStateHeightsResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryConsensusStateHeightsResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryConsensusStateHeightsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ConsensusStateHeights", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ConsensusStateHeights = append(m.ConsensusStateHeights, Height{})
			if err := m.ConsensusStateHeights[len(m.ConsensusStateHeights)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Pagination == nil {
				m.Pagination = &query.PageResponse{}
			}
			if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryClientStatusRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryClientStatusRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientStatusRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClientId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryClientStatusResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryClientStatusResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientStatusResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Status = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryClientParamsRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryClientParamsRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryClientParamsResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryClientParamsResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.Params == nil {
				m.Params = &Params{}
			}
			if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryClientCreatorRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryClientCreatorRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientCreatorRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClientId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryClientCreatorResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryClientCreatorResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryClientCreatorResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Creator = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryUpgradedClientStateRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryUpgradedClientStateRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryUpgradedClientStateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryUpgradedClientStateResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryUpgradedClientStateResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryUpgradedClientStateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field UpgradedClientState", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.UpgradedClientState == nil {
				m.UpgradedClientState = &types.Any{}
			}
			if err := m.UpgradedClientState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryUpgradedConsensusStateRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryUpgradedConsensusStateRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryUpgradedConsensusStateRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryUpgradedConsensusStateResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryUpgradedConsensusStateResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryUpgradedConsensusStateResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field UpgradedConsensusState", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if m.UpgradedConsensusState == nil {
				m.UpgradedConsensusState = &types.Any{}
			}
			if err := m.UpgradedConsensusState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryVerifyMembershipRequest) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryVerifyMembershipRequest: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryVerifyMembershipRequest: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType)
			}
			var stringLen uint64
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				stringLen |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			intStringLen := int(stringLen)
			if intStringLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + intStringLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.ClientId = string(dAtA[iNdEx:postIndex])
			iNdEx = postIndex
		case 2:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Proof", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Proof = append(m.Proof[:0], dAtA[iNdEx:postIndex]...)
			if m.Proof == nil {
				m.Proof = []byte{}
			}
			iNdEx = postIndex
		case 3:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field ProofHeight", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.ProofHeight.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		case 5:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType)
			}
			var byteLen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				byteLen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if byteLen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + byteLen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...)
			if m.Value == nil {
				m.Value = []byte{}
			}
			iNdEx = postIndex
		case 6:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field TimeDelay", wireType)
			}
			m.TimeDelay = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.TimeDelay |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 7:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field BlockDelay", wireType)
			}
			m.BlockDelay = 0
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				m.BlockDelay |= uint64(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
		case 8:
			if wireType != 2 {
				return fmt.Errorf("proto: wrong wireType = %d for field MerklePath", wireType)
			}
			var msglen int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				msglen |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if msglen < 0 {
				return ErrInvalidLengthQuery
			}
			postIndex := iNdEx + msglen
			if postIndex < 0 {
				return ErrInvalidLengthQuery
			}
			if postIndex > l {
				return io.ErrUnexpectedEOF
			}
			if err := m.MerklePath.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
				return err
			}
			iNdEx = postIndex
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func (m *QueryVerifyMembershipResponse) Unmarshal(dAtA []byte) error {
	l := len(dAtA)
	iNdEx := 0
	for iNdEx < l {
		preIndex := iNdEx
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= uint64(b&0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		fieldNum := int32(wire >> 3)
		wireType := int(wire & 0x7)
		if wireType == 4 {
			return fmt.Errorf("proto: QueryVerifyMembershipResponse: wiretype end group for non-group")
		}
		if fieldNum <= 0 {
			return fmt.Errorf("proto: QueryVerifyMembershipResponse: illegal tag %d (wire type %d)", fieldNum, wire)
		}
		switch fieldNum {
		case 1:
			if wireType != 0 {
				return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType)
			}
			var v int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				v |= int(b&0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			m.Success = bool(v != 0)
		default:
			iNdEx = preIndex
			skippy, err := skipQuery(dAtA[iNdEx:])
			if err != nil {
				return err
			}
			if (skippy < 0) || (iNdEx+skippy) < 0 {
				return ErrInvalidLengthQuery
			}
			if (iNdEx + skippy) > l {
				return io.ErrUnexpectedEOF
			}
			iNdEx += skippy
		}
	}

	if iNdEx > l {
		return io.ErrUnexpectedEOF
	}
	return nil
}
func skipQuery(dAtA []byte) (n int, err error) {
	l := len(dAtA)
	iNdEx := 0
	depth := 0
	for iNdEx < l {
		var wire uint64
		for shift := uint(0); ; shift += 7 {
			if shift >= 64 {
				return 0, ErrIntOverflowQuery
			}
			if iNdEx >= l {
				return 0, io.ErrUnexpectedEOF
			}
			b := dAtA[iNdEx]
			iNdEx++
			wire |= (uint64(b) & 0x7F) << shift
			if b < 0x80 {
				break
			}
		}
		wireType := int(wire & 0x7)
		switch wireType {
		case 0:
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				iNdEx++
				if dAtA[iNdEx-1] < 0x80 {
					break
				}
			}
		case 1:
			iNdEx += 8
		case 2:
			var length int
			for shift := uint(0); ; shift += 7 {
				if shift >= 64 {
					return 0, ErrIntOverflowQuery
				}
				if iNdEx >= l {
					return 0, io.ErrUnexpectedEOF
				}
				b := dAtA[iNdEx]
				iNdEx++
				length |= (int(b) & 0x7F) << shift
				if b < 0x80 {
					break
				}
			}
			if length < 0 {
				return 0, ErrInvalidLengthQuery
			}
			iNdEx += length
		case 3:
			depth++
		case 4:
			if depth == 0 {
				return 0, ErrUnexpectedEndOfGroupQuery
			}
			depth--
		case 5:
			iNdEx += 4
		default:
			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
		}
		if iNdEx < 0 {
			return 0, ErrInvalidLengthQuery
		}
		if depth == 0 {
			return iNdEx, nil
		}
	}
	return 0, io.ErrUnexpectedEOF
}

var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
