pub struct AptosChainClient { /* private fields */ }Expand description
Aptos implementation of ChainClient.
Maps chain client methods to Aptos REST API calls routed through the underlying transport as JSON-RPC method names.
Implementations§
Trait Implementations§
Source§impl ChainClient for AptosChainClient
impl ChainClient for AptosChainClient
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 AptosChainClient
impl !RefUnwindSafe for AptosChainClient
impl Send for AptosChainClient
impl Sync for AptosChainClient
impl Unpin for AptosChainClient
impl UnsafeUnpin for AptosChainClient
impl !UnwindSafe for AptosChainClient
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