Class Utils


  • public class Utils
    extends Object
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • waitForConfirmation

        public static PendingTransactionResponse waitForConfirmation​(AlgodClient client,
                                                                     String txID,
                                                                     int waitRounds)
                                                              throws Exception
        Wait until a transaction has been confirmed or rejected by the network or wait until waitRound fully elapsed
        Parameters:
        client - an Algod v2 client
        txID - the transaction ID that we are waiting
        waitRounds - The maximum number of rounds to wait for.
        Returns:
        TransactionResponse of the confirmed transaction
        Throws:
        Exception - if transaction is rejected or the transaction is not confirmed before wait round