diff --git a/ibc-query/src/core/client/types/response.rs b/ibc-query/src/core/client/types/response.rs index 587fe2127..a1339d3a5 100644 --- a/ibc-query/src/core/client/types/response.rs +++ b/ibc-query/src/core/client/types/response.rs @@ -165,9 +165,9 @@ impl From for RawIdentifiedClientState { #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct QueryConsensusStateResponse { - consensus_state: Any, - proof: Proof, - proof_height: Height, + pub consensus_state: Any, + pub proof: Proof, + pub proof_height: Height, } impl QueryConsensusStateResponse { @@ -213,8 +213,8 @@ impl From for RawQueryConsensusStateResponse { #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct ConsensusStateWithHeight { - height: Height, - consensus_state: Any, + pub height: Height, + pub consensus_state: Any, } impl ConsensusStateWithHeight { @@ -257,8 +257,8 @@ impl From for RawConsensusStateWithHeight { #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct QueryConsensusStatesResponse { - consensus_states: Vec, - pagination: Option, + pub consensus_states: Vec, + pub pagination: Option, } impl QueryConsensusStatesResponse { @@ -308,8 +308,8 @@ impl From for RawQueryConsensusStatesResponse { #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct QueryConsensusStateHeightsResponse { - consensus_state_heights: Vec, - pagination: Option, + pub consensus_state_heights: Vec, + pub pagination: Option, } impl QueryConsensusStateHeightsResponse { @@ -356,7 +356,7 @@ impl From for RawQueryConsensusStateHeightsR #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct QueryClientStatusResponse { - status: Status, + pub status: Status, } impl QueryClientStatusResponse { @@ -390,7 +390,7 @@ impl From for RawQueryClientStatusResponse { #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct QueryClientParamsResponse { - allowed_clients: Vec, + pub allowed_clients: Vec, } impl QueryClientParamsResponse { @@ -436,7 +436,7 @@ impl From for RawQueryClientParamsResponse { #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct QueryUpgradedClientStateResponse { - upgraded_client_state: Any, + pub upgraded_client_state: Any, } impl QueryUpgradedClientStateResponse { @@ -474,7 +474,7 @@ impl From for RawQueryUpgradedClientStateRespo #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] #[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] pub struct QueryUpgradedConsensusStateResponse { - upgraded_consensus_state: Any, + pub upgraded_consensus_state: Any, } impl QueryUpgradedConsensusStateResponse { diff --git a/ibc-query/src/core/connection/types/request.rs b/ibc-query/src/core/connection/types/request.rs index ad11e62f5..e62262adf 100644 --- a/ibc-query/src/core/connection/types/request.rs +++ b/ibc-query/src/core/connection/types/request.rs @@ -4,7 +4,6 @@ use ibc::core::client::types::Height; use ibc::core::host::types::identifiers::{ClientId, ConnectionId}; use ibc::primitives::prelude::*; -use ibc_proto::ibc::core::channel::v1::QueryConnectionChannelsRequest as RawQueryConnectionChannelsRequest; use ibc_proto::ibc::core::connection::v1::{ QueryClientConnectionsRequest as RawQueryClientConnectionsRequest, QueryConnectionClientStateRequest as RawQueryConnectionClientStateRequest, @@ -129,33 +128,3 @@ impl From for QueryConnectionParamsRequest { Self { query_height: None } } } - -/// Defines the RPC method request type for querying the channels associated -/// with a connection. -#[derive(Clone, Debug)] -#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] -#[cfg_attr(feature = "schema", derive(schemars::JsonSchema))] -pub struct QueryConnectionChannelsRequest { - pub connection_id: ConnectionId, - pub pagination: Option, -} - -impl TryFrom for QueryConnectionChannelsRequest { - type Error = QueryError; - - fn try_from(request: RawQueryConnectionChannelsRequest) -> Result { - Ok(Self { - connection_id: request.connection.parse()?, - pagination: request.pagination.map(Into::into), - }) - } -} - -impl From for RawQueryConnectionChannelsRequest { - fn from(request: QueryConnectionChannelsRequest) -> Self { - Self { - connection: request.connection_id.to_string(), - pagination: request.pagination.map(Into::into), - } - } -}