use provwasm_proc_macro::{CosmwasmExt, SerdeEnumAsInt};
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.ConsensusParams")]
pub struct ConsensusParams {
#[prost(message, optional, tag = "1")]
pub block: ::core::option::Option<BlockParams>,
#[prost(message, optional, tag = "2")]
pub evidence: ::core::option::Option<EvidenceParams>,
#[prost(message, optional, tag = "3")]
pub validator: ::core::option::Option<ValidatorParams>,
#[prost(message, optional, tag = "4")]
pub version: ::core::option::Option<VersionParams>,
#[prost(message, optional, tag = "5")]
pub abci: ::core::option::Option<AbciParams>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.BlockParams")]
pub struct BlockParams {
#[prost(int64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub max_bytes: i64,
#[prost(int64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub max_gas: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.EvidenceParams")]
pub struct EvidenceParams {
#[prost(int64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub max_age_num_blocks: i64,
#[prost(message, optional, tag = "2")]
pub max_age_duration: ::core::option::Option<crate::shim::Duration>,
#[prost(int64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub max_bytes: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.ValidatorParams")]
pub struct ValidatorParams {
#[prost(string, repeated, tag = "1")]
pub pub_key_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.VersionParams")]
pub struct VersionParams {
#[prost(uint64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub app: u64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.HashedParams")]
pub struct HashedParams {
#[prost(int64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub block_max_bytes: i64,
#[prost(int64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub block_max_gas: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.ABCIParams")]
pub struct AbciParams {
#[prost(int64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub vote_extensions_enable_height: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.ValidatorSet")]
pub struct ValidatorSet {
#[prost(message, repeated, tag = "1")]
pub validators: ::prost::alloc::vec::Vec<Validator>,
#[prost(message, optional, tag = "2")]
pub proposer: ::core::option::Option<Validator>,
#[prost(int64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub total_voting_power: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.Validator")]
pub struct Validator {
#[prost(bytes = "vec", tag = "1")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub address: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub pub_key: ::core::option::Option<super::crypto::PublicKey>,
#[prost(int64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub voting_power: i64,
#[prost(int64, tag = "4")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub proposer_priority: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.SimpleValidator")]
pub struct SimpleValidator {
#[prost(message, optional, tag = "1")]
pub pub_key: ::core::option::Option<super::crypto::PublicKey>,
#[prost(int64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub voting_power: i64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, SerdeEnumAsInt)]
pub enum BlockIdFlag {
Unknown = 0,
Absent = 1,
Commit = 2,
Nil = 3,
}
impl BlockIdFlag {
pub fn as_str_name(&self) -> &'static str {
match self {
BlockIdFlag::Unknown => "BLOCK_ID_FLAG_UNKNOWN",
BlockIdFlag::Absent => "BLOCK_ID_FLAG_ABSENT",
BlockIdFlag::Commit => "BLOCK_ID_FLAG_COMMIT",
BlockIdFlag::Nil => "BLOCK_ID_FLAG_NIL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"BLOCK_ID_FLAG_UNKNOWN" => Some(Self::Unknown),
"BLOCK_ID_FLAG_ABSENT" => Some(Self::Absent),
"BLOCK_ID_FLAG_COMMIT" => Some(Self::Commit),
"BLOCK_ID_FLAG_NIL" => Some(Self::Nil),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.PartSetHeader")]
pub struct PartSetHeader {
#[prost(uint32, tag = "1")]
pub total: u32,
#[prost(bytes = "vec", tag = "2")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub hash: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.Part")]
pub struct Part {
#[prost(uint32, tag = "1")]
pub index: u32,
#[prost(bytes = "vec", tag = "2")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub bytes: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub proof: ::core::option::Option<super::crypto::Proof>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.BlockID")]
pub struct BlockId {
#[prost(bytes = "vec", tag = "1")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub hash: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub part_set_header: ::core::option::Option<PartSetHeader>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.Header")]
pub struct Header {
#[prost(message, optional, tag = "1")]
pub version: ::core::option::Option<super::version::Consensus>,
#[prost(string, tag = "2")]
pub chain_id: ::prost::alloc::string::String,
#[prost(int64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: i64,
#[prost(message, optional, tag = "4")]
pub time: ::core::option::Option<crate::shim::Timestamp>,
#[prost(message, optional, tag = "5")]
pub last_block_id: ::core::option::Option<BlockId>,
#[prost(bytes = "vec", tag = "6")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub last_commit_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "7")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub data_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "8")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub validators_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "9")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub next_validators_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "10")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub consensus_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "11")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub app_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "12")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub last_results_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "13")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub evidence_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "14")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub proposer_address: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.Data")]
pub struct Data {
#[prost(bytes = "vec", repeated, tag = "1")]
pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.Vote")]
pub struct Vote {
#[prost(enumeration = "SignedMsgType", tag = "1")]
#[serde(
serialize_with = "SignedMsgType::serialize",
deserialize_with = "SignedMsgType::deserialize"
)]
pub r#type: i32,
#[prost(int64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: i64,
#[prost(int32, tag = "3")]
pub round: i32,
#[prost(message, optional, tag = "4")]
pub block_id: ::core::option::Option<BlockId>,
#[prost(message, optional, tag = "5")]
pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
#[prost(bytes = "vec", tag = "6")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub validator_address: ::prost::alloc::vec::Vec<u8>,
#[prost(int32, tag = "7")]
pub validator_index: i32,
#[prost(bytes = "vec", tag = "8")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub signature: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "9")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub extension: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "10")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub extension_signature: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.Commit")]
pub struct Commit {
#[prost(int64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: i64,
#[prost(int32, tag = "2")]
pub round: i32,
#[prost(message, optional, tag = "3")]
pub block_id: ::core::option::Option<BlockId>,
#[prost(message, repeated, tag = "4")]
pub signatures: ::prost::alloc::vec::Vec<CommitSig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.CommitSig")]
pub struct CommitSig {
#[prost(enumeration = "BlockIdFlag", tag = "1")]
#[serde(
serialize_with = "BlockIdFlag::serialize",
deserialize_with = "BlockIdFlag::deserialize"
)]
pub block_id_flag: i32,
#[prost(bytes = "vec", tag = "2")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub validator_address: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
#[prost(bytes = "vec", tag = "4")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.ExtendedCommit")]
pub struct ExtendedCommit {
#[prost(int64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: i64,
#[prost(int32, tag = "2")]
pub round: i32,
#[prost(message, optional, tag = "3")]
pub block_id: ::core::option::Option<BlockId>,
#[prost(message, repeated, tag = "4")]
pub extended_signatures: ::prost::alloc::vec::Vec<ExtendedCommitSig>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.ExtendedCommitSig")]
pub struct ExtendedCommitSig {
#[prost(enumeration = "BlockIdFlag", tag = "1")]
#[serde(
serialize_with = "BlockIdFlag::serialize",
deserialize_with = "BlockIdFlag::deserialize"
)]
pub block_id_flag: i32,
#[prost(bytes = "vec", tag = "2")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub validator_address: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
#[prost(bytes = "vec", tag = "4")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub signature: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "5")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub extension: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "6")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub extension_signature: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.Proposal")]
pub struct Proposal {
#[prost(enumeration = "SignedMsgType", tag = "1")]
#[serde(
serialize_with = "SignedMsgType::serialize",
deserialize_with = "SignedMsgType::deserialize"
)]
pub r#type: i32,
#[prost(int64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: i64,
#[prost(int32, tag = "3")]
pub round: i32,
#[prost(int32, tag = "4")]
pub pol_round: i32,
#[prost(message, optional, tag = "5")]
pub block_id: ::core::option::Option<BlockId>,
#[prost(message, optional, tag = "6")]
pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
#[prost(bytes = "vec", tag = "7")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub signature: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.SignedHeader")]
pub struct SignedHeader {
#[prost(message, optional, tag = "1")]
pub header: ::core::option::Option<Header>,
#[prost(message, optional, tag = "2")]
pub commit: ::core::option::Option<Commit>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.LightBlock")]
pub struct LightBlock {
#[prost(message, optional, tag = "1")]
pub signed_header: ::core::option::Option<SignedHeader>,
#[prost(message, optional, tag = "2")]
pub validator_set: ::core::option::Option<ValidatorSet>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.BlockMeta")]
pub struct BlockMeta {
#[prost(message, optional, tag = "1")]
pub block_id: ::core::option::Option<BlockId>,
#[prost(int64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub block_size: i64,
#[prost(message, optional, tag = "3")]
pub header: ::core::option::Option<Header>,
#[prost(int64, tag = "4")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub num_txs: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.TxProof")]
pub struct TxProof {
#[prost(bytes = "vec", tag = "1")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub root_hash: ::prost::alloc::vec::Vec<u8>,
#[prost(bytes = "vec", tag = "2")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub data: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "3")]
pub proof: ::core::option::Option<super::crypto::Proof>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
#[derive(::serde::Serialize, ::serde::Deserialize, ::schemars::JsonSchema, SerdeEnumAsInt)]
pub enum SignedMsgType {
Unknown = 0,
Prevote = 1,
Precommit = 2,
Proposal = 32,
}
impl SignedMsgType {
pub fn as_str_name(&self) -> &'static str {
match self {
SignedMsgType::Unknown => "SIGNED_MSG_TYPE_UNKNOWN",
SignedMsgType::Prevote => "SIGNED_MSG_TYPE_PREVOTE",
SignedMsgType::Precommit => "SIGNED_MSG_TYPE_PRECOMMIT",
SignedMsgType::Proposal => "SIGNED_MSG_TYPE_PROPOSAL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SIGNED_MSG_TYPE_UNKNOWN" => Some(Self::Unknown),
"SIGNED_MSG_TYPE_PREVOTE" => Some(Self::Prevote),
"SIGNED_MSG_TYPE_PRECOMMIT" => Some(Self::Precommit),
"SIGNED_MSG_TYPE_PROPOSAL" => Some(Self::Proposal),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.Evidence")]
pub struct Evidence {
#[prost(oneof = "evidence::Sum", tags = "1, 2")]
pub sum: ::core::option::Option<evidence::Sum>,
}
pub mod evidence {
use provwasm_proc_macro::{CosmwasmExt, SerdeEnumAsInt};
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Oneof,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
)]
pub enum Sum {
#[prost(message, tag = "1")]
DuplicateVoteEvidence(super::DuplicateVoteEvidence),
#[prost(message, tag = "2")]
LightClientAttackEvidence(super::LightClientAttackEvidence),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.DuplicateVoteEvidence")]
pub struct DuplicateVoteEvidence {
#[prost(message, optional, tag = "1")]
pub vote_a: ::core::option::Option<Vote>,
#[prost(message, optional, tag = "2")]
pub vote_b: ::core::option::Option<Vote>,
#[prost(int64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub total_voting_power: i64,
#[prost(int64, tag = "4")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub validator_power: i64,
#[prost(message, optional, tag = "5")]
pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.LightClientAttackEvidence")]
pub struct LightClientAttackEvidence {
#[prost(message, optional, tag = "1")]
pub conflicting_block: ::core::option::Option<LightBlock>,
#[prost(int64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub common_height: i64,
#[prost(message, repeated, tag = "3")]
pub byzantine_validators: ::prost::alloc::vec::Vec<Validator>,
#[prost(int64, tag = "4")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub total_voting_power: i64,
#[prost(message, optional, tag = "5")]
pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.EvidenceList")]
pub struct EvidenceList {
#[prost(message, repeated, tag = "1")]
pub evidence: ::prost::alloc::vec::Vec<Evidence>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.Block")]
pub struct Block {
#[prost(message, optional, tag = "1")]
pub header: ::core::option::Option<Header>,
#[prost(message, optional, tag = "2")]
pub data: ::core::option::Option<Data>,
#[prost(message, optional, tag = "3")]
pub evidence: ::core::option::Option<EvidenceList>,
#[prost(message, optional, tag = "4")]
pub last_commit: ::core::option::Option<Commit>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.EventDataRoundState")]
pub struct EventDataRoundState {
#[prost(int64, tag = "1")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: i64,
#[prost(int32, tag = "2")]
pub round: i32,
#[prost(string, tag = "3")]
pub step: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.CanonicalBlockID")]
pub struct CanonicalBlockId {
#[prost(bytes = "vec", tag = "1")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub hash: ::prost::alloc::vec::Vec<u8>,
#[prost(message, optional, tag = "2")]
pub part_set_header: ::core::option::Option<CanonicalPartSetHeader>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.CanonicalPartSetHeader")]
pub struct CanonicalPartSetHeader {
#[prost(uint32, tag = "1")]
pub total: u32,
#[prost(bytes = "vec", tag = "2")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub hash: ::prost::alloc::vec::Vec<u8>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.CanonicalProposal")]
pub struct CanonicalProposal {
#[prost(enumeration = "SignedMsgType", tag = "1")]
#[serde(
serialize_with = "SignedMsgType::serialize",
deserialize_with = "SignedMsgType::deserialize"
)]
pub r#type: i32,
#[prost(sfixed64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: i64,
#[prost(sfixed64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub round: i64,
#[prost(int64, tag = "4")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub pol_round: i64,
#[prost(message, optional, tag = "5")]
pub block_id: ::core::option::Option<CanonicalBlockId>,
#[prost(message, optional, tag = "6")]
pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
#[prost(string, tag = "7")]
pub chain_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.CanonicalVote")]
pub struct CanonicalVote {
#[prost(enumeration = "SignedMsgType", tag = "1")]
#[serde(
serialize_with = "SignedMsgType::serialize",
deserialize_with = "SignedMsgType::deserialize"
)]
pub r#type: i32,
#[prost(sfixed64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: i64,
#[prost(sfixed64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub round: i64,
#[prost(message, optional, tag = "4")]
pub block_id: ::core::option::Option<CanonicalBlockId>,
#[prost(message, optional, tag = "5")]
pub timestamp: ::core::option::Option<crate::shim::Timestamp>,
#[prost(string, tag = "6")]
pub chain_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(
Clone,
PartialEq,
Eq,
::prost::Message,
::serde::Serialize,
::serde::Deserialize,
::schemars::JsonSchema,
CosmwasmExt,
)]
#[proto_message(type_url = "/tendermint.types.CanonicalVoteExtension")]
pub struct CanonicalVoteExtension {
#[prost(bytes = "vec", tag = "1")]
#[serde(
serialize_with = "crate::serde::as_base64_encoded_string::serialize",
deserialize_with = "crate::serde::as_base64_encoded_string::deserialize"
)]
pub extension: ::prost::alloc::vec::Vec<u8>,
#[prost(sfixed64, tag = "2")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub height: i64,
#[prost(sfixed64, tag = "3")]
#[serde(
serialize_with = "crate::serde::as_str::serialize",
deserialize_with = "crate::serde::as_str::deserialize"
)]
pub round: i64,
#[prost(string, tag = "4")]
pub chain_id: ::prost::alloc::string::String,
}