pub struct RecordFinder<N: Network> { /* private fields */ }
Implementations§
source§impl<N: Network> RecordFinder<N>
impl<N: Network> RecordFinder<N>
pub fn new(api_client: AleoAPIClient<N>) -> Self
sourcepub fn find_amount_and_fee_records(
&self,
amount: u64,
fee: u64,
private_key: &PrivateKey<N>
) -> Result<(Record<N, Plaintext<N>>, Record<N, Plaintext<N>>)>
pub fn find_amount_and_fee_records( &self, amount: u64, fee: u64, private_key: &PrivateKey<N> ) -> Result<(Record<N, Plaintext<N>>, Record<N, Plaintext<N>>)>
Resolve two records for a transfer amount and fee respectively
Basic Usage: let (amount_record, fee_record) = self.resolve_amount_and_fee(amount, fee, private_key);
sourcepub fn find_one_record(
&self,
private_key: &PrivateKey<N>,
amount: u64
) -> Result<Record<N, Plaintext<N>>>
pub fn find_one_record( &self, private_key: &PrivateKey<N>, amount: u64 ) -> Result<Record<N, Plaintext<N>>>
Resolve a record with a specific value. If successful it will return a record with a gate value equal to or greater than the specified amount.
sourcepub fn find_record_amounts(
&self,
amounts: Vec<u64>,
private_key: &PrivateKey<N>
) -> Result<Vec<Record<N, Plaintext<N>>>>
pub fn find_record_amounts( &self, amounts: Vec<u64>, private_key: &PrivateKey<N> ) -> Result<Vec<Record<N, Plaintext<N>>>>
Attempt to resolve records with specific gate values specified as a vector of u64s. If the function is successful at resolving the records, it will return a vector of records with gates equal to or greater than the specified amounts. If it cannot resolve records with the specified amounts, it will return an error.