rollkit-types 0.0.1

Protocol buffer generated types for Rollkit
// This file is @generated by prost-build.
/// The SignRequest holds the bytes we want to sign.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignRequest {
    #[prost(bytes = "vec", tag = "1")]
    pub message: ::prost::alloc::vec::Vec<u8>,
}
/// The SignResponse returns the signature bytes.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignResponse {
    #[prost(bytes = "vec", tag = "1")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
}
/// The GetPublicRequest is an empty request.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPublicRequest {}
/// The GetPublicResponse returns the public key.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPublicResponse {
    #[prost(bytes = "vec", tag = "1")]
    pub public_key: ::prost::alloc::vec::Vec<u8>,
}
/// Version captures the consensus rules for processing a block in the blockchain,
/// including all blockchain data structures and the rules of the application's
/// state transition machine.
/// This is equivalent to the tmversion.Consensus type in Tendermint.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Version {
    #[prost(uint64, tag = "1")]
    pub block: u64,
    #[prost(uint64, tag = "2")]
    pub app: u64,
}
/// Header is the header of a block in the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Header {
    /// Block and App version
    #[prost(message, optional, tag = "1")]
    pub version: ::core::option::Option<Version>,
    /// Block height
    #[prost(uint64, tag = "2")]
    pub height: u64,
    /// Block creation time
    #[prost(uint64, tag = "3")]
    pub time: u64,
    /// Previous block info
    #[prost(bytes = "vec", tag = "4")]
    pub last_header_hash: ::prost::alloc::vec::Vec<u8>,
    /// Commit from aggregator(s) from the last block
    #[prost(bytes = "vec", tag = "5")]
    pub last_commit_hash: ::prost::alloc::vec::Vec<u8>,
    /// Block.Data root aka Transactions
    #[prost(bytes = "vec", tag = "6")]
    pub data_hash: ::prost::alloc::vec::Vec<u8>,
    /// Consensus params for current block
    #[prost(bytes = "vec", tag = "7")]
    pub consensus_hash: ::prost::alloc::vec::Vec<u8>,
    /// State after applying txs from the current block
    #[prost(bytes = "vec", tag = "8")]
    pub app_hash: ::prost::alloc::vec::Vec<u8>,
    /// Root hash of all results from the txs from the previous block.
    /// This is ABCI specific but smart-contract chains require some way of committing
    /// to transaction receipts/results.
    #[prost(bytes = "vec", tag = "9")]
    pub last_results_hash: ::prost::alloc::vec::Vec<u8>,
    /// Original proposer of the block
    /// Note that the address can be derived from the pubkey which can be derived
    /// from the signature when using secp256k.
    /// We keep this in case users choose another signature format where the
    /// pubkey can't be recovered by the signature (e.g. ed25519).
    #[prost(bytes = "vec", tag = "10")]
    pub proposer_address: ::prost::alloc::vec::Vec<u8>,
    /// validatorhash for compatibility with tendermint light client.
    #[prost(bytes = "vec", tag = "11")]
    pub validator_hash: ::prost::alloc::vec::Vec<u8>,
    /// Chain ID the block belongs to
    #[prost(string, tag = "12")]
    pub chain_id: ::prost::alloc::string::String,
}
/// SignedHeader is a header with a signature and a signer.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignedHeader {
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<Header>,
    #[prost(bytes = "vec", tag = "2")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "3")]
    pub signer: ::core::option::Option<Signer>,
}
/// Signer is a signer of a block in the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Signer {
    /// Address of the signer
    #[prost(bytes = "vec", tag = "1")]
    pub address: ::prost::alloc::vec::Vec<u8>,
    /// Public key of the signer
    #[prost(bytes = "vec", tag = "2")]
    pub pub_key: ::prost::alloc::vec::Vec<u8>,
}
/// Metadata is the metadata of a block in the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Metadata {
    /// chain id
    #[prost(string, tag = "1")]
    pub chain_id: ::prost::alloc::string::String,
    /// Block height
    #[prost(uint64, tag = "2")]
    pub height: u64,
    /// Block creation time
    #[prost(uint64, tag = "3")]
    pub time: u64,
    /// Previous block info
    #[prost(bytes = "vec", tag = "4")]
    pub last_data_hash: ::prost::alloc::vec::Vec<u8>,
}
/// Data is the data of a block in the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Data {
    #[prost(message, optional, tag = "1")]
    pub metadata: ::core::option::Option<Metadata>,
    #[prost(bytes = "vec", repeated, tag = "2")]
    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
/// SignedData is a data with a signature and a signer.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignedData {
    #[prost(message, optional, tag = "1")]
    pub data: ::core::option::Option<Data>,
    #[prost(bytes = "vec", tag = "2")]
    pub signature: ::prost::alloc::vec::Vec<u8>,
    #[prost(message, optional, tag = "3")]
    pub signer: ::core::option::Option<Signer>,
}
/// Vote is a vote for a block in the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Vote {
    /// Chain ID
    #[prost(string, tag = "1")]
    pub chain_id: ::prost::alloc::string::String,
    /// Block height
    #[prost(uint64, tag = "2")]
    pub height: u64,
    /// Timestamp
    #[prost(message, optional, tag = "3")]
    pub timestamp: ::core::option::Option<::prost_types::Timestamp>,
    /// Block ID hash
    #[prost(bytes = "vec", tag = "4")]
    pub block_id_hash: ::prost::alloc::vec::Vec<u8>,
    /// Validator address
    #[prost(bytes = "vec", tag = "5")]
    pub validator_address: ::prost::alloc::vec::Vec<u8>,
}
/// State is the state of the blockchain.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct State {
    #[prost(message, optional, tag = "1")]
    pub version: ::core::option::Option<Version>,
    #[prost(string, tag = "2")]
    pub chain_id: ::prost::alloc::string::String,
    #[prost(uint64, tag = "3")]
    pub initial_height: u64,
    #[prost(uint64, tag = "4")]
    pub last_block_height: u64,
    #[prost(message, optional, tag = "5")]
    pub last_block_time: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(uint64, tag = "6")]
    pub da_height: u64,
    #[prost(bytes = "vec", tag = "7")]
    pub last_results_hash: ::prost::alloc::vec::Vec<u8>,
    #[prost(bytes = "vec", tag = "8")]
    pub app_hash: ::prost::alloc::vec::Vec<u8>,
}
/// GetPeerInfoResponse defines the response for retrieving peer information
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPeerInfoResponse {
    /// List of connected peers
    #[prost(message, repeated, tag = "1")]
    pub peers: ::prost::alloc::vec::Vec<PeerInfo>,
}
/// GetNetInfoResponse defines the response for retrieving network information
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNetInfoResponse {
    /// Network information
    #[prost(message, optional, tag = "1")]
    pub net_info: ::core::option::Option<NetInfo>,
}
/// PeerInfo contains information about a connected peer
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PeerInfo {
    /// Peer ID
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Peer address
    #[prost(string, tag = "2")]
    pub address: ::prost::alloc::string::String,
}
/// NetInfo contains information about the network
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetInfo {
    /// Network ID
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Listen address
    #[prost(string, repeated, tag = "2")]
    pub listen_addresses: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// List of connected peers
    #[prost(string, repeated, tag = "3")]
    pub connected_peers: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Batch is a collection of transactions.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Batch {
    #[prost(bytes = "vec", repeated, tag = "1")]
    pub txs: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
}
/// GetHealthResponse defines the response for retrieving health status
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetHealthResponse {
    /// Health status
    #[prost(enumeration = "HealthStatus", tag = "1")]
    pub status: i32,
}
/// HealthStatus defines the health status of the node
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum HealthStatus {
    /// Unknown health status
    Unknown = 0,
    /// Healthy status (Healthy)
    Pass = 1,
    /// Degraded but still serving
    Warn = 2,
    /// Hard fail
    Fail = 3,
}
impl HealthStatus {
    /// 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 {
            HealthStatus::Unknown => "UNKNOWN",
            HealthStatus::Pass => "PASS",
            HealthStatus::Warn => "WARN",
            HealthStatus::Fail => "FAIL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "UNKNOWN" => Some(Self::Unknown),
            "PASS" => Some(Self::Pass),
            "WARN" => Some(Self::Warn),
            "FAIL" => Some(Self::Fail),
            _ => None,
        }
    }
}
/// Block contains all the components of a complete block
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Block {
    #[prost(message, optional, tag = "1")]
    pub header: ::core::option::Option<SignedHeader>,
    #[prost(message, optional, tag = "2")]
    pub data: ::core::option::Option<Data>,
}
/// GetBlockRequest defines the request for retrieving a block
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockRequest {
    /// The height or hash of the block to retrieve
    #[prost(oneof = "get_block_request::Identifier", tags = "1, 2")]
    pub identifier: ::core::option::Option<get_block_request::Identifier>,
}
/// Nested message and enum types in `GetBlockRequest`.
pub mod get_block_request {
    /// The height or hash of the block to retrieve
    #[allow(clippy::derive_partial_eq_without_eq)]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Identifier {
        #[prost(uint64, tag = "1")]
        Height(u64),
        #[prost(bytes, tag = "2")]
        Hash(::prost::alloc::vec::Vec<u8>),
    }
}
/// GetBlockResponse defines the response for retrieving a block
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetBlockResponse {
    #[prost(message, optional, tag = "1")]
    pub block: ::core::option::Option<Block>,
    #[prost(uint64, tag = "2")]
    pub header_da_height: u64,
    #[prost(uint64, tag = "3")]
    pub data_da_height: u64,
}
/// GetStateResponse defines the response for retrieving the current state
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetStateResponse {
    #[prost(message, optional, tag = "1")]
    pub state: ::core::option::Option<State>,
}
/// GetMetadataRequest defines the request for retrieving metadata by key
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMetadataRequest {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
}
/// GetMetadataResponse defines the response for retrieving metadata
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetMetadataResponse {
    #[prost(bytes = "vec", tag = "1")]
    pub value: ::prost::alloc::vec::Vec<u8>,
}