# Generated by the protocol buffer compiler.  DO NOT EDIT!
# sources: band/feeds/v1beta1/encoder.proto, band/feeds/v1beta1/feeds.proto, band/feeds/v1beta1/genesis.proto, band/feeds/v1beta1/params.proto, band/feeds/v1beta1/query.proto, band/feeds/v1beta1/tx.proto
# plugin: python-betterproto
# This file has been @generated

from dataclasses import dataclass
from typing import (
    TYPE_CHECKING,
    Dict,
    List,
    Optional,
)

import betterproto
import grpclib
from betterproto.grpc.grpclib_server import ServiceBase

from ....cosmos.base.query import v1beta1 as __cosmos_base_query_v1_beta1__


if TYPE_CHECKING:
    import grpclib.server
    from betterproto.grpc.grpclib_client import MetadataLike
    from grpclib.metadata import Deadline


class Encoder(betterproto.Enum):
    """
    Encoder is an enumerator that defines the mode of encoding message in tss module.
    """

    UNSPECIFIED = 0
    """ENCODER_UNSPECIFIED is an unspecified encoder mode."""

    FIXED_POINT_ABI = 1
    """
    ENCODER_FIXED_POINT_ABI is a fixed-point price abi encoder (price * 10^9).
    """

    TICK_ABI = 2
    """ENCODER_TICK_ABI is a tick abi encoder."""


class PriceStatus(betterproto.Enum):
    """PriceStatus is a structure that defines the price status of a price."""

    UNSPECIFIED = 0
    """PRICE_STATUS_UNSPECIFIED is an unspecified price status."""

    UNKNOWN_SIGNAL_ID = 1
    """PRICE_STATUS_UNKNOWN_SIGNAL_ID is an unknown signal id price status."""

    NOT_READY = 2
    """PRICE_STATUS_NOT_READY is a not ready price status."""

    AVAILABLE = 3
    """PRICE_STATUS_AVAILABLE is an available price status."""

    NOT_IN_CURRENT_FEEDS = 4
    """
    PRICE_STATUS_NOT_IN_CURRENT_FEEDS is a not in current feed price status.
    """


class SignalPriceStatus(betterproto.Enum):
    """
    SignalPriceStatus is a structure that defines the price status of a signal id.
    """

    UNSPECIFIED = 0
    """
    SIGNAL_PRICE_STATUS_UNSPECIFIED is an unspecified signal price status.
    """

    UNSUPPORTED = 1
    """
    SIGNAL_PRICE_STATUS_UNSUPPORTED is an unsupported signal price status.
    """

    UNAVAILABLE = 2
    """
    SIGNAL_PRICE_STATUS_UNAVAILABLE is an unavailable signal price status.
    """

    AVAILABLE = 3
    """SIGNAL_PRICE_STATUS_AVAILABLE is an available signal price status."""


@dataclass(eq=False, repr=False)
class Signal(betterproto.Message):
    """
    Signal is the data structure that contains signal id and power of that signal.
    """

    id: str = betterproto.string_field(1)
    """id is the id of the signal."""

    power: int = betterproto.int64_field(2)
    """power is the power of the corresponding signal id."""


@dataclass(eq=False, repr=False)
class Vote(betterproto.Message):
    """
    Vote is the data structure that contains array of signals of a voter.
    """

    voter: str = betterproto.string_field(1)
    """voter is the address of the voter of this signals."""

    signals: List["Signal"] = betterproto.message_field(2)
    """signals is a list of signals submit by the voter."""


@dataclass(eq=False, repr=False)
class Feed(betterproto.Message):
    """
    Feed is a structure that holds a signal id, its total power, and its calculated interval.
    """

    signal_id: str = betterproto.string_field(1)
    """signal_id is the unique string that identifies the unit of feed."""

    power: int = betterproto.int64_field(2)
    """power is the power of the corresponding signal id."""

    interval: int = betterproto.int64_field(3)
    """interval is the interval of the price feed."""


@dataclass(eq=False, repr=False)
class FeedWithDeviation(betterproto.Message):
    """
    FeedWithDeviation is a structure that holds a signal id, its total power, and its calculated interval and deviation.
    """

    signal_id: str = betterproto.string_field(1)
    """signal_id is the unique string that identifies the unit of feed."""

    power: int = betterproto.int64_field(2)
    """power is the power of the corresponding signal id."""

    interval: int = betterproto.int64_field(3)
    """interval is the interval of the price feed."""

    deviation_basis_point: int = betterproto.int64_field(4)
    """
    deviation_basis_point is the maximum deviation value the feed can tolerate, expressed in basis points.
    """


@dataclass(eq=False, repr=False)
class CurrentFeeds(betterproto.Message):
    """
    CurrentFeeds is a structure that holds a list of currently supported feeds, and its last update time and block.
    """

    feeds: List["Feed"] = betterproto.message_field(1)
    """feeds is a list of currently supported feeds."""

    last_update_timestamp: int = betterproto.int64_field(2)
    """
    last_update_timestamp is the timestamp of the last time supported feeds list is updated.
    """

    last_update_block: int = betterproto.int64_field(3)
    """
    last_update_block is the number of blocks of the last time supported feeds list is updated.
    """


@dataclass(eq=False, repr=False)
class CurrentFeedWithDeviations(betterproto.Message):
    """
    CurrentFeedWithDeviations is a structure that holds a list of currently supported feed-with-deviations, and its
     last update time and block.
    """

    feeds: List["FeedWithDeviation"] = betterproto.message_field(1)
    """feeds is a list of currently supported feed-with-deviations."""

    last_update_timestamp: int = betterproto.int64_field(2)
    """
    last_update_timestamp is the timestamp of the last time supported feeds list is updated.
    """

    last_update_block: int = betterproto.int64_field(3)
    """
    last_update_block is the number of blocks of the last time supported feeds list is updated.
    """


@dataclass(eq=False, repr=False)
class Price(betterproto.Message):
    """Price is a structure that defines the price of a signal id."""

    status: "PriceStatus" = betterproto.enum_field(1)
    """status is the status of a the price."""

    signal_id: str = betterproto.string_field(2)
    """signal_id is the signal id of the price."""

    price: int = betterproto.uint64_field(3)
    """price is the price of the signal id."""

    timestamp: int = betterproto.int64_field(4)
    """timestamp is the timestamp at which the price was aggregated."""


@dataclass(eq=False, repr=False)
class SignalPrice(betterproto.Message):
    """
    SignalPrice is a structure that defines the signaled price of a signal id.
    """

    status: "SignalPriceStatus" = betterproto.enum_field(1)
    """status is the status of the signal price."""

    signal_id: str = betterproto.string_field(2)
    """signal_id is the signal id of the price."""

    price: int = betterproto.uint64_field(3)
    """price is the price submitted by the validator."""


@dataclass(eq=False, repr=False)
class ValidatorPrice(betterproto.Message):
    """
    ValidatorPrice is a structure that defines the price submitted by a validator for a signal id.
    """

    signal_price_status: "SignalPriceStatus" = betterproto.enum_field(1)
    """signal_price_status is the status of a signal price submitted."""

    signal_id: str = betterproto.string_field(2)
    """signal_id is the signal id of the price."""

    price: int = betterproto.uint64_field(3)
    """price is the price submitted by the validator."""

    timestamp: int = betterproto.int64_field(4)
    """timestamp is the timestamp at which the price was submitted."""

    block_height: int = betterproto.int64_field(5)
    """block_height is the block height at which the price was submitted."""


@dataclass(eq=False, repr=False)
class ValidatorPriceList(betterproto.Message):
    """
    ValidatorPriceList is a structure that holds a list of validator prices of
     a validator and its address.
    """

    validator: str = betterproto.string_field(1)
    """validator is the validator address."""

    validator_prices: List["ValidatorPrice"] = betterproto.message_field(2)
    """validators_prices is a list of validator prices."""


@dataclass(eq=False, repr=False)
class ReferenceSourceConfig(betterproto.Message):
    """
    ReferenceSourceConfig is a structure that defines the information of reference price source.
    """

    registry_ipfs_hash: str = betterproto.string_field(1)
    """registry_ipfs_hash is the hash of the reference registry."""

    registry_version: str = betterproto.string_field(2)
    """registry_version is the version of the reference registry."""


@dataclass(eq=False, repr=False)
class FeedsSignatureOrder(betterproto.Message):
    """FeedsSignatureOrder defines a general signature order for feed data."""

    signal_ids: List[str] = betterproto.string_field(1)
    """signal_ids is the list of signal ids that require signatures."""

    encoder: Encoder = betterproto.enum_field(2)
    """encoder is the mode of encoding feeds signature order."""


@dataclass(eq=False, repr=False)
class Params(betterproto.Message):
    """
    Params is the data structure that keeps the parameters of the feeds module.
    """

    admin: str = betterproto.string_field(1)
    """
    admin is the address of the admin that is allowed to perform operations on modules.
    """

    allowable_block_time_discrepancy: int = betterproto.int64_field(2)
    """
    allowable_block_time_discrepancy is the allowed discrepancy (in seconds) between validator price timestamp and
     block_time.
    """

    grace_period: int = betterproto.int64_field(3)
    """
    grace_period is the time (in seconds) given for validators to adapt to changing in feed's interval.
    """

    min_interval: int = betterproto.int64_field(4)
    """
    min_interval is the minimum limit of every feeds' interval (in seconds).
     If the calculated interval is lower than this, it will be capped at this value.
    """

    max_interval: int = betterproto.int64_field(5)
    """
    max_interval is the maximum limit of every feeds' interval (in seconds).
     If the calculated interval of a feed is higher than this, it will not be capped at this value.
    """

    power_step_threshold: int = betterproto.int64_field(6)
    """
    power_step_threshold is the amount of minimum power required to put feed in the current feeds list.
    """

    max_current_feeds: int = betterproto.uint64_field(7)
    """
    max_current_feeds is the maximum number of feeds supported at a time.
    """

    cooldown_time: int = betterproto.int64_field(8)
    """
    cooldown_time represents the duration (in seconds) during which validators are prohibited from sending new prices.
    """

    min_deviation_basis_point: int = betterproto.int64_field(9)
    """
    min_deviation_basis_point is the minimum limit of every feeds' deviation (in basis point).
    """

    max_deviation_basis_point: int = betterproto.int64_field(10)
    """
    max_deviation_basis_point is the maximum limit of every feeds' deviation (in basis point).
    """

    current_feeds_update_interval: int = betterproto.int64_field(11)
    """
    current_feeds_update_interval is the number of blocks after which the current feeds will be re-calculated.
    """

    price_quorum: str = betterproto.string_field(12)
    """
    price_quorum is the minimum percentage of power that needs to be reached for a price to be processed.
    """

    max_signal_ids_per_signing: int = betterproto.uint64_field(13)
    """
    MaxSignalIDsPerSigning is the maximum number of signals allowed in a single tss signing request.
    """


@dataclass(eq=False, repr=False)
class MsgVote(betterproto.Message):
    """MsgVote is the transaction message to vote signals."""

    voter: str = betterproto.string_field(1)
    """voter is the address of the voter that wants to vote signals."""

    signals: List["Signal"] = betterproto.message_field(2)
    """signals is a list of submitted signals."""


@dataclass(eq=False, repr=False)
class MsgVoteResponse(betterproto.Message):
    """MsgVoteResponse is the response type for the Msg/Vote RPC method."""

    pass


@dataclass(eq=False, repr=False)
class MsgSubmitSignalPrices(betterproto.Message):
    """
    MsgSubmitSignalPrices is the transaction message to submit multiple signal prices.
    """

    validator: str = betterproto.string_field(1)
    """
    validator is the address of the validator that is performing the operation.
    """

    timestamp: int = betterproto.int64_field(2)
    """timestamp is the timestamp used as reference for the data."""

    signal_prices: List["SignalPrice"] = betterproto.message_field(3)
    """signal_prices is a list of signal prices to submit."""


@dataclass(eq=False, repr=False)
class MsgSubmitSignalPricesResponse(betterproto.Message):
    """
    MsgSubmitSignalPricesResponse is the response type for the Msg/SubmitSignalPrices RPC method.
    """

    pass


@dataclass(eq=False, repr=False)
class MsgUpdateReferenceSourceConfig(betterproto.Message):
    """
    MsgUpdateReferenceSourceConfig is the transaction message to update reference price source's configuration.
    """

    admin: str = betterproto.string_field(1)
    """admin is the address of the admin that is performing the operation."""

    reference_source_config: "ReferenceSourceConfig" = betterproto.message_field(2)
    """
    reference_source_config is the information of reference price source.
    """


@dataclass(eq=False, repr=False)
class MsgUpdateReferenceSourceConfigResponse(betterproto.Message):
    """
    MsgUpdateReferenceSourceConfigResponse is the response type for the Msg/UpdateReferenceSourceConfig RPC method.
    """

    pass


@dataclass(eq=False, repr=False)
class MsgUpdateParams(betterproto.Message):
    """MsgUpdateParams is the transaction message to update parameters."""

    authority: str = betterproto.string_field(1)
    """authority is the address of the governance account."""

    params: "Params" = betterproto.message_field(2)
    """params is the x/feeds parameters to update."""


@dataclass(eq=False, repr=False)
class MsgUpdateParamsResponse(betterproto.Message):
    """
    MsgUpdateParamsResponse is the response type for the Msg/UpdateParams RPC method.
    """

    pass


@dataclass(eq=False, repr=False)
class QueryCurrentFeedsRequest(betterproto.Message):
    """
    QueryCurrentFeedsRequest is the request type for the Query/CurrentFeeds RPC method.
    """

    pass


@dataclass(eq=False, repr=False)
class QueryCurrentFeedsResponse(betterproto.Message):
    """
    QueryCurrentFeedsResponse is the response type for the Query/CurrentFeeds RPC method.
    """

    current_feeds: "CurrentFeedWithDeviations" = betterproto.message_field(1)
    """
    current_feeds is a list of currently supported feed-with-deviations, and its last update time and block.
    """


@dataclass(eq=False, repr=False)
class QueryIsFeederRequest(betterproto.Message):
    """
    QueryIsFeederRequest is the request type for the Query/IsFeeder RPC method.
    """

    validator: str = betterproto.string_field(1)
    """validator is a validator address."""

    feeder: str = betterproto.string_field(2)
    """feeder is a candidate account."""


@dataclass(eq=False, repr=False)
class QueryIsFeederResponse(betterproto.Message):
    """
    QueryIsFeederResponse is the response type for the Query/IsFeeder RPC method.
    """

    is_feeder: bool = betterproto.bool_field(1)
    """is_feeder is true if this account has been granted by validator."""


@dataclass(eq=False, repr=False)
class QueryParamsRequest(betterproto.Message):
    """
    QueryParamsRequest is the request type for the Query/Params RPC method.
    """

    pass


@dataclass(eq=False, repr=False)
class QueryParamsResponse(betterproto.Message):
    """
    QueryParamsResponse is the response type for the Query/Params RPC method.
    """

    params: "Params" = betterproto.message_field(1)
    """params is the parameters of the module."""


@dataclass(eq=False, repr=False)
class QueryPriceRequest(betterproto.Message):
    """
    QueryPriceRequest is the request type for the Query/Price RPC method.
    """

    signal_id: str = betterproto.string_field(1)
    """signal_id is the signal id to query the price for."""


@dataclass(eq=False, repr=False)
class QueryPriceResponse(betterproto.Message):
    """
    QueryPriceResponse is the response type for the Query/Price RPC method.
    """

    price: "Price" = betterproto.message_field(1)
    """price is the aggregated price of the signal id."""


@dataclass(eq=False, repr=False)
class QueryPricesRequest(betterproto.Message):
    """
    QueryPricesRequest is the request type for the Query/Prices RPC method.
    """

    signal_ids: List[str] = betterproto.string_field(1)
    """signal_ids is a list of signal ids to query prices for."""


@dataclass(eq=False, repr=False)
class QueryPricesResponse(betterproto.Message):
    """
    QueryPricesResponse is the response type for the Query/Prices RPC method.
    """

    prices: List["Price"] = betterproto.message_field(1)
    """prices is a list of prices."""


@dataclass(eq=False, repr=False)
class QueryAllPricesRequest(betterproto.Message):
    """
    QueryAllPricesRequest is the request type for the Query/AllPrices RPC method.
    """

    pagination: "__cosmos_base_query_v1_beta1__.PageRequest" = (
        betterproto.message_field(1)
    )
    """pagination is the pagination for the request."""


@dataclass(eq=False, repr=False)
class QueryAllPricesResponse(betterproto.Message):
    """
    QueryAllPricesResponse is the response type for the Query/AllPrices RPC method.
    """

    prices: List["Price"] = betterproto.message_field(1)
    """prices is a list of prices."""

    pagination: "__cosmos_base_query_v1_beta1__.PageResponse" = (
        betterproto.message_field(2)
    )
    """pagination is the pagination information in the response."""


@dataclass(eq=False, repr=False)
class QueryReferenceSourceConfigRequest(betterproto.Message):
    """
    QueryReferenceSourceConfigRequest is the request type for the Query/ReferenceSourceConfig RPC method.
    """

    pass


@dataclass(eq=False, repr=False)
class QueryReferenceSourceConfigResponse(betterproto.Message):
    """
    QueryReferenceSourceConfigResponse is the response type for the Query/ReferenceSourceConfig RPC method.
    """

    reference_source_config: "ReferenceSourceConfig" = betterproto.message_field(1)
    """
    reference_source_config is the information about the reference price source.
    """


@dataclass(eq=False, repr=False)
class QuerySignalTotalPowersRequest(betterproto.Message):
    """
    QuerySignalTotalPowersRequest is the request type for the Query/SignalTotalPowers RPC method.
    """

    signal_ids: List[str] = betterproto.string_field(1)
    """signal_ids is a list of signal ids to query."""

    pagination: "__cosmos_base_query_v1_beta1__.PageRequest" = (
        betterproto.message_field(2)
    )
    """pagination is the pagination for the request."""


@dataclass(eq=False, repr=False)
class QuerySignalTotalPowersResponse(betterproto.Message):
    """
    QuerySignalTotalPowersResponse is the response type for the Query/SignalTotalPowers RPC method.
    """

    signal_total_powers: List["Signal"] = betterproto.message_field(1)
    """signal_total_powers is a list of signal-total-powers."""

    pagination: "__cosmos_base_query_v1_beta1__.PageResponse" = (
        betterproto.message_field(2)
    )
    """pagination is the pagination information in the response."""


@dataclass(eq=False, repr=False)
class QueryValidValidatorRequest(betterproto.Message):
    """
    QueryValidValidatorRequest is the request type for the Query/ValidValidator RPC method.
    """

    validator: str = betterproto.string_field(1)
    """validator is the validator address to query the flag."""


@dataclass(eq=False, repr=False)
class QueryValidValidatorResponse(betterproto.Message):
    """
    QueryValidValidatorResponse is the response type for the Query/ValidValidator RPC method.
    """

    valid: bool = betterproto.bool_field(1)
    """valid is a valid flag."""


@dataclass(eq=False, repr=False)
class QueryValidatorPricesRequest(betterproto.Message):
    """
    QueryValidatorPricesRequest is the request type for the Query/ValidatorPrices RPC method.
    """

    validator: str = betterproto.string_field(1)
    """validator is the validator address to query prices for."""

    signal_ids: List[str] = betterproto.string_field(2)
    """signal_ids is the list of signal ids to query the price for."""


@dataclass(eq=False, repr=False)
class QueryValidatorPricesResponse(betterproto.Message):
    """
    QueryValidatorPricesResponse is the response type for the Query/ValidatorPrices RPC method.
    """

    validator_prices: List["ValidatorPrice"] = betterproto.message_field(1)
    """validator_prices is a list of prices submitted by the validator."""


@dataclass(eq=False, repr=False)
class QueryVoteRequest(betterproto.Message):
    """QueryVoteRequest is the request type for the Query/Vote RPC method."""

    voter: str = betterproto.string_field(1)
    """voter is the voter address to query signal for."""


@dataclass(eq=False, repr=False)
class QueryVoteResponse(betterproto.Message):
    """
    QueryVoteResponse is the response type for the Query/Vote RPC method.
    """

    signals: List["Signal"] = betterproto.message_field(1)
    """signals is a list of signals submitted by the voter."""


@dataclass(eq=False, repr=False)
class GenesisState(betterproto.Message):
    """
    GenesisState is a structure that defines the feeds module's genesis state.
    """

    params: "Params" = betterproto.message_field(1)
    """params is all parameters of the module."""

    votes: List["Vote"] = betterproto.message_field(2)
    """votes is a list of voter signals."""

    reference_source_config: "ReferenceSourceConfig" = betterproto.message_field(3)
    """
    reference_source_config is the information about reference price config.
    """


class MsgStub(betterproto.ServiceStub):
    async def vote(
        self,
        msg_vote: "MsgVote",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "MsgVoteResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Msg/Vote",
            msg_vote,
            MsgVoteResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def submit_signal_prices(
        self,
        msg_submit_signal_prices: "MsgSubmitSignalPrices",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "MsgSubmitSignalPricesResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Msg/SubmitSignalPrices",
            msg_submit_signal_prices,
            MsgSubmitSignalPricesResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def update_reference_source_config(
        self,
        msg_update_reference_source_config: "MsgUpdateReferenceSourceConfig",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "MsgUpdateReferenceSourceConfigResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Msg/UpdateReferenceSourceConfig",
            msg_update_reference_source_config,
            MsgUpdateReferenceSourceConfigResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def update_params(
        self,
        msg_update_params: "MsgUpdateParams",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "MsgUpdateParamsResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Msg/UpdateParams",
            msg_update_params,
            MsgUpdateParamsResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )


class QueryStub(betterproto.ServiceStub):
    async def current_feeds(
        self,
        query_current_feeds_request: "QueryCurrentFeedsRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryCurrentFeedsResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/CurrentFeeds",
            query_current_feeds_request,
            QueryCurrentFeedsResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def is_feeder(
        self,
        query_is_feeder_request: "QueryIsFeederRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryIsFeederResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/IsFeeder",
            query_is_feeder_request,
            QueryIsFeederResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def params(
        self,
        query_params_request: "QueryParamsRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryParamsResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/Params",
            query_params_request,
            QueryParamsResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def price(
        self,
        query_price_request: "QueryPriceRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryPriceResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/Price",
            query_price_request,
            QueryPriceResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def prices(
        self,
        query_prices_request: "QueryPricesRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryPricesResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/Prices",
            query_prices_request,
            QueryPricesResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def all_prices(
        self,
        query_all_prices_request: "QueryAllPricesRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryAllPricesResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/AllPrices",
            query_all_prices_request,
            QueryAllPricesResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def reference_source_config(
        self,
        query_reference_source_config_request: "QueryReferenceSourceConfigRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryReferenceSourceConfigResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/ReferenceSourceConfig",
            query_reference_source_config_request,
            QueryReferenceSourceConfigResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def signal_total_powers(
        self,
        query_signal_total_powers_request: "QuerySignalTotalPowersRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QuerySignalTotalPowersResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/SignalTotalPowers",
            query_signal_total_powers_request,
            QuerySignalTotalPowersResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def valid_validator(
        self,
        query_valid_validator_request: "QueryValidValidatorRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryValidValidatorResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/ValidValidator",
            query_valid_validator_request,
            QueryValidValidatorResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def validator_prices(
        self,
        query_validator_prices_request: "QueryValidatorPricesRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryValidatorPricesResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/ValidatorPrices",
            query_validator_prices_request,
            QueryValidatorPricesResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def vote(
        self,
        query_vote_request: "QueryVoteRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryVoteResponse":
        return await self._unary_unary(
            "/band.feeds.v1beta1.Query/Vote",
            query_vote_request,
            QueryVoteResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )


class MsgBase(ServiceBase):

    async def vote(self, msg_vote: "MsgVote") -> "MsgVoteResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def submit_signal_prices(
        self, msg_submit_signal_prices: "MsgSubmitSignalPrices"
    ) -> "MsgSubmitSignalPricesResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def update_reference_source_config(
        self, msg_update_reference_source_config: "MsgUpdateReferenceSourceConfig"
    ) -> "MsgUpdateReferenceSourceConfigResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def update_params(
        self, msg_update_params: "MsgUpdateParams"
    ) -> "MsgUpdateParamsResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def __rpc_vote(
        self, stream: "grpclib.server.Stream[MsgVote, MsgVoteResponse]"
    ) -> None:
        request = await stream.recv_message()
        response = await self.vote(request)
        await stream.send_message(response)

    async def __rpc_submit_signal_prices(
        self,
        stream: "grpclib.server.Stream[MsgSubmitSignalPrices, MsgSubmitSignalPricesResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.submit_signal_prices(request)
        await stream.send_message(response)

    async def __rpc_update_reference_source_config(
        self,
        stream: "grpclib.server.Stream[MsgUpdateReferenceSourceConfig, MsgUpdateReferenceSourceConfigResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.update_reference_source_config(request)
        await stream.send_message(response)

    async def __rpc_update_params(
        self, stream: "grpclib.server.Stream[MsgUpdateParams, MsgUpdateParamsResponse]"
    ) -> None:
        request = await stream.recv_message()
        response = await self.update_params(request)
        await stream.send_message(response)

    def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
        return {
            "/band.feeds.v1beta1.Msg/Vote": grpclib.const.Handler(
                self.__rpc_vote,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgVote,
                MsgVoteResponse,
            ),
            "/band.feeds.v1beta1.Msg/SubmitSignalPrices": grpclib.const.Handler(
                self.__rpc_submit_signal_prices,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgSubmitSignalPrices,
                MsgSubmitSignalPricesResponse,
            ),
            "/band.feeds.v1beta1.Msg/UpdateReferenceSourceConfig": grpclib.const.Handler(
                self.__rpc_update_reference_source_config,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgUpdateReferenceSourceConfig,
                MsgUpdateReferenceSourceConfigResponse,
            ),
            "/band.feeds.v1beta1.Msg/UpdateParams": grpclib.const.Handler(
                self.__rpc_update_params,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgUpdateParams,
                MsgUpdateParamsResponse,
            ),
        }


class QueryBase(ServiceBase):

    async def current_feeds(
        self, query_current_feeds_request: "QueryCurrentFeedsRequest"
    ) -> "QueryCurrentFeedsResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def is_feeder(
        self, query_is_feeder_request: "QueryIsFeederRequest"
    ) -> "QueryIsFeederResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def params(
        self, query_params_request: "QueryParamsRequest"
    ) -> "QueryParamsResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def price(
        self, query_price_request: "QueryPriceRequest"
    ) -> "QueryPriceResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def prices(
        self, query_prices_request: "QueryPricesRequest"
    ) -> "QueryPricesResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def all_prices(
        self, query_all_prices_request: "QueryAllPricesRequest"
    ) -> "QueryAllPricesResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def reference_source_config(
        self, query_reference_source_config_request: "QueryReferenceSourceConfigRequest"
    ) -> "QueryReferenceSourceConfigResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def signal_total_powers(
        self, query_signal_total_powers_request: "QuerySignalTotalPowersRequest"
    ) -> "QuerySignalTotalPowersResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def valid_validator(
        self, query_valid_validator_request: "QueryValidValidatorRequest"
    ) -> "QueryValidValidatorResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def validator_prices(
        self, query_validator_prices_request: "QueryValidatorPricesRequest"
    ) -> "QueryValidatorPricesResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def vote(self, query_vote_request: "QueryVoteRequest") -> "QueryVoteResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def __rpc_current_feeds(
        self,
        stream: "grpclib.server.Stream[QueryCurrentFeedsRequest, QueryCurrentFeedsResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.current_feeds(request)
        await stream.send_message(response)

    async def __rpc_is_feeder(
        self,
        stream: "grpclib.server.Stream[QueryIsFeederRequest, QueryIsFeederResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.is_feeder(request)
        await stream.send_message(response)

    async def __rpc_params(
        self, stream: "grpclib.server.Stream[QueryParamsRequest, QueryParamsResponse]"
    ) -> None:
        request = await stream.recv_message()
        response = await self.params(request)
        await stream.send_message(response)

    async def __rpc_price(
        self, stream: "grpclib.server.Stream[QueryPriceRequest, QueryPriceResponse]"
    ) -> None:
        request = await stream.recv_message()
        response = await self.price(request)
        await stream.send_message(response)

    async def __rpc_prices(
        self, stream: "grpclib.server.Stream[QueryPricesRequest, QueryPricesResponse]"
    ) -> None:
        request = await stream.recv_message()
        response = await self.prices(request)
        await stream.send_message(response)

    async def __rpc_all_prices(
        self,
        stream: "grpclib.server.Stream[QueryAllPricesRequest, QueryAllPricesResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.all_prices(request)
        await stream.send_message(response)

    async def __rpc_reference_source_config(
        self,
        stream: "grpclib.server.Stream[QueryReferenceSourceConfigRequest, QueryReferenceSourceConfigResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.reference_source_config(request)
        await stream.send_message(response)

    async def __rpc_signal_total_powers(
        self,
        stream: "grpclib.server.Stream[QuerySignalTotalPowersRequest, QuerySignalTotalPowersResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.signal_total_powers(request)
        await stream.send_message(response)

    async def __rpc_valid_validator(
        self,
        stream: "grpclib.server.Stream[QueryValidValidatorRequest, QueryValidValidatorResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.valid_validator(request)
        await stream.send_message(response)

    async def __rpc_validator_prices(
        self,
        stream: "grpclib.server.Stream[QueryValidatorPricesRequest, QueryValidatorPricesResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.validator_prices(request)
        await stream.send_message(response)

    async def __rpc_vote(
        self, stream: "grpclib.server.Stream[QueryVoteRequest, QueryVoteResponse]"
    ) -> None:
        request = await stream.recv_message()
        response = await self.vote(request)
        await stream.send_message(response)

    def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
        return {
            "/band.feeds.v1beta1.Query/CurrentFeeds": grpclib.const.Handler(
                self.__rpc_current_feeds,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryCurrentFeedsRequest,
                QueryCurrentFeedsResponse,
            ),
            "/band.feeds.v1beta1.Query/IsFeeder": grpclib.const.Handler(
                self.__rpc_is_feeder,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryIsFeederRequest,
                QueryIsFeederResponse,
            ),
            "/band.feeds.v1beta1.Query/Params": grpclib.const.Handler(
                self.__rpc_params,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryParamsRequest,
                QueryParamsResponse,
            ),
            "/band.feeds.v1beta1.Query/Price": grpclib.const.Handler(
                self.__rpc_price,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryPriceRequest,
                QueryPriceResponse,
            ),
            "/band.feeds.v1beta1.Query/Prices": grpclib.const.Handler(
                self.__rpc_prices,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryPricesRequest,
                QueryPricesResponse,
            ),
            "/band.feeds.v1beta1.Query/AllPrices": grpclib.const.Handler(
                self.__rpc_all_prices,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryAllPricesRequest,
                QueryAllPricesResponse,
            ),
            "/band.feeds.v1beta1.Query/ReferenceSourceConfig": grpclib.const.Handler(
                self.__rpc_reference_source_config,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryReferenceSourceConfigRequest,
                QueryReferenceSourceConfigResponse,
            ),
            "/band.feeds.v1beta1.Query/SignalTotalPowers": grpclib.const.Handler(
                self.__rpc_signal_total_powers,
                grpclib.const.Cardinality.UNARY_UNARY,
                QuerySignalTotalPowersRequest,
                QuerySignalTotalPowersResponse,
            ),
            "/band.feeds.v1beta1.Query/ValidValidator": grpclib.const.Handler(
                self.__rpc_valid_validator,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryValidValidatorRequest,
                QueryValidValidatorResponse,
            ),
            "/band.feeds.v1beta1.Query/ValidatorPrices": grpclib.const.Handler(
                self.__rpc_validator_prices,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryValidatorPricesRequest,
                QueryValidatorPricesResponse,
            ),
            "/band.feeds.v1beta1.Query/Vote": grpclib.const.Handler(
                self.__rpc_vote,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryVoteRequest,
                QueryVoteResponse,
            ),
        }
