AccountMergeOperationBuilder
in package
Builder for creating AccountMerge operations.
This builder implements the builder pattern to construct AccountMergeOperation instances with a fluent interface. AccountMerge operations merge one account into another, transferring the source account's XLM balance to the destination account and removing the source account from the ledger.
Tags
Table of Contents
Methods
- __construct() : mixed
- Creates a new AccountMerge operation builder.
- build() : AccountMergeOperation
- Builds the AccountMerge operation.
- forMuxedDestinationAccount() : AccountMergeOperationBuilder
- Creates a new AccountMerge operation builder for a muxed destination account.
- setMuxedSourceAccount() : $this
- Sets the muxed source account for this operation.
- setSourceAccount() : $this
- Sets the source account for this operation.
Methods
__construct()
Creates a new AccountMerge operation builder.
public
__construct(string $destinationAccountId) : mixed
Parameters
- $destinationAccountId : string
-
The account ID that receives the remaining XLM balance of the source account
build()
Builds the AccountMerge operation.
public
build() : AccountMergeOperation
Return values
AccountMergeOperation —The constructed operation
forMuxedDestinationAccount()
Creates a new AccountMerge operation builder for a muxed destination account.
public
static forMuxedDestinationAccount(MuxedAccount $destination) : AccountMergeOperationBuilder
Parameters
- $destination : MuxedAccount
-
The muxed destination account
Return values
AccountMergeOperationBuilder —The new builder instance
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