getSentDocuments static method

Future<List<CommercioDoc>> getSentDocuments({
  1. required String address,
  2. required NetworkInfo networkInfo,
  3. Client? client,
})

Returns the list of all the CommercioDoc that the specified address has sent.

Implementation

static Future<List<CommercioDoc>> getSentDocuments({
  required String address,
  required NetworkInfo networkInfo,
  http.Client? client,
}) async {
  final url = Uri.parse('${networkInfo.lcdUrl}/docs/$address/sent');
  final response = await Network.queryChain(url, client: client) as List;

  return response.map((json) => CommercioDoc.fromJson(json)).toList();
}