networkTransactions method

Future<List<Transaction>> networkTransactions(
  1. String type,
  2. int page, {
  3. String request = Transaction.kTransactionQueryAllFields,
})

Query the network to list the transaction on the type.

  • type : The type of transaction
  • page : The page
  • request : List of informations to retrieve in the GraphQL Query

Returns the content scalar type represents transaction content List<Transaction>. Depending if the content can displayed it will be rendered as plain text otherwise in hexadecimal

Implementation

Future<List<Transaction>> networkTransactions(
  String type,
  int page, {
  String request = Transaction.kTransactionQueryAllFields,
}) async {
  final body =
      'query { networkTransactions(type: "$type", page: $page) { $request } }';

  final result = await _client
      .withLogger(
        'networkTransactions',
      )
      .query(
        QueryOptions(
          document: gql(body),
          parserFn: (json) {
            return TransactionsResponseData.fromJson(json)
                .networkTransactions!;
          },
        ),
      );
  manageLinkException(result);

  return result.parsedData ?? [];
}