Package org.stellar.sdk
Class TransactionPreconditions
java.lang.Object
org.stellar.sdk.TransactionPreconditions
Preconditions of a transaction per CAP-21
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
boolean
static TransactionPreconditions
fromXdr
(Preconditions preconditions) Creates a newTransactionPreconditions
object from aPreconditions
XDR object.Required extra signers.The ledger bounds for the transaction.@NonNull BigInteger
The minimum amount of time between source account sequence time and the ledger time when this transaction will become valid.long
The 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.int
hashCode()
boolean
hasV2()
toString()
toXdr()
void
validate()
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:
true
if the preconditions are v2.
-
fromXdr
Creates a newTransactionPreconditions
object from aPreconditions
XDR object.- Parameters:
preconditions
- thePreconditions
object to convert- Returns:
- a new
TransactionPreconditions
object 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
-