Stellar PHP SDK API Documentation

XdrAllowTrustOperationAsset extends XdrAllowTrustOperationAssetBase
in package

Table of Contents

Properties

$assetCode12  : string|null
$assetCode4  : string|null
$type  : XdrAssetType

Methods

__construct()  : mixed
decode()  : static
encode()  : string
fromAlphaNumAssetCode()  : XdrAllowTrustOperationAsset
fromBase64Xdr()  : static
fromJson()  : static
fromJsonValue()  : static
fromTxRep()  : static
Deserialize from a compact asset code string.
getAssetCode12()  : string|null
getAssetCode4()  : string|null
getType()  : XdrAssetType
setAssetCode12()  : void
setAssetCode4()  : void
setType()  : void
toBase64Xdr()  : string
toJson()  : string
toJsonValue()  : mixed
toTxRep()  : void
Serialize as a compact asset code string (e.g. "USD", "EURT").

Properties

Methods

fromJson()

public static fromJson(string $json) : static
Parameters
$json : string
Tags
throws
JsonException

If $json is not syntactically valid JSON.

InvalidArgumentException

If the JSON shape does not match this type.

Return values
static

fromTxRep()

Deserialize from a compact asset code string.

public static fromTxRep(array<string, string> $map, string $prefix) : static
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

toJson()

public toJson() : string
Tags
throws
JsonException

If the value contains structures that cannot be encoded as JSON.

Return values
string

toTxRep()

Serialize as a compact asset code string (e.g. "USD", "EURT").

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

Overrides the generated base method, which would expand the type discriminant and raw hex bytes. SEP-0011 uses a plain trimmed code.

Parameters
$prefix : string

Key prefix for the TxRep map.

$lines : array<string, string>

Output map (modified in place).

On this page

Search results