Stellar PHP SDK API Documentation

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
see
FuturenetFriendBot

For funding accounts on Futurenet

see
CustomFriendBot

For using a custom FriendBot endpoint

see
https://developers.stellar.org

Stellar developer docs Documentation on FriendBot

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
static
Return values
bool

True if funding succeeded, false otherwise


        
On this page

Search results