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
$alphaNum12
public
XdrAssetAlphaNum12|null
$alphaNum12
= null
$alphaNum4
public
XdrAssetAlphaNum4|null
$alphaNum4
= null
$liquidityPool
public
XdrLiquidityPoolParameters|null
$liquidityPool
= null
$type
public
XdrAssetType
$type
Methods
__construct()
public
__construct([XdrAssetType|null $type = null ]) : mixed
Parameters
- $type : XdrAssetType|null = null
decode()
public
static decode(XdrBuffer $xdr) : static
Parameters
- $xdr : XdrBuffer
Return values
staticencode()
public
encode() : string
Return values
stringfromBase64Xdr()
public
static fromBase64Xdr(string $xdr) : static
Parameters
- $xdr : string
Return values
staticfromTxRep()
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
Return values
staticfromXdrAsset()
public
static fromXdrAsset(XdrAsset $xdrAsset) : XdrChangeTrustAsset
Parameters
- $xdrAsset : XdrAsset
Return values
XdrChangeTrustAssetgetAlphaNum12()
public
getAlphaNum12() : XdrAssetAlphaNum12|null
Return values
XdrAssetAlphaNum12|nullgetAlphaNum4()
public
getAlphaNum4() : XdrAssetAlphaNum4|null
Return values
XdrAssetAlphaNum4|nullgetLiquidityPool()
public
getLiquidityPool() : XdrLiquidityPoolParameters|null
Return values
XdrLiquidityPoolParameters|nullgetType()
public
getType() : XdrAssetType
Return values
XdrAssetTypesetAlphaNum12()
public
setAlphaNum12(XdrAssetAlphaNum12|null $alphaNum12) : void
Parameters
- $alphaNum12 : XdrAssetAlphaNum12|null
setAlphaNum4()
public
setAlphaNum4(XdrAssetAlphaNum4|null $alphaNum4) : void
Parameters
- $alphaNum4 : XdrAssetAlphaNum4|null
setLiquidityPool()
public
setLiquidityPool(XdrLiquidityPoolParameters|null $liquidityPool) : void
Parameters
- $liquidityPool : XdrLiquidityPoolParameters|null
setType()
public
setType(XdrAssetType $type) : void
Parameters
- $type : XdrAssetType
toBase64Xdr()
public
toBase64Xdr() : string
Return values
stringtoTxRep()
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).