getTransactionByBlock method

Future<RosettaTransaction> getTransactionByBlock(
  1. int blockIndex
)

Implementation

Future<RosettaTransaction> getTransactionByBlock(int blockIndex) async {
  final response = await blockByIndex(blockIndex);
  final block = response.block;
  if (block != null) {
    return RosettaTransaction(block.transactions[0], blockIndex);
  }
  throw TransactionError('Block is not found $blockIndex', 500);
}