Stellar PHP SDK API Documentation

XdrTrustlineAsset extends XdrTrustlineAssetBase
in package

Table of Contents

Properties

$alphaNum12  : XdrAssetAlphaNum12|null
$alphaNum4  : XdrAssetAlphaNum4|null
$liquidityPoolID  : string|null
$type  : XdrAssetType

Methods

__construct()  : mixed
decode()  : static
encode()  : string
fromBase64Xdr()  : static
fromTxRep()  : static
Deserialize from a compact asset string.
fromXdrAsset()  : XdrTrustlineAsset
getAlphaNum12()  : XdrAssetAlphaNum12|null
getAlphaNum4()  : XdrAssetAlphaNum4|null
getLiquidityPoolID()  : string|null
getPoolId()  : string
getType()  : XdrAssetType
setAlphaNum12()  : void
setAlphaNum4()  : void
setLiquidityPoolID()  : void
setPoolId()  : void
setType()  : void
toBase64Xdr()  : string
toTxRep()  : void
Serialize as a compact asset string.

Properties

Methods

fromBase64Xdr()

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

fromTxRep()

Deserialize from a compact asset string.

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

Handles "native"/"XLM", a 64-character hex pool ID, or "CODE:ISSUER".

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

setLiquidityPoolID()

public setLiquidityPoolID(string|null $liquidityPoolID) : void
Parameters
$liquidityPoolID : string|null

setPoolId()

public setPoolId(string $poolId) : void
Parameters
$poolId : string

toTxRep()

Serialize as a compact asset string.

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

Returns "native" for XLM, "CODE:ISSUER" for credit assets, and the 64-character lowercase hex pool ID for pool-share assets. Overrides the generated base, which would expand sub-fields.

Parameters
$prefix : string

Key prefix for the TxRep map.

$lines : array<string, string>

Output map (modified in place).


        
On this page

Search results