diff --git a/src/IBC_GO_COMMIT b/src/IBC_GO_COMMIT index 900b2b9d..47f08cce 100644 --- a/src/IBC_GO_COMMIT +++ b/src/IBC_GO_COMMIT @@ -1 +1 @@ -c75650a1a037a9fecba5a9005df380f707520ff7 +2551dea41cd3c512845007ca895c8402afa9b79f diff --git a/src/lib.rs b/src/lib.rs index 8d07ed9d..4287448b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -180,6 +180,9 @@ pub mod cosmos { } } pub mod gov { + pub mod v1 { + include_proto!("cosmos.gov.v1.rs"); + } pub mod v1beta1 { include_proto!("cosmos.gov.v1beta1.rs"); } diff --git a/src/prost/google.protobuf.rs b/src/prost/google.protobuf.rs index 715d820f..3878889e 100644 --- a/src/prost/google.protobuf.rs +++ b/src/prost/google.protobuf.rs @@ -1,3 +1,129 @@ +/// `Any` contains an arbitrary serialized protocol buffer message along with a +/// URL that describes the type of the serialized message. +/// +/// Protobuf library provides support to pack/unpack Any values in the form +/// of utility functions or additional generated methods of the Any type. +/// +/// Example 1: Pack and unpack a message in C++. +/// +/// Foo foo = ...; +/// Any any; +/// any.PackFrom(foo); +/// ... +/// if (any.UnpackTo(&foo)) { +/// ... +/// } +/// +/// Example 2: Pack and unpack a message in Java. +/// +/// Foo foo = ...; +/// Any any = Any.pack(foo); +/// ... +/// if (any.is(Foo.class)) { +/// foo = any.unpack(Foo.class); +/// } +/// +/// Example 3: Pack and unpack a message in Python. +/// +/// foo = Foo(...) +/// any = Any() +/// any.Pack(foo) +/// ... +/// if any.Is(Foo.DESCRIPTOR): +/// any.Unpack(foo) +/// ... +/// +/// Example 4: Pack and unpack a message in Go +/// +/// foo := &pb.Foo{...} +/// any, err := anypb.New(foo) +/// if err != nil { +/// ... +/// } +/// ... +/// foo := &pb.Foo{} +/// if err := any.UnmarshalTo(foo); err != nil { +/// ... +/// } +/// +/// The pack methods provided by protobuf library will by default use +/// 'type.googleapis.com/full.type.name' as the type URL and the unpack +/// methods only use the fully qualified type name after the last '/' +/// in the type URL, for example "foo.bar.com/x/y.z" will yield type +/// name "y.z". +/// +/// +/// JSON +/// +/// The JSON representation of an `Any` value uses the regular +/// representation of the deserialized, embedded message, with an +/// additional field `@type` which contains the type URL. Example: +/// +/// package google.profile; +/// message Person { +/// string first_name = 1; +/// string last_name = 2; +/// } +/// +/// { +/// "@type": "type.googleapis.com/google.profile.Person", +/// "firstName": , +/// "lastName": +/// } +/// +/// If the embedded message type is well-known and has a custom JSON +/// representation, that representation will be embedded adding a field +/// `value` which holds the custom JSON in addition to the `@type` +/// field. Example (for message [google.protobuf.Duration][]): +/// +/// { +/// "@type": "type.googleapis.com/google.protobuf.Duration", +/// "value": "1.212s" +/// } +/// +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[derive(Eq)] +#[cfg_attr( + all(feature = "json-schema", feature = "serde"), + derive(::schemars::JsonSchema) +)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Any { + /// A URL/resource name that uniquely identifies the type of the serialized + /// protocol buffer message. This string must contain at least + /// one "/" character. The last segment of the URL's path must represent + /// the fully qualified name of the type (as in + /// `path/google.protobuf.Duration`). The name should be in a canonical form + /// (e.g., leading "." is not accepted). + /// + /// In practice, teams usually precompile into the binary all types that they + /// expect it to use in the context of Any. However, for URLs which use the + /// scheme `http`, `https`, or no scheme, one can optionally set up a type + /// server that maps type URLs to message definitions as follows: + /// + /// * If no scheme is provided, `https` is assumed. + /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] + /// value in binary format, or produce an error. + /// * Applications are allowed to cache lookup results based on the + /// URL, or have them precompiled into a binary to avoid any + /// lookup. Therefore, binary compatibility needs to be preserved + /// on changes to types. (Use versioned type names to manage + /// breaking changes.) + /// + /// Note: this functionality is not currently available in the official + /// protobuf release, and it is not used for type URLs beginning with + /// type.googleapis.com. + /// + /// Schemes other than `http`, `https` (or the empty scheme) might be + /// used with implementation specific semantics. + /// + #[prost(string, tag = "1")] + pub type_url: ::prost::alloc::string::String, + /// Must be a valid serialized protocol buffer of the above specified type. + #[prost(bytes = "vec", tag = "2")] + pub value: ::prost::alloc::vec::Vec, +} /// The protocol compiler can output a FileDescriptorSet containing the .proto /// files it parses. #[allow(clippy::derive_partial_eq_without_eq)] @@ -44,14 +170,9 @@ pub struct FileDescriptorProto { #[prost(message, optional, tag = "9")] pub source_code_info: ::core::option::Option, /// The syntax of the proto file. - /// The supported values are "proto2", "proto3", and "editions". - /// - /// If `edition` is present, this value must be "editions". + /// The supported values are "proto2" and "proto3". #[prost(string, optional, tag = "12")] pub syntax: ::core::option::Option<::prost::alloc::string::String>, - /// The edition of the proto file, which is an opaque string. - #[prost(string, optional, tag = "13")] - pub edition: ::core::option::Option<::prost::alloc::string::String>, } /// Describes a message type. #[allow(clippy::derive_partial_eq_without_eq)] @@ -114,90 +235,6 @@ pub struct ExtensionRangeOptions { /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, - /// For external users: DO NOT USE. We are in the process of open sourcing - /// extension declaration and executing internal cleanups before it can be - /// used externally. - #[prost(message, repeated, tag = "2")] - pub declaration: ::prost::alloc::vec::Vec, - /// Any features defined in the specific edition. - #[prost(message, optional, tag = "50")] - pub features: ::core::option::Option, - /// The verification state of the range. - /// TODO(b/278783756): flip the default to DECLARATION once all empty ranges - /// are marked as UNVERIFIED. - #[prost( - enumeration = "extension_range_options::VerificationState", - optional, - tag = "3", - default = "Unverified" - )] - pub verification: ::core::option::Option, -} -/// Nested message and enum types in `ExtensionRangeOptions`. -pub mod extension_range_options { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct Declaration { - /// The extension number declared within the extension range. - #[prost(int32, optional, tag = "1")] - pub number: ::core::option::Option, - /// The fully-qualified name of the extension field. There must be a leading - /// dot in front of the full name. - #[prost(string, optional, tag = "2")] - pub full_name: ::core::option::Option<::prost::alloc::string::String>, - /// The fully-qualified type name of the extension field. Unlike - /// Metadata.type, Declaration.type must have a leading dot for messages - /// and enums. - #[prost(string, optional, tag = "3")] - pub r#type: ::core::option::Option<::prost::alloc::string::String>, - /// If true, indicates that the number is reserved in the extension range, - /// and any extension field with the number will fail to compile. Set this - /// when a declared extension field is deleted. - #[prost(bool, optional, tag = "5")] - pub reserved: ::core::option::Option, - /// If true, indicates that the extension must be defined as repeated. - /// Otherwise the extension must be defined as optional. - #[prost(bool, optional, tag = "6")] - pub repeated: ::core::option::Option, - } - /// The verification state of the extension range. - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum VerificationState { - /// All the extensions of the range must be declared. - Declaration = 0, - Unverified = 1, - } - impl VerificationState { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - VerificationState::Declaration => "DECLARATION", - VerificationState::Unverified => "UNVERIFIED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "DECLARATION" => Some(Self::Declaration), - "UNVERIFIED" => Some(Self::Unverified), - _ => None, - } - } - } } /// Describes a field within a message. #[allow(clippy::derive_partial_eq_without_eq)] @@ -610,9 +647,6 @@ pub struct FileOptions { /// determining the ruby package. #[prost(string, optional, tag = "45")] pub ruby_package: ::core::option::Option<::prost::alloc::string::String>, - /// Any features defined in the specific edition. - #[prost(message, optional, tag = "50")] - pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. /// See the documentation for the "Options" section above. #[prost(message, repeated, tag = "999")] @@ -700,10 +734,6 @@ pub struct MessageOptions { /// this is a formalization for deprecating messages. #[prost(bool, optional, tag = "3", default = "false")] pub deprecated: ::core::option::Option, - /// NOTE: Do not set the option in .proto files. Always use the maps syntax - /// instead. The option should only be implicitly set by the proto compiler - /// parser. - /// /// Whether the message is an automatically generated map entry type for the /// maps field. /// @@ -721,24 +751,12 @@ pub struct MessageOptions { /// use a native map in the target language to hold the keys and values. /// The reflection APIs in such implementations still need to work as /// if the field is a repeated message field. + /// + /// NOTE: Do not set the option in .proto files. Always use the maps syntax + /// instead. The option should only be implicitly set by the proto compiler + /// parser. #[prost(bool, optional, tag = "7")] pub map_entry: ::core::option::Option, - /// Enable the legacy handling of JSON field name conflicts. This lowercases - /// and strips underscored from the fields before comparison in proto3 only. - /// The new behavior takes `json_name` into account and applies to proto2 as - /// well. - /// - /// This should only be used as a temporary measure against broken builds due - /// to the change in behavior for JSON field name conflicts. - /// - /// TODO(b/261750190) This is legacy behavior we plan to remove once downstream - /// teams have had time to migrate. - #[deprecated] - #[prost(bool, optional, tag = "11")] - pub deprecated_legacy_json_field_conflicts: ::core::option::Option, - /// Any features defined in the specific edition. - #[prost(message, optional, tag = "12")] - pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -748,10 +766,8 @@ pub struct MessageOptions { pub struct FieldOptions { /// The ctype option instructs the C++ code generator to use a different /// representation of the field than it normally would. See the specific - /// options below. This option is only implemented to support use of - /// \[ctype=CORD\] and \[ctype=STRING\] (the default) on non-repeated fields of - /// type "bytes" in the open source release -- sorry, we'll try to include - /// other types in a future version! + /// options below. This option is not yet implemented in the open source + /// release -- sorry, we'll try to include it in a future version! #[prost( enumeration = "field_options::CType", optional, @@ -801,6 +817,7 @@ pub struct FieldOptions { /// call from multiple threads concurrently, while non-const methods continue /// to require exclusive access. /// + /// /// Note that implementations may choose not to check required fields within /// a lazy sub-message. That is, calling IsInitialized() on the outer message /// may return true even if the inner message has missing required fields. @@ -812,8 +829,11 @@ pub struct FieldOptions { /// check its required fields, regardless of whether or not the message has /// been parsed. /// - /// As of May 2022, lazy verifies the contents of the byte stream during - /// parsing. An invalid byte stream will cause the overall parsing to fail. + /// As of 2021, lazy does no correctness checks on the byte stream during + /// parsing. This may lead to crashes if and when an invalid byte stream is + /// finally parsed upon access. + /// + /// TODO(b/211906113): Enable validation on lazy fields. #[prost(bool, optional, tag = "5", default = "false")] pub lazy: ::core::option::Option, /// unverified_lazy does no correctness checks on the byte stream. This should @@ -830,39 +850,12 @@ pub struct FieldOptions { /// For Google-internal migration only. Do not use. #[prost(bool, optional, tag = "10", default = "false")] pub weak: ::core::option::Option, - /// Indicate that the field value should not be printed out when using debug - /// formats, e.g. when the field contains sensitive credentials. - #[prost(bool, optional, tag = "16", default = "false")] - pub debug_redact: ::core::option::Option, - #[prost(enumeration = "field_options::OptionRetention", optional, tag = "17")] - pub retention: ::core::option::Option, - #[prost( - enumeration = "field_options::OptionTargetType", - repeated, - packed = "false", - tag = "19" - )] - pub targets: ::prost::alloc::vec::Vec, - #[prost(message, repeated, tag = "20")] - pub edition_defaults: ::prost::alloc::vec::Vec, - /// Any features defined in the specific edition. - #[prost(message, optional, tag = "21")] - pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, } /// Nested message and enum types in `FieldOptions`. pub mod field_options { - #[allow(clippy::derive_partial_eq_without_eq)] - #[derive(Clone, PartialEq, ::prost::Message)] - pub struct EditionDefault { - #[prost(string, optional, tag = "1")] - pub edition: ::core::option::Option<::prost::alloc::string::String>, - /// Textproto value. - #[prost(string, optional, tag = "2")] - pub value: ::core::option::Option<::prost::alloc::string::String>, - } #[derive( Clone, Copy, @@ -878,12 +871,6 @@ pub mod field_options { pub enum CType { /// Default mode. String = 0, - /// The option \[ctype=CORD\] may be applied to a non-repeated field of type - /// "bytes". It indicates that in C++, the data should be stored in a Cord - /// instead of a string. For very large strings, this may reduce memory - /// fragmentation. It may also allow better performance when parsing from a - /// Cord, or when parsing with aliasing enabled, as the parsed Cord may then - /// alias the original buffer. Cord = 1, StringPiece = 2, } @@ -951,121 +938,10 @@ pub mod field_options { } } } - /// If set to RETENTION_SOURCE, the option will be omitted from the binary. - /// Note: as of January 2023, support for this is in progress and does not yet - /// have an effect (b/264593489). - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum OptionRetention { - RetentionUnknown = 0, - RetentionRuntime = 1, - RetentionSource = 2, - } - impl OptionRetention { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - OptionRetention::RetentionUnknown => "RETENTION_UNKNOWN", - OptionRetention::RetentionRuntime => "RETENTION_RUNTIME", - OptionRetention::RetentionSource => "RETENTION_SOURCE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "RETENTION_UNKNOWN" => Some(Self::RetentionUnknown), - "RETENTION_RUNTIME" => Some(Self::RetentionRuntime), - "RETENTION_SOURCE" => Some(Self::RetentionSource), - _ => None, - } - } - } - /// This indicates the types of entities that the field may apply to when used - /// as an option. If it is unset, then the field may be freely used as an - /// option on any kind of entity. Note: as of January 2023, support for this is - /// in progress and does not yet have an effect (b/264593489). - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum OptionTargetType { - TargetTypeUnknown = 0, - TargetTypeFile = 1, - TargetTypeExtensionRange = 2, - TargetTypeMessage = 3, - TargetTypeField = 4, - TargetTypeOneof = 5, - TargetTypeEnum = 6, - TargetTypeEnumEntry = 7, - TargetTypeService = 8, - TargetTypeMethod = 9, - } - impl OptionTargetType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - OptionTargetType::TargetTypeUnknown => "TARGET_TYPE_UNKNOWN", - OptionTargetType::TargetTypeFile => "TARGET_TYPE_FILE", - OptionTargetType::TargetTypeExtensionRange => { - "TARGET_TYPE_EXTENSION_RANGE" - } - OptionTargetType::TargetTypeMessage => "TARGET_TYPE_MESSAGE", - OptionTargetType::TargetTypeField => "TARGET_TYPE_FIELD", - OptionTargetType::TargetTypeOneof => "TARGET_TYPE_ONEOF", - OptionTargetType::TargetTypeEnum => "TARGET_TYPE_ENUM", - OptionTargetType::TargetTypeEnumEntry => "TARGET_TYPE_ENUM_ENTRY", - OptionTargetType::TargetTypeService => "TARGET_TYPE_SERVICE", - OptionTargetType::TargetTypeMethod => "TARGET_TYPE_METHOD", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "TARGET_TYPE_UNKNOWN" => Some(Self::TargetTypeUnknown), - "TARGET_TYPE_FILE" => Some(Self::TargetTypeFile), - "TARGET_TYPE_EXTENSION_RANGE" => Some(Self::TargetTypeExtensionRange), - "TARGET_TYPE_MESSAGE" => Some(Self::TargetTypeMessage), - "TARGET_TYPE_FIELD" => Some(Self::TargetTypeField), - "TARGET_TYPE_ONEOF" => Some(Self::TargetTypeOneof), - "TARGET_TYPE_ENUM" => Some(Self::TargetTypeEnum), - "TARGET_TYPE_ENUM_ENTRY" => Some(Self::TargetTypeEnumEntry), - "TARGET_TYPE_SERVICE" => Some(Self::TargetTypeService), - "TARGET_TYPE_METHOD" => Some(Self::TargetTypeMethod), - _ => None, - } - } - } } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct OneofOptions { - /// Any features defined in the specific edition. - #[prost(message, optional, tag = "1")] - pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -1083,18 +959,6 @@ pub struct EnumOptions { /// is a formalization for deprecating enums. #[prost(bool, optional, tag = "3", default = "false")] pub deprecated: ::core::option::Option, - /// Enable the legacy handling of JSON field name conflicts. This lowercases - /// and strips underscored from the fields before comparison in proto3 only. - /// The new behavior takes `json_name` into account and applies to proto2 as - /// well. - /// TODO(b/261750190) Remove this legacy behavior once downstream teams have - /// had time to migrate. - #[deprecated] - #[prost(bool, optional, tag = "6")] - pub deprecated_legacy_json_field_conflicts: ::core::option::Option, - /// Any features defined in the specific edition. - #[prost(message, optional, tag = "7")] - pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -1108,14 +972,6 @@ pub struct EnumValueOptions { /// this is a formalization for deprecating enum values. #[prost(bool, optional, tag = "1", default = "false")] pub deprecated: ::core::option::Option, - /// Any features defined in the specific edition. - #[prost(message, optional, tag = "2")] - pub features: ::core::option::Option, - /// Indicate that fields annotated with this enum value should not be printed - /// out when using debug formats, e.g. when the field contains sensitive - /// credentials. - #[prost(bool, optional, tag = "3", default = "false")] - pub debug_redact: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -1123,9 +979,6 @@ pub struct EnumValueOptions { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServiceOptions { - /// Any features defined in the specific edition. - #[prost(message, optional, tag = "34")] - pub features: ::core::option::Option, /// Is this service deprecated? /// Depending on the target platform, this can emit Deprecated annotations /// for the service, or it will be completely ignored; in the very least, @@ -1152,9 +1005,6 @@ pub struct MethodOptions { default = "IdempotencyUnknown" )] pub idempotency_level: ::core::option::Option, - /// Any features defined in the specific edition. - #[prost(message, optional, tag = "35")] - pub features: ::core::option::Option, /// The parser stores options it doesn't recognize here. See above. #[prost(message, repeated, tag = "999")] pub uninterpreted_option: ::prost::alloc::vec::Vec, @@ -1248,275 +1098,8 @@ pub mod uninterpreted_option { pub is_extension: bool, } } -/// TODO(b/274655146) Enums in C++ gencode (and potentially other languages) are -/// not well scoped. This means that each of the feature enums below can clash -/// with each other. The short names we've chosen maximize call-site -/// readability, but leave us very open to this scenario. A future feature will -/// be designed and implemented to handle this, hopefully before we ever hit a -/// conflict here. -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct FeatureSet { - #[prost(enumeration = "feature_set::FieldPresence", optional, tag = "1")] - pub field_presence: ::core::option::Option, - #[prost(enumeration = "feature_set::EnumType", optional, tag = "2")] - pub enum_type: ::core::option::Option, - #[prost(enumeration = "feature_set::RepeatedFieldEncoding", optional, tag = "3")] - pub repeated_field_encoding: ::core::option::Option, - #[prost(enumeration = "feature_set::StringFieldValidation", optional, tag = "4")] - pub string_field_validation: ::core::option::Option, - #[prost(enumeration = "feature_set::MessageEncoding", optional, tag = "5")] - pub message_encoding: ::core::option::Option, - #[prost(enumeration = "feature_set::JsonFormat", optional, tag = "6")] - pub json_format: ::core::option::Option, - #[prost(message, optional, boxed, tag = "999")] - pub raw_features: ::core::option::Option<::prost::alloc::boxed::Box>, -} -/// Nested message and enum types in `FeatureSet`. -pub mod feature_set { - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum FieldPresence { - Unknown = 0, - Explicit = 1, - Implicit = 2, - LegacyRequired = 3, - } - impl FieldPresence { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - FieldPresence::Unknown => "FIELD_PRESENCE_UNKNOWN", - FieldPresence::Explicit => "EXPLICIT", - FieldPresence::Implicit => "IMPLICIT", - FieldPresence::LegacyRequired => "LEGACY_REQUIRED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "FIELD_PRESENCE_UNKNOWN" => Some(Self::Unknown), - "EXPLICIT" => Some(Self::Explicit), - "IMPLICIT" => Some(Self::Implicit), - "LEGACY_REQUIRED" => Some(Self::LegacyRequired), - _ => None, - } - } - } - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum EnumType { - Unknown = 0, - Open = 1, - Closed = 2, - } - impl EnumType { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - EnumType::Unknown => "ENUM_TYPE_UNKNOWN", - EnumType::Open => "OPEN", - EnumType::Closed => "CLOSED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "ENUM_TYPE_UNKNOWN" => Some(Self::Unknown), - "OPEN" => Some(Self::Open), - "CLOSED" => Some(Self::Closed), - _ => None, - } - } - } - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum RepeatedFieldEncoding { - Unknown = 0, - Packed = 1, - Expanded = 2, - } - impl RepeatedFieldEncoding { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - RepeatedFieldEncoding::Unknown => "REPEATED_FIELD_ENCODING_UNKNOWN", - RepeatedFieldEncoding::Packed => "PACKED", - RepeatedFieldEncoding::Expanded => "EXPANDED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "REPEATED_FIELD_ENCODING_UNKNOWN" => Some(Self::Unknown), - "PACKED" => Some(Self::Packed), - "EXPANDED" => Some(Self::Expanded), - _ => None, - } - } - } - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum StringFieldValidation { - Unknown = 0, - Mandatory = 1, - Hint = 2, - None = 3, - } - impl StringFieldValidation { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - StringFieldValidation::Unknown => "STRING_FIELD_VALIDATION_UNKNOWN", - StringFieldValidation::Mandatory => "MANDATORY", - StringFieldValidation::Hint => "HINT", - StringFieldValidation::None => "NONE", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "STRING_FIELD_VALIDATION_UNKNOWN" => Some(Self::Unknown), - "MANDATORY" => Some(Self::Mandatory), - "HINT" => Some(Self::Hint), - "NONE" => Some(Self::None), - _ => None, - } - } - } - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum MessageEncoding { - Unknown = 0, - LengthPrefixed = 1, - Delimited = 2, - } - impl MessageEncoding { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - MessageEncoding::Unknown => "MESSAGE_ENCODING_UNKNOWN", - MessageEncoding::LengthPrefixed => "LENGTH_PREFIXED", - MessageEncoding::Delimited => "DELIMITED", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "MESSAGE_ENCODING_UNKNOWN" => Some(Self::Unknown), - "LENGTH_PREFIXED" => Some(Self::LengthPrefixed), - "DELIMITED" => Some(Self::Delimited), - _ => None, - } - } - } - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum JsonFormat { - Unknown = 0, - Allow = 1, - LegacyBestEffort = 2, - } - impl JsonFormat { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - JsonFormat::Unknown => "JSON_FORMAT_UNKNOWN", - JsonFormat::Allow => "ALLOW", - JsonFormat::LegacyBestEffort => "LEGACY_BEST_EFFORT", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "JSON_FORMAT_UNKNOWN" => Some(Self::Unknown), - "ALLOW" => Some(Self::Allow), - "LEGACY_BEST_EFFORT" => Some(Self::LegacyBestEffort), - _ => None, - } - } - } -} -/// Encapsulates information about the original source file from which a -/// FileDescriptorProto was generated. +/// Encapsulates information about the original source file from which a +/// FileDescriptorProto was generated. #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct SourceCodeInfo { @@ -1688,191 +1271,12 @@ pub mod generated_code_info { #[prost(int32, optional, tag = "3")] pub begin: ::core::option::Option, /// Identifies the ending offset in bytes in the generated code that - /// relates to the identified object. The end offset should be one past + /// relates to the identified offset. The end offset should be one past /// the last relevant byte (so the length of the text = end - begin). #[prost(int32, optional, tag = "4")] pub end: ::core::option::Option, - #[prost(enumeration = "annotation::Semantic", optional, tag = "5")] - pub semantic: ::core::option::Option, - } - /// Nested message and enum types in `Annotation`. - pub mod annotation { - /// Represents the identified object's effect on the element in the original - /// .proto file. - #[derive( - Clone, - Copy, - Debug, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - ::prost::Enumeration - )] - #[repr(i32)] - pub enum Semantic { - /// There is no effect or the effect is indescribable. - None = 0, - /// The element is set or otherwise mutated. - Set = 1, - /// An alias to the element is returned. - Alias = 2, - } - impl Semantic { - /// String value of the enum field names used in the ProtoBuf definition. - /// - /// The values are not transformed in any way and thus are considered stable - /// (if the ProtoBuf definition does not change) and safe for programmatic use. - pub fn as_str_name(&self) -> &'static str { - match self { - Semantic::None => "NONE", - Semantic::Set => "SET", - Semantic::Alias => "ALIAS", - } - } - /// Creates an enum from field names used in the ProtoBuf definition. - pub fn from_str_name(value: &str) -> ::core::option::Option { - match value { - "NONE" => Some(Self::None), - "SET" => Some(Self::Set), - "ALIAS" => Some(Self::Alias), - _ => None, - } - } - } } } -/// `Any` contains an arbitrary serialized protocol buffer message along with a -/// URL that describes the type of the serialized message. -/// -/// Protobuf library provides support to pack/unpack Any values in the form -/// of utility functions or additional generated methods of the Any type. -/// -/// Example 1: Pack and unpack a message in C++. -/// -/// Foo foo = ...; -/// Any any; -/// any.PackFrom(foo); -/// ... -/// if (any.UnpackTo(&foo)) { -/// ... -/// } -/// -/// Example 2: Pack and unpack a message in Java. -/// -/// Foo foo = ...; -/// Any any = Any.pack(foo); -/// ... -/// if (any.is(Foo.class)) { -/// foo = any.unpack(Foo.class); -/// } -/// // or ... -/// if (any.isSameTypeAs(Foo.getDefaultInstance())) { -/// foo = any.unpack(Foo.getDefaultInstance()); -/// } -/// -/// Example 3: Pack and unpack a message in Python. -/// -/// foo = Foo(...) -/// any = Any() -/// any.Pack(foo) -/// ... -/// if any.Is(Foo.DESCRIPTOR): -/// any.Unpack(foo) -/// ... -/// -/// Example 4: Pack and unpack a message in Go -/// -/// foo := &pb.Foo{...} -/// any, err := anypb.New(foo) -/// if err != nil { -/// ... -/// } -/// ... -/// foo := &pb.Foo{} -/// if err := any.UnmarshalTo(foo); err != nil { -/// ... -/// } -/// -/// The pack methods provided by protobuf library will by default use -/// 'type.googleapis.com/full.type.name' as the type URL and the unpack -/// methods only use the fully qualified type name after the last '/' -/// in the type URL, for example "foo.bar.com/x/y.z" will yield type -/// name "y.z". -/// -/// JSON -/// ==== -/// The JSON representation of an `Any` value uses the regular -/// representation of the deserialized, embedded message, with an -/// additional field `@type` which contains the type URL. Example: -/// -/// package google.profile; -/// message Person { -/// string first_name = 1; -/// string last_name = 2; -/// } -/// -/// { -/// "@type": "type.googleapis.com/google.profile.Person", -/// "firstName": , -/// "lastName": -/// } -/// -/// If the embedded message type is well-known and has a custom JSON -/// representation, that representation will be embedded adding a field -/// `value` which holds the custom JSON in addition to the `@type` -/// field. Example (for message [google.protobuf.Duration][]): -/// -/// { -/// "@type": "type.googleapis.com/google.protobuf.Duration", -/// "value": "1.212s" -/// } -/// -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[derive(Eq)] -#[cfg_attr( - all(feature = "json-schema", feature = "serde"), - derive(::schemars::JsonSchema) -)] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Any { - /// A URL/resource name that uniquely identifies the type of the serialized - /// protocol buffer message. This string must contain at least - /// one "/" character. The last segment of the URL's path must represent - /// the fully qualified name of the type (as in - /// `path/google.protobuf.Duration`). The name should be in a canonical form - /// (e.g., leading "." is not accepted). - /// - /// In practice, teams usually precompile into the binary all types that they - /// expect it to use in the context of Any. However, for URLs which use the - /// scheme `http`, `https`, or no scheme, one can optionally set up a type - /// server that maps type URLs to message definitions as follows: - /// - /// * If no scheme is provided, `https` is assumed. - /// * An HTTP GET on the URL must yield a [google.protobuf.Type][] - /// value in binary format, or produce an error. - /// * Applications are allowed to cache lookup results based on the - /// URL, or have them precompiled into a binary to avoid any - /// lookup. Therefore, binary compatibility needs to be preserved - /// on changes to types. (Use versioned type names to manage - /// breaking changes.) - /// - /// Note: this functionality is not currently available in the official - /// protobuf release, and it is not used for type URLs beginning with - /// type.googleapis.com. As of May 2023, there are no widely used type server - /// implementations and no plans to implement one. - /// - /// Schemes other than `http`, `https` (or the empty scheme) might be - /// used with implementation specific semantics. - /// - #[prost(string, tag = "1")] - pub type_url: ::prost::alloc::string::String, - /// Must be a valid serialized protocol buffer of the above specified type. - #[prost(bytes = "vec", tag = "2")] - pub value: ::prost::alloc::vec::Vec, -} /// A Timestamp represents a point in time independent of any time zone or local /// calendar, encoded as a count of seconds and fractions of seconds at /// nanosecond resolution. The count is relative to an epoch at UTC midnight on @@ -1923,6 +1327,7 @@ pub struct Any { /// Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) /// .setNanos((int) ((millis % 1000) * 1000000)).build(); /// +/// /// Example 5: Compute Timestamp from Java `Instant.now()`. /// /// Instant now = Instant.now(); @@ -1931,6 +1336,7 @@ pub struct Any { /// Timestamp.newBuilder().setSeconds(now.getEpochSecond()) /// .setNanos(now.getNano()).build(); /// +/// /// Example 6: Compute Timestamp from current time in Python. /// /// timestamp = Timestamp() @@ -1960,9 +1366,10 @@ pub struct Any { /// [`strftime`]() with /// the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use /// the Joda Time's [`ISODateTimeFormat.dateTime()`]( -/// ) +/// /// ) to obtain a formatter capable of generating timestamps in this format. /// +/// #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -2038,6 +1445,7 @@ pub struct Timestamp { /// be expressed in JSON format as "3.000000001s", and 3 seconds and 1 /// microsecond should be expressed in JSON format as "3.000001s". /// +/// #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[derive(Eq)] #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/src/prost/ibc.applications.fee.v1.rs b/src/prost/ibc.applications.fee.v1.rs index 019791ae..0a0885f6 100644 --- a/src/prost/ibc.applications.fee.v1.rs +++ b/src/prost/ibc.applications.fee.v1.rs @@ -817,6 +817,11 @@ pub struct QueryIncentivizedPacketsResponse { /// list of identified fees for incentivized packets #[prost(message, repeated, tag = "1")] pub incentivized_packets: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, } /// QueryIncentivizedPacketRequest defines the request type for the IncentivizedPacket rpc #[allow(clippy::derive_partial_eq_without_eq)] @@ -864,6 +869,11 @@ pub struct QueryIncentivizedPacketsForChannelResponse { /// Map of all incentivized_packets #[prost(message, repeated, tag = "1")] pub incentivized_packets: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, } /// QueryTotalRecvFeesRequest defines the request type for the TotalRecvFees rpc #[allow(clippy::derive_partial_eq_without_eq)] @@ -983,6 +993,11 @@ pub struct QueryFeeEnabledChannelsResponse { /// list of fee enabled channels #[prost(message, repeated, tag = "1")] pub fee_enabled_channels: ::prost::alloc::vec::Vec, + /// pagination defines the pagination in the response. + #[prost(message, optional, tag = "2")] + pub pagination: ::core::option::Option< + super::super::super::super::cosmos::base::query::v1beta1::PageResponse, + >, } /// QueryFeeEnabledChannelRequest defines the request type for the FeeEnabledChannel rpc #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/src/prost/ibc.applications.interchain_accounts.controller.v1.rs b/src/prost/ibc.applications.interchain_accounts.controller.v1.rs index bf17588d..a351adda 100644 --- a/src/prost/ibc.applications.interchain_accounts.controller.v1.rs +++ b/src/prost/ibc.applications.interchain_accounts.controller.v1.rs @@ -1,3 +1,13 @@ +/// Params defines the set of on-chain interchain accounts parameters. +/// The following parameters may be used to disable the controller submodule. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Params { + /// controller_enabled enables or disables the controller submodule. + #[prost(bool, tag = "1")] + pub controller_enabled: bool, +} /// MsgRegisterInterchainAccount defines the payload for Msg/RegisterAccount #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -46,6 +56,25 @@ pub struct MsgSendTxResponse { #[prost(uint64, tag = "1")] pub sequence: u64, } +/// MsgUpdateParams defines the payload for Msg/UpdateParams +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the 27-interchain-accounts/controller parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -195,6 +224,37 @@ pub mod msg_client { ); self.inner.unary(req, path, codec).await } + /// UpdateParams defines a rpc handler for MsgUpdateParams. + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.applications.interchain_accounts.controller.v1.Msg/UpdateParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "ibc.applications.interchain_accounts.controller.v1.Msg", + "UpdateParams", + ), + ); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -221,6 +281,14 @@ pub mod msg_server { tonic::Response, tonic::Status, >; + /// UpdateParams defines a rpc handler for MsgUpdateParams. + async fn update_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } /// Msg defines the 27-interchain-accounts/controller Msg service. #[derive(Debug)] @@ -393,6 +461,50 @@ pub mod msg_server { }; Box::pin(fut) } + "/ibc.applications.interchain_accounts.controller.v1.Msg/UpdateParams" => { + #[allow(non_camel_case_types)] + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::update_params(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UpdateParamsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { Ok( @@ -434,16 +546,6 @@ pub mod msg_server { const NAME: &'static str = "ibc.applications.interchain_accounts.controller.v1.Msg"; } } -/// Params defines the set of on-chain interchain accounts parameters. -/// The following parameters may be used to disable the controller submodule. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// controller_enabled enables or disables the controller submodule. - #[prost(bool, tag = "1")] - pub controller_enabled: bool, -} /// QueryInterchainAccountRequest is the request type for the Query/InterchainAccount RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/src/prost/ibc.applications.interchain_accounts.host.v1.rs b/src/prost/ibc.applications.interchain_accounts.host.v1.rs index 3a16bdb6..00c7acb0 100644 --- a/src/prost/ibc.applications.interchain_accounts.host.v1.rs +++ b/src/prost/ibc.applications.interchain_accounts.host.v1.rs @@ -11,6 +11,327 @@ pub struct Params { #[prost(string, repeated, tag = "2")] pub allow_messages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } +/// MsgUpdateParams defines the payload for Msg/UpdateParams +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the 27-interchain-accounts/host parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +/// MsgUpdateParamsResponse defines the response for Msg/UpdateParams +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} +/// Generated client implementations. +#[cfg(feature = "client")] +pub mod msg_client { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + use tonic::codegen::http::Uri; + /// Msg defines the 27-interchain-accounts/host Msg service. + #[derive(Debug, Clone)] + pub struct MsgClient { + inner: tonic::client::Grpc, + } + impl MsgClient { + /// Attempt to create a new client by connecting to a given endpoint. + pub async fn connect(dst: D) -> Result + where + D: TryInto, + D::Error: Into, + { + let conn = tonic::transport::Endpoint::new(dst)?.connect().await?; + Ok(Self::new(conn)) + } + } + impl MsgClient + where + T: tonic::client::GrpcService, + T::Error: Into, + T::ResponseBody: Body + Send + 'static, + ::Error: Into + Send, + { + pub fn new(inner: T) -> Self { + let inner = tonic::client::Grpc::new(inner); + Self { inner } + } + pub fn with_origin(inner: T, origin: Uri) -> Self { + let inner = tonic::client::Grpc::with_origin(inner, origin); + Self { inner } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> MsgClient> + where + F: tonic::service::Interceptor, + T::ResponseBody: Default, + T: tonic::codegen::Service< + http::Request, + Response = http::Response< + >::ResponseBody, + >, + >, + , + >>::Error: Into + Send + Sync, + { + MsgClient::new(InterceptedService::new(inner, interceptor)) + } + /// Compress requests with the given encoding. + /// + /// This requires the server to support it otherwise it might respond with an + /// error. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.send_compressed(encoding); + self + } + /// Enable decompressing responses. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.inner = self.inner.accept_compressed(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_decoding_message_size(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.inner = self.inner.max_encoding_message_size(limit); + self + } + /// UpdateParams defines a rpc handler for MsgUpdateParams. + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.applications.interchain_accounts.host.v1.Msg/UpdateParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "ibc.applications.interchain_accounts.host.v1.Msg", + "UpdateParams", + ), + ); + self.inner.unary(req, path, codec).await + } + } +} +/// Generated server implementations. +#[cfg(feature = "server")] +pub mod msg_server { + #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)] + use tonic::codegen::*; + /// Generated trait containing gRPC methods that should be implemented for use with MsgServer. + #[async_trait] + pub trait Msg: Send + Sync + 'static { + /// UpdateParams defines a rpc handler for MsgUpdateParams. + async fn update_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + } + /// Msg defines the 27-interchain-accounts/host Msg service. + #[derive(Debug)] + pub struct MsgServer { + inner: _Inner, + accept_compression_encodings: EnabledCompressionEncodings, + send_compression_encodings: EnabledCompressionEncodings, + max_decoding_message_size: Option, + max_encoding_message_size: Option, + } + struct _Inner(Arc); + impl MsgServer { + pub fn new(inner: T) -> Self { + Self::from_arc(Arc::new(inner)) + } + pub fn from_arc(inner: Arc) -> Self { + let inner = _Inner(inner); + Self { + inner, + accept_compression_encodings: Default::default(), + send_compression_encodings: Default::default(), + max_decoding_message_size: None, + max_encoding_message_size: None, + } + } + pub fn with_interceptor( + inner: T, + interceptor: F, + ) -> InterceptedService + where + F: tonic::service::Interceptor, + { + InterceptedService::new(Self::new(inner), interceptor) + } + /// Enable decompressing requests with the given encoding. + #[must_use] + pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.accept_compression_encodings.enable(encoding); + self + } + /// Compress responses with the given encoding, if the client supports it. + #[must_use] + pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self { + self.send_compression_encodings.enable(encoding); + self + } + /// Limits the maximum size of a decoded message. + /// + /// Default: `4MB` + #[must_use] + pub fn max_decoding_message_size(mut self, limit: usize) -> Self { + self.max_decoding_message_size = Some(limit); + self + } + /// Limits the maximum size of an encoded message. + /// + /// Default: `usize::MAX` + #[must_use] + pub fn max_encoding_message_size(mut self, limit: usize) -> Self { + self.max_encoding_message_size = Some(limit); + self + } + } + impl tonic::codegen::Service> for MsgServer + where + T: Msg, + B: Body + Send + 'static, + B::Error: Into + Send + 'static, + { + type Response = http::Response; + type Error = std::convert::Infallible; + type Future = BoxFuture; + fn poll_ready( + &mut self, + _cx: &mut Context<'_>, + ) -> Poll> { + Poll::Ready(Ok(())) + } + fn call(&mut self, req: http::Request) -> Self::Future { + let inner = self.inner.clone(); + match req.uri().path() { + "/ibc.applications.interchain_accounts.host.v1.Msg/UpdateParams" => { + #[allow(non_camel_case_types)] + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::update_params(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UpdateParamsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + _ => { + Box::pin(async move { + Ok( + http::Response::builder() + .status(200) + .header("grpc-status", "12") + .header("content-type", "application/grpc") + .body(empty_body()) + .unwrap(), + ) + }) + } + } + } + } + impl Clone for MsgServer { + fn clone(&self) -> Self { + let inner = self.inner.clone(); + Self { + inner, + accept_compression_encodings: self.accept_compression_encodings, + send_compression_encodings: self.send_compression_encodings, + max_decoding_message_size: self.max_decoding_message_size, + max_encoding_message_size: self.max_encoding_message_size, + } + } + } + impl Clone for _Inner { + fn clone(&self) -> Self { + Self(Arc::clone(&self.0)) + } + } + impl std::fmt::Debug for _Inner { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "{:?}", self.0) + } + } + impl tonic::server::NamedService for MsgServer { + const NAME: &'static str = "ibc.applications.interchain_accounts.host.v1.Msg"; + } +} /// QueryParamsRequest is the request type for the Query/Params RPC method. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] diff --git a/src/prost/ibc.applications.transfer.v1.rs b/src/prost/ibc.applications.transfer.v1.rs index 42a9cbb7..ba523ebd 100644 --- a/src/prost/ibc.applications.transfer.v1.rs +++ b/src/prost/ibc.applications.transfer.v1.rs @@ -1,3 +1,34 @@ +/// DenomTrace contains the base denomination for ICS20 fungible tokens and the +/// source tracing information path. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct DenomTrace { + /// path defines the chain of port/channel identifiers used for tracing the + /// source of the fungible token. + #[prost(string, tag = "1")] + pub path: ::prost::alloc::string::String, + /// base denomination of the relayed fungible token. + #[prost(string, tag = "2")] + pub base_denom: ::prost::alloc::string::String, +} +/// Params defines the set of IBC transfer parameters. +/// NOTE: To prevent a single token from being transferred, set the +/// TransfersEnabled parameter to true and then set the bank module's SendEnabled +/// parameter for the denomination to false. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Params { + /// send_enabled enables or disables all cross-chain token transfers from this + /// chain. + #[prost(bool, tag = "1")] + pub send_enabled: bool, + /// receive_enabled enables or disables all cross-chain token transfers to this + /// chain. + #[prost(bool, tag = "2")] + pub receive_enabled: bool, +} /// MsgTransfer defines a msg to transfer fungible tokens (i.e Coins) between /// ICS20 enabled chains. See ICS Spec here: /// @@ -46,6 +77,26 @@ pub struct MsgTransferResponse { #[prost(uint64, tag = "1")] pub sequence: u64, } +/// MsgUpdateParams is the Msg/UpdateParams request type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the transfer parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +/// MsgUpdateParamsResponse defines the response structure for executing a +/// MsgUpdateParams message. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -159,6 +210,34 @@ pub mod msg_client { .insert(GrpcMethod::new("ibc.applications.transfer.v1.Msg", "Transfer")); self.inner.unary(req, path, codec).await } + /// UpdateParams defines a rpc handler for MsgUpdateParams. + pub async fn update_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.applications.transfer.v1.Msg/UpdateParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.applications.transfer.v1.Msg", "UpdateParams"), + ); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -177,6 +256,14 @@ pub mod msg_server { tonic::Response, tonic::Status, >; + /// UpdateParams defines a rpc handler for MsgUpdateParams. + async fn update_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } /// Msg defines the ibc/transfer Msg service. #[derive(Debug)] @@ -302,6 +389,50 @@ pub mod msg_server { }; Box::pin(fut) } + "/ibc.applications.transfer.v1.Msg/UpdateParams" => { + #[allow(non_camel_case_types)] + struct UpdateParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateParamsSvc { + type Response = super::MsgUpdateParamsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::update_params(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UpdateParamsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { Ok( @@ -343,37 +474,6 @@ pub mod msg_server { const NAME: &'static str = "ibc.applications.transfer.v1.Msg"; } } -/// DenomTrace contains the base denomination for ICS20 fungible tokens and the -/// source tracing information path. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct DenomTrace { - /// path defines the chain of port/channel identifiers used for tracing the - /// source of the fungible token. - #[prost(string, tag = "1")] - pub path: ::prost::alloc::string::String, - /// base denomination of the relayed fungible token. - #[prost(string, tag = "2")] - pub base_denom: ::prost::alloc::string::String, -} -/// Params defines the set of IBC transfer parameters. -/// NOTE: To prevent a single token from being transferred, set the -/// TransfersEnabled parameter to true and then set the bank module's SendEnabled -/// parameter for the denomination to false. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// send_enabled enables or disables all cross-chain token transfers from this - /// chain. - #[prost(bool, tag = "1")] - pub send_enabled: bool, - /// receive_enabled enables or disables all cross-chain token transfers to this - /// chain. - #[prost(bool, tag = "2")] - pub receive_enabled: bool, -} /// QueryDenomTraceRequest is the request type for the Query/DenomTrace RPC /// method #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] @@ -581,12 +681,12 @@ pub mod query_client { self.inner = self.inner.max_encoding_message_size(limit); self } - /// DenomTrace queries a denomination trace information. - pub async fn denom_trace( + /// DenomTraces queries all denomination traces. + pub async fn denom_traces( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -600,21 +700,21 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Query/DenomTrace", + "/ibc.applications.transfer.v1.Query/DenomTraces", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomTrace"), + GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomTraces"), ); self.inner.unary(req, path, codec).await } - /// DenomTraces queries all denomination traces. - pub async fn denom_traces( + /// DenomTrace queries a denomination trace information. + pub async fn denom_trace( &mut self, - request: impl tonic::IntoRequest, + request: impl tonic::IntoRequest, ) -> std::result::Result< - tonic::Response, + tonic::Response, tonic::Status, > { self.inner @@ -628,12 +728,12 @@ pub mod query_client { })?; let codec = tonic::codec::ProstCodec::default(); let path = http::uri::PathAndQuery::from_static( - "/ibc.applications.transfer.v1.Query/DenomTraces", + "/ibc.applications.transfer.v1.Query/DenomTrace", ); let mut req = request.into_request(); req.extensions_mut() .insert( - GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomTraces"), + GrpcMethod::new("ibc.applications.transfer.v1.Query", "DenomTrace"), ); self.inner.unary(req, path, codec).await } @@ -763,14 +863,6 @@ pub mod query_server { /// Generated trait containing gRPC methods that should be implemented for use with QueryServer. #[async_trait] pub trait Query: Send + Sync + 'static { - /// DenomTrace queries a denomination trace information. - async fn denom_trace( - &self, - request: tonic::Request, - ) -> std::result::Result< - tonic::Response, - tonic::Status, - >; /// DenomTraces queries all denomination traces. async fn denom_traces( &self, @@ -779,6 +871,14 @@ pub mod query_server { tonic::Response, tonic::Status, >; + /// DenomTrace queries a denomination trace information. + async fn denom_trace( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; /// Params queries all parameters of the ibc-transfer module. async fn params( &self, @@ -892,25 +992,25 @@ pub mod query_server { fn call(&mut self, req: http::Request) -> Self::Future { let inner = self.inner.clone(); match req.uri().path() { - "/ibc.applications.transfer.v1.Query/DenomTrace" => { + "/ibc.applications.transfer.v1.Query/DenomTraces" => { #[allow(non_camel_case_types)] - struct DenomTraceSvc(pub Arc); + struct DenomTracesSvc(pub Arc); impl< T: Query, - > tonic::server::UnaryService - for DenomTraceSvc { - type Response = super::QueryDenomTraceResponse; + > tonic::server::UnaryService + for DenomTracesSvc { + type Response = super::QueryDenomTracesResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::denom_trace(&inner, request).await + ::denom_traces(&inner, request).await }; Box::pin(fut) } @@ -922,7 +1022,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DenomTraceSvc(inner); + let method = DenomTracesSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( @@ -938,25 +1038,25 @@ pub mod query_server { }; Box::pin(fut) } - "/ibc.applications.transfer.v1.Query/DenomTraces" => { + "/ibc.applications.transfer.v1.Query/DenomTrace" => { #[allow(non_camel_case_types)] - struct DenomTracesSvc(pub Arc); + struct DenomTraceSvc(pub Arc); impl< T: Query, - > tonic::server::UnaryService - for DenomTracesSvc { - type Response = super::QueryDenomTracesResponse; + > tonic::server::UnaryService + for DenomTraceSvc { + type Response = super::QueryDenomTraceResponse; type Future = BoxFuture< tonic::Response, tonic::Status, >; fn call( &mut self, - request: tonic::Request, + request: tonic::Request, ) -> Self::Future { let inner = Arc::clone(&self.0); let fut = async move { - ::denom_traces(&inner, request).await + ::denom_trace(&inner, request).await }; Box::pin(fut) } @@ -968,7 +1068,7 @@ pub mod query_server { let inner = self.inner.clone(); let fut = async move { let inner = inner.0; - let method = DenomTracesSvc(inner); + let method = DenomTraceSvc(inner); let codec = tonic::codec::ProstCodec::default(); let mut grpc = tonic::server::Grpc::new(codec) .apply_compression_config( diff --git a/src/prost/ibc.core.channel.v1.rs b/src/prost/ibc.core.channel.v1.rs index d741e62c..2dd7954d 100644 --- a/src/prost/ibc.core.channel.v1.rs +++ b/src/prost/ibc.core.channel.v1.rs @@ -169,6 +169,20 @@ pub mod acknowledgement { Error(::prost::alloc::string::String), } } +/// Timeout defines an execution deadline structure for 04-channel handlers. +/// This includes packet lifecycle handlers as well as the upgrade handshake handlers. +/// A valid Timeout contains either one or both of a timestamp and block height (sequence). +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Timeout { + /// block height after which the packet or upgrade times out + #[prost(message, optional, tag = "1")] + pub height: ::core::option::Option, + /// block timestamp (in nanoseconds) after which the packet or upgrade times out + #[prost(uint64, tag = "2")] + pub timestamp: u64, +} /// State defines if a channel is in one of the following states: /// CLOSED, INIT, TRYOPEN, OPEN or UNINITIALIZED. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] @@ -1992,6 +2006,35 @@ pub struct QueryNextSequenceReceiveResponse { #[prost(message, optional, tag = "3")] pub proof_height: ::core::option::Option, } +/// QueryNextSequenceSendRequest is the request type for the +/// Query/QueryNextSequenceSend RPC method +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryNextSequenceSendRequest { + /// port unique identifier + #[prost(string, tag = "1")] + pub port_id: ::prost::alloc::string::String, + /// channel unique identifier + #[prost(string, tag = "2")] + pub channel_id: ::prost::alloc::string::String, +} +/// QueryNextSequenceSendResponse is the request type for the +/// Query/QueryNextSequenceSend RPC method +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct QueryNextSequenceSendResponse { + /// next sequence send number + #[prost(uint64, tag = "1")] + pub next_sequence_send: u64, + /// merkle proof of existence + #[prost(bytes = "vec", tag = "2")] + pub proof: ::prost::alloc::vec::Vec, + /// height at which the proof was retrieved + #[prost(message, optional, tag = "3")] + pub proof_height: ::core::option::Option, +} /// Generated client implementations. #[cfg(feature = "client")] pub mod query_client { @@ -2446,6 +2489,34 @@ pub mod query_client { ); self.inner.unary(req, path, codec).await } + /// NextSequenceSend returns the next send sequence for a given channel. + pub async fn next_sequence_send( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.channel.v1.Query/NextSequenceSend", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new("ibc.core.channel.v1.Query", "NextSequenceSend"), + ); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -2568,6 +2639,14 @@ pub mod query_server { tonic::Response, tonic::Status, >; + /// NextSequenceSend returns the next send sequence for a given channel. + async fn next_sequence_send( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } /// Query provides defines the gRPC querier service #[derive(Debug)] @@ -3262,6 +3341,52 @@ pub mod query_server { }; Box::pin(fut) } + "/ibc.core.channel.v1.Query/NextSequenceSend" => { + #[allow(non_camel_case_types)] + struct NextSequenceSendSvc(pub Arc); + impl< + T: Query, + > tonic::server::UnaryService + for NextSequenceSendSvc { + type Response = super::QueryNextSequenceSendResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::next_sequence_send(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = NextSequenceSendSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { Ok( diff --git a/src/prost/ibc.core.client.v1.rs b/src/prost/ibc.core.client.v1.rs index 6dff7eb4..05dd3b4b 100644 --- a/src/prost/ibc.core.client.v1.rs +++ b/src/prost/ibc.core.client.v1.rs @@ -41,10 +41,51 @@ pub struct ClientConsensusStates { #[prost(message, repeated, tag = "2")] pub consensus_states: ::prost::alloc::vec::Vec, } -/// ClientUpdateProposal is a governance proposal. If it passes, the substitute +/// Height is a monotonically increasing data type +/// that can be compared against another Height for the purposes of updating and +/// freezing clients +/// +/// Normally the RevisionHeight is incremented at each height while keeping +/// RevisionNumber the same. However some consensus algorithms may choose to +/// reset the height in certain conditions e.g. hard forks, state-machine +/// breaking changes In these cases, the RevisionNumber is incremented so that +/// height continues to be monitonically increasing even as the RevisionHeight +/// gets reset +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[derive(Eq, PartialOrd, Ord)] +#[cfg_attr( + all(feature = "json-schema", feature = "serde"), + derive(::schemars::JsonSchema) +)] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Height { + /// the revision that the client is currently on + #[prost(uint64, tag = "1")] + #[cfg_attr(feature = "serde", serde(default))] + pub revision_number: u64, + /// the height within the given revision + #[prost(uint64, tag = "2")] + #[cfg_attr(feature = "serde", serde(default))] + pub revision_height: u64, +} +/// Params defines the set of IBC light client parameters. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Params { + /// allowed_clients defines the list of allowed client state types which can be created + /// and interacted with. If a client type is removed from the allowed clients list, usage + /// of this client will be disabled until it is added again to the list. + #[prost(string, repeated, tag = "1")] + pub allowed_clients: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +/// ClientUpdateProposal is a legacy governance proposal. If it passes, the substitute /// client's latest consensus state is copied over to the subject client. The proposal /// handler may fail if the subject and the substitute do not match in client and /// chain parameters (with exception to latest height, frozen height, and chain-id). +/// +/// Deprecated: Please use MsgRecoverClient in favour of this message type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -65,6 +106,8 @@ pub struct ClientUpdateProposal { } /// UpgradeProposal is a gov Content type for initiating an IBC breaking /// upgrade. +/// +/// Deprecated: Please use MsgIBCSoftwareUpgrade in favour of this message type. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -88,45 +131,6 @@ pub struct UpgradeProposal { super::super::super::super::google::protobuf::Any, >, } -/// Height is a monotonically increasing data type -/// that can be compared against another Height for the purposes of updating and -/// freezing clients -/// -/// Normally the RevisionHeight is incremented at each height while keeping -/// RevisionNumber the same. However some consensus algorithms may choose to -/// reset the height in certain conditions e.g. hard forks, state-machine -/// breaking changes In these cases, the RevisionNumber is incremented so that -/// height continues to be monitonically increasing even as the RevisionHeight -/// gets reset -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[derive(Eq, PartialOrd, Ord)] -#[cfg_attr( - all(feature = "json-schema", feature = "serde"), - derive(::schemars::JsonSchema) -)] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Height { - /// the revision that the client is currently on - #[prost(uint64, tag = "1")] - #[cfg_attr(feature = "serde", serde(default))] - pub revision_number: u64, - /// the height within the given revision - #[prost(uint64, tag = "2")] - #[cfg_attr(feature = "serde", serde(default))] - pub revision_height: u64, -} -/// Params defines the set of IBC light client parameters. -#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] -#[allow(clippy::derive_partial_eq_without_eq)] -#[derive(Clone, PartialEq, ::prost::Message)] -pub struct Params { - /// allowed_clients defines the list of allowed client state types which can be created - /// and interacted with. If a client type is removed from the allowed clients list, usage - /// of this client will be disabled until it is added again to the list. - #[prost(string, repeated, tag = "1")] - pub allowed_clients: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, -} /// GenesisState defines the ibc client submodule's genesis state. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] @@ -143,7 +147,9 @@ pub struct GenesisState { pub clients_metadata: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "4")] pub params: ::core::option::Option, - /// create localhost on initialization + /// Deprecated: create_localhost has been deprecated. + /// The localhost client is automatically created at genesis. + #[deprecated] #[prost(bool, tag = "5")] pub create_localhost: bool, /// the sequence for the next generated client identifier @@ -259,23 +265,20 @@ pub struct MsgUpgradeClient { pub struct MsgUpgradeClientResponse {} /// MsgSubmitMisbehaviour defines an sdk.Msg type that submits Evidence for /// light client misbehaviour. -/// Warning: DEPRECATED +/// This message has been deprecated. Use MsgUpdateClient instead. #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitMisbehaviour { /// client unique identifier - #[deprecated] #[prost(string, tag = "1")] pub client_id: ::prost::alloc::string::String, /// misbehaviour used for freezing the light client - #[deprecated] #[prost(message, optional, tag = "2")] pub misbehaviour: ::core::option::Option< super::super::super::super::google::protobuf::Any, >, /// signer address - #[deprecated] #[prost(string, tag = "3")] pub signer: ::prost::alloc::string::String, } @@ -285,6 +288,76 @@ pub struct MsgSubmitMisbehaviour { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgSubmitMisbehaviourResponse {} +/// MsgRecoverClient defines the message used to recover a frozen or expired client. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRecoverClient { + /// the client identifier for the client to be updated if the proposal passes + #[prost(string, tag = "1")] + pub subject_client_id: ::prost::alloc::string::String, + /// the substitute client identifier for the client which will replace the subject + /// client + #[prost(string, tag = "2")] + pub substitute_client_id: ::prost::alloc::string::String, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, +} +/// MsgRecoverClientResponse defines the Msg/RecoverClient response type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgRecoverClientResponse {} +/// MsgIBCSoftwareUpgrade defines the message used to schedule an upgrade of an IBC client using a v1 governance proposal +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgIbcSoftwareUpgrade { + #[prost(message, optional, tag = "1")] + pub plan: ::core::option::Option< + super::super::super::super::cosmos::upgrade::v1beta1::Plan, + >, + /// An UpgradedClientState must be provided to perform an IBC breaking upgrade. + /// This will make the chain commit to the correct upgraded (self) client state + /// before the upgrade occurs, so that connecting chains can verify that the + /// new upgraded client is valid by verifying a proof on the previous version + /// of the chain. This will allow IBC connections to persist smoothly across + /// planned chain upgrades. Correspondingly, the UpgradedClientState field has been + /// deprecated in the Cosmos SDK to allow for this logic to exist solely in + /// the 02-client module. + #[prost(message, optional, tag = "2")] + pub upgraded_client_state: ::core::option::Option< + super::super::super::super::google::protobuf::Any, + >, + /// signer address + #[prost(string, tag = "3")] + pub signer: ::prost::alloc::string::String, +} +/// MsgIBCSoftwareUpgradeResponse defines the Msg/IBCSoftwareUpgrade response type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgIbcSoftwareUpgradeResponse {} +/// MsgUpdateParams defines the sdk.Msg type to update the client parameters. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the client parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -476,6 +549,84 @@ pub mod msg_client { .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "SubmitMisbehaviour")); self.inner.unary(req, path, codec).await } + /// RecoverClient defines a rpc handler method for MsgRecoverClient. + pub async fn recover_client( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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/RecoverClient", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "RecoverClient")); + self.inner.unary(req, path, codec).await + } + /// IBCSoftwareUpgrade defines a rpc handler method for MsgIBCSoftwareUpgrade. + pub async fn ibc_software_upgrade( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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/IBCSoftwareUpgrade", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "IBCSoftwareUpgrade")); + self.inner.unary(req, path, codec).await + } + /// UpdateClientParams defines a rpc handler method for MsgUpdateParams. + pub async fn update_client_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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/UpdateClientParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert(GrpcMethod::new("ibc.core.client.v1.Msg", "UpdateClientParams")); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -518,6 +669,30 @@ pub mod msg_server { tonic::Response, tonic::Status, >; + /// RecoverClient defines a rpc handler method for MsgRecoverClient. + async fn recover_client( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// IBCSoftwareUpgrade defines a rpc handler method for MsgIBCSoftwareUpgrade. + async fn ibc_software_upgrade( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; + /// UpdateClientParams defines a rpc handler method for MsgUpdateParams. + async fn update_client_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } /// Msg defines the ibc/client Msg service. #[derive(Debug)] @@ -777,6 +952,140 @@ pub mod msg_server { }; Box::pin(fut) } + "/ibc.core.client.v1.Msg/RecoverClient" => { + #[allow(non_camel_case_types)] + struct RecoverClientSvc(pub Arc); + impl tonic::server::UnaryService + for RecoverClientSvc { + type Response = super::MsgRecoverClientResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::recover_client(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = RecoverClientSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.core.client.v1.Msg/IBCSoftwareUpgrade" => { + #[allow(non_camel_case_types)] + struct IBCSoftwareUpgradeSvc(pub Arc); + impl< + T: Msg, + > tonic::server::UnaryService + for IBCSoftwareUpgradeSvc { + type Response = super::MsgIbcSoftwareUpgradeResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::ibc_software_upgrade(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = IBCSoftwareUpgradeSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } + "/ibc.core.client.v1.Msg/UpdateClientParams" => { + #[allow(non_camel_case_types)] + struct UpdateClientParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateClientParamsSvc { + type Response = super::MsgUpdateParamsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::update_client_params(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UpdateClientParamsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { Ok( diff --git a/src/prost/ibc.core.connection.v1.rs b/src/prost/ibc.core.connection.v1.rs index a9b00b4b..12cc3618 100644 --- a/src/prost/ibc.core.connection.v1.rs +++ b/src/prost/ibc.core.connection.v1.rs @@ -313,6 +313,25 @@ pub struct MsgConnectionOpenConfirm { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct MsgConnectionOpenConfirmResponse {} +/// MsgUpdateParams defines the sdk.Msg type to update the connection parameters. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParams { + /// signer address + #[prost(string, tag = "1")] + pub signer: ::prost::alloc::string::String, + /// params defines the connection parameters to update. + /// + /// NOTE: All parameters must be supplied. + #[prost(message, optional, tag = "2")] + pub params: ::core::option::Option, +} +/// MsgUpdateParamsResponse defines the MsgUpdateParams response type. +#[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))] +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct MsgUpdateParamsResponse {} /// Generated client implementations. #[cfg(feature = "client")] pub mod msg_client { @@ -516,6 +535,38 @@ pub mod msg_client { ); self.inner.unary(req, path, codec).await } + /// UpdateConnectionParams defines a rpc handler method for + /// MsgUpdateParams. + pub async fn update_connection_params( + &mut self, + request: impl tonic::IntoRequest, + ) -> std::result::Result< + tonic::Response, + 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.connection.v1.Msg/UpdateConnectionParams", + ); + let mut req = request.into_request(); + req.extensions_mut() + .insert( + GrpcMethod::new( + "ibc.core.connection.v1.Msg", + "UpdateConnectionParams", + ), + ); + self.inner.unary(req, path, codec).await + } } } /// Generated server implementations. @@ -559,6 +610,15 @@ pub mod msg_server { tonic::Response, tonic::Status, >; + /// UpdateConnectionParams defines a rpc handler method for + /// MsgUpdateParams. + async fn update_connection_params( + &self, + request: tonic::Request, + ) -> std::result::Result< + tonic::Response, + tonic::Status, + >; } /// Msg defines the ibc/connection Msg service. #[derive(Debug)] @@ -820,6 +880,50 @@ pub mod msg_server { }; Box::pin(fut) } + "/ibc.core.connection.v1.Msg/UpdateConnectionParams" => { + #[allow(non_camel_case_types)] + struct UpdateConnectionParamsSvc(pub Arc); + impl tonic::server::UnaryService + for UpdateConnectionParamsSvc { + type Response = super::MsgUpdateParamsResponse; + type Future = BoxFuture< + tonic::Response, + tonic::Status, + >; + fn call( + &mut self, + request: tonic::Request, + ) -> Self::Future { + let inner = Arc::clone(&self.0); + let fut = async move { + ::update_connection_params(&inner, request).await + }; + Box::pin(fut) + } + } + let accept_compression_encodings = self.accept_compression_encodings; + let send_compression_encodings = self.send_compression_encodings; + let max_decoding_message_size = self.max_decoding_message_size; + let max_encoding_message_size = self.max_encoding_message_size; + let inner = self.inner.clone(); + let fut = async move { + let inner = inner.0; + let method = UpdateConnectionParamsSvc(inner); + let codec = tonic::codec::ProstCodec::default(); + let mut grpc = tonic::server::Grpc::new(codec) + .apply_compression_config( + accept_compression_encodings, + send_compression_encodings, + ) + .apply_max_message_size_config( + max_decoding_message_size, + max_encoding_message_size, + ); + let res = grpc.unary(method, req).await; + Ok(res) + }; + Box::pin(fut) + } _ => { Box::pin(async move { Ok( diff --git a/src/prost/proto_descriptor.bin b/src/prost/proto_descriptor.bin index d8d01bf0..bb1bdf04 100644 Binary files a/src/prost/proto_descriptor.bin and b/src/prost/proto_descriptor.bin differ