resolve Stellar Address
Resolves a Stellar address to account information.
Queries the federation server to resolve a human-readable Stellar address (e.g., "bob*stellar.org") to the corresponding account ID and optional memo information required for payments.
Return
The federation response containing account ID and optional memo information
Parameters
address
The Stellar address to resolve (must be in format "username*domain")
Throws
If the address format is invalid
If the federation server returns an invalid response or the address cannot be resolved
Example:
val service = FederationService.fromDomain("stellar.org")
val response = service.resolveStellarAddress("bob*stellar.org")
println("Send payment to: ${response.accountId}")
if (response.memoType == "id" && response.memo != null) {
// Attach ID memo when building payment
val memo = MemoId(response.memo.toLong())
}Content copied to clipboard