fromDomain static method
Creates an instance of this class by loading the anchor quote server sep 38 url from the given domain
stellar toml file (ANCHOR_QUOTE_SERVER).
It also accepts an optional httpClient
to be used for all requests. If not provided, this service will use its own http client.
Implementation
static Future<SEP38QuoteService> fromDomain(String domain,
{http.Client? httpClient}) async {
StellarToml toml =
await StellarToml.fromDomain(domain, httpClient: httpClient);
String? addr = toml.generalInformation.anchorQuoteServer;
checkNotNull(
addr, "Anchor quote server SEP 38 not available for domain " + domain);
return SEP38QuoteService(addr!, httpClient: httpClient);
}