mempool method

Future<List<Mempool>> mempool({
  1. required String transactionType,
  2. int? startEpoch,
  3. int? stopEpoch,
})

Implementation

Future<List<Mempool>> mempool(
    {required String transactionType,
    int? startEpoch,
    int? stopEpoch}) async {
  try {
    List<dynamic> data = await client.get(api('network/mempool', {
      "transaction_type": transactionType,
      "start_epoch": startEpoch,
      "stop_epoch": stopEpoch
    }));
    return data.map((mempoolTx) => Mempool.fromJson(mempoolTx)).toList();
  } on ExplorerException catch (e) {
    throw ExplorerException(
        code: e.code, message: '{"mempool": "${e.message}"}');
  }
}