waitForConfirmation method

Future<PendingTransaction> waitForConfirmation(
  1. String transactionId, {
  2. int? timeout,
})

Utility function to wait on a transaction to be confirmed. The timeout parameter indicates how many rounds do you wish to check pending transactions for.

On Algorand, transactions are final as soon as they are incorporated into a block and blocks are produced, on average, every 5 seconds.

This means that transactions are confirmed, on average, in 5 seconds

Implementation

Future<PendingTransaction> waitForConfirmation(
  String transactionId, {
  int? timeout,
}) async {
  return _transactionRepository.waitForConfirmation(
    transactionId,
    timeout: timeout ?? _options.timeout,
  );
}