#[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Params { #[prost(message, optional, tag = "1")] pub reward_delay_time: ::core::option::Option<::prost_types::Duration>, /// Time interval between consecutive applications of `take_rate` #[prost(message, optional, tag = "2")] pub take_rate_claim_interval: ::core::option::Option<::prost_types::Duration>, /// Last application of `take_rate` on assets #[prost(message, optional, tag = "3")] pub last_take_rate_claim_time: ::core::option::Option<::prost_types::Timestamp>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RewardHistory { #[prost(string, tag = "1")] pub denom: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub index: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub alliance: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RewardWeightRange { #[prost(string, tag = "1")] pub min: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub max: ::prost::alloc::string::String, } /// key: denom value: AllianceAsset #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AllianceAsset { /// Denom of the asset. It could either be a native token or an IBC token #[prost(string, tag = "1")] pub denom: ::prost::alloc::string::String, /// The reward weight specifies the ratio of rewards that will be given to each alliance asset /// It does not need to sum to 1. rate = weight / total_weight /// Native asset is always assumed to have a weight of 1.s #[prost(string, tag = "2")] pub reward_weight: ::prost::alloc::string::String, /// A positive take rate is used for liquid staking derivatives. It defines an rate that is applied per take_rate_interval /// that will be redirected to the distribution rewards pool #[prost(string, tag = "3")] pub take_rate: ::prost::alloc::string::String, #[prost(string, tag = "4")] pub total_tokens: ::prost::alloc::string::String, #[prost(string, tag = "5")] pub total_validator_shares: ::prost::alloc::string::String, #[prost(message, optional, tag = "6")] pub reward_start_time: ::core::option::Option<::prost_types::Timestamp>, #[prost(string, tag = "7")] pub reward_change_rate: ::prost::alloc::string::String, #[prost(message, optional, tag = "8")] pub reward_change_interval: ::core::option::Option<::prost_types::Duration>, #[prost(message, optional, tag = "9")] pub last_reward_change_time: ::core::option::Option<::prost_types::Timestamp>, /// set a bound of weight range to limit how much reward weights can scale. #[prost(message, optional, tag = "10")] pub reward_weight_range: ::core::option::Option, /// flag to check if an asset has completed the initialization process after the reward delay #[prost(bool, tag = "11")] pub is_initialized: bool, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RewardWeightChangeSnapshot { #[prost(string, tag = "1")] pub prev_reward_weight: ::prost::alloc::string::String, #[prost(message, repeated, tag = "2")] pub reward_histories: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateAllianceProposal { /// the title of the update proposal #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, /// the description of the proposal #[prost(string, tag = "2")] pub description: ::prost::alloc::string::String, /// Denom of the asset. It could either be a native token or an IBC token #[prost(string, tag = "3")] pub denom: ::prost::alloc::string::String, /// The reward weight specifies the ratio of rewards that will be given to each alliance asset /// It does not need to sum to 1. rate = weight / total_weight /// Native asset is always assumed to have a weight of 1. #[prost(string, tag = "4")] pub reward_weight: ::prost::alloc::string::String, /// A positive take rate is used for liquid staking derivatives. It defines an annualized reward rate that /// will be redirected to the distribution rewards pool #[prost(string, tag = "5")] pub take_rate: ::prost::alloc::string::String, #[prost(string, tag = "6")] pub reward_change_rate: ::prost::alloc::string::String, #[prost(message, optional, tag = "7")] pub reward_change_interval: ::core::option::Option<::prost_types::Duration>, /// set a bound of weight range to limit how much reward weights can scale. #[prost(message, optional, tag = "8")] pub reward_weight_range: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateAllianceProposal { /// the title of the update proposal #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, /// the description of the proposal #[prost(string, tag = "2")] pub description: ::prost::alloc::string::String, /// Denom of the asset. It could either be a native token or an IBC token #[prost(string, tag = "3")] pub denom: ::prost::alloc::string::String, /// The reward weight specifies the ratio of rewards that will be given to each alliance asset /// It does not need to sum to 1. rate = weight / total_weight /// Native asset is always assumed to have a weight of 1. #[prost(string, tag = "4")] pub reward_weight: ::prost::alloc::string::String, #[prost(string, tag = "5")] pub take_rate: ::prost::alloc::string::String, #[prost(string, tag = "6")] pub reward_change_rate: ::prost::alloc::string::String, #[prost(message, optional, tag = "7")] pub reward_change_interval: ::core::option::Option<::prost_types::Duration>, /// set a bound of weight range to limit how much reward weights can scale. #[prost(message, optional, tag = "8")] pub reward_weight_range: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDeleteAllianceProposal { /// the title of the update proposal #[prost(string, tag = "1")] pub title: ::prost::alloc::string::String, /// the description of the proposal #[prost(string, tag = "2")] pub description: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub denom: ::prost::alloc::string::String, } /// Used internally to keep track of redelegations #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueuedRedelegation { #[prost(message, repeated, tag = "1")] pub entries: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Redelegation { /// internal or external user address #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, /// redelegation source validator #[prost(string, tag = "2")] pub src_validator_address: ::prost::alloc::string::String, /// redelegation destination validator #[prost(string, tag = "3")] pub dst_validator_address: ::prost::alloc::string::String, /// amount to redelegate #[prost(message, optional, tag = "4")] pub balance: ::core::option::Option, } /// Used on QueryServer #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RedelegationEntry { /// internal or external user address #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, /// redelegation source validator #[prost(string, tag = "2")] pub src_validator_address: ::prost::alloc::string::String, /// redelegation destination validator #[prost(string, tag = "3")] pub dst_validator_address: ::prost::alloc::string::String, /// amount to redelegate #[prost(message, optional, tag = "4")] pub balance: ::core::option::Option, /// completion_time defines the unix time for redelegation completion. #[prost(message, optional, tag = "5")] pub completion_time: ::core::option::Option<::prost_types::Timestamp>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegateAllianceEvent { #[prost(string, tag = "1")] pub alliance_sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub coin: ::core::option::Option, #[prost(string, tag = "4")] pub new_shares: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UndelegateAllianceEvent { #[prost(string, tag = "1")] pub alliance_sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub coin: ::core::option::Option, #[prost(message, optional, tag = "4")] pub completion_time: ::core::option::Option<::prost_types::Timestamp>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RedelegateAllianceEvent { #[prost(string, tag = "1")] pub alliance_sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub source_validator: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub destination_validator: ::prost::alloc::string::String, #[prost(message, optional, tag = "4")] pub coin: ::core::option::Option, #[prost(message, optional, tag = "5")] pub completion_time: ::core::option::Option<::prost_types::Timestamp>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClaimAllianceRewardsEvent { #[prost(string, tag = "1")] pub alliance_sender: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator: ::prost::alloc::string::String, #[prost(message, repeated, tag = "3")] pub coins: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DeductAllianceAssetsEvent { #[prost(message, repeated, tag = "1")] pub coins: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Delegation { /// delegator_address is the bech32-encoded address of the delegator. #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, /// validator_address is the bech32-encoded address of the validator. #[prost(string, tag = "2")] pub validator_address: ::prost::alloc::string::String, /// denom of token staked #[prost(string, tag = "3")] pub denom: ::prost::alloc::string::String, /// shares define the delegation shares received. #[prost(string, tag = "4")] pub shares: ::prost::alloc::string::String, #[prost(message, repeated, tag = "5")] pub reward_history: ::prost::alloc::vec::Vec, #[prost(uint64, tag = "6")] pub last_reward_claim_height: u64, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Undelegation { #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator_address: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub balance: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueuedUndelegation { #[prost(message, repeated, tag = "1")] pub entries: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct AllianceValidatorInfo { #[prost(message, repeated, tag = "1")] pub global_reward_history: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "2")] pub total_delegator_shares: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "3")] pub validator_shares: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ValidatorInfoState { #[prost(string, tag = "1")] pub validator_address: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] pub validator: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RedelegationState { #[prost(message, optional, tag = "1")] pub completion_time: ::core::option::Option<::prost_types::Timestamp>, #[prost(message, optional, tag = "2")] pub redelegation: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UndelegationState { #[prost(message, optional, tag = "1")] pub completion_time: ::core::option::Option<::prost_types::Timestamp>, #[prost(message, optional, tag = "2")] pub undelegation: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct RewardWeightChangeSnapshotState { #[prost(uint64, tag = "1")] pub height: u64, #[prost(string, tag = "2")] pub validator: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub denom: ::prost::alloc::string::String, #[prost(message, optional, tag = "4")] pub snapshot: ::core::option::Option, } /// GenesisState defines the module's genesis state. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct GenesisState { #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, #[prost(message, repeated, tag = "2")] pub assets: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "3")] pub validator_infos: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "4")] pub reward_weight_change_snaphots: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "5")] pub delegations: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "6")] pub redelegations: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "7")] pub undelegations: ::prost::alloc::vec::Vec, } /// UnbondingDelegation defines an unbonding object with relevant metadata. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct UnbondingDelegation { /// completion_time is the unix time for unbonding completion. #[prost(message, optional, tag = "1")] pub completion_time: ::core::option::Option<::prost_types::Timestamp>, /// validator_address is the bech32-encoded address of the validator. #[prost(string, tag = "2")] pub validator_address: ::prost::alloc::string::String, /// amount defines the tokens to receive at completion. #[prost(string, tag = "3")] pub amount: ::prost::alloc::string::String, /// alliance denom of the unbonding delegation #[prost(string, tag = "4")] pub denom: ::prost::alloc::string::String, } /// Params #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsRequest {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryParamsResponse { #[prost(message, optional, tag = "1")] pub params: ::core::option::Option, } /// Alliances #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAlliancesRequest { #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAlliancesResponse { #[prost(message, repeated, tag = "1")] pub alliances: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// Alliance #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceRequest { #[prost(string, tag = "1")] pub denom: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceResponse { #[prost(message, optional, tag = "1")] pub alliance: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryIbcAllianceRequest { #[prost(string, tag = "1")] pub hash: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceValidatorRequest { #[prost(string, tag = "1")] pub validator_addr: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllAllianceValidatorsRequest { #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllAlliancesDelegationsRequest { #[prost(message, optional, tag = "1")] pub pagination: ::core::option::Option, } /// AlliancesDelegation #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAlliancesDelegationsRequest { #[prost(string, tag = "1")] pub delegator_addr: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// AlliancesDelegationByValidator #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAlliancesDelegationByValidatorRequest { #[prost(string, tag = "1")] pub delegator_addr: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator_addr: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub pagination: ::core::option::Option, } /// DelegationResponse is equivalent to Delegation except that it contains a /// balance in addition to shares which is more suitable for client responses. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct DelegationResponse { #[prost(message, optional, tag = "1")] pub delegation: ::core::option::Option, #[prost(message, optional, tag = "2")] pub balance: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAlliancesDelegationsResponse { #[prost(message, repeated, tag = "1")] pub delegations: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// AllianceDelegation #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceDelegationRequest { #[prost(string, tag = "1")] pub delegator_addr: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator_addr: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub denom: ::prost::alloc::string::String, #[prost(message, optional, tag = "4")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryIbcAllianceDelegationRequest { #[prost(string, tag = "1")] pub delegator_addr: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator_addr: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub hash: ::prost::alloc::string::String, #[prost(message, optional, tag = "4")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceDelegationResponse { #[prost(message, optional, tag = "1")] pub delegation: ::core::option::Option, } /// AllianceDelegation #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceDelegationRewardsRequest { #[prost(string, tag = "1")] pub delegator_addr: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator_addr: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub denom: ::prost::alloc::string::String, #[prost(message, optional, tag = "4")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryIbcAllianceDelegationRewardsRequest { #[prost(string, tag = "1")] pub delegator_addr: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator_addr: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub hash: ::prost::alloc::string::String, #[prost(message, optional, tag = "4")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceDelegationRewardsResponse { #[prost(message, repeated, tag = "1")] pub rewards: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceValidatorResponse { #[prost(string, tag = "1")] pub validator_addr: ::prost::alloc::string::String, #[prost(message, repeated, tag = "2")] pub total_delegation_shares: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "3")] pub validator_shares: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "4")] pub total_staked: ::prost::alloc::vec::Vec, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceValidatorsResponse { #[prost(message, repeated, tag = "1")] pub validators: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// AllianceDelegation #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceUnbondingsByDelegatorRequest { #[prost(string, tag = "1")] pub delegator_addr: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceUnbondingsByDelegatorResponse { #[prost(message, repeated, tag = "1")] pub unbondings: ::prost::alloc::vec::Vec, } /// AllianceDelegation #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceUnbondingsByDenomAndDelegatorRequest { #[prost(string, tag = "1")] pub denom: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub delegator_addr: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceUnbondingsByDenomAndDelegatorResponse { #[prost(message, repeated, tag = "1")] pub unbondings: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceUnbondingsRequest { #[prost(string, tag = "1")] pub denom: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub delegator_addr: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub validator_addr: ::prost::alloc::string::String, #[prost(message, optional, tag = "4")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceUnbondingsResponse { #[prost(message, repeated, tag = "1")] pub unbondings: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// Redelegations #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceRedelegationsRequest { #[prost(string, tag = "1")] pub denom: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub delegator_addr: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceRedelegationsResponse { #[prost(message, repeated, tag = "1")] pub redelegations: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceRedelegationsByDelegatorRequest { #[prost(string, tag = "1")] pub delegator_addr: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct QueryAllianceRedelegationsByDelegatorResponse { #[prost(message, repeated, tag = "1")] pub redelegations: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "2")] pub pagination: ::core::option::Option, } /// Generated client implementations. #[cfg(feature = "grpc")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] pub mod query_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::http::Uri; use tonic::codegen::*; #[derive(Debug, Clone)] pub struct QueryClient { inner: tonic::client::Grpc, } #[cfg(feature = "grpc-transport")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] impl QueryClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: std::convert::TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl QueryClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_origin(inner: T, origin: Uri) -> Self { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } pub fn with_interceptor( inner: T, interceptor: F, ) -> QueryClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, >>::Error: Into + Send + Sync, { QueryClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } /// Query Alliance module parameters more info about the params /// https://docs.alliance.money/tech/parameters pub async fn params( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Query/Params"); self.inner.unary(request.into_request(), path, codec).await } /// Query all alliances with pagination pub async fn alliances( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Query/Alliances"); self.inner.unary(request.into_request(), path, codec).await } /// Query all alliances delegations with pagination pub async fn all_alliances_delegations( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Query/AllAlliancesDelegations", ); self.inner.unary(request.into_request(), path, codec).await } /// Query alliance validator pub async fn alliance_validator( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Query/AllianceValidator"); self.inner.unary(request.into_request(), path, codec).await } /// Query all paginated alliance validators pub async fn all_alliance_validators( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Query/AllAllianceValidators", ); self.inner.unary(request.into_request(), path, codec).await } /// Query all paginated alliance delegations for a delegator addr pub async fn alliances_delegation( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Query/AlliancesDelegation", ); self.inner.unary(request.into_request(), path, codec).await } /// Query all paginated alliance delegations for a delegator addr and validator_addr pub async fn alliances_delegation_by_validator( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Query/AlliancesDelegationByValidator", ); self.inner.unary(request.into_request(), path, codec).await } /// Query a specific delegation by delegator addr, validator addr and denom pub async fn alliance_delegation( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Query/AllianceDelegation"); self.inner.unary(request.into_request(), path, codec).await } /// Query a specific delegation rewards by delegator addr, validator addr and denom pub async fn alliance_delegation_rewards( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Query/AllianceDelegationRewards", ); self.inner.unary(request.into_request(), path, codec).await } /// Query for rewards by delegator addr, validator_addr and denom /// @deprecated: this endpoint will be replaced for by the encoded version /// of the denom e.g.: GET:/terra/alliances/terradr1231/terravaloper41234/ibc%2Falliance pub async fn ibc_alliance_delegation_rewards( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Query/IBCAllianceDelegationRewards", ); self.inner.unary(request.into_request(), path, codec).await } /// Query unbondings by delegator address pub async fn alliance_unbondings_by_delegator( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Query/AllianceUnbondingsByDelegator", ); self.inner.unary(request.into_request(), path, codec).await } /// Query unbondings by denom, delegator addr pub async fn alliance_unbondings_by_denom_and_delegator( &mut self, request: impl tonic::IntoRequest, ) -> Result< tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Query/AllianceUnbondingsByDenomAndDelegator", ); self.inner.unary(request.into_request(), path, codec).await } /// Query unbondings by denom, delegator addr, validator addr pub async fn alliance_unbondings( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Query/AllianceUnbondings"); self.inner.unary(request.into_request(), path, codec).await } /// Query paginated redelegations delegator addr pub async fn alliance_redelegations_by_delegator( &mut self, request: impl tonic::IntoRequest, ) -> Result< tonic::Response, tonic::Status, > { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Query/AllianceRedelegationsByDelegator", ); self.inner.unary(request.into_request(), path, codec).await } /// Query paginated redelegations by denom and delegator addr pub async fn alliance_redelegations( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Query/AllianceRedelegations", ); self.inner.unary(request.into_request(), path, codec).await } /// Query a specific alliance by denom pub async fn alliance( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Query/Alliance"); self.inner.unary(request.into_request(), path, codec).await } } } /// Generated server implementations. #[cfg(feature = "grpc")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] pub mod query_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] pub trait Query: Send + Sync + 'static { /// Query Alliance module parameters more info about the params /// https://docs.alliance.money/tech/parameters async fn params( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query all alliances with pagination async fn alliances( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query all alliances delegations with pagination async fn all_alliances_delegations( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query alliance validator async fn alliance_validator( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query all paginated alliance validators async fn all_alliance_validators( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query all paginated alliance delegations for a delegator addr async fn alliances_delegation( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query all paginated alliance delegations for a delegator addr and validator_addr async fn alliances_delegation_by_validator( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query a specific delegation by delegator addr, validator addr and denom async fn alliance_delegation( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query a specific delegation rewards by delegator addr, validator addr and denom async fn alliance_delegation_rewards( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query for rewards by delegator addr, validator_addr and denom /// @deprecated: this endpoint will be replaced for by the encoded version /// of the denom e.g.: GET:/terra/alliances/terradr1231/terravaloper41234/ibc%2Falliance async fn ibc_alliance_delegation_rewards( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query unbondings by delegator address async fn alliance_unbondings_by_delegator( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query unbondings by denom, delegator addr async fn alliance_unbondings_by_denom_and_delegator( &self, request: tonic::Request, ) -> Result< tonic::Response, tonic::Status, >; /// Query unbondings by denom, delegator addr, validator addr async fn alliance_unbondings( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query paginated redelegations delegator addr async fn alliance_redelegations_by_delegator( &self, request: tonic::Request, ) -> Result< tonic::Response, tonic::Status, >; /// Query paginated redelegations by denom and delegator addr async fn alliance_redelegations( &self, request: tonic::Request, ) -> Result, tonic::Status>; /// Query a specific alliance by denom async fn alliance( &self, request: tonic::Request, ) -> Result, tonic::Status>; } #[derive(Debug)] pub struct QueryServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, } struct _Inner(Arc); impl QueryServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), } } pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } } impl tonic::codegen::Service> for QueryServer where T: Query, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/alliance.alliance.Query/Params" => { #[allow(non_camel_case_types)] struct ParamsSvc(pub Arc); impl tonic::server::UnaryService for ParamsSvc { type Response = super::QueryParamsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).params(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = ParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/Alliances" => { #[allow(non_camel_case_types)] struct AlliancesSvc(pub Arc); impl tonic::server::UnaryService for AlliancesSvc { type Response = super::QueryAlliancesResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliances(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AlliancesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AllAlliancesDelegations" => { #[allow(non_camel_case_types)] struct AllAlliancesDelegationsSvc(pub Arc); impl tonic::server::UnaryService for AllAlliancesDelegationsSvc { type Response = super::QueryAlliancesDelegationsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).all_alliances_delegations(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllAlliancesDelegationsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AllianceValidator" => { #[allow(non_camel_case_types)] struct AllianceValidatorSvc(pub Arc); impl tonic::server::UnaryService for AllianceValidatorSvc { type Response = super::QueryAllianceValidatorResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliance_validator(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllianceValidatorSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AllAllianceValidators" => { #[allow(non_camel_case_types)] struct AllAllianceValidatorsSvc(pub Arc); impl tonic::server::UnaryService for AllAllianceValidatorsSvc { type Response = super::QueryAllianceValidatorsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).all_alliance_validators(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllAllianceValidatorsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AlliancesDelegation" => { #[allow(non_camel_case_types)] struct AlliancesDelegationSvc(pub Arc); impl tonic::server::UnaryService for AlliancesDelegationSvc { type Response = super::QueryAlliancesDelegationsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliances_delegation(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AlliancesDelegationSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AlliancesDelegationByValidator" => { #[allow(non_camel_case_types)] struct AlliancesDelegationByValidatorSvc(pub Arc); impl tonic::server::UnaryService< super::QueryAlliancesDelegationByValidatorRequest, > for AlliancesDelegationByValidatorSvc { type Response = super::QueryAlliancesDelegationsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request< super::QueryAlliancesDelegationByValidatorRequest, >, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliances_delegation_by_validator(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AlliancesDelegationByValidatorSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AllianceDelegation" => { #[allow(non_camel_case_types)] struct AllianceDelegationSvc(pub Arc); impl tonic::server::UnaryService for AllianceDelegationSvc { type Response = super::QueryAllianceDelegationResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliance_delegation(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllianceDelegationSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AllianceDelegationRewards" => { #[allow(non_camel_case_types)] struct AllianceDelegationRewardsSvc(pub Arc); impl tonic::server::UnaryService for AllianceDelegationRewardsSvc { type Response = super::QueryAllianceDelegationRewardsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliance_delegation_rewards(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllianceDelegationRewardsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/IBCAllianceDelegationRewards" => { #[allow(non_camel_case_types)] struct IBCAllianceDelegationRewardsSvc(pub Arc); impl tonic::server::UnaryService for IBCAllianceDelegationRewardsSvc { type Response = super::QueryAllianceDelegationRewardsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request< super::QueryIbcAllianceDelegationRewardsRequest, >, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).ibc_alliance_delegation_rewards(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = IBCAllianceDelegationRewardsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AllianceUnbondingsByDelegator" => { #[allow(non_camel_case_types)] struct AllianceUnbondingsByDelegatorSvc(pub Arc); impl tonic::server::UnaryService< super::QueryAllianceUnbondingsByDelegatorRequest, > for AllianceUnbondingsByDelegatorSvc { type Response = super::QueryAllianceUnbondingsByDelegatorResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request< super::QueryAllianceUnbondingsByDelegatorRequest, >, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliance_unbondings_by_delegator(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllianceUnbondingsByDelegatorSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AllianceUnbondingsByDenomAndDelegator" => { #[allow(non_camel_case_types)] struct AllianceUnbondingsByDenomAndDelegatorSvc(pub Arc); impl tonic::server::UnaryService< super::QueryAllianceUnbondingsByDenomAndDelegatorRequest, > for AllianceUnbondingsByDenomAndDelegatorSvc { type Response = super::QueryAllianceUnbondingsByDenomAndDelegatorResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request< super::QueryAllianceUnbondingsByDenomAndDelegatorRequest, >, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner) .alliance_unbondings_by_denom_and_delegator(request) .await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllianceUnbondingsByDenomAndDelegatorSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AllianceUnbondings" => { #[allow(non_camel_case_types)] struct AllianceUnbondingsSvc(pub Arc); impl tonic::server::UnaryService for AllianceUnbondingsSvc { type Response = super::QueryAllianceUnbondingsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliance_unbondings(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllianceUnbondingsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AllianceRedelegationsByDelegator" => { #[allow(non_camel_case_types)] struct AllianceRedelegationsByDelegatorSvc(pub Arc); impl tonic::server::UnaryService< super::QueryAllianceRedelegationsByDelegatorRequest, > for AllianceRedelegationsByDelegatorSvc { type Response = super::QueryAllianceRedelegationsByDelegatorResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request< super::QueryAllianceRedelegationsByDelegatorRequest, >, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliance_redelegations_by_delegator(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllianceRedelegationsByDelegatorSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/AllianceRedelegations" => { #[allow(non_camel_case_types)] struct AllianceRedelegationsSvc(pub Arc); impl tonic::server::UnaryService for AllianceRedelegationsSvc { type Response = super::QueryAllianceRedelegationsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliance_redelegations(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllianceRedelegationsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Query/Alliance" => { #[allow(non_camel_case_types)] struct AllianceSvc(pub Arc); impl tonic::server::UnaryService for AllianceSvc { type Response = super::QueryAllianceResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).alliance(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = AllianceSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => Box::pin(async move { Ok(http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap()) }), } } } impl Clone for QueryServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(self.0.clone()) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for QueryServer { const NAME: &'static str = "alliance.alliance.Query"; } } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDelegate { #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator_address: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub amount: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDelegateResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUndelegate { #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator_address: ::prost::alloc::string::String, #[prost(message, optional, tag = "3")] pub amount: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUndelegateResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRedelegate { #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator_src_address: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub validator_dst_address: ::prost::alloc::string::String, #[prost(message, optional, tag = "4")] pub amount: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgRedelegateResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgClaimDelegationRewards { #[prost(string, tag = "1")] pub delegator_address: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub validator_address: ::prost::alloc::string::String, #[prost(string, tag = "3")] pub denom: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgClaimDelegationRewardsResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateParams { #[prost(string, tag = "1")] pub authority: ::prost::alloc::string::String, #[prost(message, optional, tag = "2")] pub params: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateParamsResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateAlliance { #[prost(string, tag = "1")] pub authority: ::prost::alloc::string::String, /// Denom of the asset. It could either be a native token or an IBC token #[prost(string, tag = "2")] pub denom: ::prost::alloc::string::String, /// The reward weight specifies the ratio of rewards that will be given to each alliance asset /// It does not need to sum to 1. rate = weight / total_weight /// Native asset is always assumed to have a weight of 1. #[prost(string, tag = "3")] pub reward_weight: ::prost::alloc::string::String, /// A positive take rate is used for liquid staking derivatives. It defines an annualized reward rate that /// will be redirected to the distribution rewards pool #[prost(string, tag = "4")] pub take_rate: ::prost::alloc::string::String, #[prost(string, tag = "5")] pub reward_change_rate: ::prost::alloc::string::String, #[prost(message, optional, tag = "6")] pub reward_change_interval: ::core::option::Option<::prost_types::Duration>, /// set a bound of weight range to limit how much reward weights can scale. #[prost(message, optional, tag = "7")] pub reward_weight_range: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgCreateAllianceResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateAlliance { #[prost(string, tag = "1")] pub authority: ::prost::alloc::string::String, /// Denom of the asset. It could either be a native token or an IBC token #[prost(string, tag = "2")] pub denom: ::prost::alloc::string::String, /// The reward weight specifies the ratio of rewards that will be given to each alliance asset /// It does not need to sum to 1. rate = weight / total_weight /// Native asset is always assumed to have a weight of 1. #[prost(string, tag = "3")] pub reward_weight: ::prost::alloc::string::String, #[prost(string, tag = "4")] pub take_rate: ::prost::alloc::string::String, #[prost(string, tag = "5")] pub reward_change_rate: ::prost::alloc::string::String, #[prost(message, optional, tag = "6")] pub reward_change_interval: ::core::option::Option<::prost_types::Duration>, /// set a bound of weight range to limit how much reward weights can scale. #[prost(message, optional, tag = "7")] pub reward_weight_range: ::core::option::Option, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgUpdateAllianceResponse {} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDeleteAlliance { #[prost(string, tag = "1")] pub authority: ::prost::alloc::string::String, #[prost(string, tag = "2")] pub denom: ::prost::alloc::string::String, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgDeleteAllianceResponse {} /// Generated client implementations. #[cfg(feature = "grpc")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] pub mod msg_client { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::http::Uri; use tonic::codegen::*; #[derive(Debug, Clone)] pub struct MsgClient { inner: tonic::client::Grpc, } #[cfg(feature = "grpc-transport")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc-transport")))] impl MsgClient { /// Attempt to create a new client by connecting to a given endpoint. pub async fn connect(dst: D) -> Result where D: std::convert::TryInto, D::Error: Into, { let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; Ok(Self::new(conn)) } } impl MsgClient where T: tonic::client::GrpcService, T::Error: Into, T::ResponseBody: Body + Send + 'static, ::Error: Into + Send, { pub fn new(inner: T) -> Self { let inner = tonic::client::Grpc::new(inner); Self { inner } } pub fn with_origin(inner: T, origin: Uri) -> Self { let inner = tonic::client::Grpc::with_origin(inner, origin); Self { inner } } pub fn with_interceptor(inner: T, interceptor: F) -> MsgClient> where F: tonic::service::Interceptor, T::ResponseBody: Default, T: tonic::codegen::Service< http::Request, Response = http::Response< >::ResponseBody, >, >, >>::Error: Into + Send + Sync, { MsgClient::new(InterceptedService::new(inner, interceptor)) } /// Compress requests with the given encoding. /// /// This requires the server to support it otherwise it might respond with an /// error. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.send_compressed(encoding); self } /// Enable decompressing responses. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.inner = self.inner.accept_compressed(encoding); self } pub async fn delegate( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Msg/Delegate"); self.inner.unary(request.into_request(), path, codec).await } pub async fn redelegate( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Msg/Redelegate"); self.inner.unary(request.into_request(), path, codec).await } pub async fn undelegate( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Msg/Undelegate"); self.inner.unary(request.into_request(), path, codec).await } pub async fn claim_delegation_rewards( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( "/alliance.alliance.Msg/ClaimDelegationRewards", ); self.inner.unary(request.into_request(), path, codec).await } pub async fn update_params( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Msg/UpdateParams"); self.inner.unary(request.into_request(), path, codec).await } pub async fn create_alliance( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Msg/CreateAlliance"); self.inner.unary(request.into_request(), path, codec).await } pub async fn update_alliance( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Msg/UpdateAlliance"); self.inner.unary(request.into_request(), path, codec).await } pub async fn delete_alliance( &mut self, request: impl tonic::IntoRequest, ) -> Result, tonic::Status> { self.inner.ready().await.map_err(|e| { tonic::Status::new( tonic::Code::Unknown, format!("Service was not ready: {}", e.into()), ) })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static("/alliance.alliance.Msg/DeleteAlliance"); self.inner.unary(request.into_request(), path, codec).await } } } /// Generated server implementations. #[cfg(feature = "grpc")] #[cfg_attr(docsrs, doc(cfg(feature = "grpc")))] pub mod msg_server { #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] use tonic::codegen::*; /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. #[async_trait] pub trait Msg: Send + Sync + 'static { async fn delegate( &self, request: tonic::Request, ) -> Result, tonic::Status>; async fn redelegate( &self, request: tonic::Request, ) -> Result, tonic::Status>; async fn undelegate( &self, request: tonic::Request, ) -> Result, tonic::Status>; async fn claim_delegation_rewards( &self, request: tonic::Request, ) -> Result, tonic::Status>; async fn update_params( &self, request: tonic::Request, ) -> Result, tonic::Status>; async fn create_alliance( &self, request: tonic::Request, ) -> Result, tonic::Status>; async fn update_alliance( &self, request: tonic::Request, ) -> Result, tonic::Status>; async fn delete_alliance( &self, request: tonic::Request, ) -> Result, tonic::Status>; } #[derive(Debug)] pub struct MsgServer { inner: _Inner, accept_compression_encodings: EnabledCompressionEncodings, send_compression_encodings: EnabledCompressionEncodings, } struct _Inner(Arc); impl MsgServer { pub fn new(inner: T) -> Self { Self::from_arc(Arc::new(inner)) } pub fn from_arc(inner: Arc) -> Self { let inner = _Inner(inner); Self { inner, accept_compression_encodings: Default::default(), send_compression_encodings: Default::default(), } } pub fn with_interceptor(inner: T, interceptor: F) -> InterceptedService where F: tonic::service::Interceptor, { InterceptedService::new(Self::new(inner), interceptor) } /// Enable decompressing requests with the given encoding. #[must_use] pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { self.accept_compression_encodings.enable(encoding); self } /// Compress responses with the given encoding, if the client supports it. #[must_use] pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { self.send_compression_encodings.enable(encoding); self } } impl tonic::codegen::Service> for MsgServer where T: Msg, B: Body + Send + 'static, B::Error: Into + Send + 'static, { type Response = http::Response; type Error = std::convert::Infallible; type Future = BoxFuture; fn poll_ready(&mut self, _cx: &mut Context<'_>) -> Poll> { Poll::Ready(Ok(())) } fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { "/alliance.alliance.Msg/Delegate" => { #[allow(non_camel_case_types)] struct DelegateSvc(pub Arc); impl tonic::server::UnaryService for DelegateSvc { type Response = super::MsgDelegateResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).delegate(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = DelegateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Msg/Redelegate" => { #[allow(non_camel_case_types)] struct RedelegateSvc(pub Arc); impl tonic::server::UnaryService for RedelegateSvc { type Response = super::MsgRedelegateResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).redelegate(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = RedelegateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Msg/Undelegate" => { #[allow(non_camel_case_types)] struct UndelegateSvc(pub Arc); impl tonic::server::UnaryService for UndelegateSvc { type Response = super::MsgUndelegateResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).undelegate(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = UndelegateSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Msg/ClaimDelegationRewards" => { #[allow(non_camel_case_types)] struct ClaimDelegationRewardsSvc(pub Arc); impl tonic::server::UnaryService for ClaimDelegationRewardsSvc { type Response = super::MsgClaimDelegationRewardsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).claim_delegation_rewards(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = ClaimDelegationRewardsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Msg/UpdateParams" => { #[allow(non_camel_case_types)] struct UpdateParamsSvc(pub Arc); impl tonic::server::UnaryService for UpdateParamsSvc { type Response = super::MsgUpdateParamsResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).update_params(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = UpdateParamsSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Msg/CreateAlliance" => { #[allow(non_camel_case_types)] struct CreateAllianceSvc(pub Arc); impl tonic::server::UnaryService for CreateAllianceSvc { type Response = super::MsgCreateAllianceResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).create_alliance(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = CreateAllianceSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Msg/UpdateAlliance" => { #[allow(non_camel_case_types)] struct UpdateAllianceSvc(pub Arc); impl tonic::server::UnaryService for UpdateAllianceSvc { type Response = super::MsgUpdateAllianceResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).update_alliance(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = UpdateAllianceSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } "/alliance.alliance.Msg/DeleteAlliance" => { #[allow(non_camel_case_types)] struct DeleteAllianceSvc(pub Arc); impl tonic::server::UnaryService for DeleteAllianceSvc { type Response = super::MsgDeleteAllianceResponse; type Future = BoxFuture, tonic::Status>; fn call( &mut self, request: tonic::Request, ) -> Self::Future { let inner = self.0.clone(); let fut = async move { (*inner).delete_alliance(request).await }; Box::pin(fut) } } let accept_compression_encodings = self.accept_compression_encodings; let send_compression_encodings = self.send_compression_encodings; let inner = self.inner.clone(); let fut = async move { let inner = inner.0; let method = DeleteAllianceSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec).apply_compression_config( accept_compression_encodings, send_compression_encodings, ); let res = grpc.unary(method, req).await; Ok(res) }; Box::pin(fut) } _ => Box::pin(async move { Ok(http::Response::builder() .status(200) .header("grpc-status", "12") .header("content-type", "application/grpc") .body(empty_body()) .unwrap()) }), } } } impl Clone for MsgServer { fn clone(&self) -> Self { let inner = self.inner.clone(); Self { inner, accept_compression_encodings: self.accept_compression_encodings, send_compression_encodings: self.send_compression_encodings, } } } impl Clone for _Inner { fn clone(&self) -> Self { Self(self.0.clone()) } } impl std::fmt::Debug for _Inner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "{:?}", self.0) } } impl tonic::server::NamedService for MsgServer { const NAME: &'static str = "alliance.alliance.Msg"; } }