fetchTransfers static method

Future<Map?> fetchTransfers(
  1. SubScanRequestParams params
)

Implementation

static Future<Map?> fetchTransfers(SubScanRequestParams params) async {
  String url = '${getSnEndpoint(params.network!)}/transfers';
  String body = jsonEncode({
    "page": params.page,
    "row": params.row,
    "address": params.address,
  });
  Response res =
      await post(Uri.parse(url), headers: post_headers, body: body);
  final obj = await compute(jsonDecode, res.body);
  if (params.sendPort != null) {
    params.sendPort!.send(obj['data']);
  }
  return obj['data'];
}