register Account
Registers an account with the recovery server.
Creates a new account registration with the specified identity providers and authentication methods. The recovery server will generate signing keys for the registered identities that can later be used to sign recovery transactions.
Return
Sep30AccountResponse with registered identities and signing addresses
Parameters
The Stellar account address to register
The identity configuration with authentication methods
SEP-10 authentication token
Throws
If the request is malformed or contains invalid parameters (HTTP 400)
If the JWT token is missing, invalid, or expired (HTTP 401)
If the endpoint is not found (HTTP 404)
If the account is already registered (HTTP 409)
If the server returns HTTP 200 with a malformed body
If the server returns an unexpected HTTP status code
Example:
val emailAuth = Sep30AuthMethod(type = "email", value = "user@example.com")
val ownerIdentity = Sep30RequestIdentity(role = "owner", authMethods = listOf(emailAuth))
val request = Sep30Request(identities = listOf(ownerIdentity))
val response = sep30.registerAccount("GABC...", request, jwtToken)
println("Account: ${response.address}")
println("Signers: ${response.signers.map { it.key }}")