Package org.stellar.sdk.xdr
Class InvokeHostFunctionOp
java.lang.Object
org.stellar.sdk.xdr.InvokeHostFunctionOp
- All Implemented Interfaces:
XdrElement
InvokeHostFunctionOp's original definition in the XDR file is:
struct InvokeHostFunctionOp
{
// Host function to invoke.
HostFunction hostFunction;
// Per-address authorizations for this host function.
SorobanAuthorizationEntry auth<>;
};
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface org.stellar.sdk.xdr.XdrElement
gson -
Constructor Summary
ConstructorsConstructorDescriptionInvokeHostFunctionOp(HostFunction hostFunction, SorobanAuthorizationEntry[] auth) Creates a newInvokeHostFunctionOpinstance. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static InvokeHostFunctionOpdecode(XdrDataInputStream stream) static InvokeHostFunctionOpdecode(XdrDataInputStream stream, int maxDepth) voidencode(XdrDataOutputStream stream) Encodes this value to XDR and writes it to the provided stream.booleanstatic InvokeHostFunctionOpstatic InvokeHostFunctionOpfromXdrBase64(String xdr) static InvokeHostFunctionOpfromXdrByteArray(byte[] xdr) getAuth()Value of theauthfield.Value of thehostFunctionfield.inthashCode()voidsetAuth(SorobanAuthorizationEntry[] auth) Value of theauthfield.voidsetHostFunction(HostFunction hostFunction) Value of thehostFunctionfield.toJson()Serializes this value to JSON.toString()Methods inherited from interface org.stellar.sdk.xdr.XdrElement
toXdrBase64, toXdrByteArray
-
Constructor Details
-
InvokeHostFunctionOp
public InvokeHostFunctionOp() -
InvokeHostFunctionOp
Creates a newInvokeHostFunctionOpinstance.- Parameters:
hostFunction- thehostFunctionfield valueauth- theauthfield 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 InvokeHostFunctionOp 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
-
getHostFunction
Value of thehostFunctionfield.- Returns:
- the
hostFunctionfield value
-
getAuth
Value of theauthfield.- Returns:
- the
authfield value
-
setHostFunction
Value of thehostFunctionfield.- Parameters:
hostFunction- thehostFunctionfield value
-
setAuth
Value of theauthfield.- Parameters:
auth- theauthfield value
-
equals
-
hashCode
public int hashCode() -
toString
-