streamIndexedTransactions method
Stream<TransactionResponse>
streamIndexedTransactions({
- required String indexName,
- CallOptions? options,
- int? maxResults,
- int? skipResults,
- List<
IndexMatchValue> ? indexMatchValues,
Streams a TransactionResponse object for the transaction found at the given indexName
, maxResults
, skipResults
, and indexMatchValues
.
indexName
is a String representing the index name to retrieve transactions for
maxResults
is an int representing the maximum number of results to return
skipResults
is an int representing the number of results to skip
indexMatchValues
is a List<IndexMatchValue> representing the index match values to retrieve transactions for
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> streamIndexedTransactions({
required String indexName,
CallOptions? options,
int? maxResults,
int? skipResults,
List<IndexMatchValue>? indexMatchValues,
}) async* {
final request = GetIndexedTransactionsRequest(
indexName: indexName,
maxResults: maxResults,
skipResults: skipResults == null ? null : Int64(skipResults),
value: indexMatchValues,
);
final Stream<TransactionResponse> stream =
genusTransactionStub.getIndexedTransactions(
request,
options: options,
);
await for (final TransactionResponse response in stream) {
yield response;
}
}