pub trait Source: Send + Sync {
// Required methods
fn get_unchecked<'life0, 'life1, 'async_trait>(
&'life0 self,
height: u32,
block_hash: &'life1 BlockHash
) -> Pin<Box<dyn Future<Output = Result<SignedAttestation, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn oracle_setup<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = &OracleSetup> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn secp(&self) -> &Secp256k1<All>;
fn on_new_block<'life0, 'life1, 'async_trait>(
&'life0 self,
block_height: u32,
block: &'life1 Block
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
height: u32,
block: &'life1 Block
) -> Pin<Box<dyn Future<Output = Result<(SignedAttestation, FilterHeader), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
An attestation source
Required Methods§
sourcefn get_unchecked<'life0, 'life1, 'async_trait>(
&'life0 self,
height: u32,
block_hash: &'life1 BlockHash
) -> Pin<Box<dyn Future<Output = Result<SignedAttestation, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_unchecked<'life0, 'life1, 'async_trait>( &'life0 self, height: u32, block_hash: &'life1 BlockHash ) -> Pin<Box<dyn Future<Output = Result<SignedAttestation, Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Get an attestation for the given block, without checking it
sourcefn oracle_setup<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = &OracleSetup> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn oracle_setup<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = &OracleSetup> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the oracle configuration
sourcefn on_new_block<'life0, 'life1, 'async_trait>(
&'life0 self,
block_height: u32,
block: &'life1 Block
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_new_block<'life0, 'life1, 'async_trait>( &'life0 self, block_height: u32, block: &'life1 Block ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Notify the source of a new block, in case the source passively updates
Provided Methods§
sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
height: u32,
block: &'life1 Block
) -> Pin<Box<dyn Future<Output = Result<(SignedAttestation, FilterHeader), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>( &'life0 self, height: u32, block: &'life1 Block ) -> Pin<Box<dyn Future<Output = Result<(SignedAttestation, FilterHeader), Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Get an attestation for the given block, with full validation Also returns the previous filter header