getChallenge

suspend fun getChallenge(clientAccountId: String, homeDomain: String? = null, clientDomain: String? = null): Sep45ChallengeResponse

Requests a challenge from the authentication server.

This is the first step of the SEP-45 authentication flow. The server generates authorization entries specifically for the client contract account and returns them as base64-encoded XDR.

Return

Sep45ChallengeResponse containing authorization entries XDR

Parameters

clientAccountId

Contract account (C...) to authenticate

homeDomain

Optional home domain for the request. Defaults to server home domain.

clientDomain

Optional client domain for verification

Throws

If the request fails or returns an error