Package org.stellar.sdk.xdr
Class SorobanAuthorizedFunction
java.lang.Object
org.stellar.sdk.xdr.SorobanAuthorizedFunction
SorobanAuthorizedFunction's original definition in the XDR file is:
union SorobanAuthorizedFunction switch (SorobanAuthorizedFunctionType type) { case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CONTRACT_FN: InvokeContractArgs contractFn; // This variant of auth payload for creating new contract instances // doesn't allow specifying the constructor arguments, creating contracts // with constructors that take arguments is only possible by authorizing // `SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN` // (protocol 22+). case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_HOST_FN: CreateContractArgs createContractHostFn; // This variant of auth payload for creating new contract instances // is only accepted in and after protocol 22. It allows authorizing the // contract constructor arguments. case SOROBAN_AUTHORIZED_FUNCTION_TYPE_CREATE_CONTRACT_V2_HOST_FN: CreateContractArgsV2 createContractV2HostFn; };
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
-
Constructor Summary
ConstructorDescriptionSorobanAuthorizedFunction
(SorobanAuthorizedFunctionType discriminant, InvokeContractArgs contractFn, CreateContractArgs createContractHostFn, CreateContractArgsV2 createContractV2HostFn) -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
static SorobanAuthorizedFunction
decode
(XdrDataInputStream stream) void
encode
(XdrDataOutputStream stream) boolean
static SorobanAuthorizedFunction
fromXdrBase64
(String xdr) static SorobanAuthorizedFunction
fromXdrByteArray
(byte[] xdr) int
hashCode()
void
setContractFn
(InvokeContractArgs contractFn) void
setCreateContractHostFn
(CreateContractArgs createContractHostFn) void
setCreateContractV2HostFn
(CreateContractArgsV2 createContractV2HostFn) void
setDiscriminant
(SorobanAuthorizedFunctionType discriminant) toString()
default String
default byte[]
-
Constructor Details
-
SorobanAuthorizedFunction
public SorobanAuthorizedFunction() -
SorobanAuthorizedFunction
public SorobanAuthorizedFunction(SorobanAuthorizedFunctionType discriminant, InvokeContractArgs contractFn, CreateContractArgs createContractHostFn, CreateContractArgsV2 createContractV2HostFn)
-
-
Method Details
-
encode
- Throws:
IOException
-
decode
- Throws:
IOException
-
fromXdrBase64
- Throws:
IOException
-
fromXdrByteArray
- Throws:
IOException
-
builder
-
toBuilder
-
getDiscriminant
-
getContractFn
-
getCreateContractHostFn
-
getCreateContractV2HostFn
-
setDiscriminant
-
setContractFn
-
setCreateContractHostFn
-
setCreateContractV2HostFn
-
equals
-
hashCode
public int hashCode() -
toString
-
toXdrBase64
- Throws:
IOException
-
toXdrByteArray
- Throws:
IOException
-