Stellar PHP SDK API Documentation

PreconditionsTimeBoundsResponse

Represents time-based validity bounds for transaction preconditions

Time bounds specify a time range during which a transaction is valid for submission to the network. The transaction can only be included in ledgers closed between minTime and maxTime (inclusive). Times are represented as Unix timestamps in seconds.

Time bounds are the most common form of transaction precondition and help prevent transaction replay attacks and ensure transactions execute within expected timeframes. Null values indicate no constraint in that direction (no minimum or maximum).

Available since the early Stellar protocol versions.

Tags
see
TransactionPreconditionsResponse

For the parent preconditions container

see
PreconditionsLedgerBoundsResponse

For ledger-based validity bounds

see
https://developers.stellar.org

Stellar developer docs Transaction Preconditions

since
1.0.0

Table of Contents

Methods

fromJson()  : PreconditionsTimeBoundsResponse
Creates a PreconditionsTimeBoundsResponse instance from JSON data
getMaxTime()  : string|null
Gets the maximum time for transaction validity
getMinTime()  : string|null
Gets the minimum time for transaction validity
loadFromJson()  : void
Loads time bounds data from JSON response

Methods

getMaxTime()

Gets the maximum time for transaction validity

public getMaxTime() : string|null

Returns the maximum Unix timestamp (in seconds) before which this transaction must be included in a ledger. After this time, the transaction becomes invalid. If null, the transaction has no maximum time constraint.

Return values
string|null

The maximum Unix timestamp as a string, or null for no constraint

getMinTime()

Gets the minimum time for transaction validity

public getMinTime() : string|null

Returns the minimum Unix timestamp (in seconds) after which this transaction becomes valid. If null, the transaction has no minimum time constraint and is valid from creation.

Return values
string|null

The minimum Unix timestamp as a string, or null for no constraint

loadFromJson()

Loads time bounds data from JSON response

protected loadFromJson(array<string|int, mixed> $json) : void
Parameters
$json : array<string|int, mixed>

The JSON array containing time bounds data


        
On this page

Search results