Package org.stellar.sdk
Class TransactionPreconditions
java.lang.Object
org.stellar.sdk.TransactionPreconditions
Preconditions of a transaction per CAP-21
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()booleanstatic TransactionPreconditionsfromXdr(Preconditions preconditions) Creates a newTransactionPreconditionsobject from aPreconditionsXDR object.Required extra signers.The ledger bounds for the transaction.@NonNull BigIntegerThe minimum amount of time between source account sequence time and the ledger time when this transaction will become valid.longThe minimum number of ledgers between source account sequence and the ledger number when this transaction will become valid.The minimum source account sequence number this transaction is valid for.The time bounds for the transaction.inthashCode()booleanhasV2()toString()toXdr()voidvalidate()Validates the preconditions.
-
Field Details
-
MAX_EXTRA_SIGNERS_COUNT
public static final long MAX_EXTRA_SIGNERS_COUNT- See Also:
-
TIMEOUT_INFINITE
-
-
Method Details
-
validate
public void validate()Validates the preconditions.- Throws:
IllegalStateException- if the preconditions are invalid
-
hasV2
public boolean hasV2()- Returns:
trueif the preconditions are v2.
-
fromXdr
Creates a newTransactionPreconditionsobject from aPreconditionsXDR object.- Parameters:
preconditions- thePreconditionsobject to convert- Returns:
- a new
TransactionPreconditionsobject from the given XDR object
-
toXdr
- Returns:
- the XDR object of this
TransactionPreconditions
-
builder
-
toBuilder
-
getTimeBounds
The time bounds for the transaction. -
getLedgerBounds
The ledger bounds for the transaction. -
getMinSeqNumber
The minimum source account sequence number this transaction is valid for. ifnull, the transaction is valid when **source account's sequence number == tx.sequence - 1**. -
getMinSeqAge
The minimum amount of time between source account sequence time and the ledger time when this transaction will become valid. If the value is0, 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 is0, the transaction is unrestricted by the account sequence ledger. Cannot be negative. -
getExtraSigners
Required extra signers. -
equals
-
hashCode
public int hashCode() -
toString
-