Package com.casper.sdk.helper
Class CasperValidatorHelper
- java.lang.Object
-
- com.casper.sdk.helper.CasperValidatorHelper
-
public class CasperValidatorHelper extends java.lang.ObjectValidator 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 DeploycreateValidatorAuctionBid(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 deploystatic DeploycreateValidatorAuctionBid(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 deploystatic DeploycreateValidatorAuctionBidWithdraw(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 deploystatic DeploycreateValidatorAuctionBidWithdraw(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 deploystatic DeploycreateValidatorDelegation(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 deploystatic DeploycreateValidatorDelegation(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 deploystatic DeploycreateValidatorDelegationWithdraw(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 deploystatic DeploycreateValidatorDelegationWithdraw(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
-
-
-
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 senderwasmBytes- bytes of compiled delegate.wasmbidAmount- amount in motes to be submitted as an auction bid.delegationRate- Percentage charged to a delegator for provided service.chainName- chain name- Returns:
- Throws:
NoSuchTypeExceptionjava.security.GeneralSecurityExceptiondev.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 senderwasmBytes- bytes of compiled delegate.wasmbidAmount- amount in motes to be submitted as an auction bid.delegationRate- Percentage charged to a delegator for provided service.paymentAmount- payment amount for processing transferschainName- chain namegasPrice- gas pricettl- time to livedate- execution datedependencies- List of digest dependencies- Returns:
- Throws:
NoSuchTypeExceptionjava.security.GeneralSecurityExceptiondev.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 senderwasmBytes- bytes of compiled delegate.wasmwithdrawAmount- amount in motes to be submitted as an auction bid.unboundPurse- validator's purse unforgeable reference to which to withdraw fundschainName- chain name- Returns:
- Throws:
NoSuchTypeExceptionjava.security.GeneralSecurityExceptiondev.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 senderwasmBytes- bytes of compiled delegate.wasmwithdrawAmount- amount in motes to be withdrawn from auctionunboundPurse- validator's purse unforgeable reference to which to withdraw fundspaymentAmount- payment amount for processing transferschainName- chain namegasPrice- gas pricettl- time to livedate- execution datedependencies- List of digest dependencies- Returns:
- Throws:
NoSuchTypeExceptionjava.security.GeneralSecurityExceptiondev.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 senderwasmBytes- bytes of compiled delegate.wasmamount- amount in motes to delegatevalidatorKey- validator's public keydelegatorKey- delegator's public keychainName- chain name- Returns:
- Throws:
NoSuchTypeExceptionjava.security.GeneralSecurityExceptiondev.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 senderwasmBytes- bytes of compiled delegate.wasmamount- amount in motes to delegatevalidatorKey- validator's public keydelegatorKey- delegator's public keypaymentAmount- payment amount for processing transferschainName- chain namegasPrice- gas pricettl- time to livedate- execution datedependencies- List of digest dependencies- Returns:
- Throws:
NoSuchTypeExceptionjava.security.GeneralSecurityExceptiondev.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 senderwasmBytes- bytes of compiled delegate.wasmamount- amount in motes to delegatevalidatorKey- validator's public keydelegatorKey- delegator's public keychainName- chain name- Returns:
- Throws:
NoSuchTypeExceptionjava.security.GeneralSecurityExceptiondev.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 senderwasmBytes- bytes of compiled delegate.wasmamount- amount in motes to withdraw from delegationvalidatorKey- validator's public keydelegatorKey- delegator's public keypaymentAmount- payment amount for processing transferschainName- chain namegasPrice- gas pricettl- time to livedate- execution datedependencies- List of digest dependencies- Returns:
- Throws:
NoSuchTypeExceptionjava.security.GeneralSecurityExceptiondev.oak3.sbs4j.exception.ValueSerializationException
-
-