Package org.stellar.sdk.xdr
Class SorobanTransactionData
java.lang.Object
org.stellar.sdk.xdr.SorobanTransactionData
- All Implemented Interfaces:
XdrElement
SorobanTransactionData's original definition in the XDR file is:
struct SorobanTransactionData
{
union switch (int v)
{
case 0:
void;
case 1:
SorobanResourcesExtV0 resourceExt;
} ext;
SorobanResources resources;
// Amount of the transaction `fee` allocated to the Soroban resource fees.
// The fraction of `resourceFee` corresponding to `resources` specified
// above is *not* refundable (i.e. fees for instructions, ledger I/O), as
// well as fees for the transaction size.
// The remaining part of the fee is refundable and the charged value is
// based on the actual consumption of refundable resources (events, ledger
// rent bumps).
// The `inclusionFee` used for prioritization of the transaction is defined
// as `tx.fee - resourceFee`.
int64 resourceFee;
};
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classSorobanTransactionDataExt's original definition in the XDR file is: -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionSorobanTransactionData(SorobanTransactionData.SorobanTransactionDataExt ext, SorobanResources resources, Int64 resourceFee) Creates a newSorobanTransactionDatainstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static SorobanTransactionDatadecode(XdrDataInputStream stream) static SorobanTransactionDatadecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic SorobanTransactionDatastatic SorobanTransactionDatafromXdrBase64(String xdr) static SorobanTransactionDatafromXdrByteArray(byte[] xdr) getExt()Value of theextfield.Value of theresourceFeefield.Value of theresourcesfield.inthashCode()voidValue of theextfield.voidsetResourceFee(Int64 resourceFee) Value of theresourceFeefield.voidsetResources(SorobanResources resources) Value of theresourcesfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
SorobanTransactionData
public SorobanTransactionData() -
SorobanTransactionData
public SorobanTransactionData(SorobanTransactionData.SorobanTransactionDataExt ext, SorobanResources resources, Int64 resourceFee) Creates a newSorobanTransactionDatainstance.- Parameters:
ext- theextfield valueresources- theresourcesfield valueresourceFee- theresourceFeefield 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
public static SorobanTransactionData decode(XdrDataInputStream stream, int maxDepth) throws IOException - 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
-
getExt
Value of theextfield.- Returns:
- the
extfield value
-
getResources
Value of theresourcesfield.- Returns:
- the
resourcesfield value
-
getResourceFee
Value of theresourceFeefield.- Returns:
- the
resourceFeefield value
-
setExt
Value of theextfield.- Parameters:
ext- theextfield value
-
setResources
Value of theresourcesfield.- Parameters:
resources- theresourcesfield value
-
setResourceFee
Value of theresourceFeefield.- Parameters:
resourceFee- theresourceFeefield value
-
equals
-
hashCode
public int hashCode() -
toString
-