tendermint 0.19.0

Tendermint is a high-performance blockchain consensus engine that powers Byzantine fault tolerant applications written in any programming language. This crate provides core types for representing information about Tendermint blockchain networks, including chain information types, secret connections, and remote procedure calls (JSON-RPC).
Documentation
use crate::{block, chain, time::Time};

/// Information about a particular Tendermint blockchain
#[derive(Clone, Debug)]
pub struct Info {
    /// Chain identifier (e.g. 'gaia-9000')
    pub id: chain::Id,

    /// Current block height of the chain
    pub height: block::Height,

    /// Last block ID seen for this chain
    pub last_block_id: Option<block::Id>,

    /// Current consensus time (if available)
    pub time: Option<Time>,
}

impl Info {
    /// Create information about a particular network
    pub fn new<I>(id: I) -> Self
    where
        I: Into<chain::Id>,
    {
        Self {
            id: id.into(),
            height: Default::default(),
            last_block_id: None,
            time: None,
        }
    }
}