#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerAdditionProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub chain_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub initial_height: ::core::option::Option<
super::super::super::super::ibc::core::client::v1::Height,
>,
#[prost(bytes = "vec", tag = "5")]
pub genesis_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "6")]
pub binary_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "7")]
pub spawn_time: ::core::option::Option<
::tendermint_proto::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "8")]
pub unbonding_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(message, optional, tag = "9")]
pub ccv_timeout_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(message, optional, tag = "10")]
pub transfer_timeout_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(string, tag = "11")]
pub consumer_redistribution_fraction: ::prost::alloc::string::String,
#[prost(int64, tag = "12")]
pub blocks_per_distribution_transmission: i64,
#[prost(int64, tag = "13")]
pub historical_entries: i64,
#[prost(string, tag = "14")]
pub distribution_transmission_channel: ::prost::alloc::string::String,
#[prost(uint32, tag = "15")]
pub top_n: u32,
#[prost(uint32, tag = "16")]
pub validators_power_cap: u32,
#[prost(uint32, tag = "17")]
pub validator_set_cap: u32,
#[prost(string, repeated, tag = "18")]
pub allowlist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "19")]
pub denylist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag = "20")]
pub min_stake: u64,
#[prost(bool, tag = "21")]
pub allow_inactive_vals: bool,
}
impl ::prost::Name for ConsumerAdditionProposal {
const NAME: &'static str = "ConsumerAdditionProposal";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerAdditionProposal".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerAdditionProposal".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerRemovalProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub chain_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub stop_time: ::core::option::Option<
::tendermint_proto::google::protobuf::Timestamp,
>,
}
impl ::prost::Name for ConsumerRemovalProposal {
const NAME: &'static str = "ConsumerRemovalProposal";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerRemovalProposal".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerRemovalProposal".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerModificationProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub chain_id: ::prost::alloc::string::String,
#[prost(uint32, tag = "4")]
pub top_n: u32,
#[prost(uint32, tag = "5")]
pub validators_power_cap: u32,
#[prost(uint32, tag = "6")]
pub validator_set_cap: u32,
#[prost(string, repeated, tag = "7")]
pub allowlist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "8")]
pub denylist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag = "9")]
pub min_stake: u64,
#[prost(bool, tag = "10")]
pub allow_inactive_vals: bool,
}
impl ::prost::Name for ConsumerModificationProposal {
const NAME: &'static str = "ConsumerModificationProposal";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerModificationProposal".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerModificationProposal".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EquivocationProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub equivocations: ::prost::alloc::vec::Vec<
super::super::super::super::cosmos::evidence::v1beta1::Equivocation,
>,
}
impl ::prost::Name for EquivocationProposal {
const NAME: &'static str = "EquivocationProposal";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.EquivocationProposal".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.EquivocationProposal".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChangeRewardDenomsProposal {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub denoms_to_add: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub denoms_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for ChangeRewardDenomsProposal {
const NAME: &'static str = "ChangeRewardDenomsProposal";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ChangeRewardDenomsProposal".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ChangeRewardDenomsProposal".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GlobalSlashEntry {
#[prost(message, optional, tag = "1")]
pub recv_time: ::core::option::Option<
::tendermint_proto::google::protobuf::Timestamp,
>,
#[prost(string, tag = "2")]
pub consumer_chain_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "3")]
pub ibc_seq_num: u64,
#[prost(bytes = "vec", tag = "4")]
pub provider_val_cons_addr: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for GlobalSlashEntry {
const NAME: &'static str = "GlobalSlashEntry";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.GlobalSlashEntry".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.GlobalSlashEntry".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(message, optional, tag = "1")]
pub template_client: ::core::option::Option<
super::super::super::super::ibc::lightclients::tendermint::v1::ClientState,
>,
#[prost(string, tag = "2")]
pub trusting_period_fraction: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub ccv_timeout_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(message, optional, tag = "6")]
pub slash_meter_replenish_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(string, tag = "7")]
pub slash_meter_replenish_fraction: ::prost::alloc::string::String,
#[prost(message, optional, tag = "9")]
pub consumer_reward_denom_registration_fee: ::core::option::Option<
super::super::super::super::cosmos::base::v1beta1::Coin,
>,
#[prost(int64, tag = "10")]
pub blocks_per_epoch: i64,
#[prost(int64, tag = "11")]
pub number_of_epochs_to_start_receiving_rewards: i64,
#[prost(int64, tag = "12")]
pub max_provider_consensus_validators: i64,
}
impl ::prost::Name for Params {
const NAME: &'static str = "Params";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.Params".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.Params".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SlashAcks {
#[prost(string, repeated, tag = "1")]
pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for SlashAcks {
const NAME: &'static str = "SlashAcks";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.SlashAcks".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.SlashAcks".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerAdditionProposals {
#[prost(message, repeated, tag = "1")]
pub pending: ::prost::alloc::vec::Vec<ConsumerAdditionProposal>,
}
impl ::prost::Name for ConsumerAdditionProposals {
const NAME: &'static str = "ConsumerAdditionProposals";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerAdditionProposals".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerAdditionProposals".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerRemovalProposals {
#[prost(message, repeated, tag = "1")]
pub pending: ::prost::alloc::vec::Vec<ConsumerRemovalProposal>,
}
impl ::prost::Name for ConsumerRemovalProposals {
const NAME: &'static str = "ConsumerRemovalProposals";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerRemovalProposals".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerRemovalProposals".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddressList {
#[prost(bytes = "vec", repeated, tag = "1")]
pub addresses: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
impl ::prost::Name for AddressList {
const NAME: &'static str = "AddressList";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.AddressList".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.AddressList".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelToChain {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub chain_id: ::prost::alloc::string::String,
}
impl ::prost::Name for ChannelToChain {
const NAME: &'static str = "ChannelToChain";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ChannelToChain".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ChannelToChain".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorSetChangePackets {
#[prost(message, repeated, tag = "1")]
pub list: ::prost::alloc::vec::Vec<super::super::v1::ValidatorSetChangePacketData>,
}
impl ::prost::Name for ValidatorSetChangePackets {
const NAME: &'static str = "ValidatorSetChangePackets";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ValidatorSetChangePackets".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ValidatorSetChangePackets".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyAssignmentReplacement {
#[prost(bytes = "vec", tag = "1")]
pub provider_addr: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub prev_c_key: ::core::option::Option<::tendermint_proto::crypto::PublicKey>,
#[prost(int64, tag = "3")]
pub power: i64,
}
impl ::prost::Name for KeyAssignmentReplacement {
const NAME: &'static str = "KeyAssignmentReplacement";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.KeyAssignmentReplacement".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.KeyAssignmentReplacement".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorConsumerPubKey {
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub provider_addr: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub consumer_key: ::core::option::Option<::tendermint_proto::crypto::PublicKey>,
}
impl ::prost::Name for ValidatorConsumerPubKey {
const NAME: &'static str = "ValidatorConsumerPubKey";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ValidatorConsumerPubKey".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ValidatorConsumerPubKey".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatorByConsumerAddr {
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(bytes = "vec", tag = "2")]
pub consumer_addr: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub provider_addr: ::prost::alloc::vec::Vec<u8>,
}
impl ::prost::Name for ValidatorByConsumerAddr {
const NAME: &'static str = "ValidatorByConsumerAddr";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ValidatorByConsumerAddr".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ValidatorByConsumerAddr".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerAddrsToPruneV2 {
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub prune_ts: ::core::option::Option<
::tendermint_proto::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "3")]
pub consumer_addrs: ::core::option::Option<AddressList>,
}
impl ::prost::Name for ConsumerAddrsToPruneV2 {
const NAME: &'static str = "ConsumerAddrsToPruneV2";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerAddrsToPruneV2".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerAddrsToPruneV2".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsensusValidator {
#[prost(bytes = "vec", tag = "1")]
pub provider_cons_addr: ::prost::alloc::vec::Vec<u8>,
#[prost(int64, tag = "2")]
pub power: i64,
#[prost(message, optional, tag = "3")]
pub public_key: ::core::option::Option<::tendermint_proto::crypto::PublicKey>,
#[prost(int64, tag = "4")]
pub join_height: i64,
}
impl ::prost::Name for ConsensusValidator {
const NAME: &'static str = "ConsensusValidator";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsensusValidator".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsensusValidator".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerRewardsAllocation {
#[prost(message, repeated, tag = "1")]
pub rewards: ::prost::alloc::vec::Vec<
super::super::super::super::cosmos::base::v1beta1::DecCoin,
>,
}
impl ::prost::Name for ConsumerRewardsAllocation {
const NAME: &'static str = "ConsumerRewardsAllocation";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerRewardsAllocation".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerRewardsAllocation".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerMetadata {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub metadata: ::prost::alloc::string::String,
}
impl ::prost::Name for ConsumerMetadata {
const NAME: &'static str = "ConsumerMetadata";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerMetadata".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerMetadata".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerInitializationParameters {
#[prost(message, optional, tag = "1")]
pub initial_height: ::core::option::Option<
super::super::super::super::ibc::core::client::v1::Height,
>,
#[prost(bytes = "vec", tag = "2")]
pub genesis_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "3")]
pub binary_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "4")]
pub spawn_time: ::core::option::Option<
::tendermint_proto::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "5")]
pub unbonding_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(message, optional, tag = "6")]
pub ccv_timeout_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(message, optional, tag = "7")]
pub transfer_timeout_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(string, tag = "8")]
pub consumer_redistribution_fraction: ::prost::alloc::string::String,
#[prost(int64, tag = "9")]
pub blocks_per_distribution_transmission: i64,
#[prost(int64, tag = "10")]
pub historical_entries: i64,
#[prost(string, tag = "11")]
pub distribution_transmission_channel: ::prost::alloc::string::String,
}
impl ::prost::Name for ConsumerInitializationParameters {
const NAME: &'static str = "ConsumerInitializationParameters";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerInitializationParameters".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerInitializationParameters".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PowerShapingParameters {
#[prost(uint32, tag = "1")]
pub top_n: u32,
#[prost(uint32, tag = "2")]
pub validators_power_cap: u32,
#[prost(uint32, tag = "3")]
pub validator_set_cap: u32,
#[prost(string, repeated, tag = "4")]
pub allowlist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub denylist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(uint64, tag = "6")]
pub min_stake: u64,
#[prost(bool, tag = "7")]
pub allow_inactive_vals: bool,
}
impl ::prost::Name for PowerShapingParameters {
const NAME: &'static str = "PowerShapingParameters";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.PowerShapingParameters".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.PowerShapingParameters".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerIds {
#[prost(string, repeated, tag = "1")]
pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for ConsumerIds {
const NAME: &'static str = "ConsumerIds";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerIds".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerIds".into()
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConsumerPhase {
Unspecified = 0,
Registered = 1,
Initialized = 2,
Launched = 3,
Stopped = 4,
Deleted = 5,
}
impl ConsumerPhase {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CONSUMER_PHASE_UNSPECIFIED",
Self::Registered => "CONSUMER_PHASE_REGISTERED",
Self::Initialized => "CONSUMER_PHASE_INITIALIZED",
Self::Launched => "CONSUMER_PHASE_LAUNCHED",
Self::Stopped => "CONSUMER_PHASE_STOPPED",
Self::Deleted => "CONSUMER_PHASE_DELETED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONSUMER_PHASE_UNSPECIFIED" => Some(Self::Unspecified),
"CONSUMER_PHASE_REGISTERED" => Some(Self::Registered),
"CONSUMER_PHASE_INITIALIZED" => Some(Self::Initialized),
"CONSUMER_PHASE_LAUNCHED" => Some(Self::Launched),
"CONSUMER_PHASE_STOPPED" => Some(Self::Stopped),
"CONSUMER_PHASE_DELETED" => Some(Self::Deleted),
_ => None,
}
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgAssignConsumerKey {
#[deprecated]
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub provider_addr: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub consumer_key: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub signer: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgAssignConsumerKey {
const NAME: &'static str = "MsgAssignConsumerKey";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgAssignConsumerKey".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgAssignConsumerKey".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgAssignConsumerKeyResponse {}
impl ::prost::Name for MsgAssignConsumerKeyResponse {
const NAME: &'static str = "MsgAssignConsumerKeyResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgAssignConsumerKeyResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgAssignConsumerKeyResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSubmitConsumerMisbehaviour {
#[prost(string, tag = "1")]
pub submitter: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub misbehaviour: ::core::option::Option<
super::super::super::super::ibc::lightclients::tendermint::v1::Misbehaviour,
>,
#[prost(string, tag = "3")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgSubmitConsumerMisbehaviour {
const NAME: &'static str = "MsgSubmitConsumerMisbehaviour";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgSubmitConsumerMisbehaviour".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgSubmitConsumerMisbehaviour".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgSubmitConsumerMisbehaviourResponse {}
impl ::prost::Name for MsgSubmitConsumerMisbehaviourResponse {
const NAME: &'static str = "MsgSubmitConsumerMisbehaviourResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgSubmitConsumerMisbehaviourResponse"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgSubmitConsumerMisbehaviourResponse"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSubmitConsumerDoubleVoting {
#[prost(string, tag = "1")]
pub submitter: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub duplicate_vote_evidence: ::core::option::Option<
::tendermint_proto::types::DuplicateVoteEvidence,
>,
#[prost(message, optional, tag = "3")]
pub infraction_block_header: ::core::option::Option<
super::super::super::super::ibc::lightclients::tendermint::v1::Header,
>,
#[prost(string, tag = "4")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgSubmitConsumerDoubleVoting {
const NAME: &'static str = "MsgSubmitConsumerDoubleVoting";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgSubmitConsumerDoubleVoting".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgSubmitConsumerDoubleVoting".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgSubmitConsumerDoubleVotingResponse {}
impl ::prost::Name for MsgSubmitConsumerDoubleVotingResponse {
const NAME: &'static str = "MsgSubmitConsumerDoubleVotingResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgSubmitConsumerDoubleVotingResponse"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgSubmitConsumerDoubleVotingResponse"
.into()
}
}
#[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<Params>,
}
impl ::prost::Name for MsgUpdateParams {
const NAME: &'static str = "MsgUpdateParams";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgUpdateParams".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgUpdateParams".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgUpdateParamsResponse {}
impl ::prost::Name for MsgUpdateParamsResponse {
const NAME: &'static str = "MsgUpdateParamsResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgUpdateParamsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgUpdateParamsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConsumerAddition {
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub initial_height: ::core::option::Option<
super::super::super::super::ibc::core::client::v1::Height,
>,
#[prost(bytes = "vec", tag = "3")]
pub genesis_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "4")]
pub binary_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "5")]
pub spawn_time: ::core::option::Option<
::tendermint_proto::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "6")]
pub unbonding_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(message, optional, tag = "7")]
pub ccv_timeout_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(message, optional, tag = "8")]
pub transfer_timeout_period: ::core::option::Option<
::tendermint_proto::google::protobuf::Duration,
>,
#[prost(string, tag = "9")]
pub consumer_redistribution_fraction: ::prost::alloc::string::String,
#[prost(int64, tag = "10")]
pub blocks_per_distribution_transmission: i64,
#[prost(int64, tag = "11")]
pub historical_entries: i64,
#[prost(string, tag = "12")]
pub distribution_transmission_channel: ::prost::alloc::string::String,
#[prost(uint32, tag = "13")]
pub top_n: u32,
#[prost(uint32, tag = "14")]
pub validators_power_cap: u32,
#[prost(uint32, tag = "15")]
pub validator_set_cap: u32,
#[prost(string, repeated, tag = "16")]
pub allowlist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "17")]
pub denylist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "18")]
pub authority: ::prost::alloc::string::String,
#[prost(uint64, tag = "19")]
pub min_stake: u64,
#[prost(bool, tag = "20")]
pub allow_inactive_vals: bool,
}
impl ::prost::Name for MsgConsumerAddition {
const NAME: &'static str = "MsgConsumerAddition";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgConsumerAddition".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgConsumerAddition".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConsumerRemoval {
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub stop_time: ::core::option::Option<
::tendermint_proto::google::protobuf::Timestamp,
>,
#[prost(string, tag = "3")]
pub authority: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgConsumerRemoval {
const NAME: &'static str = "MsgConsumerRemoval";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgConsumerRemoval".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgConsumerRemoval".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgRemoveConsumer {
#[prost(string, tag = "1")]
pub consumer_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub owner: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgRemoveConsumer {
const NAME: &'static str = "MsgRemoveConsumer";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgRemoveConsumer".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgRemoveConsumer".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgRemoveConsumerResponse {}
impl ::prost::Name for MsgRemoveConsumerResponse {
const NAME: &'static str = "MsgRemoveConsumerResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgRemoveConsumerResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgRemoveConsumerResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgChangeRewardDenoms {
#[prost(string, repeated, tag = "1")]
pub denoms_to_add: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub denoms_to_remove: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "3")]
pub authority: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgChangeRewardDenoms {
const NAME: &'static str = "MsgChangeRewardDenoms";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgChangeRewardDenoms".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgChangeRewardDenoms".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgChangeRewardDenomsResponse {}
impl ::prost::Name for MsgChangeRewardDenomsResponse {
const NAME: &'static str = "MsgChangeRewardDenomsResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgChangeRewardDenomsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgChangeRewardDenomsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgOptIn {
#[deprecated]
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub provider_addr: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub consumer_key: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub signer: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgOptIn {
const NAME: &'static str = "MsgOptIn";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgOptIn".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgOptIn".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgOptInResponse {}
impl ::prost::Name for MsgOptInResponse {
const NAME: &'static str = "MsgOptInResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgOptInResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgOptInResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgOptOut {
#[deprecated]
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub provider_addr: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub signer: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgOptOut {
const NAME: &'static str = "MsgOptOut";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgOptOut".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgOptOut".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgOptOutResponse {}
impl ::prost::Name for MsgOptOutResponse {
const NAME: &'static str = "MsgOptOutResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgOptOutResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgOptOutResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSetConsumerCommissionRate {
#[prost(string, tag = "1")]
pub provider_addr: ::prost::alloc::string::String,
#[deprecated]
#[prost(string, tag = "2")]
pub chain_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub rate: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub signer: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgSetConsumerCommissionRate {
const NAME: &'static str = "MsgSetConsumerCommissionRate";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgSetConsumerCommissionRate".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgSetConsumerCommissionRate".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgSetConsumerCommissionRateResponse {}
impl ::prost::Name for MsgSetConsumerCommissionRateResponse {
const NAME: &'static str = "MsgSetConsumerCommissionRateResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgSetConsumerCommissionRateResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgSetConsumerCommissionRateResponse"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgConsumerModification {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub chain_id: ::prost::alloc::string::String,
#[prost(uint32, tag = "4")]
pub top_n: u32,
#[prost(uint32, tag = "5")]
pub validators_power_cap: u32,
#[prost(uint32, tag = "6")]
pub validator_set_cap: u32,
#[prost(string, repeated, tag = "7")]
pub allowlist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "8")]
pub denylist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "9")]
pub authority: ::prost::alloc::string::String,
#[prost(uint64, tag = "10")]
pub min_stake: u64,
#[prost(bool, tag = "11")]
pub allow_inactive_vals: bool,
}
impl ::prost::Name for MsgConsumerModification {
const NAME: &'static str = "MsgConsumerModification";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgConsumerModification".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgConsumerModification".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgConsumerModificationResponse {}
impl ::prost::Name for MsgConsumerModificationResponse {
const NAME: &'static str = "MsgConsumerModificationResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgConsumerModificationResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgConsumerModificationResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCreateConsumer {
#[prost(string, tag = "1")]
pub submitter: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub chain_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub metadata: ::core::option::Option<ConsumerMetadata>,
#[prost(message, optional, tag = "4")]
pub initialization_parameters: ::core::option::Option<
ConsumerInitializationParameters,
>,
#[prost(message, optional, tag = "5")]
pub power_shaping_parameters: ::core::option::Option<PowerShapingParameters>,
}
impl ::prost::Name for MsgCreateConsumer {
const NAME: &'static str = "MsgCreateConsumer";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgCreateConsumer".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgCreateConsumer".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCreateConsumerResponse {
#[prost(string, tag = "1")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for MsgCreateConsumerResponse {
const NAME: &'static str = "MsgCreateConsumerResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgCreateConsumerResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgCreateConsumerResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateConsumer {
#[prost(string, tag = "1")]
pub owner: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub consumer_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub new_owner_address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub metadata: ::core::option::Option<ConsumerMetadata>,
#[prost(message, optional, tag = "5")]
pub initialization_parameters: ::core::option::Option<
ConsumerInitializationParameters,
>,
#[prost(message, optional, tag = "6")]
pub power_shaping_parameters: ::core::option::Option<PowerShapingParameters>,
}
impl ::prost::Name for MsgUpdateConsumer {
const NAME: &'static str = "MsgUpdateConsumer";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgUpdateConsumer".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgUpdateConsumer".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MsgUpdateConsumerResponse {}
impl ::prost::Name for MsgUpdateConsumerResponse {
const NAME: &'static str = "MsgUpdateConsumerResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.MsgUpdateConsumerResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.MsgUpdateConsumerResponse".into()
}
}
#[cfg(feature = "client")]
pub mod msg_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct MsgClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "transport")]
impl MsgClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> MsgClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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<F>(
inner: T,
interceptor: F,
) -> MsgClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
MsgClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn assign_consumer_key(
&mut self,
request: impl tonic::IntoRequest<super::MsgAssignConsumerKey>,
) -> std::result::Result<
tonic::Response<super::MsgAssignConsumerKeyResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/AssignConsumerKey",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Msg",
"AssignConsumerKey",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn submit_consumer_misbehaviour(
&mut self,
request: impl tonic::IntoRequest<super::MsgSubmitConsumerMisbehaviour>,
) -> std::result::Result<
tonic::Response<super::MsgSubmitConsumerMisbehaviourResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/SubmitConsumerMisbehaviour",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Msg",
"SubmitConsumerMisbehaviour",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn submit_consumer_double_voting(
&mut self,
request: impl tonic::IntoRequest<super::MsgSubmitConsumerDoubleVoting>,
) -> std::result::Result<
tonic::Response<super::MsgSubmitConsumerDoubleVotingResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/SubmitConsumerDoubleVoting",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Msg",
"SubmitConsumerDoubleVoting",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_consumer(
&mut self,
request: impl tonic::IntoRequest<super::MsgCreateConsumer>,
) -> std::result::Result<
tonic::Response<super::MsgCreateConsumerResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/CreateConsumer",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Msg",
"CreateConsumer",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_consumer(
&mut self,
request: impl tonic::IntoRequest<super::MsgUpdateConsumer>,
) -> std::result::Result<
tonic::Response<super::MsgUpdateConsumerResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/UpdateConsumer",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Msg",
"UpdateConsumer",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn remove_consumer(
&mut self,
request: impl tonic::IntoRequest<super::MsgRemoveConsumer>,
) -> std::result::Result<
tonic::Response<super::MsgRemoveConsumerResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/RemoveConsumer",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Msg",
"RemoveConsumer",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_params(
&mut self,
request: impl tonic::IntoRequest<super::MsgUpdateParams>,
) -> std::result::Result<
tonic::Response<super::MsgUpdateParamsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/UpdateParams",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Msg",
"UpdateParams",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn opt_in(
&mut self,
request: impl tonic::IntoRequest<super::MsgOptIn>,
) -> std::result::Result<
tonic::Response<super::MsgOptInResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/OptIn",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("interchain_security.ccv.provider.v1.Msg", "OptIn"),
);
self.inner.unary(req, path, codec).await
}
pub async fn opt_out(
&mut self,
request: impl tonic::IntoRequest<super::MsgOptOut>,
) -> std::result::Result<
tonic::Response<super::MsgOptOutResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/OptOut",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("interchain_security.ccv.provider.v1.Msg", "OptOut"),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_consumer_commission_rate(
&mut self,
request: impl tonic::IntoRequest<super::MsgSetConsumerCommissionRate>,
) -> std::result::Result<
tonic::Response<super::MsgSetConsumerCommissionRateResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/SetConsumerCommissionRate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Msg",
"SetConsumerCommissionRate",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn change_reward_denoms(
&mut self,
request: impl tonic::IntoRequest<super::MsgChangeRewardDenoms>,
) -> std::result::Result<
tonic::Response<super::MsgChangeRewardDenomsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Msg/ChangeRewardDenoms",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Msg",
"ChangeRewardDenoms",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "server")]
pub mod msg_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Msg: std::marker::Send + std::marker::Sync + 'static {
async fn assign_consumer_key(
&self,
request: tonic::Request<super::MsgAssignConsumerKey>,
) -> std::result::Result<
tonic::Response<super::MsgAssignConsumerKeyResponse>,
tonic::Status,
>;
async fn submit_consumer_misbehaviour(
&self,
request: tonic::Request<super::MsgSubmitConsumerMisbehaviour>,
) -> std::result::Result<
tonic::Response<super::MsgSubmitConsumerMisbehaviourResponse>,
tonic::Status,
>;
async fn submit_consumer_double_voting(
&self,
request: tonic::Request<super::MsgSubmitConsumerDoubleVoting>,
) -> std::result::Result<
tonic::Response<super::MsgSubmitConsumerDoubleVotingResponse>,
tonic::Status,
>;
async fn create_consumer(
&self,
request: tonic::Request<super::MsgCreateConsumer>,
) -> std::result::Result<
tonic::Response<super::MsgCreateConsumerResponse>,
tonic::Status,
>;
async fn update_consumer(
&self,
request: tonic::Request<super::MsgUpdateConsumer>,
) -> std::result::Result<
tonic::Response<super::MsgUpdateConsumerResponse>,
tonic::Status,
>;
async fn remove_consumer(
&self,
request: tonic::Request<super::MsgRemoveConsumer>,
) -> std::result::Result<
tonic::Response<super::MsgRemoveConsumerResponse>,
tonic::Status,
>;
async fn update_params(
&self,
request: tonic::Request<super::MsgUpdateParams>,
) -> std::result::Result<
tonic::Response<super::MsgUpdateParamsResponse>,
tonic::Status,
>;
async fn opt_in(
&self,
request: tonic::Request<super::MsgOptIn>,
) -> std::result::Result<
tonic::Response<super::MsgOptInResponse>,
tonic::Status,
>;
async fn opt_out(
&self,
request: tonic::Request<super::MsgOptOut>,
) -> std::result::Result<
tonic::Response<super::MsgOptOutResponse>,
tonic::Status,
>;
async fn set_consumer_commission_rate(
&self,
request: tonic::Request<super::MsgSetConsumerCommissionRate>,
) -> std::result::Result<
tonic::Response<super::MsgSetConsumerCommissionRateResponse>,
tonic::Status,
>;
async fn change_reward_denoms(
&self,
request: tonic::Request<super::MsgChangeRewardDenoms>,
) -> std::result::Result<
tonic::Response<super::MsgChangeRewardDenomsResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct MsgServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> MsgServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for MsgServer<T>
where
T: Msg,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/interchain_security.ccv.provider.v1.Msg/AssignConsumerKey" => {
#[allow(non_camel_case_types)]
struct AssignConsumerKeySvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgAssignConsumerKey>
for AssignConsumerKeySvc<T> {
type Response = super::MsgAssignConsumerKeyResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgAssignConsumerKey>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::assign_consumer_key(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = AssignConsumerKeySvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Msg/SubmitConsumerMisbehaviour" => {
#[allow(non_camel_case_types)]
struct SubmitConsumerMisbehaviourSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgSubmitConsumerMisbehaviour>
for SubmitConsumerMisbehaviourSvc<T> {
type Response = super::MsgSubmitConsumerMisbehaviourResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgSubmitConsumerMisbehaviour>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::submit_consumer_misbehaviour(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SubmitConsumerMisbehaviourSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Msg/SubmitConsumerDoubleVoting" => {
#[allow(non_camel_case_types)]
struct SubmitConsumerDoubleVotingSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgSubmitConsumerDoubleVoting>
for SubmitConsumerDoubleVotingSvc<T> {
type Response = super::MsgSubmitConsumerDoubleVotingResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgSubmitConsumerDoubleVoting>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::submit_consumer_double_voting(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SubmitConsumerDoubleVotingSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Msg/CreateConsumer" => {
#[allow(non_camel_case_types)]
struct CreateConsumerSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgCreateConsumer>
for CreateConsumerSvc<T> {
type Response = super::MsgCreateConsumerResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgCreateConsumer>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::create_consumer(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = CreateConsumerSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Msg/UpdateConsumer" => {
#[allow(non_camel_case_types)]
struct UpdateConsumerSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgUpdateConsumer>
for UpdateConsumerSvc<T> {
type Response = super::MsgUpdateConsumerResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgUpdateConsumer>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::update_consumer(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = UpdateConsumerSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Msg/RemoveConsumer" => {
#[allow(non_camel_case_types)]
struct RemoveConsumerSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgRemoveConsumer>
for RemoveConsumerSvc<T> {
type Response = super::MsgRemoveConsumerResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgRemoveConsumer>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::remove_consumer(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = RemoveConsumerSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Msg/UpdateParams" => {
#[allow(non_camel_case_types)]
struct UpdateParamsSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgUpdateParams>
for UpdateParamsSvc<T> {
type Response = super::MsgUpdateParamsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgUpdateParams>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::update_params(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
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,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Msg/OptIn" => {
#[allow(non_camel_case_types)]
struct OptInSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgOptIn>
for OptInSvc<T> {
type Response = super::MsgOptInResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgOptIn>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::opt_in(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = OptInSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Msg/OptOut" => {
#[allow(non_camel_case_types)]
struct OptOutSvc<T: Msg>(pub Arc<T>);
impl<T: Msg> tonic::server::UnaryService<super::MsgOptOut>
for OptOutSvc<T> {
type Response = super::MsgOptOutResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgOptOut>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::opt_out(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = OptOutSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Msg/SetConsumerCommissionRate" => {
#[allow(non_camel_case_types)]
struct SetConsumerCommissionRateSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgSetConsumerCommissionRate>
for SetConsumerCommissionRateSvc<T> {
type Response = super::MsgSetConsumerCommissionRateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgSetConsumerCommissionRate>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::set_consumer_commission_rate(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = SetConsumerCommissionRateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Msg/ChangeRewardDenoms" => {
#[allow(non_camel_case_types)]
struct ChangeRewardDenomsSvc<T: Msg>(pub Arc<T>);
impl<
T: Msg,
> tonic::server::UnaryService<super::MsgChangeRewardDenoms>
for ChangeRewardDenomsSvc<T> {
type Response = super::MsgChangeRewardDenomsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::MsgChangeRewardDenoms>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Msg>::change_reward_denoms(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = ChangeRewardDenomsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> Clone for MsgServer<T> {
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,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "interchain_security.ccv.provider.v1.Msg";
impl<T> tonic::server::NamedService for MsgServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerGenesisRequest {
#[prost(string, tag = "1")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryConsumerGenesisRequest {
const NAME: &'static str = "QueryConsumerGenesisRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerGenesisRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerGenesisRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerGenesisResponse {
#[prost(message, optional, tag = "1")]
pub genesis_state: ::core::option::Option<super::super::v1::ConsumerGenesisState>,
}
impl ::prost::Name for QueryConsumerGenesisResponse {
const NAME: &'static str = "QueryConsumerGenesisResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerGenesisResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerGenesisResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerChainsRequest {
#[prost(enumeration = "ConsumerPhase", tag = "1")]
pub phase: i32,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageRequest,
>,
}
impl ::prost::Name for QueryConsumerChainsRequest {
const NAME: &'static str = "QueryConsumerChainsRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerChainsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerChainsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerChainsResponse {
#[prost(message, repeated, tag = "1")]
pub chains: ::prost::alloc::vec::Vec<Chain>,
#[prost(message, optional, tag = "2")]
pub pagination: ::core::option::Option<
super::super::super::super::cosmos::base::query::v1beta1::PageResponse,
>,
}
impl ::prost::Name for QueryConsumerChainsResponse {
const NAME: &'static str = "QueryConsumerChainsResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerChainsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerChainsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Chain {
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub client_id: ::prost::alloc::string::String,
#[prost(uint32, tag = "3")]
pub top_n: u32,
#[prost(int64, tag = "4")]
pub min_power_in_top_n: i64,
#[prost(uint32, tag = "5")]
pub validators_power_cap: u32,
#[prost(uint32, tag = "6")]
pub validator_set_cap: u32,
#[prost(string, repeated, tag = "7")]
pub allowlist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "8")]
pub denylist: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "9")]
pub phase: ::prost::alloc::string::String,
#[prost(message, optional, tag = "10")]
pub metadata: ::core::option::Option<ConsumerMetadata>,
#[prost(uint64, tag = "11")]
pub min_stake: u64,
#[prost(bool, tag = "12")]
pub allow_inactive_vals: bool,
#[prost(string, tag = "13")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for Chain {
const NAME: &'static str = "Chain";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.Chain".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.Chain".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorConsumerAddrRequest {
#[prost(string, tag = "1")]
pub provider_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryValidatorConsumerAddrRequest {
const NAME: &'static str = "QueryValidatorConsumerAddrRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryValidatorConsumerAddrRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryValidatorConsumerAddrRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorConsumerAddrResponse {
#[prost(string, tag = "1")]
pub consumer_address: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryValidatorConsumerAddrResponse {
const NAME: &'static str = "QueryValidatorConsumerAddrResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryValidatorConsumerAddrResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryValidatorConsumerAddrResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorProviderAddrRequest {
#[prost(string, tag = "1")]
pub consumer_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryValidatorProviderAddrRequest {
const NAME: &'static str = "QueryValidatorProviderAddrRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryValidatorProviderAddrRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryValidatorProviderAddrRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorProviderAddrResponse {
#[prost(string, tag = "1")]
pub provider_address: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryValidatorProviderAddrResponse {
const NAME: &'static str = "QueryValidatorProviderAddrResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryValidatorProviderAddrResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryValidatorProviderAddrResponse".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryThrottleStateRequest {}
impl ::prost::Name for QueryThrottleStateRequest {
const NAME: &'static str = "QueryThrottleStateRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryThrottleStateRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryThrottleStateRequest".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryThrottleStateResponse {
#[prost(int64, tag = "1")]
pub slash_meter: i64,
#[prost(int64, tag = "2")]
pub slash_meter_allowance: i64,
#[prost(message, optional, tag = "3")]
pub next_replenish_candidate: ::core::option::Option<
::tendermint_proto::google::protobuf::Timestamp,
>,
}
impl ::prost::Name for QueryThrottleStateResponse {
const NAME: &'static str = "QueryThrottleStateResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryThrottleStateResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryThrottleStateResponse".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryRegisteredConsumerRewardDenomsRequest {}
impl ::prost::Name for QueryRegisteredConsumerRewardDenomsRequest {
const NAME: &'static str = "QueryRegisteredConsumerRewardDenomsRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryRegisteredConsumerRewardDenomsRequest"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryRegisteredConsumerRewardDenomsRequest"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryRegisteredConsumerRewardDenomsResponse {
#[prost(string, repeated, tag = "1")]
pub denoms: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for QueryRegisteredConsumerRewardDenomsResponse {
const NAME: &'static str = "QueryRegisteredConsumerRewardDenomsResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryRegisteredConsumerRewardDenomsResponse"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryRegisteredConsumerRewardDenomsResponse"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAllPairsValConsAddrByConsumerRequest {
#[prost(string, tag = "1")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryAllPairsValConsAddrByConsumerRequest {
const NAME: &'static str = "QueryAllPairsValConsAddrByConsumerRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryAllPairsValConsAddrByConsumerRequest"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryAllPairsValConsAddrByConsumerRequest"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryAllPairsValConsAddrByConsumerResponse {
#[prost(message, repeated, tag = "1")]
pub pair_val_con_addr: ::prost::alloc::vec::Vec<PairValConAddrProviderAndConsumer>,
}
impl ::prost::Name for QueryAllPairsValConsAddrByConsumerResponse {
const NAME: &'static str = "QueryAllPairsValConsAddrByConsumerResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryAllPairsValConsAddrByConsumerResponse"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryAllPairsValConsAddrByConsumerResponse"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PairValConAddrProviderAndConsumer {
#[prost(string, tag = "1")]
pub provider_address: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub consumer_address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub consumer_key: ::core::option::Option<::tendermint_proto::crypto::PublicKey>,
}
impl ::prost::Name for PairValConAddrProviderAndConsumer {
const NAME: &'static str = "PairValConAddrProviderAndConsumer";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.PairValConAddrProviderAndConsumer".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.PairValConAddrProviderAndConsumer".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryParamsRequest {}
impl ::prost::Name for QueryParamsRequest {
const NAME: &'static str = "QueryParamsRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryParamsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryParamsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryParamsResponse {
#[prost(message, optional, tag = "1")]
pub params: ::core::option::Option<Params>,
}
impl ::prost::Name for QueryParamsResponse {
const NAME: &'static str = "QueryParamsResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryParamsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryParamsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerChainOptedInValidatorsRequest {
#[prost(string, tag = "1")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryConsumerChainOptedInValidatorsRequest {
const NAME: &'static str = "QueryConsumerChainOptedInValidatorsRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerChainOptedInValidatorsRequest"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerChainOptedInValidatorsRequest"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerChainOptedInValidatorsResponse {
#[prost(string, repeated, tag = "1")]
pub validators_provider_addresses: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
}
impl ::prost::Name for QueryConsumerChainOptedInValidatorsResponse {
const NAME: &'static str = "QueryConsumerChainOptedInValidatorsResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerChainOptedInValidatorsResponse"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerChainOptedInValidatorsResponse"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerValidatorsRequest {
#[prost(string, tag = "1")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryConsumerValidatorsRequest {
const NAME: &'static str = "QueryConsumerValidatorsRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerValidatorsRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerValidatorsRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerValidatorsValidator {
#[prost(string, tag = "1")]
pub provider_address: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub consumer_key: ::core::option::Option<::tendermint_proto::crypto::PublicKey>,
#[deprecated]
#[prost(int64, tag = "3")]
pub power: i64,
#[deprecated]
#[prost(string, tag = "4")]
pub rate: ::prost::alloc::string::String,
#[prost(int64, tag = "5")]
pub consumer_power: i64,
#[prost(string, tag = "6")]
pub consumer_commission_rate: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub provider_commission_rate: ::prost::alloc::string::String,
#[prost(message, optional, tag = "8")]
pub description: ::core::option::Option<
super::super::super::super::cosmos::staking::v1beta1::Description,
>,
#[prost(string, tag = "9")]
pub provider_operator_address: ::prost::alloc::string::String,
#[prost(bool, tag = "10")]
pub jailed: bool,
#[prost(
enumeration = "super::super::super::super::cosmos::staking::v1beta1::BondStatus",
tag = "11"
)]
pub status: i32,
#[prost(string, tag = "12")]
pub provider_tokens: ::prost::alloc::string::String,
#[prost(int64, tag = "13")]
pub provider_power: i64,
#[prost(bool, tag = "14")]
pub validates_current_epoch: bool,
}
impl ::prost::Name for QueryConsumerValidatorsValidator {
const NAME: &'static str = "QueryConsumerValidatorsValidator";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerValidatorsValidator".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerValidatorsValidator".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerValidatorsResponse {
#[prost(message, repeated, tag = "1")]
pub validators: ::prost::alloc::vec::Vec<QueryConsumerValidatorsValidator>,
}
impl ::prost::Name for QueryConsumerValidatorsResponse {
const NAME: &'static str = "QueryConsumerValidatorsResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerValidatorsResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerValidatorsResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerChainsValidatorHasToValidateRequest {
#[prost(string, tag = "1")]
pub provider_address: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryConsumerChainsValidatorHasToValidateRequest {
const NAME: &'static str = "QueryConsumerChainsValidatorHasToValidateRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerChainsValidatorHasToValidateRequest"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerChainsValidatorHasToValidateRequest"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerChainsValidatorHasToValidateResponse {
#[prost(string, repeated, tag = "1")]
pub consumer_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for QueryConsumerChainsValidatorHasToValidateResponse {
const NAME: &'static str = "QueryConsumerChainsValidatorHasToValidateResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerChainsValidatorHasToValidateResponse"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerChainsValidatorHasToValidateResponse"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorConsumerCommissionRateRequest {
#[prost(string, tag = "1")]
pub consumer_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub provider_address: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryValidatorConsumerCommissionRateRequest {
const NAME: &'static str = "QueryValidatorConsumerCommissionRateRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryValidatorConsumerCommissionRateRequest"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryValidatorConsumerCommissionRateRequest"
.into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryValidatorConsumerCommissionRateResponse {
#[prost(string, tag = "1")]
pub rate: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryValidatorConsumerCommissionRateResponse {
const NAME: &'static str = "QueryValidatorConsumerCommissionRateResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryValidatorConsumerCommissionRateResponse"
.into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryValidatorConsumerCommissionRateResponse"
.into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryBlocksUntilNextEpochRequest {}
impl ::prost::Name for QueryBlocksUntilNextEpochRequest {
const NAME: &'static str = "QueryBlocksUntilNextEpochRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryBlocksUntilNextEpochRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryBlocksUntilNextEpochRequest".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct QueryBlocksUntilNextEpochResponse {
#[prost(uint64, tag = "1")]
pub blocks_until_next_epoch: u64,
}
impl ::prost::Name for QueryBlocksUntilNextEpochResponse {
const NAME: &'static str = "QueryBlocksUntilNextEpochResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryBlocksUntilNextEpochResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryBlocksUntilNextEpochResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerIdFromClientIdRequest {
#[prost(string, tag = "1")]
pub client_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryConsumerIdFromClientIdRequest {
const NAME: &'static str = "QueryConsumerIdFromClientIdRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerIdFromClientIdRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerIdFromClientIdRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerIdFromClientIdResponse {
#[prost(string, tag = "1")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryConsumerIdFromClientIdResponse {
const NAME: &'static str = "QueryConsumerIdFromClientIdResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerIdFromClientIdResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerIdFromClientIdResponse".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerChainRequest {
#[prost(string, tag = "1")]
pub consumer_id: ::prost::alloc::string::String,
}
impl ::prost::Name for QueryConsumerChainRequest {
const NAME: &'static str = "QueryConsumerChainRequest";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerChainRequest".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerChainRequest".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsumerChainResponse {
#[prost(string, tag = "1")]
pub consumer_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub chain_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub owner_address: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub phase: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub metadata: ::core::option::Option<ConsumerMetadata>,
#[prost(message, optional, tag = "6")]
pub init_params: ::core::option::Option<ConsumerInitializationParameters>,
#[prost(message, optional, tag = "7")]
pub power_shaping_params: ::core::option::Option<PowerShapingParameters>,
}
impl ::prost::Name for QueryConsumerChainResponse {
const NAME: &'static str = "QueryConsumerChainResponse";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.QueryConsumerChainResponse".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.QueryConsumerChainResponse".into()
}
}
#[cfg(feature = "client")]
pub mod query_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct QueryClient<T> {
inner: tonic::client::Grpc<T>,
}
#[cfg(feature = "transport")]
impl QueryClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> QueryClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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<F>(
inner: T,
interceptor: F,
) -> QueryClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
QueryClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn query_consumer_genesis(
&mut self,
request: impl tonic::IntoRequest<super::QueryConsumerGenesisRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerGenesisResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryConsumerGenesis",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryConsumerGenesis",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_consumer_chains(
&mut self,
request: impl tonic::IntoRequest<super::QueryConsumerChainsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerChainsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryConsumerChains",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryConsumerChains",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_validator_consumer_addr(
&mut self,
request: impl tonic::IntoRequest<super::QueryValidatorConsumerAddrRequest>,
) -> std::result::Result<
tonic::Response<super::QueryValidatorConsumerAddrResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerAddr",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryValidatorConsumerAddr",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_validator_provider_addr(
&mut self,
request: impl tonic::IntoRequest<super::QueryValidatorProviderAddrRequest>,
) -> std::result::Result<
tonic::Response<super::QueryValidatorProviderAddrResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryValidatorProviderAddr",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryValidatorProviderAddr",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_throttle_state(
&mut self,
request: impl tonic::IntoRequest<super::QueryThrottleStateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryThrottleStateResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryThrottleState",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryThrottleState",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_registered_consumer_reward_denoms(
&mut self,
request: impl tonic::IntoRequest<
super::QueryRegisteredConsumerRewardDenomsRequest,
>,
) -> std::result::Result<
tonic::Response<super::QueryRegisteredConsumerRewardDenomsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryRegisteredConsumerRewardDenoms",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryRegisteredConsumerRewardDenoms",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_all_pairs_val_cons_addr_by_consumer(
&mut self,
request: impl tonic::IntoRequest<
super::QueryAllPairsValConsAddrByConsumerRequest,
>,
) -> std::result::Result<
tonic::Response<super::QueryAllPairsValConsAddrByConsumerResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryAllPairsValConsAddrByConsumer",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryAllPairsValConsAddrByConsumer",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_params(
&mut self,
request: impl tonic::IntoRequest<super::QueryParamsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryParamsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryParams",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryParams",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_consumer_chain_opted_in_validators(
&mut self,
request: impl tonic::IntoRequest<
super::QueryConsumerChainOptedInValidatorsRequest,
>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerChainOptedInValidatorsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryConsumerChainOptedInValidators",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryConsumerChainOptedInValidators",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_consumer_chains_validator_has_to_validate(
&mut self,
request: impl tonic::IntoRequest<
super::QueryConsumerChainsValidatorHasToValidateRequest,
>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerChainsValidatorHasToValidateResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryConsumerChainsValidatorHasToValidate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryConsumerChainsValidatorHasToValidate",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_validator_consumer_commission_rate(
&mut self,
request: impl tonic::IntoRequest<
super::QueryValidatorConsumerCommissionRateRequest,
>,
) -> std::result::Result<
tonic::Response<super::QueryValidatorConsumerCommissionRateResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerCommissionRate",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryValidatorConsumerCommissionRate",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_consumer_validators(
&mut self,
request: impl tonic::IntoRequest<super::QueryConsumerValidatorsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerValidatorsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryConsumerValidators",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryConsumerValidators",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_blocks_until_next_epoch(
&mut self,
request: impl tonic::IntoRequest<super::QueryBlocksUntilNextEpochRequest>,
) -> std::result::Result<
tonic::Response<super::QueryBlocksUntilNextEpochResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryBlocksUntilNextEpoch",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryBlocksUntilNextEpoch",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_consumer_id_from_client_id(
&mut self,
request: impl tonic::IntoRequest<super::QueryConsumerIdFromClientIdRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerIdFromClientIdResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryConsumerIdFromClientId",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryConsumerIdFromClientId",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn query_consumer_chain(
&mut self,
request: impl tonic::IntoRequest<super::QueryConsumerChainRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerChainResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/interchain_security.ccv.provider.v1.Query/QueryConsumerChain",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"interchain_security.ccv.provider.v1.Query",
"QueryConsumerChain",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[cfg(feature = "server")]
pub mod query_server {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
#[async_trait]
pub trait Query: std::marker::Send + std::marker::Sync + 'static {
async fn query_consumer_genesis(
&self,
request: tonic::Request<super::QueryConsumerGenesisRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerGenesisResponse>,
tonic::Status,
>;
async fn query_consumer_chains(
&self,
request: tonic::Request<super::QueryConsumerChainsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerChainsResponse>,
tonic::Status,
>;
async fn query_validator_consumer_addr(
&self,
request: tonic::Request<super::QueryValidatorConsumerAddrRequest>,
) -> std::result::Result<
tonic::Response<super::QueryValidatorConsumerAddrResponse>,
tonic::Status,
>;
async fn query_validator_provider_addr(
&self,
request: tonic::Request<super::QueryValidatorProviderAddrRequest>,
) -> std::result::Result<
tonic::Response<super::QueryValidatorProviderAddrResponse>,
tonic::Status,
>;
async fn query_throttle_state(
&self,
request: tonic::Request<super::QueryThrottleStateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryThrottleStateResponse>,
tonic::Status,
>;
async fn query_registered_consumer_reward_denoms(
&self,
request: tonic::Request<super::QueryRegisteredConsumerRewardDenomsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryRegisteredConsumerRewardDenomsResponse>,
tonic::Status,
>;
async fn query_all_pairs_val_cons_addr_by_consumer(
&self,
request: tonic::Request<super::QueryAllPairsValConsAddrByConsumerRequest>,
) -> std::result::Result<
tonic::Response<super::QueryAllPairsValConsAddrByConsumerResponse>,
tonic::Status,
>;
async fn query_params(
&self,
request: tonic::Request<super::QueryParamsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryParamsResponse>,
tonic::Status,
>;
async fn query_consumer_chain_opted_in_validators(
&self,
request: tonic::Request<super::QueryConsumerChainOptedInValidatorsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerChainOptedInValidatorsResponse>,
tonic::Status,
>;
async fn query_consumer_chains_validator_has_to_validate(
&self,
request: tonic::Request<
super::QueryConsumerChainsValidatorHasToValidateRequest,
>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerChainsValidatorHasToValidateResponse>,
tonic::Status,
>;
async fn query_validator_consumer_commission_rate(
&self,
request: tonic::Request<super::QueryValidatorConsumerCommissionRateRequest>,
) -> std::result::Result<
tonic::Response<super::QueryValidatorConsumerCommissionRateResponse>,
tonic::Status,
>;
async fn query_consumer_validators(
&self,
request: tonic::Request<super::QueryConsumerValidatorsRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerValidatorsResponse>,
tonic::Status,
>;
async fn query_blocks_until_next_epoch(
&self,
request: tonic::Request<super::QueryBlocksUntilNextEpochRequest>,
) -> std::result::Result<
tonic::Response<super::QueryBlocksUntilNextEpochResponse>,
tonic::Status,
>;
async fn query_consumer_id_from_client_id(
&self,
request: tonic::Request<super::QueryConsumerIdFromClientIdRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerIdFromClientIdResponse>,
tonic::Status,
>;
async fn query_consumer_chain(
&self,
request: tonic::Request<super::QueryConsumerChainRequest>,
) -> std::result::Result<
tonic::Response<super::QueryConsumerChainResponse>,
tonic::Status,
>;
}
#[derive(Debug)]
pub struct QueryServer<T> {
inner: Arc<T>,
accept_compression_encodings: EnabledCompressionEncodings,
send_compression_encodings: EnabledCompressionEncodings,
max_decoding_message_size: Option<usize>,
max_encoding_message_size: Option<usize>,
}
impl<T> QueryServer<T> {
pub fn new(inner: T) -> Self {
Self::from_arc(Arc::new(inner))
}
pub fn from_arc(inner: Arc<T>) -> Self {
Self {
inner,
accept_compression_encodings: Default::default(),
send_compression_encodings: Default::default(),
max_decoding_message_size: None,
max_encoding_message_size: None,
}
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> InterceptedService<Self, F>
where
F: tonic::service::Interceptor,
{
InterceptedService::new(Self::new(inner), interceptor)
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.accept_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.send_compression_encodings.enable(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.max_decoding_message_size = Some(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.max_encoding_message_size = Some(limit);
self
}
}
impl<T, B> tonic::codegen::Service<http::Request<B>> for QueryServer<T>
where
T: Query,
B: Body + std::marker::Send + 'static,
B::Error: Into<StdError> + std::marker::Send + 'static,
{
type Response = http::Response<tonic::body::Body>;
type Error = std::convert::Infallible;
type Future = BoxFuture<Self::Response, Self::Error>;
fn poll_ready(
&mut self,
_cx: &mut Context<'_>,
) -> Poll<std::result::Result<(), Self::Error>> {
Poll::Ready(Ok(()))
}
fn call(&mut self, req: http::Request<B>) -> Self::Future {
match req.uri().path() {
"/interchain_security.ccv.provider.v1.Query/QueryConsumerGenesis" => {
#[allow(non_camel_case_types)]
struct QueryConsumerGenesisSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryConsumerGenesisRequest>
for QueryConsumerGenesisSvc<T> {
type Response = super::QueryConsumerGenesisResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryConsumerGenesisRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_consumer_genesis(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryConsumerGenesisSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryConsumerChains" => {
#[allow(non_camel_case_types)]
struct QueryConsumerChainsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryConsumerChainsRequest>
for QueryConsumerChainsSvc<T> {
type Response = super::QueryConsumerChainsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryConsumerChainsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_consumer_chains(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryConsumerChainsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerAddr" => {
#[allow(non_camel_case_types)]
struct QueryValidatorConsumerAddrSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryValidatorConsumerAddrRequest,
> for QueryValidatorConsumerAddrSvc<T> {
type Response = super::QueryValidatorConsumerAddrResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryValidatorConsumerAddrRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_validator_consumer_addr(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryValidatorConsumerAddrSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryValidatorProviderAddr" => {
#[allow(non_camel_case_types)]
struct QueryValidatorProviderAddrSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryValidatorProviderAddrRequest,
> for QueryValidatorProviderAddrSvc<T> {
type Response = super::QueryValidatorProviderAddrResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryValidatorProviderAddrRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_validator_provider_addr(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryValidatorProviderAddrSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryThrottleState" => {
#[allow(non_camel_case_types)]
struct QueryThrottleStateSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryThrottleStateRequest>
for QueryThrottleStateSvc<T> {
type Response = super::QueryThrottleStateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryThrottleStateRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_throttle_state(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryThrottleStateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryRegisteredConsumerRewardDenoms" => {
#[allow(non_camel_case_types)]
struct QueryRegisteredConsumerRewardDenomsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryRegisteredConsumerRewardDenomsRequest,
> for QueryRegisteredConsumerRewardDenomsSvc<T> {
type Response = super::QueryRegisteredConsumerRewardDenomsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryRegisteredConsumerRewardDenomsRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_registered_consumer_reward_denoms(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryRegisteredConsumerRewardDenomsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryAllPairsValConsAddrByConsumer" => {
#[allow(non_camel_case_types)]
struct QueryAllPairsValConsAddrByConsumerSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryAllPairsValConsAddrByConsumerRequest,
> for QueryAllPairsValConsAddrByConsumerSvc<T> {
type Response = super::QueryAllPairsValConsAddrByConsumerResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryAllPairsValConsAddrByConsumerRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_all_pairs_val_cons_addr_by_consumer(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryAllPairsValConsAddrByConsumerSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryParams" => {
#[allow(non_camel_case_types)]
struct QueryParamsSvc<T: Query>(pub Arc<T>);
impl<T: Query> tonic::server::UnaryService<super::QueryParamsRequest>
for QueryParamsSvc<T> {
type Response = super::QueryParamsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryParamsRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_params(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryParamsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryConsumerChainOptedInValidators" => {
#[allow(non_camel_case_types)]
struct QueryConsumerChainOptedInValidatorsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryConsumerChainOptedInValidatorsRequest,
> for QueryConsumerChainOptedInValidatorsSvc<T> {
type Response = super::QueryConsumerChainOptedInValidatorsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryConsumerChainOptedInValidatorsRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_consumer_chain_opted_in_validators(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryConsumerChainOptedInValidatorsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryConsumerChainsValidatorHasToValidate" => {
#[allow(non_camel_case_types)]
struct QueryConsumerChainsValidatorHasToValidateSvc<T: Query>(
pub Arc<T>,
);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryConsumerChainsValidatorHasToValidateRequest,
> for QueryConsumerChainsValidatorHasToValidateSvc<T> {
type Response = super::QueryConsumerChainsValidatorHasToValidateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryConsumerChainsValidatorHasToValidateRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_consumer_chains_validator_has_to_validate(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryConsumerChainsValidatorHasToValidateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryValidatorConsumerCommissionRate" => {
#[allow(non_camel_case_types)]
struct QueryValidatorConsumerCommissionRateSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryValidatorConsumerCommissionRateRequest,
> for QueryValidatorConsumerCommissionRateSvc<T> {
type Response = super::QueryValidatorConsumerCommissionRateResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryValidatorConsumerCommissionRateRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_validator_consumer_commission_rate(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryValidatorConsumerCommissionRateSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryConsumerValidators" => {
#[allow(non_camel_case_types)]
struct QueryConsumerValidatorsSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryConsumerValidatorsRequest>
for QueryConsumerValidatorsSvc<T> {
type Response = super::QueryConsumerValidatorsResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryConsumerValidatorsRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_consumer_validators(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryConsumerValidatorsSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryBlocksUntilNextEpoch" => {
#[allow(non_camel_case_types)]
struct QueryBlocksUntilNextEpochSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryBlocksUntilNextEpochRequest,
> for QueryBlocksUntilNextEpochSvc<T> {
type Response = super::QueryBlocksUntilNextEpochResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryBlocksUntilNextEpochRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_blocks_until_next_epoch(&inner, request)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryBlocksUntilNextEpochSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryConsumerIdFromClientId" => {
#[allow(non_camel_case_types)]
struct QueryConsumerIdFromClientIdSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<
super::QueryConsumerIdFromClientIdRequest,
> for QueryConsumerIdFromClientIdSvc<T> {
type Response = super::QueryConsumerIdFromClientIdResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<
super::QueryConsumerIdFromClientIdRequest,
>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_consumer_id_from_client_id(
&inner,
request,
)
.await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryConsumerIdFromClientIdSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
"/interchain_security.ccv.provider.v1.Query/QueryConsumerChain" => {
#[allow(non_camel_case_types)]
struct QueryConsumerChainSvc<T: Query>(pub Arc<T>);
impl<
T: Query,
> tonic::server::UnaryService<super::QueryConsumerChainRequest>
for QueryConsumerChainSvc<T> {
type Response = super::QueryConsumerChainResponse;
type Future = BoxFuture<
tonic::Response<Self::Response>,
tonic::Status,
>;
fn call(
&mut self,
request: tonic::Request<super::QueryConsumerChainRequest>,
) -> Self::Future {
let inner = Arc::clone(&self.0);
let fut = async move {
<T as Query>::query_consumer_chain(&inner, request).await
};
Box::pin(fut)
}
}
let accept_compression_encodings = self.accept_compression_encodings;
let send_compression_encodings = self.send_compression_encodings;
let max_decoding_message_size = self.max_decoding_message_size;
let max_encoding_message_size = self.max_encoding_message_size;
let inner = self.inner.clone();
let fut = async move {
let method = QueryConsumerChainSvc(inner);
let codec = tonic::codec::ProstCodec::default();
let mut grpc = tonic::server::Grpc::new(codec)
.apply_compression_config(
accept_compression_encodings,
send_compression_encodings,
)
.apply_max_message_size_config(
max_decoding_message_size,
max_encoding_message_size,
);
let res = grpc.unary(method, req).await;
Ok(res)
};
Box::pin(fut)
}
_ => {
Box::pin(async move {
let mut response = http::Response::new(
tonic::body::Body::default(),
);
let headers = response.headers_mut();
headers
.insert(
tonic::Status::GRPC_STATUS,
(tonic::Code::Unimplemented as i32).into(),
);
headers
.insert(
http::header::CONTENT_TYPE,
tonic::metadata::GRPC_CONTENT_TYPE,
);
Ok(response)
})
}
}
}
}
impl<T> Clone for QueryServer<T> {
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,
max_decoding_message_size: self.max_decoding_message_size,
max_encoding_message_size: self.max_encoding_message_size,
}
}
}
pub const SERVICE_NAME: &str = "interchain_security.ccv.provider.v1.Query";
impl<T> tonic::server::NamedService for QueryServer<T> {
const NAME: &'static str = SERVICE_NAME;
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(uint64, tag = "1")]
pub valset_update_id: u64,
#[prost(message, repeated, tag = "2")]
pub consumer_states: ::prost::alloc::vec::Vec<ConsumerState>,
#[prost(message, repeated, tag = "5")]
pub valset_update_id_to_height: ::prost::alloc::vec::Vec<ValsetUpdateIdToHeight>,
#[prost(message, optional, tag = "8")]
pub params: ::core::option::Option<Params>,
#[prost(message, repeated, tag = "9")]
pub validator_consumer_pubkeys: ::prost::alloc::vec::Vec<ValidatorConsumerPubKey>,
#[prost(message, repeated, tag = "10")]
pub validators_by_consumer_addr: ::prost::alloc::vec::Vec<ValidatorByConsumerAddr>,
#[prost(message, repeated, tag = "14")]
pub consumer_addrs_to_prune_v2: ::prost::alloc::vec::Vec<ConsumerAddrsToPruneV2>,
}
impl ::prost::Name for GenesisState {
const NAME: &'static str = "GenesisState";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.GenesisState".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.GenesisState".into()
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsumerState {
#[prost(string, tag = "1")]
pub chain_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub client_id: ::prost::alloc::string::String,
#[prost(uint64, tag = "4")]
pub initial_height: u64,
#[prost(message, optional, tag = "5")]
pub consumer_genesis: ::core::option::Option<super::super::v1::ConsumerGenesisState>,
#[prost(message, repeated, tag = "6")]
pub pending_valset_changes: ::prost::alloc::vec::Vec<
super::super::v1::ValidatorSetChangePacketData,
>,
#[prost(string, repeated, tag = "7")]
pub slash_downtime_ack: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(enumeration = "ConsumerPhase", tag = "9")]
pub phase: i32,
}
impl ::prost::Name for ConsumerState {
const NAME: &'static str = "ConsumerState";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ConsumerState".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ConsumerState".into()
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ValsetUpdateIdToHeight {
#[prost(uint64, tag = "1")]
pub valset_update_id: u64,
#[prost(uint64, tag = "2")]
pub height: u64,
}
impl ::prost::Name for ValsetUpdateIdToHeight {
const NAME: &'static str = "ValsetUpdateIdToHeight";
const PACKAGE: &'static str = "interchain_security.ccv.provider.v1";
fn full_name() -> ::prost::alloc::string::String {
"interchain_security.ccv.provider.v1.ValsetUpdateIdToHeight".into()
}
fn type_url() -> ::prost::alloc::string::String {
"/interchain_security.ccv.provider.v1.ValsetUpdateIdToHeight".into()
}
}