Function wait_for_notes

Source
pub async fn wait_for_notes(
    client: &mut Client,
    account_id: &Account,
    expected: usize,
) -> Result<(), ClientError>
Expand description

Waits for a specific number of notes to be available.

This function will block until the specified number of consumable notes are found for the account.

§Arguments

  • client - The Miden client used to interact with the blockchain.
  • account_id - The account ID to check for the notes.
  • expected - The number of notes to wait for.

§Returns

Returns a Result indicating whether the expected number of notes was found.