Class CasperDeployService


  • public class CasperDeployService
    extends java.lang.Object
    Deploy Service class implementing the process to generate deploys
    Since:
    0.2.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Deploy buildTransferDeploy​(com.syntifi.crypto.key.AbstractPrivateKey fromPrivateKey, PublicKey toPublicKey, java.math.BigInteger amount, java.lang.String chainName)
      Method to generate a Transfer deploy
      static Deploy buildTransferDeploy​(com.syntifi.crypto.key.AbstractPrivateKey fromPrivateKey, PublicKey toPublicKey, java.math.BigInteger amount, java.lang.String chainName, java.lang.Long id, java.math.BigInteger paymentAmount, java.lang.Long gasPrice, Ttl ttl, java.util.Date date, java.util.List<Digest> dependencies)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CasperDeployService

        public CasperDeployService()
    • Method Detail

      • buildTransferDeploy

        public static Deploy buildTransferDeploy​(com.syntifi.crypto.key.AbstractPrivateKey fromPrivateKey,
                                                 PublicKey toPublicKey,
                                                 java.math.BigInteger amount,
                                                 java.lang.String chainName)
                                          throws java.io.IOException,
                                                 CLValueEncodeException,
                                                 DynamicInstanceException,
                                                 NoSuchTypeException,
                                                 java.security.GeneralSecurityException
        Method to generate a Transfer deploy
        Parameters:
        fromPrivateKey - sender private Key
        toPublicKey - receiver public key
        amount - amount to transfer
        chainName - network name
        Returns:
        Deploy
        Throws:
        NoSuchTypeException - thrown if type not found
        DynamicInstanceException - thrown if it could not instantiate a type
        CLValueEncodeException - thrown if failed to encode a cl value
        java.io.IOException - thrown if an IO error occurs
        java.security.GeneralSecurityException - thrown when an error occurs with cryptographic keys
      • buildTransferDeploy

        public static Deploy buildTransferDeploy​(com.syntifi.crypto.key.AbstractPrivateKey fromPrivateKey,
                                                 PublicKey toPublicKey,
                                                 java.math.BigInteger amount,
                                                 java.lang.String chainName,
                                                 java.lang.Long id,
                                                 java.math.BigInteger paymentAmount,
                                                 java.lang.Long gasPrice,
                                                 Ttl ttl,
                                                 java.util.Date date,
                                                 java.util.List<Digest> dependencies)
                                          throws java.io.IOException,
                                                 CLValueEncodeException,
                                                 DynamicInstanceException,
                                                 NoSuchTypeException,
                                                 java.security.GeneralSecurityException
        Parameters:
        fromPrivateKey - private key of the sender
        toPublicKey - public key of the receiver
        amount - amount to transfer
        id - id field in the request to tag the transaction
        paymentAmount - , the number of motes paying to the execution engine
        gasPrice - gasPrice for native transfers can be set to 1
        ttl - time to live in milliseconds (default value is 1800000 ms (30 minutes))
        Returns:
        Deploy
        Throws:
        NoSuchTypeException - thrown if type not found
        DynamicInstanceException - thrown if it could not instantiate a type
        CLValueEncodeException - thrown if failed to encode a cl value
        java.io.IOException - thrown if an IO error occurs
        java.security.GeneralSecurityException - thrown when an error occurs with cryptographic keys