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

from dataclasses import dataclass
from datetime import datetime
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 SigningStatus(betterproto.Enum):
    """
    SigningStatus is an enumeration of the possible statuses of a signing.
    """

    UNSPECIFIED = 0
    """
    SIGNING_STATUS_UNSPECIFIED is the status of a signing that has not been specified.
    """

    WAITING = 1
    """
    SIGNING_STATUS_WAITING is the status of a signing that is waiting to be signed in the protocol.
    """

    SUCCESS = 2
    """
    SIGNING_STATUS_SUCCESS is the status of a signing that has success in the protocol.
    """

    FALLEN = 3
    """
    SIGNING_STATUS_FALLEN is the status of a signing that has fallen out of the protocol.
    """


class GroupStatus(betterproto.Enum):
    """GroupStatus is an enumeration of the possible statuses of a group."""

    UNSPECIFIED = 0
    """
    GROUP_STATUS_UNSPECIFIED is the status of a group that has not been specified.
    """

    ROUND_1 = 1
    """
    GROUP_STATUS_ROUND_1 is the status of a group that is in the first round of the protocol.
    """

    ROUND_2 = 2
    """
    GROUP_STATUS_ROUND_2 is the status of a group that is in the second round of the protocol.
    """

    ROUND_3 = 3
    """
    GROUP_STATUS_ROUND_3 is the status of a group that is in the third round of the protocol.
    """

    ACTIVE = 4
    """
    GROUP_STATUS_ACTIVE is the status of a group that is actively participating in the protocol.
    """

    EXPIRED = 5
    """
    GROUP_STATUS_EXPIRED is the status of a group that has expired in the protocol.
    """

    FALLEN = 6
    """
    GROUP_STATUS_FALLEN is the status of a group that has fallen out of the protocol.
    """


class ComplaintStatus(betterproto.Enum):
    """ComplaintStatus represents the status of a complaint."""

    UNSPECIFIED = 0
    """
    COMPLAINT_STATUS_UNSPECIFIED represents an undefined status of the complaint.
    """

    SUCCESS = 1
    """COMPLAINT_STATUS_SUCCESS represents a successful complaint."""

    FAILED = 2
    """COMPLAINT_STATUS_FAILED represents a failed complaint."""


@dataclass(eq=False, repr=False)
class Group(betterproto.Message):
    """
    Group is a type representing a participant group in a Distributed Key Generation or signing process.
    """

    id: int = betterproto.uint64_field(1)
    """id is the unique identifier of the group."""

    size: int = betterproto.uint64_field(2)
    """size is the number of members in the group."""

    threshold: int = betterproto.uint64_field(3)
    """
    threshold is the minimum number of members needed to generate a valid signature.
    """

    pub_key: bytes = betterproto.bytes_field(4)
    """
    pub_key is the public key generated by the group after successful completion of the DKG process.
    """

    status: "GroupStatus" = betterproto.enum_field(5)
    """
    status represents the current stage of the group in the DKG or signing process.
    """

    created_height: int = betterproto.uint64_field(6)
    """created_height is the block height when the group was created."""

    module_owner: str = betterproto.string_field(7)
    """module_owner is the module that creates this group."""


@dataclass(eq=False, repr=False)
class GroupResult(betterproto.Message):
    """
    GroupResult is a tss group result from querying tss group information.
    """

    group: "Group" = betterproto.message_field(1)
    """group defines the group object containing group information."""

    dkg_context: bytes = betterproto.bytes_field(2)
    """dkg_context defines the DKG context data."""

    members: List["Member"] = betterproto.message_field(3)
    """members is the list of members in the group."""

    round1_infos: List["Round1Info"] = betterproto.message_field(4)
    """round1_infos is the list of Round 1 information."""

    round2_infos: List["Round2Info"] = betterproto.message_field(5)
    """round2_infos is the list of Round 2 information."""

    complaints_with_status: List["ComplaintsWithStatus"] = betterproto.message_field(6)
    """complaints_with_status is the list of complaints with status."""

    confirms: List["Confirm"] = betterproto.message_field(7)
    """confirms is the list of confirms."""


@dataclass(eq=False, repr=False)
class Round1Info(betterproto.Message):
    """
    Round1Info contains all necessary information for handling round 1 of the DKG process.
    """

    member_id: int = betterproto.uint64_field(1)
    """member_id is the unique identifier of a group member."""

    coefficient_commits: List[bytes] = betterproto.bytes_field(2)
    """
    coefficients_commits is a list of commitments to the coefficients of the member's secret polynomial.
    """

    one_time_pub_key: bytes = betterproto.bytes_field(3)
    """
    one_time_pub_key is the one-time public key used by the member to encrypt secret shares.
    """

    a0_signature: bytes = betterproto.bytes_field(4)
    """
    a0_signature is the member's signature on the first coefficient of its secret polynomial.
    """

    one_time_signature: bytes = betterproto.bytes_field(5)
    """
    one_time_signature is the member's signature on its one-time public key.
    """


@dataclass(eq=False, repr=False)
class Round2Info(betterproto.Message):
    """
    Round2Info contains all necessary information for handling round 2 of the DKG process.
    """

    member_id: int = betterproto.uint64_field(1)
    """member_id is the unique identifier of a group member."""

    encrypted_secret_shares: List[bytes] = betterproto.bytes_field(2)
    """
    encrypted_secret_shares is a list of secret shares encrypted under the public keys of other members.
    """


@dataclass(eq=False, repr=False)
class De(betterproto.Message):
    """
    DE contains the public parts of a member's decryption and encryption keys.
    """

    pub_d: bytes = betterproto.bytes_field(1)
    """pub_d is the public value of own commitment (D)."""

    pub_e: bytes = betterproto.bytes_field(2)
    """pub_e is the public value of own commitment (E)."""


@dataclass(eq=False, repr=False)
class DeQueue(betterproto.Message):
    """
    DEQueue is a simple queue data structure contains index of existing DE objects of each member.
    """

    head: int = betterproto.uint64_field(1)
    """head is the current index of the first element in the queue."""

    tail: int = betterproto.uint64_field(2)
    """tail is the current index of the last element in the queue."""


@dataclass(eq=False, repr=False)
class Signing(betterproto.Message):
    """
    Signing contains all necessary information for handling a signing request.
    """

    id: int = betterproto.uint64_field(1)
    """id is the unique identifier of the signing."""

    current_attempt: int = betterproto.uint64_field(2)
    """
    current_attempt is the latest round number that signing has been attempted.
    """

    group_id: int = betterproto.uint64_field(3)
    """group_id is the unique identifier of the group."""

    group_pub_key: bytes = betterproto.bytes_field(4)
    """group_pub_key is the public key of the group that sign this message."""

    message: bytes = betterproto.bytes_field(5)
    """message is the message to be signed."""

    group_pub_nonce: bytes = betterproto.bytes_field(6)
    """
    group_pub_nonce is the public nonce generated by the group for this signing process.
    """

    signature: bytes = betterproto.bytes_field(7)
    """signature is the group's signature on the message."""

    status: "SigningStatus" = betterproto.enum_field(8)
    """
    status represents the current stage of the signing in the signing process.
    """

    created_height: int = betterproto.uint64_field(9)
    """created_height is the block height when the signing was created."""

    created_timestamp: datetime = betterproto.message_field(10)
    """
    created_timestamp is the block timestamp when the signing was created.
    """


@dataclass(eq=False, repr=False)
class SigningAttempt(betterproto.Message):
    """
    SigningAttempt contains a member that has been assigned to and expiration block height of
     the specific attempt.
    """

    signing_id: int = betterproto.uint64_field(1)
    """signing_id is the unique identifier of the signing."""

    attempt: int = betterproto.uint64_field(2)
    """attempt is the number of round that this signing has been attempted."""

    expired_height: int = betterproto.uint64_field(3)
    """
    expired_height is the block height when this signing attempt was expired.
    """

    assigned_members: List["AssignedMember"] = betterproto.message_field(4)
    """
    assigned_members is a list of members assigned to the signing process.
    """


@dataclass(eq=False, repr=False)
class AssignedMember(betterproto.Message):
    """
    AssignedMember is a type representing a member that has been assigned to a signing process.
    """

    member_id: int = betterproto.uint64_field(1)
    """member_id is the unique identifier of the member."""

    address: str = betterproto.string_field(2)
    """member is the human-readable name of the member."""

    pub_key: bytes = betterproto.bytes_field(3)
    """pub_key is the public part of a member."""

    pub_d: bytes = betterproto.bytes_field(4)
    """pub_d is the public part of a member's decryption key."""

    pub_e: bytes = betterproto.bytes_field(5)
    """pub_e is the public part of a member's encryption key."""

    binding_factor: bytes = betterproto.bytes_field(6)
    """
    binding_factor is the binding factor of the member for the signing process.
    """

    pub_nonce: bytes = betterproto.bytes_field(7)
    """pub_nonce is the public nonce of the member for the signing process."""


@dataclass(eq=False, repr=False)
class PendingSignings(betterproto.Message):
    """
    PendingSignings is a list of all signing processes that are currently pending.
    """

    signing_ids: List[int] = betterproto.uint64_field(1)
    """signing_ids is a list of identifiers for the signing processes."""


@dataclass(eq=False, repr=False)
class Member(betterproto.Message):
    """Member is a type representing a member of the group."""

    id: int = betterproto.uint64_field(1)
    """id is the unique identifier of a member."""

    group_id: int = betterproto.uint64_field(2)
    """group_id is the group id of this member."""

    address: str = betterproto.string_field(3)
    """address is the address of the member."""

    pub_key: bytes = betterproto.bytes_field(4)
    """pub_key is the public key of the member."""

    is_malicious: bool = betterproto.bool_field(5)
    """
    is_malicious is a boolean flag indicating whether the member is considered malicious.
    """

    is_active: bool = betterproto.bool_field(6)
    """
    is_active is a boolean flag indicating whether the member is currently active in the protocol.
    """


@dataclass(eq=False, repr=False)
class Confirm(betterproto.Message):
    """
    Confirm is a message type used to confirm participation in the protocol.
    """

    member_id: int = betterproto.uint64_field(1)
    """member_id is the unique identifier of a group member."""

    own_pub_key_sig: bytes = betterproto.bytes_field(2)
    """own_pub_key_sig is a signature over the member's own public key."""


@dataclass(eq=False, repr=False)
class Complaint(betterproto.Message):
    """
    Complaint is a message type used to issue a complaint against a member.
    """

    complainant: int = betterproto.uint64_field(1)
    """complainant is the member issuing the complaint."""

    respondent: int = betterproto.uint64_field(2)
    """respondent is the member against whom the complaint is issued."""

    key_sym: bytes = betterproto.bytes_field(3)
    """
    key_sym is a symmetric key between respondent's private key and respondent's public key.
    """

    signature: bytes = betterproto.bytes_field(4)
    """
    signature is the complaint signature that can do a symmetric key validation and complaint verification.
    """


@dataclass(eq=False, repr=False)
class ComplaintWithStatus(betterproto.Message):
    """
    ComplaintWithStatus contains information about a complaint with its status.
    """

    complaint: "Complaint" = betterproto.message_field(1)
    """complaint is the information about the complaint."""

    complaint_status: "ComplaintStatus" = betterproto.enum_field(2)
    """complaint_status is the status of the complaint."""


@dataclass(eq=False, repr=False)
class ComplaintsWithStatus(betterproto.Message):
    """
    ComplaintsWithStatus contains information about multiple complaints and their status from a single member.
    """

    member_id: int = betterproto.uint64_field(1)
    """member_id is the identifier of the member filing the complaints."""

    complaints_with_status: List["ComplaintWithStatus"] = betterproto.message_field(2)
    """
    complaints_with_status is the list of complaints with their status from this member.
    """


@dataclass(eq=False, repr=False)
class PendingProcessGroups(betterproto.Message):
    """
    PendingProcessGroups is a list of groups that are waiting to be processed.
    """

    group_ids: List[int] = betterproto.uint64_field(1)
    """group_ids is a list of group IDs."""


@dataclass(eq=False, repr=False)
class PendingProcessSignings(betterproto.Message):
    """
    PendingProcessSignigns is a list of signings that are waiting to be processed.
    """

    signing_ids: List[int] = betterproto.uint64_field(1)
    """signing_ids is a list of signing IDs."""


@dataclass(eq=False, repr=False)
class PartialSignature(betterproto.Message):
    """
    PartialSignature contains information about a member's partial signature.
    """

    signing_id: int = betterproto.uint64_field(1)
    """signing_id is the unique identifier of the signing."""

    signing_attempt: int = betterproto.uint64_field(2)
    """signing_attempt is the number of attempts for this signing."""

    member_id: int = betterproto.uint64_field(3)
    """
    member_id is the identifier of the member providing the partial signature.
    """

    signature: bytes = betterproto.bytes_field(4)
    """signature is the partial signature provided by this member."""


@dataclass(eq=False, repr=False)
class TextSignatureOrder(betterproto.Message):
    """TextSignatureOrder defines a general text signature order."""

    message: bytes = betterproto.bytes_field(1)
    """message is the data that needs to be signed."""


@dataclass(eq=False, repr=False)
class EvmSignature(betterproto.Message):
    """EVMSignature defines a signature in the EVM format."""

    r_address: bytes = betterproto.bytes_field(1)
    """r_address is the address of the nonce for using in the contract."""

    signature: bytes = betterproto.bytes_field(2)
    """signature is the signature part for using in the contract."""


@dataclass(eq=False, repr=False)
class SigningResult(betterproto.Message):
    """
    SigningResult is a tss signing result from querying tss signing information.
    """

    signing: "Signing" = betterproto.message_field(1)
    """signing is the tss signing result."""

    current_signing_attempt: "SigningAttempt" = betterproto.message_field(2)
    """
    current_signing_attempt is the current attempt information of the signing.
    """

    evm_signature: "EvmSignature" = betterproto.message_field(3)
    """
    evm_signature is the signature in the format that can use directly in EVM.
    """

    received_partial_signatures: List["PartialSignature"] = betterproto.message_field(4)
    """
    received_partial_signatures is a list of received partial signatures.
    """


@dataclass(eq=False, repr=False)
class SigningExpiration(betterproto.Message):
    """SigningExpiration defines the expiration time of the signing."""

    signing_id: int = betterproto.uint64_field(1)
    """signing_id is the id of the signing."""

    signing_attempt: int = betterproto.uint64_field(2)
    """signing_attempt is the number of attempts of the signing."""


@dataclass(eq=False, repr=False)
class SigningExpirations(betterproto.Message):
    """
    SigningExpirations is a list of signing expiration information that are waiting in the queue.
    """

    signing_expirations: List["SigningExpiration"] = betterproto.message_field(1)
    """signing_expirations is a list of SigningExpiration object."""


@dataclass(eq=False, repr=False)
class GenesisState(betterproto.Message):
    """GenesisState defines the tss module's genesis state."""

    params: "Params" = betterproto.message_field(1)
    """params defines all the paramiters of the module."""

    groups: List["Group"] = betterproto.message_field(2)
    """groups is an array containing information about each group."""

    members: List["Member"] = betterproto.message_field(3)
    """
    members is an array containing information about each member of groups.
    """

    des: List["DeGenesis"] = betterproto.message_field(4)
    """des is an array containing the des of all the addressres."""


@dataclass(eq=False, repr=False)
class Params(betterproto.Message):
    """Params defines the set of module parameters."""

    max_group_size: int = betterproto.uint64_field(1)
    """max_group_size is the maximum of the member capacity of the group."""

    max_de_size: int = betterproto.uint64_field(2)
    """max_de_size is the maximum of the de capacity of the member."""

    creation_period: int = betterproto.uint64_field(3)
    """
    creation_period is the number of blocks allowed to creating tss group.
    """

    signing_period: int = betterproto.uint64_field(4)
    """signing_period is the number of blocks allowed to sign."""

    max_signing_attempt: int = betterproto.uint64_field(5)
    """
    max_signing_attempt is the maximum number of signing retry process per signingID.
    """

    max_memo_length: int = betterproto.uint64_field(6)
    """
    max_memo_length is the maximum length of the memo in the direct originator.
    """

    max_message_length: int = betterproto.uint64_field(7)
    """
    max_message_length is the maximum length of the message in the TextSignatureOrder.
    """


@dataclass(eq=False, repr=False)
class DeGenesis(betterproto.Message):
    """
    DEGenesis defines an account address and de pair used in the tss module's genesis state.
    """

    address: str = betterproto.string_field(1)
    """address is the address of the de holder."""

    de: "De" = betterproto.message_field(2)
    """de defines the difference de this balance holds."""


@dataclass(eq=False, repr=False)
class MsgSubmitDkgRound1(betterproto.Message):
    """MsgSubmitDKGRound1 is the Msg/MsgSubmitDKGRound1 request type."""

    group_id: int = betterproto.uint64_field(1)
    """group_id is ID of the group."""

    round1_info: "Round1Info" = betterproto.message_field(2)
    """round1_info is all data that require to handle round 1."""

    sender: str = betterproto.string_field(3)
    """
    sender is the user address that submits the group creation information;
     must be a member of this group.
    """


@dataclass(eq=False, repr=False)
class MsgSubmitDkgRound1Response(betterproto.Message):
    """MsgSubmitDKGRound1Response is the Msg/SubmitDKGRound1 response type."""

    pass


@dataclass(eq=False, repr=False)
class MsgSubmitDkgRound2(betterproto.Message):
    """MsgSubmitDKGRound2 is the Msg/SubmitDKGRound2 request type."""

    group_id: int = betterproto.uint64_field(1)
    """group_id is ID of the group."""

    round2_info: "Round2Info" = betterproto.message_field(2)
    """round2_info is all data that is required to handle round 2."""

    sender: str = betterproto.string_field(3)
    """
    sender is the user address that submits the group creation information;
     must be a member of this group.
    """


@dataclass(eq=False, repr=False)
class MsgSubmitDkgRound2Response(betterproto.Message):
    """
    MsgSubmitDKGRound2Response is response data for MsgSubmitDKGRound2 message
    """

    pass


@dataclass(eq=False, repr=False)
class MsgComplain(betterproto.Message):
    """
    MsgComplain is a message used to complain about malicious actors in the group.
    """

    group_id: int = betterproto.uint64_field(1)
    """group_id is ID of the group."""

    complaints: List["Complaint"] = betterproto.message_field(2)
    """complaints is a list of complaints."""

    sender: str = betterproto.string_field(3)
    """
    sender is the user address that submits the group creation information;
     must be a member of this group.
    """


@dataclass(eq=False, repr=False)
class MsgComplainResponse(betterproto.Message):
    """MsgComplainResponse is response data for MsgComplain message"""

    pass


@dataclass(eq=False, repr=False)
class MsgConfirm(betterproto.Message):
    """MsgConfirm is a message used to confirm own public key."""

    group_id: int = betterproto.uint64_field(1)
    """group_id is ID of the group."""

    member_id: int = betterproto.uint64_field(2)
    """member_id is ID of the sender."""

    own_pub_key_sig: bytes = betterproto.bytes_field(3)
    """
    own_pub_key_sig is a signature of the member_i on its own PubKey to confirm
     that the address is able to derive the PubKey.
    """

    sender: str = betterproto.string_field(4)
    """
    sender is the user address that submits the group creation information;
     must be a member of this group.
    """


@dataclass(eq=False, repr=False)
class MsgConfirmResponse(betterproto.Message):
    """MsgConfirmResponse is response data for MsgConfirm message"""

    pass


@dataclass(eq=False, repr=False)
class MsgSubmitDEs(betterproto.Message):
    """MsgSubmitDEs is a message used to submit a list of DEs."""

    des: List["De"] = betterproto.message_field(1)
    """des is a list of DE objects."""

    sender: str = betterproto.string_field(2)
    """sender is the user address that submits DE objects."""


@dataclass(eq=False, repr=False)
class MsgSubmitDEsResponse(betterproto.Message):
    """MsgSubmitDEsResponse is response data for MsgSubmitDEs message"""

    pass


@dataclass(eq=False, repr=False)
class MsgResetDE(betterproto.Message):
    """
    MsgResetDE is a message used to reset the DEs that being stored on chain.
    """

    sender: str = betterproto.string_field(1)
    """sender is the user address that request for resetting DEs."""


@dataclass(eq=False, repr=False)
class MsgResetDEResponse(betterproto.Message):
    """MsgResetDEResponse is response data for MsgResetDE message"""

    pass


@dataclass(eq=False, repr=False)
class MsgSubmitSignature(betterproto.Message):
    """MsgSubmitSignature is a message used to submitting signature data."""

    signing_id: int = betterproto.uint64_field(1)
    """signing_id is the unique identifier of the signing process."""

    member_id: int = betterproto.uint64_field(2)
    """member_id is the unique identifier of the signer in the group."""

    signature: bytes = betterproto.bytes_field(3)
    """signature is the signature produced by the signer."""

    signer: str = betterproto.string_field(4)
    """
    signer is the address who signs a message; must be a member of the group.
    """


@dataclass(eq=False, repr=False)
class MsgSubmitSignatureResponse(betterproto.Message):
    """
    MsgSubmitSignatureResponse is response data for MsgSubmitSignature message
    """

    pass


@dataclass(eq=False, repr=False)
class MsgUpdateParams(betterproto.Message):
    """MsgUpdateParams is the Msg/UpdateParams request type."""

    params: "Params" = betterproto.message_field(1)
    """params defines the x/tss parameters to update."""

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


@dataclass(eq=False, repr=False)
class MsgUpdateParamsResponse(betterproto.Message):
    """
    MsgUpdateParamsResponse defines the response structure for executing a
     MsgUpdateParams message.
    """

    pass


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

    pass


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

    group_count: int = betterproto.uint64_field(1)
    """group_count is total number of group available on the chain"""

    signing_count: int = betterproto.uint64_field(2)
    """
    signing_count is total number of signing request submitted to the chain
    """


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

    group_id: int = betterproto.uint64_field(1)
    """group_id defines the unique id of the group."""


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

    group_result: "GroupResult" = betterproto.message_field(1)
    """group_result is the result of the group."""


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

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


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

    groups: List["GroupResult"] = betterproto.message_field(1)
    """groups is the list of groups."""

    pagination: "__cosmos_base_query_v1_beta1__.PageResponse" = betterproto.message_field(2)
    """pagination defines an pagination for the response."""


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

    group_id: int = betterproto.uint64_field(1)
    """group_id defines the unique id of the group."""


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

    members: List["Member"] = betterproto.message_field(1)
    """members are member list of the group"""


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

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

    grantee: str = betterproto.string_field(2)
    """grantee is a grantee address"""


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

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


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

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

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


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

    des: List["De"] = betterproto.message_field(1)
    """des is a list of DEs."""

    pagination: "__cosmos_base_query_v1_beta1__.PageResponse" = betterproto.message_field(2)
    """pagination defines an pagination for the response."""


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

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


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

    pending_groups: List[int] = betterproto.uint64_field(1)
    """pending_groups is a list of pending groups."""


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

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


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

    pending_signings: List[int] = betterproto.uint64_field(1)
    """pending_signings is a list of pending signings."""


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

    signing_id: int = betterproto.uint64_field(1)
    """signing_id is the ID of the signing request."""


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

    signing_result: "SigningResult" = betterproto.message_field(1)
    """signing_result is the result of the signing."""


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

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


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

    signing_results: List["SigningResult"] = betterproto.message_field(1)
    """signing_results is a list of signing results."""

    pagination: "__cosmos_base_query_v1_beta1__.PageResponse" = betterproto.message_field(2)
    """pagination defines an pagination for the response."""


@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 are the parameters of the module."""


@dataclass(eq=False, repr=False)
class DirectOriginator(betterproto.Message):
    """
    DirectOriginator is a message originator defines an information of the requester
     on direct TSS request.
    """

    source_chain_id: str = betterproto.string_field(1)
    """
    source_chain_id is the source chain ID that the data is originated from.
    """

    requester: str = betterproto.string_field(2)
    """
    requester is the address of the requester, it can be the user address or module address.
    """

    memo: str = betterproto.string_field(3)
    """memo is the note of the message."""


@dataclass(eq=False, repr=False)
class TunnelOriginator(betterproto.Message):
    """
    TunnelOriginator is a message originator defines an information of the requester
     on TSS request via tunnel module.
    """

    source_chain_id: str = betterproto.string_field(1)
    """
    source_chain_id is the source chain ID that the data is originated from.
    """

    tunnel_id: int = betterproto.uint64_field(2)
    """tunnel_id is the tunnel ID that the request is originated from."""

    destination_chain_id: str = betterproto.string_field(3)
    """
    destination_chain_id is the destination chain ID that the data should be relayed to.
    """

    destination_contract_address: str = betterproto.string_field(4)
    """
    destination_contract_address is the destination address that the data should be relayed to.
    """


class MsgStub(betterproto.ServiceStub):
    async def submit_dkg_round1(
        self,
        msg_submit_dkg_round1: "MsgSubmitDkgRound1",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "MsgSubmitDkgRound1Response":
        return await self._unary_unary(
            "/band.tss.v1beta1.Msg/SubmitDKGRound1",
            msg_submit_dkg_round1,
            MsgSubmitDkgRound1Response,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def submit_dkg_round2(
        self,
        msg_submit_dkg_round2: "MsgSubmitDkgRound2",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "MsgSubmitDkgRound2Response":
        return await self._unary_unary(
            "/band.tss.v1beta1.Msg/SubmitDKGRound2",
            msg_submit_dkg_round2,
            MsgSubmitDkgRound2Response,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def complain(
        self,
        msg_complain: "MsgComplain",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "MsgComplainResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Msg/Complain",
            msg_complain,
            MsgComplainResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def confirm(
        self,
        msg_confirm: "MsgConfirm",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "MsgConfirmResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Msg/Confirm",
            msg_confirm,
            MsgConfirmResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def submit_d_es(
        self,
        msg_submit_d_es: "MsgSubmitDEs",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "MsgSubmitDEsResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Msg/SubmitDEs",
            msg_submit_d_es,
            MsgSubmitDEsResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def reset_de(
        self,
        msg_reset_de: MsgResetDE,
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> MsgResetDEResponse:
        return await self._unary_unary(
            "/band.tss.v1beta1.Msg/ResetDE",
            msg_reset_de,
            MsgResetDEResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def submit_signature(
        self,
        msg_submit_signature: "MsgSubmitSignature",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "MsgSubmitSignatureResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Msg/SubmitSignature",
            msg_submit_signature,
            MsgSubmitSignatureResponse,
            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.tss.v1beta1.Msg/UpdateParams",
            msg_update_params,
            MsgUpdateParamsResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )


class QueryStub(betterproto.ServiceStub):
    async def counts(
        self,
        query_counts_request: "QueryCountsRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryCountsResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Query/Counts",
            query_counts_request,
            QueryCountsResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def groups(
        self,
        query_groups_request: "QueryGroupsRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryGroupsResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Query/Groups",
            query_groups_request,
            QueryGroupsResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def group(
        self,
        query_group_request: "QueryGroupRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryGroupResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Query/Group",
            query_group_request,
            QueryGroupResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def members(
        self,
        query_members_request: "QueryMembersRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryMembersResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Query/Members",
            query_members_request,
            QueryMembersResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def is_grantee(
        self,
        query_is_grantee_request: "QueryIsGranteeRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryIsGranteeResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Query/IsGrantee",
            query_is_grantee_request,
            QueryIsGranteeResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def de(
        self,
        query_de_request: "QueryDeRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryDeResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Query/DE",
            query_de_request,
            QueryDeResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def pending_groups(
        self,
        query_pending_groups_request: "QueryPendingGroupsRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryPendingGroupsResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Query/PendingGroups",
            query_pending_groups_request,
            QueryPendingGroupsResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def pending_signings(
        self,
        query_pending_signings_request: "QueryPendingSigningsRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QueryPendingSigningsResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Query/PendingSignings",
            query_pending_signings_request,
            QueryPendingSigningsResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def signing(
        self,
        query_signing_request: "QuerySigningRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QuerySigningResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Query/Signing",
            query_signing_request,
            QuerySigningResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )

    async def signings(
        self,
        query_signings_request: "QuerySigningsRequest",
        *,
        timeout: Optional[float] = None,
        deadline: Optional["Deadline"] = None,
        metadata: Optional["MetadataLike"] = None
    ) -> "QuerySigningsResponse":
        return await self._unary_unary(
            "/band.tss.v1beta1.Query/Signings",
            query_signings_request,
            QuerySigningsResponse,
            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.tss.v1beta1.Query/Params",
            query_params_request,
            QueryParamsResponse,
            timeout=timeout,
            deadline=deadline,
            metadata=metadata,
        )


class MsgBase(ServiceBase):
    async def submit_dkg_round1(self, msg_submit_dkg_round1: "MsgSubmitDkgRound1") -> "MsgSubmitDkgRound1Response":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def submit_dkg_round2(self, msg_submit_dkg_round2: "MsgSubmitDkgRound2") -> "MsgSubmitDkgRound2Response":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def complain(self, msg_complain: "MsgComplain") -> "MsgComplainResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def confirm(self, msg_confirm: "MsgConfirm") -> "MsgConfirmResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def submit_d_es(self, msg_submit_d_es: "MsgSubmitDEs") -> "MsgSubmitDEsResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def reset_de(self, msg_reset_de: MsgResetDE) -> MsgResetDEResponse:
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def submit_signature(self, msg_submit_signature: "MsgSubmitSignature") -> "MsgSubmitSignatureResponse":
        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_submit_dkg_round1(
        self,
        stream: "grpclib.server.Stream[MsgSubmitDkgRound1, MsgSubmitDkgRound1Response]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.submit_dkg_round1(request)
        await stream.send_message(response)

    async def __rpc_submit_dkg_round2(
        self,
        stream: "grpclib.server.Stream[MsgSubmitDkgRound2, MsgSubmitDkgRound2Response]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.submit_dkg_round2(request)
        await stream.send_message(response)

    async def __rpc_complain(self, stream: "grpclib.server.Stream[MsgComplain, MsgComplainResponse]") -> None:
        request = await stream.recv_message()
        response = await self.complain(request)
        await stream.send_message(response)

    async def __rpc_confirm(self, stream: "grpclib.server.Stream[MsgConfirm, MsgConfirmResponse]") -> None:
        request = await stream.recv_message()
        response = await self.confirm(request)
        await stream.send_message(response)

    async def __rpc_submit_d_es(self, stream: "grpclib.server.Stream[MsgSubmitDEs, MsgSubmitDEsResponse]") -> None:
        request = await stream.recv_message()
        response = await self.submit_d_es(request)
        await stream.send_message(response)

    async def __rpc_reset_de(self, stream: "grpclib.server.Stream[MsgResetDE, MsgResetDEResponse]") -> None:
        request = await stream.recv_message()
        response = await self.reset_de(request)
        await stream.send_message(response)

    async def __rpc_submit_signature(
        self,
        stream: "grpclib.server.Stream[MsgSubmitSignature, MsgSubmitSignatureResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.submit_signature(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.tss.v1beta1.Msg/SubmitDKGRound1": grpclib.const.Handler(
                self.__rpc_submit_dkg_round1,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgSubmitDkgRound1,
                MsgSubmitDkgRound1Response,
            ),
            "/band.tss.v1beta1.Msg/SubmitDKGRound2": grpclib.const.Handler(
                self.__rpc_submit_dkg_round2,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgSubmitDkgRound2,
                MsgSubmitDkgRound2Response,
            ),
            "/band.tss.v1beta1.Msg/Complain": grpclib.const.Handler(
                self.__rpc_complain,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgComplain,
                MsgComplainResponse,
            ),
            "/band.tss.v1beta1.Msg/Confirm": grpclib.const.Handler(
                self.__rpc_confirm,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgConfirm,
                MsgConfirmResponse,
            ),
            "/band.tss.v1beta1.Msg/SubmitDEs": grpclib.const.Handler(
                self.__rpc_submit_d_es,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgSubmitDEs,
                MsgSubmitDEsResponse,
            ),
            "/band.tss.v1beta1.Msg/ResetDE": grpclib.const.Handler(
                self.__rpc_reset_de,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgResetDE,
                MsgResetDEResponse,
            ),
            "/band.tss.v1beta1.Msg/SubmitSignature": grpclib.const.Handler(
                self.__rpc_submit_signature,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgSubmitSignature,
                MsgSubmitSignatureResponse,
            ),
            "/band.tss.v1beta1.Msg/UpdateParams": grpclib.const.Handler(
                self.__rpc_update_params,
                grpclib.const.Cardinality.UNARY_UNARY,
                MsgUpdateParams,
                MsgUpdateParamsResponse,
            ),
        }


class QueryBase(ServiceBase):
    async def counts(self, query_counts_request: "QueryCountsRequest") -> "QueryCountsResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def groups(self, query_groups_request: "QueryGroupsRequest") -> "QueryGroupsResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def group(self, query_group_request: "QueryGroupRequest") -> "QueryGroupResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def members(self, query_members_request: "QueryMembersRequest") -> "QueryMembersResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def is_grantee(self, query_is_grantee_request: "QueryIsGranteeRequest") -> "QueryIsGranteeResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def de(self, query_de_request: "QueryDeRequest") -> "QueryDeResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def pending_groups(
        self, query_pending_groups_request: "QueryPendingGroupsRequest"
    ) -> "QueryPendingGroupsResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def pending_signings(
        self, query_pending_signings_request: "QueryPendingSigningsRequest"
    ) -> "QueryPendingSigningsResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def signing(self, query_signing_request: "QuerySigningRequest") -> "QuerySigningResponse":
        raise grpclib.GRPCError(grpclib.const.Status.UNIMPLEMENTED)

    async def signings(self, query_signings_request: "QuerySigningsRequest") -> "QuerySigningsResponse":
        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 __rpc_counts(self, stream: "grpclib.server.Stream[QueryCountsRequest, QueryCountsResponse]") -> None:
        request = await stream.recv_message()
        response = await self.counts(request)
        await stream.send_message(response)

    async def __rpc_groups(self, stream: "grpclib.server.Stream[QueryGroupsRequest, QueryGroupsResponse]") -> None:
        request = await stream.recv_message()
        response = await self.groups(request)
        await stream.send_message(response)

    async def __rpc_group(self, stream: "grpclib.server.Stream[QueryGroupRequest, QueryGroupResponse]") -> None:
        request = await stream.recv_message()
        response = await self.group(request)
        await stream.send_message(response)

    async def __rpc_members(self, stream: "grpclib.server.Stream[QueryMembersRequest, QueryMembersResponse]") -> None:
        request = await stream.recv_message()
        response = await self.members(request)
        await stream.send_message(response)

    async def __rpc_is_grantee(
        self,
        stream: "grpclib.server.Stream[QueryIsGranteeRequest, QueryIsGranteeResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.is_grantee(request)
        await stream.send_message(response)

    async def __rpc_de(self, stream: "grpclib.server.Stream[QueryDeRequest, QueryDeResponse]") -> None:
        request = await stream.recv_message()
        response = await self.de(request)
        await stream.send_message(response)

    async def __rpc_pending_groups(
        self,
        stream: "grpclib.server.Stream[QueryPendingGroupsRequest, QueryPendingGroupsResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.pending_groups(request)
        await stream.send_message(response)

    async def __rpc_pending_signings(
        self,
        stream: "grpclib.server.Stream[QueryPendingSigningsRequest, QueryPendingSigningsResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.pending_signings(request)
        await stream.send_message(response)

    async def __rpc_signing(self, stream: "grpclib.server.Stream[QuerySigningRequest, QuerySigningResponse]") -> None:
        request = await stream.recv_message()
        response = await self.signing(request)
        await stream.send_message(response)

    async def __rpc_signings(
        self,
        stream: "grpclib.server.Stream[QuerySigningsRequest, QuerySigningsResponse]",
    ) -> None:
        request = await stream.recv_message()
        response = await self.signings(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)

    def __mapping__(self) -> Dict[str, grpclib.const.Handler]:
        return {
            "/band.tss.v1beta1.Query/Counts": grpclib.const.Handler(
                self.__rpc_counts,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryCountsRequest,
                QueryCountsResponse,
            ),
            "/band.tss.v1beta1.Query/Groups": grpclib.const.Handler(
                self.__rpc_groups,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryGroupsRequest,
                QueryGroupsResponse,
            ),
            "/band.tss.v1beta1.Query/Group": grpclib.const.Handler(
                self.__rpc_group,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryGroupRequest,
                QueryGroupResponse,
            ),
            "/band.tss.v1beta1.Query/Members": grpclib.const.Handler(
                self.__rpc_members,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryMembersRequest,
                QueryMembersResponse,
            ),
            "/band.tss.v1beta1.Query/IsGrantee": grpclib.const.Handler(
                self.__rpc_is_grantee,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryIsGranteeRequest,
                QueryIsGranteeResponse,
            ),
            "/band.tss.v1beta1.Query/DE": grpclib.const.Handler(
                self.__rpc_de,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryDeRequest,
                QueryDeResponse,
            ),
            "/band.tss.v1beta1.Query/PendingGroups": grpclib.const.Handler(
                self.__rpc_pending_groups,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryPendingGroupsRequest,
                QueryPendingGroupsResponse,
            ),
            "/band.tss.v1beta1.Query/PendingSignings": grpclib.const.Handler(
                self.__rpc_pending_signings,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryPendingSigningsRequest,
                QueryPendingSigningsResponse,
            ),
            "/band.tss.v1beta1.Query/Signing": grpclib.const.Handler(
                self.__rpc_signing,
                grpclib.const.Cardinality.UNARY_UNARY,
                QuerySigningRequest,
                QuerySigningResponse,
            ),
            "/band.tss.v1beta1.Query/Signings": grpclib.const.Handler(
                self.__rpc_signings,
                grpclib.const.Cardinality.UNARY_UNARY,
                QuerySigningsRequest,
                QuerySigningsResponse,
            ),
            "/band.tss.v1beta1.Query/Params": grpclib.const.Handler(
                self.__rpc_params,
                grpclib.const.Cardinality.UNARY_UNARY,
                QueryParamsRequest,
                QueryParamsResponse,
            ),
        }
