Package org.stellar.sdk.xdr
Class PreconditionsV2
java.lang.Object
org.stellar.sdk.xdr.PreconditionsV2
PreconditionsV2's original definition in the XDR file is:
struct PreconditionsV2
{
TimeBounds* timeBounds;
// Transaction only valid for ledger numbers n such that
// minLedger <= n < maxLedger (if maxLedger == 0, then
// only minLedger is checked)
LedgerBounds* ledgerBounds;
// If NULL, only valid when sourceAccount's sequence number
// is seqNum - 1. Otherwise, valid when sourceAccount's
// sequence number n satisfies minSeqNum <= n < tx.seqNum.
// Note that after execution the account's sequence number
// is always raised to tx.seqNum, and a transaction is not
// valid if tx.seqNum is too high to ensure replay protection.
SequenceNumber* minSeqNum;
// For the transaction to be valid, the current ledger time must
// be at least minSeqAge greater than sourceAccount's seqTime.
Duration minSeqAge;
// For the transaction to be valid, the current ledger number
// must be at least minSeqLedgerGap greater than sourceAccount's
// seqLedger.
uint32 minSeqLedgerGap;
// For the transaction to be valid, there must be a signature
// corresponding to every Signer in this array, even if the
// signature is not otherwise required by the sourceAccount or
// operations.
SignerKey extraSigners<2>;
};
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionPreconditionsV2(TimeBounds timeBounds, LedgerBounds ledgerBounds, SequenceNumber minSeqNum, Duration minSeqAge, Uint32 minSeqLedgerGap, SignerKey[] extraSigners) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static PreconditionsV2decode(XdrDataInputStream stream) voidencode(XdrDataOutputStream stream) booleanstatic PreconditionsV2fromXdrBase64(String xdr) static PreconditionsV2fromXdrByteArray(byte[] xdr) inthashCode()voidsetExtraSigners(SignerKey[] extraSigners) voidsetLedgerBounds(LedgerBounds ledgerBounds) voidsetMinSeqAge(Duration minSeqAge) voidsetMinSeqLedgerGap(Uint32 minSeqLedgerGap) voidsetMinSeqNum(SequenceNumber minSeqNum) voidsetTimeBounds(TimeBounds timeBounds) toString()default Stringdefault byte[]
-
Constructor Details
-
PreconditionsV2
public PreconditionsV2() -
PreconditionsV2
public PreconditionsV2(TimeBounds timeBounds, LedgerBounds ledgerBounds, SequenceNumber minSeqNum, Duration minSeqAge, Uint32 minSeqLedgerGap, SignerKey[] extraSigners)
-
-
Method Details
-
encode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
builder
-
toBuilder
-
getTimeBounds
-
getLedgerBounds
-
getMinSeqNum
-
getMinSeqAge
-
getMinSeqLedgerGap
-
getExtraSigners
-
setTimeBounds
-
setLedgerBounds
-
setMinSeqNum
-
setMinSeqAge
-
setMinSeqLedgerGap
-
setExtraSigners
-
equals
-
hashCode
public int hashCode() -
toString
-
toXdrBase64
- Throws:
IOException
-
toXdrByteArray
- Throws:
IOException
-