Stellar PHP SDK API Documentation

XdrChangeTrustAsset extends XdrChangeTrustAssetBase
in package

Table of Contents

Properties

$alphaNum12  : XdrAssetAlphaNum12|null
$alphaNum4  : XdrAssetAlphaNum4|null
$liquidityPool  : XdrLiquidityPoolParameters|null
$type  : XdrAssetType

Methods

__construct()  : mixed
decode()  : static
encode()  : string
fromBase64Xdr()  : static
fromTxRep()  : static
Deserialize a change-trust asset.
fromXdrAsset()  : XdrChangeTrustAsset
getAlphaNum12()  : XdrAssetAlphaNum12|null
getAlphaNum4()  : XdrAssetAlphaNum4|null
getLiquidityPool()  : XdrLiquidityPoolParameters|null
getType()  : XdrAssetType
setAlphaNum12()  : void
setAlphaNum4()  : void
setLiquidityPool()  : void
setType()  : void
toBase64Xdr()  : string
toTxRep()  : void
Serialize the change-trust asset.

Properties

Methods

fromBase64Xdr()

public static fromBase64Xdr(string $xdr) : static
Parameters
$xdr : string
Return values
static

fromTxRep()

Deserialize a change-trust asset.

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

A compact asset string ("native", "XLM", or "CODE:ISSUER") is parsed directly. Pool-share assets are expected to be represented by their expanded sub-field keys and are deserialized via the generated base.

Detection: if the prefix key itself is present in the map, the value is a compact asset string; otherwise pool-share sub-fields are expected.

Parameters
$map : array<string, string>

Parsed TxRep map.

$prefix : string

Key prefix.

Tags
throws
InvalidArgumentException

If the value is missing or invalid.

Return values
static

toTxRep()

Serialize the change-trust asset.

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

Native and credit assets are written as a single compact string (e.g. "native" or "USD:G..."). Pool-share assets are expanded to their sub-fields by delegating to the generated base implementation.

Parameters
$prefix : string

Key prefix for the TxRep map.

$lines : array<string, string>

Output map (modified in place).


        
On this page

Search results