Stellar PHP SDK API Documentation

GetLatestLedgerResponse extends SorobanRpcResponse

Response for getLatestLedger request.

Tags
see
https://developers.stellar.org/network/soroban-rpc/api-reference/methods/getLatestLedger

Table of Contents

Properties

$closeTime  : int|null
$error  : SorobanRpcErrorResponse|null
$headerXdr  : string|null
$id  : string|null
$jsonResponse  : array<string|int, mixed>
$metadataXdr  : string|null
$protocolVersion  : int|null
$sequence  : int|null

Methods

__construct()  : mixed
fromJson()  : static
Creates an instance from JSON-RPC response data
getCloseTime()  : int|null
getError()  : SorobanRpcErrorResponse|null
getHeaderXdr()  : string|null
getId()  : string|null
getJsonResponse()  : array<string|int, mixed>
getMetadataXdr()  : string|null
getProtocolVersion()  : int|null
getSequence()  : int|null
setCloseTime()  : void
setError()  : void
setHeaderXdr()  : void
setId()  : void
setJsonResponse()  : void
setMetadataXdr()  : void
setProtocolVersion()  : void
setSequence()  : void

Properties

$protocolVersion

public int|null $protocolVersion = null

Stellar Core protocol version associated with the latest ledger

$sequence

public int|null $sequence = null

The sequence number of the latest ledger known to Soroban RPC

Methods

__construct()

public __construct(array<string|int, mixed> $jsonResponse) : mixed
Parameters
$jsonResponse : array<string|int, mixed>

The complete JSON response as data array

fromJson()

Creates an instance from JSON-RPC response data

public static fromJson(array<string, mixed> $json) : static
Parameters
$json : array<string, mixed>

The JSON response data

Return values
static

The created instance

getCloseTime()

public getCloseTime() : int|null
Return values
int|null

Unix timestamp when the ledger closed

getHeaderXdr()

public getHeaderXdr() : string|null
Return values
string|null

Base64-encoded ledger header XDR

getId()

public getId() : string|null
Return values
string|null

Hash identifier of the latest ledger as hex-encoded string

getJsonResponse()

public getJsonResponse() : array<string|int, mixed>
Return values
array<string|int, mixed>

The complete JSON response as data array

getMetadataXdr()

public getMetadataXdr() : string|null
Return values
string|null

Base64-encoded ledger close metadata XDR

getProtocolVersion()

public getProtocolVersion() : int|null
Return values
int|null

Stellar Core protocol version associated with the latest ledger

getSequence()

public getSequence() : int|null
Return values
int|null

The sequence number of the latest ledger known to Soroban RPC

setCloseTime()

public setCloseTime(int|null $closeTime) : void
Parameters
$closeTime : int|null

Unix timestamp when the ledger closed

setHeaderXdr()

public setHeaderXdr(string|null $headerXdr) : void
Parameters
$headerXdr : string|null

Base64-encoded ledger header XDR

setId()

public setId(string|null $id) : void
Parameters
$id : string|null

Hash identifier of the latest ledger

setJsonResponse()

public setJsonResponse(array<string|int, mixed> $jsonResponse) : void
Parameters
$jsonResponse : array<string|int, mixed>

The complete JSON response as data array

setMetadataXdr()

public setMetadataXdr(string|null $metadataXdr) : void
Parameters
$metadataXdr : string|null

Base64-encoded ledger close metadata XDR

setProtocolVersion()

public setProtocolVersion(int|null $protocolVersion) : void
Parameters
$protocolVersion : int|null

Stellar Core protocol version

setSequence()

public setSequence(int|null $sequence) : void
Parameters
$sequence : int|null

The sequence number of the latest ledger


        
On this page

Search results