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
- 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
- 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
$hash
public
string|null
$hash
= null
$type
public
XdrClaimableBalanceIDType
$type
Methods
__construct()
public
__construct(XdrClaimableBalanceIDType $type, string $hash) : mixed
Parameters
- $type : XdrClaimableBalanceIDType
- $hash : string
decode()
public
static decode(XdrBuffer $xdr) : static
Parameters
- $xdr : XdrBuffer
Return values
staticencode()
public
encode() : string
Return values
stringforClaimableBalanceId()
public
static forClaimableBalanceId(string $claimableBalanceId) : XdrClaimableBalanceID
Parameters
- $claimableBalanceId : string
Return values
XdrClaimableBalanceIDfromBase64Xdr()
public
static fromBase64Xdr(string $xdr) : static
Parameters
- $xdr : string
Return values
staticfromTxRep()
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
staticgetHash()
public
getHash() : string|null
Return values
string|nullgetPaddedBalanceIdHex()
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.
getType()
public
getType() : XdrClaimableBalanceIDType
Return values
XdrClaimableBalanceIDTypesetHash()
public
setHash(string|null $hash) : void
Parameters
- $hash : string|null
setType()
public
setType(XdrClaimableBalanceIDType $type) : void
Parameters
- $type : XdrClaimableBalanceIDType
toBase64Xdr()
public
toBase64Xdr() : string
Return values
stringtoTxRep()
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>