Package org.stellar.sdk.xdr
Class HostFunction
java.lang.Object
org.stellar.sdk.xdr.HostFunction
HostFunction's original definition in the XDR file is:
union HostFunction switch (HostFunctionType type) { case HOST_FUNCTION_TYPE_INVOKE_CONTRACT: InvokeContractArgs invokeContract; case HOST_FUNCTION_TYPE_CREATE_CONTRACT: CreateContractArgs createContract; case HOST_FUNCTION_TYPE_UPLOAD_CONTRACT_WASM: opaque wasm<>; case HOST_FUNCTION_TYPE_CREATE_CONTRACT_V2: CreateContractArgsV2 createContractV2; };
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionHostFunction
(HostFunctionType discriminant, InvokeContractArgs invokeContract, CreateContractArgs createContract, byte[] wasm, CreateContractArgsV2 createContractV2) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
static HostFunction
decode
(XdrDataInputStream stream) void
encode
(XdrDataOutputStream stream) boolean
static HostFunction
fromXdrBase64
(String xdr) static HostFunction
fromXdrByteArray
(byte[] xdr) byte[]
getWasm()
int
hashCode()
void
setCreateContract
(CreateContractArgs createContract) void
setCreateContractV2
(CreateContractArgsV2 createContractV2) void
setDiscriminant
(HostFunctionType discriminant) void
setInvokeContract
(InvokeContractArgs invokeContract) void
setWasm
(byte[] wasm) toString()
default String
default byte[]
-
Constructor Details
-
HostFunction
public HostFunction() -
HostFunction
public HostFunction(HostFunctionType discriminant, InvokeContractArgs invokeContract, CreateContractArgs createContract, byte[] wasm, CreateContractArgsV2 createContractV2)
-
-
Method Details
-
encode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
builder
-
toBuilder
-
getDiscriminant
-
getInvokeContract
-
getCreateContract
-
getWasm
public byte[] getWasm() -
getCreateContractV2
-
setDiscriminant
-
setInvokeContract
-
setCreateContract
-
setWasm
public void setWasm(byte[] wasm) -
setCreateContractV2
-
equals
-
hashCode
public int hashCode() -
toString
-
toXdrBase64
- Throws:
IOException
-
toXdrByteArray
- Throws:
IOException
-