#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdentifiedClientState {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub client_state: ::core::option::Option<::prost_types::Any>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConsensusStateWithHeight {
#[prost(message, optional, tag="1")]
pub height: ::core::option::Option<Height>,
#[prost(message, optional, tag="2")]
pub consensus_state: ::core::option::Option<::prost_types::Any>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientConsensusStates {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub consensus_states: ::prost::alloc::vec::Vec<ConsensusStateWithHeight>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ClientUpdateProposal {
#[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 client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag="4")]
pub header: ::core::option::Option<::prost_types::Any>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Height {
#[prost(uint64, tag="1")]
pub revision_number: u64,
#[prost(uint64, tag="2")]
pub revision_height: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Params {
#[prost(string, repeated, tag="1")]
pub allowed_clients: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisState {
#[prost(message, repeated, tag="1")]
pub clients: ::prost::alloc::vec::Vec<IdentifiedClientState>,
#[prost(message, repeated, tag="2")]
pub clients_consensus: ::prost::alloc::vec::Vec<ClientConsensusStates>,
#[prost(message, repeated, tag="3")]
pub clients_metadata: ::prost::alloc::vec::Vec<IdentifiedGenesisMetadata>,
#[prost(message, optional, tag="4")]
pub params: ::core::option::Option<Params>,
#[prost(bool, tag="5")]
pub create_localhost: bool,
#[prost(uint64, tag="6")]
pub next_client_sequence: u64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenesisMetadata {
#[prost(bytes="vec", tag="1")]
pub key: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="2")]
pub value: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdentifiedGenesisMetadata {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag="2")]
pub client_metadata: ::prost::alloc::vec::Vec<GenesisMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCreateClient {
#[prost(message, optional, tag="1")]
pub client_state: ::core::option::Option<::prost_types::Any>,
#[prost(message, optional, tag="2")]
pub consensus_state: ::core::option::Option<::prost_types::Any>,
#[prost(string, tag="3")]
pub signer: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgCreateClientResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateClient {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub header: ::core::option::Option<::prost_types::Any>,
#[prost(string, tag="3")]
pub signer: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpdateClientResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpgradeClient {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub client_state: ::core::option::Option<::prost_types::Any>,
#[prost(message, optional, tag="3")]
pub consensus_state: ::core::option::Option<::prost_types::Any>,
#[prost(bytes="vec", tag="4")]
pub proof_upgrade_client: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes="vec", tag="5")]
pub proof_upgrade_consensus_state: ::prost::alloc::vec::Vec<u8>,
#[prost(string, tag="6")]
pub signer: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgUpgradeClientResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSubmitMisbehaviour {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub misbehaviour: ::core::option::Option<::prost_types::Any>,
#[prost(string, tag="3")]
pub signer: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MsgSubmitMisbehaviourResponse {
}
# [doc = r" Generated client implementations."] pub mod msg_client { # ! [allow (unused_variables , dead_code , missing_docs)] use tonic :: codegen :: * ; # [doc = " Msg defines the ibc/client Msg service."] pub struct MsgClient < T > { inner : tonic :: client :: Grpc < T > , } impl MsgClient < tonic :: transport :: Channel > { # [doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect < D > (dst : D) -> Result < Self , tonic :: transport :: Error > where D : std :: convert :: 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 :: BoxBody > , T :: ResponseBody : Body + HttpBody + Send + 'static , T :: Error : Into < StdError > , < T :: ResponseBody as HttpBody > :: Error : Into < StdError > + Send , { pub fn new (inner : T) -> Self { let inner = tonic :: client :: Grpc :: new (inner) ; Self { inner } } pub fn with_interceptor (inner : T , interceptor : impl Into < tonic :: Interceptor >) -> Self { let inner = tonic :: client :: Grpc :: with_interceptor (inner , interceptor) ; Self { inner } } # [doc = " CreateClient defines a rpc handler method for MsgCreateClient."] pub async fn create_client (& mut self , request : impl tonic :: IntoRequest < super :: MsgCreateClient > ,) -> Result < tonic :: Response < super :: MsgCreateClientResponse > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/ibc.core.client.v1.Msg/CreateClient") ; self . inner . unary (request . into_request () , path , codec) . await } # [doc = " UpdateClient defines a rpc handler method for MsgUpdateClient."] pub async fn update_client (& mut self , request : impl tonic :: IntoRequest < super :: MsgUpdateClient > ,) -> Result < tonic :: Response < super :: MsgUpdateClientResponse > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/ibc.core.client.v1.Msg/UpdateClient") ; self . inner . unary (request . into_request () , path , codec) . await } # [doc = " UpgradeClient defines a rpc handler method for MsgUpgradeClient."] pub async fn upgrade_client (& mut self , request : impl tonic :: IntoRequest < super :: MsgUpgradeClient > ,) -> Result < tonic :: Response < super :: MsgUpgradeClientResponse > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/ibc.core.client.v1.Msg/UpgradeClient") ; self . inner . unary (request . into_request () , path , codec) . await } # [doc = " SubmitMisbehaviour defines a rpc handler method for MsgSubmitMisbehaviour."] pub async fn submit_misbehaviour (& mut self , request : impl tonic :: IntoRequest < super :: MsgSubmitMisbehaviour > ,) -> Result < tonic :: Response < super :: MsgSubmitMisbehaviourResponse > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/ibc.core.client.v1.Msg/SubmitMisbehaviour") ; self . inner . unary (request . into_request () , path , codec) . await } } impl < T : Clone > Clone for MsgClient < T > { fn clone (& self) -> Self { Self { inner : self . inner . clone () , } } } impl < T > std :: fmt :: Debug for MsgClient < T > { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { write ! (f , "MsgClient {{ ... }}") } } }
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientStateRequest {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientStateResponse {
#[prost(message, optional, tag="1")]
pub client_state: ::core::option::Option<::prost_types::Any>,
#[prost(bytes="vec", tag="2")]
pub proof: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag="3")]
pub proof_height: ::core::option::Option<Height>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientStatesRequest {
#[prost(message, optional, tag="1")]
pub pagination: ::core::option::Option<super::super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientStatesResponse {
#[prost(message, repeated, tag="1")]
pub client_states: ::prost::alloc::vec::Vec<IdentifiedClientState>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsensusStateRequest {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(uint64, tag="2")]
pub revision_number: u64,
#[prost(uint64, tag="3")]
pub revision_height: u64,
#[prost(bool, tag="4")]
pub latest_height: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsensusStateResponse {
#[prost(message, optional, tag="1")]
pub consensus_state: ::core::option::Option<::prost_types::Any>,
#[prost(bytes="vec", tag="2")]
pub proof: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag="3")]
pub proof_height: ::core::option::Option<Height>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsensusStatesRequest {
#[prost(string, tag="1")]
pub client_id: ::prost::alloc::string::String,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::super::super::cosmos::base::query::v1beta1::PageRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryConsensusStatesResponse {
#[prost(message, repeated, tag="1")]
pub consensus_states: ::prost::alloc::vec::Vec<ConsensusStateWithHeight>,
#[prost(message, optional, tag="2")]
pub pagination: ::core::option::Option<super::super::super::super::cosmos::base::query::v1beta1::PageResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientParamsRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct QueryClientParamsResponse {
#[prost(message, optional, tag="1")]
pub params: ::core::option::Option<Params>,
}
# [doc = r" Generated client implementations."] pub mod query_client { # ! [allow (unused_variables , dead_code , missing_docs)] use tonic :: codegen :: * ; # [doc = " Query provides defines the gRPC querier service"] pub struct QueryClient < T > { inner : tonic :: client :: Grpc < T > , } impl QueryClient < tonic :: transport :: Channel > { # [doc = r" Attempt to create a new client by connecting to a given endpoint."] pub async fn connect < D > (dst : D) -> Result < Self , tonic :: transport :: Error > where D : std :: convert :: 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 :: BoxBody > , T :: ResponseBody : Body + HttpBody + Send + 'static , T :: Error : Into < StdError > , < T :: ResponseBody as HttpBody > :: Error : Into < StdError > + Send , { pub fn new (inner : T) -> Self { let inner = tonic :: client :: Grpc :: new (inner) ; Self { inner } } pub fn with_interceptor (inner : T , interceptor : impl Into < tonic :: Interceptor >) -> Self { let inner = tonic :: client :: Grpc :: with_interceptor (inner , interceptor) ; Self { inner } } # [doc = " ClientState queries an IBC light client."] pub async fn client_state (& mut self , request : impl tonic :: IntoRequest < super :: QueryClientStateRequest > ,) -> Result < tonic :: Response < super :: QueryClientStateResponse > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/ibc.core.client.v1.Query/ClientState") ; self . inner . unary (request . into_request () , path , codec) . await } # [doc = " ClientStates queries all the IBC light clients of a chain."] pub async fn client_states (& mut self , request : impl tonic :: IntoRequest < super :: QueryClientStatesRequest > ,) -> Result < tonic :: Response < super :: QueryClientStatesResponse > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/ibc.core.client.v1.Query/ClientStates") ; self . inner . unary (request . into_request () , path , codec) . await } # [doc = " ConsensusState queries a consensus state associated with a client state at"] # [doc = " a given height."] pub async fn consensus_state (& mut self , request : impl tonic :: IntoRequest < super :: QueryConsensusStateRequest > ,) -> Result < tonic :: Response < super :: QueryConsensusStateResponse > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/ibc.core.client.v1.Query/ConsensusState") ; self . inner . unary (request . into_request () , path , codec) . await } # [doc = " ConsensusStates queries all the consensus state associated with a given"] # [doc = " client."] pub async fn consensus_states (& mut self , request : impl tonic :: IntoRequest < super :: QueryConsensusStatesRequest > ,) -> Result < tonic :: Response < super :: QueryConsensusStatesResponse > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/ibc.core.client.v1.Query/ConsensusStates") ; self . inner . unary (request . into_request () , path , codec) . await } # [doc = " ClientParams queries all parameters of the ibc client."] pub async fn client_params (& mut self , request : impl tonic :: IntoRequest < super :: QueryClientParamsRequest > ,) -> Result < tonic :: Response < super :: QueryClientParamsResponse > , tonic :: Status > { self . inner . ready () . await . map_err (| e | { tonic :: Status :: new (tonic :: Code :: Unknown , format ! ("Service was not ready: {}" , e . into ())) }) ? ; let codec = tonic :: codec :: ProstCodec :: default () ; let path = http :: uri :: PathAndQuery :: from_static ("/ibc.core.client.v1.Query/ClientParams") ; self . inner . unary (request . into_request () , path , codec) . await } } impl < T : Clone > Clone for QueryClient < T > { fn clone (& self) -> Self { Self { inner : self . inner . clone () , } } } impl < T > std :: fmt :: Debug for QueryClient < T > { fn fmt (& self , f : & mut std :: fmt :: Formatter < '_ >) -> std :: fmt :: Result { write ! (f , "QueryClient {{ ... }}") } } }