listTransactions method

Future<ListTransactionsOutput> listTransactions({
  1. required String address,
  2. required QueryNetwork network,
  3. ConfirmationStatusFilter? confirmationStatusFilter,
  4. BlockchainInstant? fromBlockchainInstant,
  5. int? maxResults,
  6. String? nextToken,
  7. ListTransactionsSort? sort,
  8. BlockchainInstant? toBlockchainInstant,
})

Lists all the transaction events for a transaction.

May throw AccessDeniedException. May throw InternalServerException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter address : The address (either a contract or wallet), whose transactions are being requested.

Parameter network : The blockchain network where the transactions occurred.

Parameter confirmationStatusFilter : This filter is used to include transactions in the response that haven't reached finality . Transactions that have reached finality are always part of the response.

Parameter maxResults : The maximum number of transactions to list.

Default: 100

To retrieve the next set of results, make another request with the returned nextToken value. The value of nextToken is null when there are no more results to return

Parameter nextToken : The pagination token that indicates the next set of results to retrieve.

Parameter sort : The order by which the results will be sorted.

Implementation

Future<ListTransactionsOutput> listTransactions({
  required String address,
  required QueryNetwork network,
  ConfirmationStatusFilter? confirmationStatusFilter,
  BlockchainInstant? fromBlockchainInstant,
  int? maxResults,
  String? nextToken,
  ListTransactionsSort? sort,
  BlockchainInstant? toBlockchainInstant,
}) async {
  final $payload = <String, dynamic>{
    'address': address,
    'network': network.value,
    if (confirmationStatusFilter != null)
      'confirmationStatusFilter': confirmationStatusFilter,
    if (fromBlockchainInstant != null)
      'fromBlockchainInstant': fromBlockchainInstant,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (sort != null) 'sort': sort,
    if (toBlockchainInstant != null)
      'toBlockchainInstant': toBlockchainInstant,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/list-transactions',
    exceptionFnMap: _exceptionFns,
  );
  return ListTransactionsOutput.fromJson(response);
}