juno_rust_proto/prost/ibc-go/
ibc.applications.interchain_accounts.v1.rs

1/// InterchainAccountPacketData is comprised of a raw transaction, type of transaction and optional memo field.
2#[allow(clippy::derive_partial_eq_without_eq)]
3#[derive(Clone, PartialEq, ::prost::Message)]
4pub struct InterchainAccountPacketData {
5    #[prost(enumeration = "Type", tag = "1")]
6    pub r#type: i32,
7    #[prost(bytes = "vec", tag = "2")]
8    pub data: ::prost::alloc::vec::Vec<u8>,
9    #[prost(string, tag = "3")]
10    pub memo: ::prost::alloc::string::String,
11}
12/// CosmosTx contains a list of sdk.Msg's. It should be used when sending transactions to an SDK host chain.
13#[allow(clippy::derive_partial_eq_without_eq)]
14#[derive(Clone, PartialEq, ::prost::Message)]
15pub struct CosmosTx {
16    #[prost(message, repeated, tag = "1")]
17    pub messages: ::prost::alloc::vec::Vec<::prost_types::Any>,
18}
19/// Type defines a classification of message issued from a controller chain to its associated interchain accounts
20/// host
21#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
22#[repr(i32)]
23pub enum Type {
24    /// Default zero value enumeration
25    Unspecified = 0,
26    /// Execute a transaction on an interchain accounts host chain
27    ExecuteTx = 1,
28}
29impl Type {
30    /// String value of the enum field names used in the ProtoBuf definition.
31    ///
32    /// The values are not transformed in any way and thus are considered stable
33    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
34    pub fn as_str_name(&self) -> &'static str {
35        match self {
36            Type::Unspecified => "TYPE_UNSPECIFIED",
37            Type::ExecuteTx => "TYPE_EXECUTE_TX",
38        }
39    }
40    /// Creates an enum from field names used in the ProtoBuf definition.
41    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
42        match value {
43            "TYPE_UNSPECIFIED" => Some(Self::Unspecified),
44            "TYPE_EXECUTE_TX" => Some(Self::ExecuteTx),
45            _ => None,
46        }
47    }
48}
49/// Metadata defines a set of protocol specific data encoded into the ICS27 channel version bytestring
50/// See ICS004: <https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics#Versioning>
51#[allow(clippy::derive_partial_eq_without_eq)]
52#[derive(Clone, PartialEq, ::prost::Message)]
53pub struct Metadata {
54    /// version defines the ICS27 protocol version
55    #[prost(string, tag = "1")]
56    pub version: ::prost::alloc::string::String,
57    /// controller_connection_id is the connection identifier associated with the controller chain
58    #[prost(string, tag = "2")]
59    pub controller_connection_id: ::prost::alloc::string::String,
60    /// host_connection_id is the connection identifier associated with the host chain
61    #[prost(string, tag = "3")]
62    pub host_connection_id: ::prost::alloc::string::String,
63    /// address defines the interchain account address to be fulfilled upon the OnChanOpenTry handshake step
64    /// NOTE: the address field is empty on the OnChanOpenInit handshake step
65    #[prost(string, tag = "4")]
66    pub address: ::prost::alloc::string::String,
67    /// encoding defines the supported codec format
68    #[prost(string, tag = "5")]
69    pub encoding: ::prost::alloc::string::String,
70    /// tx_type defines the type of transactions the interchain account can execute
71    #[prost(string, tag = "6")]
72    pub tx_type: ::prost::alloc::string::String,
73}
74/// GenesisState defines the interchain accounts genesis state
75#[allow(clippy::derive_partial_eq_without_eq)]
76#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct GenesisState {
78    #[prost(message, optional, tag = "1")]
79    pub controller_genesis_state: ::core::option::Option<ControllerGenesisState>,
80    #[prost(message, optional, tag = "2")]
81    pub host_genesis_state: ::core::option::Option<HostGenesisState>,
82}
83/// ControllerGenesisState defines the interchain accounts controller genesis state
84#[allow(clippy::derive_partial_eq_without_eq)]
85#[derive(Clone, PartialEq, ::prost::Message)]
86pub struct ControllerGenesisState {
87    #[prost(message, repeated, tag = "1")]
88    pub active_channels: ::prost::alloc::vec::Vec<ActiveChannel>,
89    #[prost(message, repeated, tag = "2")]
90    pub interchain_accounts: ::prost::alloc::vec::Vec<RegisteredInterchainAccount>,
91    #[prost(string, repeated, tag = "3")]
92    pub ports: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
93    #[prost(message, optional, tag = "4")]
94    pub params: ::core::option::Option<super::controller::v1::Params>,
95}
96/// HostGenesisState defines the interchain accounts host genesis state
97#[allow(clippy::derive_partial_eq_without_eq)]
98#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct HostGenesisState {
100    #[prost(message, repeated, tag = "1")]
101    pub active_channels: ::prost::alloc::vec::Vec<ActiveChannel>,
102    #[prost(message, repeated, tag = "2")]
103    pub interchain_accounts: ::prost::alloc::vec::Vec<RegisteredInterchainAccount>,
104    #[prost(string, tag = "3")]
105    pub port: ::prost::alloc::string::String,
106    #[prost(message, optional, tag = "4")]
107    pub params: ::core::option::Option<super::host::v1::Params>,
108}
109/// ActiveChannel contains a connection ID, port ID and associated active channel ID
110#[allow(clippy::derive_partial_eq_without_eq)]
111#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct ActiveChannel {
113    #[prost(string, tag = "1")]
114    pub connection_id: ::prost::alloc::string::String,
115    #[prost(string, tag = "2")]
116    pub port_id: ::prost::alloc::string::String,
117    #[prost(string, tag = "3")]
118    pub channel_id: ::prost::alloc::string::String,
119}
120/// RegisteredInterchainAccount contains a connection ID, port ID and associated interchain account address
121#[allow(clippy::derive_partial_eq_without_eq)]
122#[derive(Clone, PartialEq, ::prost::Message)]
123pub struct RegisteredInterchainAccount {
124    #[prost(string, tag = "1")]
125    pub connection_id: ::prost::alloc::string::String,
126    #[prost(string, tag = "2")]
127    pub port_id: ::prost::alloc::string::String,
128    #[prost(string, tag = "3")]
129    pub account_address: ::prost::alloc::string::String,
130}
131/// An InterchainAccount is defined as a BaseAccount & the address of the account owner on the controller chain
132#[allow(clippy::derive_partial_eq_without_eq)]
133#[derive(Clone, PartialEq, ::prost::Message)]
134pub struct InterchainAccount {
135    #[prost(message, optional, tag = "1")]
136    pub base_account:
137        ::core::option::Option<super::super::super::super::cosmos::auth::v1beta1::BaseAccount>,
138    #[prost(string, tag = "2")]
139    pub account_owner: ::prost::alloc::string::String,
140}