fromDomain static method

Future<KYCService> fromDomain(
  1. String domain, {
  2. Client? httpClient,
  3. Map<String, String>? httpRequestHeaders,
})

Implementation

static Future<KYCService> fromDomain(
  String domain, {
  http.Client? httpClient,
  Map<String, String>? httpRequestHeaders,
}) async {
  StellarToml toml = await StellarToml.fromDomain(domain,
      httpClient: httpClient, httpRequestHeaders: httpRequestHeaders);

  String? address = toml.generalInformation.kYCServer ??
      toml.generalInformation.transferServer;

  checkNotNull(
      address, "kyc or transfer server not available for domain " + domain);
  return KYCService(address!,
      httpClient: httpClient, httpRequestHeaders: httpRequestHeaders);
}