Stellar PHP SDK API Documentation

XdrClaimableBalanceID extends XdrClaimableBalanceIDBase
in package

Table of Contents

Properties

$hash  : string|null
$type  : XdrClaimableBalanceIDType

Methods

__construct()  : mixed
decode()  : static
encode()  : string
forClaimableBalanceId()  : XdrClaimableBalanceID
fromBase64Xdr()  : static
fromJson()  : static
fromJsonValue()  : static
fromTxRep()  : static
Override fromTxRep to store the hash as a hex string (as the constructor and encode() expect) rather than converting to/from binary bytes.
getHash()  : string|null
getPaddedBalanceIdHex()  : string
Returns the balance id as hex string with leading zeros, so it can be used in horizon requests.
getType()  : XdrClaimableBalanceIDType
setHash()  : void
setType()  : void
toBase64Xdr()  : string
toJson()  : string
toJsonValue()  : string
toTxRep()  : void
Override toTxRep to emit the hash as a hex string directly (this class stores $hash as a hex string, not binary bytes).

Properties

Methods

fromBase64Xdr()

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

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

fromJsonValue()

public static fromJsonValue(mixed $value) : static
Parameters
$value : mixed
Return values
static

fromTxRep()

Override fromTxRep to store the hash as a hex string (as the constructor and encode() expect) rather than converting to/from binary bytes.

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

getPaddedBalanceIdHex()

Returns the balance id as hex string with leading zeros, so it can be used in horizon requests.

public getPaddedBalanceIdHex() : string

e.g. '000000003be9c4382b2e4acc74600f6eb1b68e51de5e5cc22ee2adcf68bd7fdfa1f40cf9' instead of '3be9c4382b2e4acc74600f6eb1b68e51de5e5cc22ee2adcf68bd7fdfa1f40cf9'

Return values
string

balance id as hex string with leading zeros, so it can be used in horizon requests.

toJson()

public toJson() : string
Tags
throws
JsonException

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

Return values
string

toTxRep()

Override toTxRep to emit the hash as a hex string directly (this class stores $hash as a hex string, not binary bytes).

public toTxRep(string $prefix, array<string, string> &$lines) : void
Parameters
$prefix : string
$lines : array<string, string>
On this page

Search results