Package com.casper.sdk.model.deploy
Class Deploy
- java.lang.Object
-
- com.casper.sdk.model.transaction.AbstractTransaction
-
- com.casper.sdk.model.deploy.Deploy
-
- All Implemented Interfaces:
CasperSerializableObject,SerializableObject
public class Deploy extends AbstractTransaction implements CasperSerializableObject
Deploy an item containing a smart contract along with the requesters' signature(s)- Since:
- 0.0.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDeploy.DeployBuilder
-
Constructor Summary
Constructors Constructor Description Deploy()Deploy(Digest hash, DeployHeader header, ExecutableDeployItem payment, ExecutableDeployItem session, java.util.List<Approval> approvals)Deploy(DeployHeader header, ExecutableDeployItem payment, ExecutableDeployItem session)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Deploy.DeployBuilderbuilder()protected voidcalculateHash()Calculate the hash of the transactionprotected DigestcalculateSessionAndPaymentHash()DeployHeadergetHeader()ExecutableDeployItemgetPayment()ExecutableDeployItemgetSession()voidserialize(SerializerBuffer ser, Target target)Implements Deploy encodervoidsetHeader(DeployHeader header)voidsetPayment(ExecutableDeployItem payment)voidsetSession(ExecutableDeployItem session)-
Methods inherited from class com.casper.sdk.model.transaction.AbstractTransaction
getApprovals, getHash, serializeApprovals, setApprovals, setHash, sign
-
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
-
Deploy
public Deploy(Digest hash, DeployHeader header, ExecutableDeployItem payment, ExecutableDeployItem session, java.util.List<Approval> approvals)
-
Deploy
public Deploy(DeployHeader header, ExecutableDeployItem payment, ExecutableDeployItem session)
-
Deploy
public Deploy()
-
-
Method Detail
-
serialize
public void serialize(SerializerBuffer ser, Target target) throws NoSuchTypeException, ValueSerializationException
Implements Deploy encoder- 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
-
calculateHash
protected void calculateHash()
Description copied from class:AbstractTransactionCalculate the hash of the transaction- Specified by:
calculateHashin classAbstractTransaction
-
calculateSessionAndPaymentHash
protected Digest calculateSessionAndPaymentHash()
-
builder
public static Deploy.DeployBuilder builder()
-
getHeader
public DeployHeader getHeader()
- See Also:
DeployHeader
-
getPayment
public ExecutableDeployItem getPayment()
- See Also:
ExecutableDeployItem
-
getSession
public ExecutableDeployItem getSession()
- See Also:
ExecutableDeployItem
-
setHeader
public void setHeader(DeployHeader header)
- See Also:
DeployHeader
-
setPayment
public void setPayment(ExecutableDeployItem payment)
- See Also:
ExecutableDeployItem
-
setSession
public void setSession(ExecutableDeployItem session)
- See Also:
ExecutableDeployItem
-
-