PreconditionsLedgerBoundsResponse

public struct PreconditionsLedgerBoundsResponse : Decodable, Sendable

Represents ledger sequence constraints for when a transaction can be included.

Ledger bounds restrict transaction validity to a specific range of ledger sequence numbers. Validators will reject transactions with ledger bounds that don’t include the current ledger.

Use cases:

  • Transactions that should execute within specific ledger windows
  • Coordinating transactions across multiple parties with ledger-based timing
  • Ensuring transactions execute before significant network state changes

Unlike time bounds, ledger bounds use deterministic ledger sequence numbers rather than wall-clock time, providing more predictable execution windows.

See also:

  • Stellar developer docs
  • TransactionPreconditionsResponse for all precondition types
  • PreconditionsTimeBoundsResponse for time-based constraints
  • Minimum ledger sequence number. Transaction invalid before this ledger. Value 0 means no minimum.

    Declaration

    Swift

    public var minLedger: Int
  • Maximum ledger sequence number. Transaction invalid after this ledger. Value 0 means no maximum.

    Declaration

    Swift

    public var maxLedger: Int
  • Declaration

    Swift

    public init(from decoder: Decoder) throws