getFucent method

Future<Map<String, dynamic>> getFucent(
  1. String address
)

get fucent in specify node

Implementation

Future<Map<String, dynamic>> getFucent(String address) async {
  final fucentUrl = getFaucetUrl(rpc.url);
  final requestPayload = {'destination': address, 'userAgent': "xrpl-dart"};

  final response = await rpc.post(
    fucentUrl,
    StringUtils.fromJson(requestPayload),
    header: {'Content-Type': 'application/json'},
  ).timeout(const Duration(seconds: 30));
  return StringUtils.toJson(response);
}