resolve Stellar Address
suspend fun resolveStellarAddress(address: String, httpClient: HttpClient? = null, httpRequestHeaders: Map<String, String>? = null): FederationResponse
Resolves a Stellar address in a single call by auto-discovering the federation server.
This is a convenience method that combines parseAddress, fromDomain, and resolveStellarAddress into a single operation. It automatically extracts the domain from the address, discovers the federation server from stellar.toml, and resolves the address.
Return
The federation response containing account ID and optional memo information
Parameters
address
The Stellar address to resolve (e.g., "bob*stellar.org")
http Client
Optional custom HTTP client for testing
http Request Headers
Optional custom headers for requests
Throws
If the address format is invalid
If the domain's stellar.toml does not contain a federation server URL
If the federation server returns an invalid response or the address cannot be resolved
Example:
// Resolve address in one step
val response = FederationService.resolveStellarAddress("bob*stellar.org")
println("Account: ${response.accountId}")
if (response.memo != null) {
println("Required memo (${response.memoType}): ${response.memo}")
}Content copied to clipboard