ibc_proto/prost/
ibc.applications.interchain_accounts.v1.rs

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