send abstract method

Future<TransactionConfirmation?> send({
  1. required Transaction transaction,
  2. bool isEnoughConfirmations(
    1. TransactionConfirmation
    ),
  3. Duration timeout = const Duration(seconds: 10),
  4. TransactionConfirmationHandler? onConfirmation,
})

Sends a transaction and listens to confirmations.

Sender auto-closes in the following situations : - when transaction has enough confirmations - when timeout is reached - when transaction fails

Caller can be notified of incoming confirmations using onConfirmation

Implementation

Future<TransactionConfirmation?> send({
  required Transaction transaction,
  bool Function(TransactionConfirmation) isEnoughConfirmations,
  Duration timeout = const Duration(seconds: 10),
  TransactionConfirmationHandler? onConfirmation,
});