pub struct SolanaChainClient { /* private fields */ }Expand description
Solana implementation of ChainClient.
Wraps any Arc<dyn RpcTransport> and translates ChainClient methods
into the appropriate Solana JSON-RPC calls.
Implementations§
Trait Implementations§
Source§impl ChainClient for SolanaChainClient
impl ChainClient for SolanaChainClient
Source§fn get_head_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_head_height<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the current head height (block number / slot / checkpoint).
Source§fn get_block_by_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<ChainBlock>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_block_by_height<'life0, 'async_trait>(
&'life0 self,
height: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<ChainBlock>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a block by its height. Read more
Source§fn chain_id(&self) -> &str
fn chain_id(&self) -> &str
Return the chain identifier (e.g.
"1" for Ethereum mainnet,
"mainnet-beta" for Solana).Source§fn chain_family(&self) -> &str
fn chain_family(&self) -> &str
Return the chain family name (e.g.
"evm", "solana", "cosmos").Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform a health check against the underlying transport.
Auto Trait Implementations§
impl Freeze for SolanaChainClient
impl !RefUnwindSafe for SolanaChainClient
impl Send for SolanaChainClient
impl Sync for SolanaChainClient
impl Unpin for SolanaChainClient
impl UnsafeUnpin for SolanaChainClient
impl !UnwindSafe for SolanaChainClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more