Class TransactionPreconditions

java.lang.Object
org.stellar.sdk.TransactionPreconditions

public final class TransactionPreconditions extends Object
Preconditions of a transaction per CAP-21
  • Field Details

    • MAX_EXTRA_SIGNERS_COUNT

      public static final long MAX_EXTRA_SIGNERS_COUNT
      See Also:
    • TIMEOUT_INFINITE

      public static final BigInteger TIMEOUT_INFINITE
  • Method Details

    • validate

      public void validate()
      Validates the preconditions.
      Throws:
      IllegalStateException - if the preconditions are invalid
    • hasV2

      public boolean hasV2()
      Returns:
      true if the preconditions are v2.
    • fromXdr

      public static TransactionPreconditions fromXdr(Preconditions preconditions)
      Creates a new TransactionPreconditions object from a Preconditions XDR object.
      Parameters:
      preconditions - the Preconditions object to convert
      Returns:
      a new TransactionPreconditions object from the given XDR object
    • toXdr

      public Preconditions toXdr()
      Returns:
      the XDR object of this TransactionPreconditions
    • builder

    • toBuilder

    • getTimeBounds

      public TimeBounds getTimeBounds()
      The time bounds for the transaction.
    • getLedgerBounds

      @Nullable public LedgerBounds getLedgerBounds()
      The ledger bounds for the transaction.
    • getMinSeqNumber

      @Nullable public Long getMinSeqNumber()
      The minimum source account sequence number this transaction is valid for. if null, the transaction is valid when **source account's sequence number == tx.sequence - 1**.
    • getMinSeqAge

      @NonNull public @NonNull BigInteger getMinSeqAge()
      The minimum amount of time between source account sequence time and the ledger time when this transaction will become valid. If the value is 0, the transaction is unrestricted by the account sequence age. Cannot be negative.
    • getMinSeqLedgerGap

      public long getMinSeqLedgerGap()
      The minimum number of ledgers between source account sequence and the ledger number when this transaction will become valid. If the value is 0, the transaction is unrestricted by the account sequence ledger. Cannot be negative.
    • getExtraSigners

      @NonNull public @NonNull List<SignerKey> getExtraSigners()
      Required extra signers.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object