Package org.stellar.sdk.xdr
Class Transaction
java.lang.Object
org.stellar.sdk.xdr.Transaction
- All Implemented Interfaces:
XdrElement
Transaction's original definition in the XDR file is:
struct Transaction
{
// account used to run the transaction
MuxedAccount sourceAccount;
// the fee the sourceAccount will pay
uint32 fee;
// sequence number to consume in the account
SequenceNumber seqNum;
// validity conditions
Preconditions cond;
Memo memo;
Operation operations<MAX_OPS_PER_TX>;
union switch (int v)
{
case 0:
void;
case 1:
SorobanTransactionData sorobanData;
}
ext;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classTransactionExt's original definition in the XDR file is: -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionTransaction(MuxedAccount sourceAccount, Uint32 fee, SequenceNumber seqNum, Preconditions cond, Memo memo, Operation[] operations, Transaction.TransactionExt ext) Creates a newTransactioninstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static Transactiondecode(XdrDataInputStream stream) static Transactiondecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic Transactionstatic TransactionfromXdrBase64(String xdr) static TransactionfromXdrByteArray(byte[] xdr) getCond()Value of thecondfield.getExt()Value of theextfield.getFee()Value of thefeefield.getMemo()Value of thememofield.Value of theoperationsfield.Value of theseqNumfield.Value of thesourceAccountfield.inthashCode()voidsetCond(Preconditions cond) Value of thecondfield.voidValue of theextfield.voidValue of thefeefield.voidValue of thememofield.voidsetOperations(Operation[] operations) Value of theoperationsfield.voidsetSeqNum(SequenceNumber seqNum) Value of theseqNumfield.voidsetSourceAccount(MuxedAccount sourceAccount) Value of thesourceAccountfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
Transaction
public Transaction() -
Transaction
public Transaction(MuxedAccount sourceAccount, Uint32 fee, SequenceNumber seqNum, Preconditions cond, Memo memo, Operation[] operations, Transaction.TransactionExt ext) Creates a newTransactioninstance.- Parameters:
sourceAccount- thesourceAccountfield valuefee- thefeefield valueseqNum- theseqNumfield valuecond- thecondfield valuememo- thememofield valueoperations- theoperationsfield valueext- theextfield value
-
-
Method Details
-
encode
Description copied from interface:XdrElementEncodes this value to XDR and writes it to the provided stream.- Specified by:
encodein interfaceXdrElement- Parameters:
stream- the destination XDR output stream- Throws:
IOException- if an I/O error occurs while writing the value
-
decode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
toJson
Description copied from interface:XdrElementSerializes this value to JSON.- Specified by:
toJsonin interfaceXdrElement- Returns:
- the JSON representation of this value
-
fromJson
-
builder
-
toBuilder
-
getSourceAccount
Value of thesourceAccountfield.- Returns:
- the
sourceAccountfield value
-
getFee
Value of thefeefield.- Returns:
- the
feefield value
-
getSeqNum
Value of theseqNumfield.- Returns:
- the
seqNumfield value
-
getCond
Value of thecondfield.- Returns:
- the
condfield value
-
getMemo
Value of thememofield.- Returns:
- the
memofield value
-
getOperations
Value of theoperationsfield.- Returns:
- the
operationsfield value
-
getExt
Value of theextfield.- Returns:
- the
extfield value
-
setSourceAccount
Value of thesourceAccountfield.- Parameters:
sourceAccount- thesourceAccountfield value
-
setFee
Value of thefeefield.- Parameters:
fee- thefeefield value
-
setSeqNum
Value of theseqNumfield.- Parameters:
seqNum- theseqNumfield value
-
setCond
Value of thecondfield.- Parameters:
cond- thecondfield value
-
setMemo
Value of thememofield.- Parameters:
memo- thememofield value
-
setOperations
Value of theoperationsfield.- Parameters:
operations- theoperationsfield value
-
setExt
Value of theextfield.- Parameters:
ext- theextfield value
-
equals
-
hashCode
public int hashCode() -
toString
-