resolveAccountId

suspend fun resolveAccountId(accountId: String): FederationResponse

Performs a reverse lookup to find the Stellar address for an account ID.

Queries the federation server to find the human-readable Stellar address associated with a given account ID (public key). Not all accounts have federation addresses configured.

Return

The federation response containing the Stellar address if found

Parameters

accountId

The Stellar account ID (G... address) to look up

Throws

If the federation server returns an invalid response or the account ID has no associated Stellar address

Example:

val service = FederationService.fromDomain("stellar.org")
val response = service.resolveAccountId("GCIBUCGPOHWMMMFPFTDWBSVHQRT4DIBJ7AD6BZJYDITBK2LCVBYW7HUQ")

println("Stellar address: ${response.stellarAddress ?: "not found"}")