Class Session
- java.lang.Object
-
- com.casper.sdk.model.transaction.target.Session
-
- All Implemented Interfaces:
CasperSerializableObject,Tag,TransactionTarget,SerializableObject
public class Session extends java.lang.Object implements TransactionTarget
The execution target is the included module bytes, i.e. compiled Wasm.Note this class is serialized using the @see TransactionTargetSerializer and deserialized using the
-
-
Constructor Summary
Constructors Constructor Description Session()Session(boolean installUpgrade, TransactionRuntime runtime, byte[] moduleBytes, long transferredValue, Digest seed)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description bytegetByteTag()byte[]getModuleBytes()The compiled Wasm.TransactionRuntimegetRuntime()The execution runtime to use.DigestgetSeed()intgetSESSION_IS_INSTALL_INDEX()intgetSESSION_MODULE_BYTES_INDEX()intgetSESSION_RUNTIME_INDEX()intgetSESSION_SEED_INDEX()bytegetSESSION_TAG()intgetSESSION_TRANSFERRED_VALUE_INDEX()intgetTAG_FIELD_INDEX()longgetTransferredValue()booleanisInstallUpgrade()Flag determining if the Wasm is an install/upgrade.voidserialize(SerializerBuffer ser, Target target)Called when the object's values must be serializedvoidsetInstallUpgrade(boolean installUpgrade)Flag determining if the Wasm is an install/upgrade.voidsetModuleBytes(byte[] moduleBytes)The compiled Wasm.voidsetRuntime(TransactionRuntime runtime)The execution runtime to use.voidsetSeed(Digest seed)voidsetTransferredValue(long transferredValue)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.casper.sdk.model.clvalue.serde.CasperSerializableObject
serialize
-
-
-
-
Constructor Detail
-
Session
public Session()
-
Session
public Session(boolean installUpgrade, TransactionRuntime runtime, byte[] moduleBytes, long transferredValue, Digest seed)
-
-
Method Detail
-
serialize
public void serialize(SerializerBuffer ser, Target target) throws ValueSerializationException, NoSuchTypeException
Description copied from interface:CasperSerializableObjectCalled when the object's values must be serialized- Specified by:
serializein interfaceCasperSerializableObject- Parameters:
ser- the serializer to be usedtarget- target serialization standard- Throws:
ValueSerializationException- exception holding information of failure to serialize a valueNoSuchTypeException
-
getByteTag
public byte getByteTag()
- Specified by:
getByteTagin interfaceTag
-
getTAG_FIELD_INDEX
public int getTAG_FIELD_INDEX()
-
getSESSION_TAG
public byte getSESSION_TAG()
-
getSESSION_IS_INSTALL_INDEX
public int getSESSION_IS_INSTALL_INDEX()
-
getSESSION_RUNTIME_INDEX
public int getSESSION_RUNTIME_INDEX()
-
getSESSION_MODULE_BYTES_INDEX
public int getSESSION_MODULE_BYTES_INDEX()
-
getSESSION_TRANSFERRED_VALUE_INDEX
public int getSESSION_TRANSFERRED_VALUE_INDEX()
-
getSESSION_SEED_INDEX
public int getSESSION_SEED_INDEX()
-
isInstallUpgrade
public boolean isInstallUpgrade()
Flag determining if the Wasm is an install/upgrade.
-
getRuntime
public TransactionRuntime getRuntime()
The execution runtime to use.
-
getModuleBytes
public byte[] getModuleBytes()
The compiled Wasm.
-
getTransferredValue
public long getTransferredValue()
-
getSeed
public Digest getSeed()
-
setInstallUpgrade
public void setInstallUpgrade(boolean installUpgrade)
Flag determining if the Wasm is an install/upgrade.
-
setRuntime
public void setRuntime(TransactionRuntime runtime)
The execution runtime to use.
-
setModuleBytes
public void setModuleBytes(byte[] moduleBytes)
The compiled Wasm.
-
setTransferredValue
public void setTransferredValue(long transferredValue)
-
setSeed
public void setSeed(Digest seed)
-
-