wownero-interface 0.1.0

Traits for interfacing with the Monero network, built around monero-oxide
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use core::future::Future;

use crate::InterfaceError;

/// Provides metadata from the blockchain.
pub trait ProvidesBlockchainMeta: Sync {
  /// Get the number of the latest block.
  ///
  /// The number of a block is its index on the blockchain, so the genesis block would have
  /// `number = 0`.
  fn latest_block_number(&self) -> impl Send + Future<Output = Result<usize, InterfaceError>>;
}