loadAccount

suspend fun loadAccount(address: String): Account

Loads an account from Horizon and returns it as a TransactionBuilderAccount.

This is a convenience method that fetches the account from Horizon and wraps it in a format suitable for building transactions. The account object includes the current sequence number which is incremented automatically when building transactions.

For muxed accounts (M...), this method fetches the underlying G... account and preserves the muxed account ID in the returned Account object.

Return

Account object ready for use with TransactionBuilder

Parameters

address

The account address (G... or M...)

Throws

If the request fails

If the account is not found (404)