1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#![cfg(feature = "stargate")]
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use crate::ibc::IbcChannel;
#[non_exhaustive]
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum IbcQuery {
PortId {},
ListChannels { port_id: Option<String> },
Channel {
channel_id: String,
port_id: Option<String>,
},
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct PortIdResponse {
pub port_id: String,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct ListChannelsResponse {
pub channels: Vec<IbcChannel>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
pub struct ChannelResponse {
pub channel: Option<IbcChannel>,
}