Class CasperValidatorHelper


  • public class CasperValidatorHelper
    extends java.lang.Object
    Validator helper provides methods to easily place auctions and delegate
    Since:
    0.5.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Deploy createValidatorAuctionBid​(com.syntifi.crypto.key.AbstractPrivateKey signer, byte[] wasmBytes, java.math.BigInteger bidAmount, java.lang.Byte delegationRate, java.lang.String chainName)
      Helper method to create a validator auction bid deploy
      static Deploy createValidatorAuctionBid​(com.syntifi.crypto.key.AbstractPrivateKey signer, byte[] wasmBytes, java.math.BigInteger bidAmount, java.lang.Byte delegationRate, java.math.BigInteger paymentAmount, java.lang.String chainName, java.lang.Long gasPrice, Ttl ttl, java.util.Date date, java.util.List<Digest> dependencies)
      Helper method to create a validator auction bid deploy
      static Deploy createValidatorAuctionBidWithdraw​(com.syntifi.crypto.key.AbstractPrivateKey signer, byte[] wasmBytes, java.math.BigInteger withdrawAmount, URef unboundPurse, java.lang.String chainName)
      Helper method to create a withdraw bid deploy
      static Deploy createValidatorAuctionBidWithdraw​(com.syntifi.crypto.key.AbstractPrivateKey signer, byte[] wasmBytes, java.math.BigInteger withdrawAmount, URef unboundPurse, java.math.BigInteger paymentAmount, java.lang.String chainName, java.lang.Long gasPrice, Ttl ttl, java.util.Date date, java.util.List<Digest> dependencies)
      Helper method to create a withdraw bid deploy
      static Deploy createValidatorDelegation​(com.syntifi.crypto.key.AbstractPrivateKey signer, byte[] wasmBytes, java.math.BigInteger amount, PublicKey validatorKey, PublicKey delegatorKey, java.lang.String chainName)
      Helper method to create a validator delegation deploy
      static Deploy createValidatorDelegation​(com.syntifi.crypto.key.AbstractPrivateKey signer, byte[] wasmBytes, java.math.BigInteger amount, PublicKey validatorKey, PublicKey delegatorKey, java.math.BigInteger paymentAmount, java.lang.String chainName, java.lang.Long gasPrice, Ttl ttl, java.util.Date date, java.util.List<Digest> dependencies)
      Helper method to create a validator delegation deploy
      static Deploy createValidatorDelegationWithdraw​(com.syntifi.crypto.key.AbstractPrivateKey signer, byte[] wasmBytes, java.math.BigInteger amount, PublicKey validatorKey, PublicKey delegatorKey, java.lang.String chainName)
      Helper method to create a validator delegation withdraw deploy
      static Deploy createValidatorDelegationWithdraw​(com.syntifi.crypto.key.AbstractPrivateKey signer, byte[] wasmBytes, java.math.BigInteger amount, PublicKey validatorKey, PublicKey delegatorKey, java.math.BigInteger paymentAmount, java.lang.String chainName, java.lang.Long gasPrice, Ttl ttl, java.util.Date date, java.util.List<Digest> dependencies)
      Helper method to create a validator delegation withdraw deploy
      • Methods inherited from class java.lang.Object

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

      • createValidatorAuctionBid

        public static Deploy createValidatorAuctionBid​(com.syntifi.crypto.key.AbstractPrivateKey signer,
                                                       byte[] wasmBytes,
                                                       java.math.BigInteger bidAmount,
                                                       java.lang.Byte delegationRate,
                                                       java.lang.String chainName)
                                                throws NoSuchTypeException,
                                                       java.security.GeneralSecurityException,
                                                       dev.oak3.sbs4j.exception.ValueSerializationException
        Helper method to create a validator auction bid deploy
        Parameters:
        signer - private key from sender
        wasmBytes - bytes of compiled delegate.wasm
        bidAmount - amount in motes to be submitted as an auction bid.
        delegationRate - Percentage charged to a delegator for provided service.
        chainName - chain name
        Returns:
        Throws:
        NoSuchTypeException
        java.security.GeneralSecurityException
        dev.oak3.sbs4j.exception.ValueSerializationException
      • createValidatorAuctionBid

        public static Deploy createValidatorAuctionBid​(com.syntifi.crypto.key.AbstractPrivateKey signer,
                                                       byte[] wasmBytes,
                                                       java.math.BigInteger bidAmount,
                                                       java.lang.Byte delegationRate,
                                                       java.math.BigInteger paymentAmount,
                                                       java.lang.String chainName,
                                                       java.lang.Long gasPrice,
                                                       Ttl ttl,
                                                       java.util.Date date,
                                                       java.util.List<Digest> dependencies)
                                                throws NoSuchTypeException,
                                                       java.security.GeneralSecurityException,
                                                       dev.oak3.sbs4j.exception.ValueSerializationException
        Helper method to create a validator auction bid deploy
        Parameters:
        signer - private key from sender
        wasmBytes - bytes of compiled delegate.wasm
        bidAmount - amount in motes to be submitted as an auction bid.
        delegationRate - Percentage charged to a delegator for provided service.
        paymentAmount - payment amount for processing transfers
        chainName - chain name
        gasPrice - gas price
        ttl - time to live
        date - execution date
        dependencies - List of digest dependencies
        Returns:
        Throws:
        NoSuchTypeException
        java.security.GeneralSecurityException
        dev.oak3.sbs4j.exception.ValueSerializationException
      • createValidatorAuctionBidWithdraw

        public static Deploy createValidatorAuctionBidWithdraw​(com.syntifi.crypto.key.AbstractPrivateKey signer,
                                                               byte[] wasmBytes,
                                                               java.math.BigInteger withdrawAmount,
                                                               URef unboundPurse,
                                                               java.lang.String chainName)
                                                        throws NoSuchTypeException,
                                                               java.security.GeneralSecurityException,
                                                               dev.oak3.sbs4j.exception.ValueSerializationException
        Helper method to create a withdraw bid deploy
        Parameters:
        signer - private key from sender
        wasmBytes - bytes of compiled delegate.wasm
        withdrawAmount - amount in motes to be submitted as an auction bid.
        unboundPurse - validator's purse unforgeable reference to which to withdraw funds
        chainName - chain name
        Returns:
        Throws:
        NoSuchTypeException
        java.security.GeneralSecurityException
        dev.oak3.sbs4j.exception.ValueSerializationException
      • createValidatorAuctionBidWithdraw

        public static Deploy createValidatorAuctionBidWithdraw​(com.syntifi.crypto.key.AbstractPrivateKey signer,
                                                               byte[] wasmBytes,
                                                               java.math.BigInteger withdrawAmount,
                                                               URef unboundPurse,
                                                               java.math.BigInteger paymentAmount,
                                                               java.lang.String chainName,
                                                               java.lang.Long gasPrice,
                                                               Ttl ttl,
                                                               java.util.Date date,
                                                               java.util.List<Digest> dependencies)
                                                        throws NoSuchTypeException,
                                                               java.security.GeneralSecurityException,
                                                               dev.oak3.sbs4j.exception.ValueSerializationException
        Helper method to create a withdraw bid deploy
        Parameters:
        signer - private key from sender
        wasmBytes - bytes of compiled delegate.wasm
        withdrawAmount - amount in motes to be withdrawn from auction
        unboundPurse - validator's purse unforgeable reference to which to withdraw funds
        paymentAmount - payment amount for processing transfers
        chainName - chain name
        gasPrice - gas price
        ttl - time to live
        date - execution date
        dependencies - List of digest dependencies
        Returns:
        Throws:
        NoSuchTypeException
        java.security.GeneralSecurityException
        dev.oak3.sbs4j.exception.ValueSerializationException
      • createValidatorDelegation

        public static Deploy createValidatorDelegation​(com.syntifi.crypto.key.AbstractPrivateKey signer,
                                                       byte[] wasmBytes,
                                                       java.math.BigInteger amount,
                                                       PublicKey validatorKey,
                                                       PublicKey delegatorKey,
                                                       java.lang.String chainName)
                                                throws NoSuchTypeException,
                                                       java.security.GeneralSecurityException,
                                                       dev.oak3.sbs4j.exception.ValueSerializationException
        Helper method to create a validator delegation deploy
        Parameters:
        signer - private key from sender
        wasmBytes - bytes of compiled delegate.wasm
        amount - amount in motes to delegate
        validatorKey - validator's public key
        delegatorKey - delegator's public key
        chainName - chain name
        Returns:
        Throws:
        NoSuchTypeException
        java.security.GeneralSecurityException
        dev.oak3.sbs4j.exception.ValueSerializationException
      • createValidatorDelegation

        public static Deploy createValidatorDelegation​(com.syntifi.crypto.key.AbstractPrivateKey signer,
                                                       byte[] wasmBytes,
                                                       java.math.BigInteger amount,
                                                       PublicKey validatorKey,
                                                       PublicKey delegatorKey,
                                                       java.math.BigInteger paymentAmount,
                                                       java.lang.String chainName,
                                                       java.lang.Long gasPrice,
                                                       Ttl ttl,
                                                       java.util.Date date,
                                                       java.util.List<Digest> dependencies)
                                                throws NoSuchTypeException,
                                                       java.security.GeneralSecurityException,
                                                       dev.oak3.sbs4j.exception.ValueSerializationException
        Helper method to create a validator delegation deploy
        Parameters:
        signer - private key from sender
        wasmBytes - bytes of compiled delegate.wasm
        amount - amount in motes to delegate
        validatorKey - validator's public key
        delegatorKey - delegator's public key
        paymentAmount - payment amount for processing transfers
        chainName - chain name
        gasPrice - gas price
        ttl - time to live
        date - execution date
        dependencies - List of digest dependencies
        Returns:
        Throws:
        NoSuchTypeException
        java.security.GeneralSecurityException
        dev.oak3.sbs4j.exception.ValueSerializationException
      • createValidatorDelegationWithdraw

        public static Deploy createValidatorDelegationWithdraw​(com.syntifi.crypto.key.AbstractPrivateKey signer,
                                                               byte[] wasmBytes,
                                                               java.math.BigInteger amount,
                                                               PublicKey validatorKey,
                                                               PublicKey delegatorKey,
                                                               java.lang.String chainName)
                                                        throws NoSuchTypeException,
                                                               java.security.GeneralSecurityException,
                                                               dev.oak3.sbs4j.exception.ValueSerializationException
        Helper method to create a validator delegation withdraw deploy
        Parameters:
        signer - private key from sender
        wasmBytes - bytes of compiled delegate.wasm
        amount - amount in motes to delegate
        validatorKey - validator's public key
        delegatorKey - delegator's public key
        chainName - chain name
        Returns:
        Throws:
        NoSuchTypeException
        java.security.GeneralSecurityException
        dev.oak3.sbs4j.exception.ValueSerializationException
      • createValidatorDelegationWithdraw

        public static Deploy createValidatorDelegationWithdraw​(com.syntifi.crypto.key.AbstractPrivateKey signer,
                                                               byte[] wasmBytes,
                                                               java.math.BigInteger amount,
                                                               PublicKey validatorKey,
                                                               PublicKey delegatorKey,
                                                               java.math.BigInteger paymentAmount,
                                                               java.lang.String chainName,
                                                               java.lang.Long gasPrice,
                                                               Ttl ttl,
                                                               java.util.Date date,
                                                               java.util.List<Digest> dependencies)
                                                        throws NoSuchTypeException,
                                                               java.security.GeneralSecurityException,
                                                               dev.oak3.sbs4j.exception.ValueSerializationException
        Helper method to create a validator delegation withdraw deploy
        Parameters:
        signer - private key from sender
        wasmBytes - bytes of compiled delegate.wasm
        amount - amount in motes to withdraw from delegation
        validatorKey - validator's public key
        delegatorKey - delegator's public key
        paymentAmount - payment amount for processing transfers
        chainName - chain name
        gasPrice - gas price
        ttl - time to live
        date - execution date
        dependencies - List of digest dependencies
        Returns:
        Throws:
        NoSuchTypeException
        java.security.GeneralSecurityException
        dev.oak3.sbs4j.exception.ValueSerializationException