FriendBot
in package
Utility for funding test accounts on the Stellar test network
FriendBot is a service that funds accounts on the Stellar test network with test XLM. This is useful for development and testing purposes. Do not use on the public network.
Warning: This service should only be used with test networks. Never attempt to use FriendBot with mainnet accounts.
Example:
$accountId = "GABC...XYZ";
if (FriendBot::fundTestAccount($accountId)) {
echo "Test account funded successfully";
}
Tags
Table of Contents
Methods
- fundTestAccount() : bool
- Funds a test account on the Stellar test network
Methods
fundTestAccount()
Funds a test account on the Stellar test network
public
static fundTestAccount(string $accountId) : bool
Note: Errors are printed to stdout for debugging purposes
Parameters
- $accountId : string
-
The Stellar account ID (56-character public key starting with 'G') to fund
Tags
Return values
bool —True if funding succeeded, false otherwise