getTransactionsByAccount method

Future<List<RosettaTransaction>> getTransactionsByAccount(
  1. String accountAddress
)

Return an array of Transaction objects based on the specified parameters, or an empty array if none found. @param {string} accountAddress The account address to get the transactions of. @returns {Promise<Array

Implementation

Future<List<RosettaTransaction>> getTransactionsByAccount(
  String accountAddress,
) async {
  final response = await transactionsByAccount(accountAddress);
  final transactions = response.transactions
      .map(
        (blockTransaction) => RosettaTransaction(
          blockTransaction.transaction,
          blockTransaction.blockIdentifier.index,
        ),
      )
      .toList();
  return transactions.reversed.toList();
}