getTransactionByLockAddressStream method

Stream<TransactionResponse> getTransactionByLockAddressStream({
  1. required LockAddress address,
  2. double? confidence,
  3. CallOptions? options,
})

Streams a TransactionResponse object for the transaction found at the given addresses and confidence.

address is a LockAddress representing the address to retrieve transactions for

confidence is a double representing the confidence factor of the transactions to retrieve.

options is a CallOptions object that can be used to set additional options for the RPC request.

Throws an Exception if an error occurs during the RPC request.

Implementation

Stream<TransactionResponse> getTransactionByLockAddressStream({
  required LockAddress address,
  double? confidence,
  CallOptions? options,
}) async* {
  final QueryByLockAddressRequest request = QueryByLockAddressRequest(
    confidenceFactor: getConfidenceFactorFromDouble(confidence),
    address: address,
  );
  final stream = genusTransactionStub.getTransactionByLockAddressStream(
    request,
    options: options,
  );

  await for (final response in stream) {
    yield response;
  }
}