Stellar PHP SDK API Documentation

LedgerBounds
in package

Represents ledger number bounds as transaction preconditions

LedgerBounds specify a range of ledger numbers during which a transaction is valid. Transactions with ledger bounds will only be accepted if the current ledger number falls within the specified range.

This feature was introduced in CAP-21 to provide more granular control over transaction validity based on ledger progression rather than time.

Tags
see
https://github.com/stellar/stellar-protocol/blob/master/core/cap-0021.md#specification

CAP-21 specification

see
https://developers.stellar.org

Stellar developer docs Documentation on preconditions

Table of Contents

Methods

__construct()  : mixed
Constructs a new LedgerBounds instance
fromXdr()  : LedgerBounds
Creates LedgerBounds from XDR format
getMaxLedger()  : int
Gets the maximum ledger number
getMinLedger()  : int
Gets the minimum ledger number
setMaxLedger()  : void
Sets the maximum ledger number
setMinLedger()  : void
Sets the minimum ledger number
toXdr()  : XdrLedgerBounds
Converts these ledger bounds to XDR format

Methods

__construct()

Constructs a new LedgerBounds instance

public __construct(int $minLedger, int $maxLedger) : mixed
Parameters
$minLedger : int

The minimum ledger number (inclusive)

$maxLedger : int

The maximum ledger number (inclusive)

getMaxLedger()

Gets the maximum ledger number

public getMaxLedger() : int
Return values
int

The maximum ledger number

getMinLedger()

Gets the minimum ledger number

public getMinLedger() : int
Return values
int

The minimum ledger number

setMaxLedger()

Sets the maximum ledger number

public setMaxLedger(int $maxLedger) : void
Parameters
$maxLedger : int

The maximum ledger number

setMinLedger()

Sets the minimum ledger number

public setMinLedger(int $minLedger) : void
Parameters
$minLedger : int

The minimum ledger number


        
On this page

Search results