getFucent method
get fucent in specify node
Implementation
Future<Map<String, dynamic>> getFucent(String address) async {
final client = http.Client();
try {
final fucentUrl = getFaucetUrl(rpc.url);
final requestPayload = {'destination': address, 'userAgent': "xrpl-dart"};
final response = await client
.post(Uri.parse(fucentUrl),
headers: {'Content-Type': 'application/json'},
body: json.encode(requestPayload))
.timeout(const Duration(seconds: 30));
return json.decode(response.body);
} finally {
client.close();
}
}