Stellar PHP SDK API Documentation

CreateAccountOperationBuilder
in package

Builder for creating CreateAccount operations.

This builder implements the builder pattern to construct CreateAccountOperation instances with a fluent interface. CreateAccount operations create a new account on the Stellar ledger with an initial XLM balance.

Tags
see
CreateAccountOperation
see
https://developers.stellar.org

Stellar developer docs

since
1.0.0
example

$operation = (new CreateAccountOperationBuilder($destinationId, '10.00')) ->setSourceAccount($sourceId) ->build();

Table of Contents

Methods

__construct()  : mixed
Creates a new CreateAccount operation builder.
build()  : CreateAccountOperation
Builds the CreateAccount operation.
setMuxedSourceAccount()  : $this
Sets the muxed source account for this operation.
setSourceAccount()  : $this
Sets the source account for this operation.

Methods

__construct()

Creates a new CreateAccount operation builder.

public __construct(string $destination, string $startingBalance) : mixed
Parameters
$destination : string

The destination account ID to be created

$startingBalance : string

The initial balance in lumens (XLM)

setMuxedSourceAccount()

Sets the muxed source account for this operation.

public setMuxedSourceAccount(MuxedAccount $sourceAccount) : $this
Parameters
$sourceAccount : MuxedAccount

The muxed account to use as source

Return values
$this

Returns the builder instance for method chaining

setSourceAccount()

Sets the source account for this operation.

public setSourceAccount(string $accountId) : $this
Parameters
$accountId : string

The Stellar account ID (G...)

Return values
$this

Returns the builder instance for method chaining


        
On this page

Search results