pub struct AlgodClient { /* private fields */ }
Expand description
Client for interacting with the Algorand protocol daemon
Implementations§
Source§impl AlgodClient
impl AlgodClient
pub fn new(address: &str, token: &str) -> AlgodClient
pub fn new_with_headers( address: &str, token: &str, headers: HeaderMap, ) -> AlgodClient
Sourcepub fn status(&self) -> Result<NodeStatus, Error>
pub fn status(&self) -> Result<NodeStatus, Error>
Gets the current node status
Sourcepub fn status_after_block(&self, round: Round) -> Result<NodeStatus, Error>
pub fn status_after_block(&self, round: Round) -> Result<NodeStatus, Error>
Waits for a block to appear after the specified round and returns the node status at the time
Sourcepub fn ledger_supply(&self) -> Result<Supply, Error>
pub fn ledger_supply(&self) -> Result<Supply, Error>
Gets the current supply reported by the ledger
pub fn account_information(&self, address: &str) -> Result<Account, Error>
Sourcepub fn pending_transactions(
&self,
limit: u64,
) -> Result<PendingTransactions, Error>
pub fn pending_transactions( &self, limit: u64, ) -> Result<PendingTransactions, Error>
Gets a list of unconfirmed transactions currently in the transaction pool
Sorted by priority in decreasing order and truncated at the specified limit, or returns all if specified limit is 0
Sourcepub fn pending_transaction_information(
&self,
transaction_id: &str,
) -> Result<Transaction, Error>
pub fn pending_transaction_information( &self, transaction_id: &str, ) -> Result<Transaction, Error>
Get a specified pending transaction
Sourcepub fn transactions(
&self,
address: &str,
first_round: Option<Round>,
last_round: Option<Round>,
from_date: Option<String>,
to_date: Option<String>,
limit: Option<u64>,
) -> Result<TransactionList, Error>
pub fn transactions( &self, address: &str, first_round: Option<Round>, last_round: Option<Round>, from_date: Option<String>, to_date: Option<String>, limit: Option<u64>, ) -> Result<TransactionList, Error>
Get a list of confirmed transactions, limited to filters if specified
Sourcepub fn send_transaction(
&self,
signed_transaction: &SignedTransaction,
) -> Result<TransactionID, Error>
pub fn send_transaction( &self, signed_transaction: &SignedTransaction, ) -> Result<TransactionID, Error>
Broadcasts a transaction to the network
Sourcepub fn raw_transaction(&self, raw: &[u8]) -> Result<TransactionID, Error>
pub fn raw_transaction(&self, raw: &[u8]) -> Result<TransactionID, Error>
Broadcasts a raw transaction to the network
Sourcepub fn transaction(&self, transaction_id: &str) -> Result<Transaction, Error>
pub fn transaction(&self, transaction_id: &str) -> Result<Transaction, Error>
Gets the information of a single transaction
Sourcepub fn transaction_information(
&self,
address: &str,
transaction_id: &str,
) -> Result<Transaction, Error>
pub fn transaction_information( &self, address: &str, transaction_id: &str, ) -> Result<Transaction, Error>
Gets a specific confirmed transaction
Sourcepub fn suggested_fee(&self) -> Result<TransactionFee, Error>
pub fn suggested_fee(&self) -> Result<TransactionFee, Error>
Gets suggested fee in units of micro-Algos per byte
Sourcepub fn transaction_params(&self) -> Result<TransactionParams, Error>
pub fn transaction_params(&self) -> Result<TransactionParams, Error>
Gets parameters for constructing a new transaction
Auto Trait Implementations§
impl Freeze for AlgodClient
impl RefUnwindSafe for AlgodClient
impl Send for AlgodClient
impl Sync for AlgodClient
impl Unpin for AlgodClient
impl UnwindSafe for AlgodClient
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more