fundFuturenetAccount

suspend fun fundFuturenetAccount(accountId: String): Boolean

Funds a futurenet account using FriendBot.

This will create the account if it doesn't exist and fund it with 10,000 XLM (futurenet lumens). The operation is idempotent - calling it multiple times on the same account will not fail, but the account will only receive the initial 10,000 XLM funding once.

Network: This only works on Stellar's futurenet. For testnet, use fundTestnetAccount.

Return

true if funding was successful, false otherwise

Parameters

accountId

The account ID (G... address) to fund

Throws

if the funding request fails with network errors

Example

val keypair = KeyPair.random()
val success = FriendBot.fundFuturenetAccount(keypair.getAccountId())
if (success) {
println("Account funded successfully!")
}