pub trait ChainBridge: Send + Sync {
// Required methods
fn submit_proof<'life0, 'life1, 'async_trait>(
&'life0 self,
proof: &'life1 ProofPayload,
) -> Pin<Box<dyn Future<Output = Result<TxSignature, TribeError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn query_miner<'life0, 'life1, 'async_trait>(
&'life0 self,
pubkey: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MinerAccount>, TribeError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn register_miner<'life0, 'life1, 'async_trait>(
&'life0 self,
miner_pubkey: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TxSignature, TribeError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_current_difficulty<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, TribeError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn request_swap<'life0, 'async_trait>(
&'life0 self,
from_token: Token,
to_token: Token,
amount: u64,
) -> Pin<Box<dyn Future<Output = Result<TxSignature, TribeError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}Expand description
How proofs and rewards interact with on-chain programs.
Required Methods§
fn submit_proof<'life0, 'life1, 'async_trait>(
&'life0 self,
proof: &'life1 ProofPayload,
) -> Pin<Box<dyn Future<Output = Result<TxSignature, TribeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn query_miner<'life0, 'life1, 'async_trait>(
&'life0 self,
pubkey: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MinerAccount>, TribeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sourcefn register_miner<'life0, 'life1, 'async_trait>(
&'life0 self,
miner_pubkey: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TxSignature, TribeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn register_miner<'life0, 'life1, 'async_trait>(
&'life0 self,
miner_pubkey: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<TxSignature, TribeError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Register a miner on-chain (creates MinerAccount PDA). Used for auto-registration of new devices/miners.