Struct aleo_rust::AleoAPIClient
source · pub struct AleoAPIClient<N: Network> { /* private fields */ }
Expand description
Aleo API client for interacting with the Aleo Beacon API
Implementations§
source§impl<N: Network> AleoAPIClient<N>
impl<N: Network> AleoAPIClient<N>
pub fn latest_height(&self) -> Result<u32>
pub fn latest_hash(&self) -> Result<N::BlockHash>
pub fn latest_block(&self) -> Result<Block<N>>
pub fn get_block(&self, height: u32) -> Result<Block<N>>
pub fn get_blocks( &self, start_height: u32, end_height: u32 ) -> Result<Vec<Block<N>>>
pub fn get_transaction( &self, transaction_id: N::TransactionID ) -> Result<Transaction<N>>
pub fn get_memory_pool_transactions(&self) -> Result<Vec<Transaction<N>>>
pub fn get_program( &self, program_id: impl TryInto<ProgramID<N>> ) -> Result<Program<N>>
pub fn find_block_hash( &self, transaction_id: N::TransactionID ) -> Result<N::BlockHash>
sourcepub fn find_transition_id(
&self,
input_or_output_id: Field<N>
) -> Result<N::TransitionID>
pub fn find_transition_id( &self, input_or_output_id: Field<N> ) -> Result<N::TransitionID>
Returns the transition ID that contains the given input ID
or output ID
.
sourcepub fn scan(
&self,
view_key: impl TryInto<ViewKey<N>>,
block_heights: Range<u32>,
max_records: Option<usize>
) -> Result<Vec<(Field<N>, Record<N, Ciphertext<N>>)>>
pub fn scan( &self, view_key: impl TryInto<ViewKey<N>>, block_heights: Range<u32>, max_records: Option<usize> ) -> Result<Vec<(Field<N>, Record<N, Ciphertext<N>>)>>
Scans the ledger for records that match the given view key.
sourcepub fn get_unspent_records(
&self,
private_key: &PrivateKey<N>,
block_heights: Range<u32>,
max_gates: Option<u64>,
specified_amounts: Option<&Vec<u64>>
) -> Result<Vec<(Field<N>, Record<N, Ciphertext<N>>)>>
pub fn get_unspent_records( &self, private_key: &PrivateKey<N>, block_heights: Range<u32>, max_gates: Option<u64>, specified_amounts: Option<&Vec<u64>> ) -> Result<Vec<(Field<N>, Record<N, Ciphertext<N>>)>>
Search for unspent records in the ledger
sourcepub fn transaction_broadcast(
&self,
transaction: Transaction<N>
) -> Result<String>
pub fn transaction_broadcast( &self, transaction: Transaction<N> ) -> Result<String>
Broadcast a deploy or execute transaction to the Aleo network
source§impl<N: Network> AleoAPIClient<N>
impl<N: Network> AleoAPIClient<N>
Trait Implementations§
Auto Trait Implementations§
impl<N> !RefUnwindSafe for AleoAPIClient<N>
impl<N> Send for AleoAPIClient<N>
impl<N> Sync for AleoAPIClient<N>
impl<N> Unpin for AleoAPIClient<N>where N: Unpin,
impl<N> !UnwindSafe for AleoAPIClient<N>
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