Stellar PHP SDK API Documentation

XdrAccountMergeOperation
in package

Table of Contents

Methods

__construct()  : mixed
decode()  : XdrAccountMergeOperation
encode()  : string
fromTxRep()  : XdrAccountMergeOperation
Reconstruct from a TxRep map.
getDestination()  : XdrMuxedAccount
toTxRep()  : void
Emit the destination address as a TxRep value at the given key.

Methods

fromTxRep()

Reconstruct from a TxRep map.

public static fromTxRep(array<string, string> $map, string $prefix) : XdrAccountMergeOperation

The caller passes the full key (e.g. tx.operations[0].body.destination) as $prefix; we read the value directly at that key.

Parameters
$map : array<string, string>

Parsed TxRep key/value map.

$prefix : string

Full TxRep key including .destination.

Return values
XdrAccountMergeOperation

toTxRep()

Emit the destination address as a TxRep value at the given key.

public toTxRep(string $prefix, array<string, string> &$lines) : void

ACCOUNT_MERGE in SEP-0011 serialises as a bare destination key (e.g. tx.operations[0].body.destination: G...). The caller in XdrOperationBody already appends .destination to the prefix before passing it here, so this method writes the value directly at $prefix.

Parameters
$prefix : string

Full TxRep key including .destination.

$lines : array<string, string>

Output map.


        
On this page

Search results