Stellar PHP SDK API Documentation

GetLedgersResponse extends SorobanRpcResponse

Response for the getLedgers request.

Tags
see
https://developers.stellar.org/docs/data/rpc/api-reference/methods/getLedgers

Table of Contents

Properties

$cursor  : string|null
$error  : SorobanRpcErrorResponse|null
$jsonResponse  : array<string|int, mixed>
$latestLedger  : int|null
$latestLedgerCloseTime  : int|null
$ledgers  : array<string|int, LedgerInfo>|null
$oldestLedger  : int|null
$oldestLedgerCloseTime  : int|null

Methods

__construct()  : mixed
fromJson()  : static
Creates an instance from JSON-RPC response data
getCursor()  : string|null
getError()  : SorobanRpcErrorResponse|null
getJsonResponse()  : array<string|int, mixed>
getLatestLedger()  : int|null
getLatestLedgerCloseTime()  : int|null
getLedgers()  : array<string|int, LedgerInfo>|null
getOldestLedger()  : int|null
getOldestLedgerCloseTime()  : int|null
setCursor()  : void
setError()  : void
setJsonResponse()  : void
setLatestLedger()  : void
setLatestLedgerCloseTime()  : void
setLedgers()  : void
setOldestLedger()  : void
setOldestLedgerCloseTime()  : void

Properties

$latestLedger

public int|null $latestLedger = null

The sequence number of the latest ledger known to Soroban RPC at the time it handled the request

$latestLedgerCloseTime

public int|null $latestLedgerCloseTime = null

Unix timestamp of the latest ledger close time

$oldestLedger

public int|null $oldestLedger = null

The sequence number of the oldest ledger ingested by Soroban RPC

$oldestLedgerCloseTime

public int|null $oldestLedgerCloseTime = null

Unix timestamp of the oldest ledger close time

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

getCursor()

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

Cursor value for pagination

getJsonResponse()

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

The complete JSON response as data array

getLatestLedger()

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

The sequence number of the latest ledger known to Soroban RPC at the time it handled the request

getLatestLedgerCloseTime()

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

Unix timestamp of the latest ledger close time

getOldestLedger()

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

The sequence number of the oldest ledger ingested by Soroban RPC

getOldestLedgerCloseTime()

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

Unix timestamp of the oldest ledger close time

setCursor()

public setCursor(string|null $cursor) : void
Parameters
$cursor : string|null

Cursor value for pagination

setJsonResponse()

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

The complete JSON response as data array

setLatestLedger()

public setLatestLedger(int|null $latestLedger) : void
Parameters
$latestLedger : int|null

The sequence number of the latest ledger

setLatestLedgerCloseTime()

public setLatestLedgerCloseTime(int|null $latestLedgerCloseTime) : void
Parameters
$latestLedgerCloseTime : int|null

Unix timestamp of the latest ledger close time

setOldestLedger()

public setOldestLedger(int|null $oldestLedger) : void
Parameters
$oldestLedger : int|null

The sequence number of the oldest ledger

setOldestLedgerCloseTime()

public setOldestLedgerCloseTime(int|null $oldestLedgerCloseTime) : void
Parameters
$oldestLedgerCloseTime : int|null

Unix timestamp of the oldest ledger close time


        
On this page

Search results