Class CasperValidatorHelper


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

      • createValidatorAuctionBid

        public static Deploy createValidatorAuctionBid​(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​(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​(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​(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​(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​(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​(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​(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