pub trait Issuing {
// Required methods
fn is_initialized<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn initialize<'life0, 'async_trait>(
&'life0 self,
header: Vec<u8>,
height: u32
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_block_header<'life0, 'async_trait>(
&'life0 self,
header: Vec<u8>,
random_delay: Arc<Box<dyn RandomDelay + Send + Sync>>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn submit_block_header_batch<'life0, 'async_trait>(
&'life0 self,
headers: Vec<Vec<u8>>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_best_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_block_hash<'life0, 'async_trait>(
&'life0 self,
height: u32
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn is_block_stored<'life0, 'async_trait>(
&'life0 self,
hash_le: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
sourcefn is_initialized<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_initialized<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns true if the light client is initialized
sourcefn initialize<'life0, 'async_trait>(
&'life0 self,
header: Vec<u8>,
height: u32
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>( &'life0 self, header: Vec<u8>, height: u32 ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
sourcefn submit_block_header<'life0, 'async_trait>(
&'life0 self,
header: Vec<u8>,
random_delay: Arc<Box<dyn RandomDelay + Send + Sync>>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_block_header<'life0, 'async_trait>( &'life0 self, header: Vec<u8>, random_delay: Arc<Box<dyn RandomDelay + Send + Sync>> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
sourcefn submit_block_header_batch<'life0, 'async_trait>(
&'life0 self,
headers: Vec<Vec<u8>>
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn submit_block_header_batch<'life0, 'async_trait>( &'life0 self, headers: Vec<Vec<u8>> ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Submit a batch of block headers and wait for inclusion
Arguments
headers
- Raw block headers (multiple of 80 bytes)
sourcefn get_best_height<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_best_height<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<u32, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the light client’s chain tip
sourcefn get_block_hash<'life0, 'async_trait>(
&'life0 self,
height: u32
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_hash<'life0, 'async_trait>( &'life0 self, height: u32 ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns the block hash stored at a given height, this is assumed to be in little-endian format
Arguments
height
- Height of the block to fetch
sourcefn is_block_stored<'life0, 'async_trait>(
&'life0 self,
hash_le: Vec<u8>
) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_block_stored<'life0, 'async_trait>( &'life0 self, hash_le: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Returns true if the block described by the hash has been stored in the light client
Arguments
hash_le
- Hash (little-endian) of the block