pub struct AptosRpcClient { /* private fields */ }Expand description
Real Aptos RPC client using REST API
Implementations§
Trait Implementations§
Source§impl AptosRpc for AptosRpcClient
impl AptosRpc for AptosRpcClient
fn get_ledger_info( &self, ) -> Result<AptosLedgerInfo, Box<dyn Error + Send + Sync>>
Source§fn sender_address(&self) -> Result<[u8; 32], Box<dyn Error + Send + Sync>>
fn sender_address(&self) -> Result<[u8; 32], Box<dyn Error + Send + Sync>>
Get the sender’s account address
Source§fn get_account_sequence_number(
&self,
address: [u8; 32],
) -> Result<u64, Box<dyn Error + Send + Sync>>
fn get_account_sequence_number( &self, address: [u8; 32], ) -> Result<u64, Box<dyn Error + Send + Sync>>
Get the account sequence number (transaction count)
fn get_resource( &self, address: [u8; 32], resource_type: &str, _position: Option<u64>, ) -> Result<Option<AptosResource>, Box<dyn Error + Send + Sync>>
fn get_transaction( &self, version: u64, ) -> Result<Option<AptosTransaction>, Box<dyn Error + Send + Sync>>
fn get_transactions( &self, start_version: u64, limit: u32, ) -> Result<Vec<AptosTransaction>, Box<dyn Error + Send + Sync>>
fn get_events( &self, event_handle: &str, _position: &str, limit: u32, ) -> Result<Vec<AptosEvent>, Box<dyn Error + Send + Sync>>
fn submit_transaction( &self, tx_bytes: Vec<u8>, ) -> Result<[u8; 32], Box<dyn Error + Send + Sync>>
Source§fn submit_signed_transaction(
&self,
signed_tx_json: Value,
) -> Result<[u8; 32], Box<dyn Error + Send + Sync>>
fn submit_signed_transaction( &self, signed_tx_json: Value, ) -> Result<[u8; 32], Box<dyn Error + Send + Sync>>
Submit a signed transaction as JSON to the Aptos REST API
Returns the transaction hash on success
fn wait_for_transaction( &self, tx_hash: [u8; 32], ) -> Result<AptosTransaction, Box<dyn Error + Send + Sync>>
fn get_block_by_version( &self, version: u64, ) -> Result<Option<AptosBlockInfo>, Box<dyn Error + Send + Sync>>
fn get_events_by_account( &self, account: [u8; 32], start: u64, limit: u32, ) -> Result<Vec<AptosEvent>, Box<dyn Error + Send + Sync>>
fn get_latest_version(&self) -> Result<u64, Box<dyn Error + Send + Sync>>
fn get_transaction_by_version( &self, version: u64, ) -> Result<Option<AptosTransaction>, Box<dyn Error + Send + Sync>>
fn publish_module( &self, tx_bytes: Vec<u8>, ) -> Result<[u8; 32], Box<dyn Error + Send + Sync>>
fn verify_checkpoint( &self, sequence_number: u64, ) -> Result<bool, Box<dyn Error + Send + Sync>>
fn as_any(&self) -> &dyn Any
Auto Trait Implementations§
impl Freeze for AptosRpcClient
impl !RefUnwindSafe for AptosRpcClient
impl Send for AptosRpcClient
impl Sync for AptosRpcClient
impl Unpin for AptosRpcClient
impl UnsafeUnpin for AptosRpcClient
impl !UnwindSafe for AptosRpcClient
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