Class KeyRegistrationTransactionBuilder<T extends KeyRegistrationTransactionBuilder<T>>
- java.lang.Object
-
- com.algorand.algosdk.builder.transaction.TransactionParametersBuilder<T>
-
- com.algorand.algosdk.builder.transaction.TransactionBuilder<T>
-
- com.algorand.algosdk.builder.transaction.KeyRegistrationTransactionBuilder<T>
-
public class KeyRegistrationTransactionBuilder<T extends KeyRegistrationTransactionBuilder<T>> extends TransactionBuilder<T>
Build a keyreg transaction. Required parameters: genesisHash Optional parameters: nonparticipation votePK selectionPK voteFirst voteLast voteKeyDilution stateProofKey Optional global parameters: fee/flatFee note genesisID group lease
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
nonparticipation
protected VRFPublicKey
selectionPK
protected MerkleVerifier
stateProofPk
protected BigInteger
voteFirst
protected BigInteger
voteKeyDilution
protected BigInteger
voteLast
protected ParticipationPublicKey
votePK
-
Fields inherited from class com.algorand.algosdk.builder.transaction.TransactionBuilder
group, type
-
Fields inherited from class com.algorand.algosdk.builder.transaction.TransactionParametersBuilder
fee, firstValid, flatFee, genesisHash, genesisID, lastValid, lease, note, rekeyTo, sender
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
KeyRegistrationTransactionBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyTo(Transaction txn)
static KeyRegistrationTransactionBuilder<?>
Builder()
Initialize aKeyRegistrationTransactionBuilder
.T
nonparticipation(boolean nonpart)
Set the nonparticipation value.T
participationPublicKey(byte[] pk)
Set participation public key used in key registration transactions in the raw 32 byte format.T
participationPublicKey(ParticipationPublicKey pk)
Set participation public key used in key registration transactions.T
participationPublicKeyBase64(String pk)
Set participation public key used in key registration transactions as a base64 encoded representation of the raw 32 byte format.T
selectionPublicKey(byte[] pk)
Set selection public key for the VRF private key used in key registration transactions in the raw 32 byte formatT
selectionPublicKey(VRFPublicKey pk)
Set selection public key for the VRF private key used in key registration transactions.T
selectionPublicKeyBase64(String pk)
Set selection public key for the VRF private key used in key registration transactions as a base64 encoded representation of the raw 32 byte format.T
stateProofKey(byte[] stprf)
Set the stateProofKey value.T
stateProofKey(MerkleVerifier stprf)
Set the stateProofKey value.T
stateProofKeyBase64(String stprf)
Set the stateProofKey value.T
voteFirst(Integer voteFirst)
Set the voteFirst value.T
voteFirst(Long voteFirst)
Set the voteFirst value.T
voteFirst(BigInteger voteFirst)
Set the voteFirst value.T
voteKeyDilution(Integer voteKeyDilution)
Set the voteKeyDilution value.T
voteKeyDilution(Long voteKeyDilution)
Set the voteKeyDilution value.T
voteKeyDilution(BigInteger voteKeyDilution)
Set the voteKeyDilution value.T
voteLast(Integer voteLast)
Set the voteLast value.T
voteLast(Long voteLast)
Set the voteLast value.T
voteLast(BigInteger voteLast)
Set the voteLast value.-
Methods inherited from class com.algorand.algosdk.builder.transaction.TransactionBuilder
build, group, group, groupB64, groupUTF8
-
Methods inherited from class com.algorand.algosdk.builder.transaction.TransactionParametersBuilder
fee, fee, fee, firstValid, firstValid, firstValid, flatFee, flatFee, flatFee, genesisHash, genesisHash, genesisHashB64, genesisHashUTF8, genesisID, lastValid, lastValid, lastValid, lease, lease, leaseB64, leaseUTF8, lookupParams, note, noteB64, noteUTF8, rekey, rekey, rekey, sender, sender, sender, suggestedParams
-
-
-
-
Field Detail
-
nonparticipation
protected boolean nonparticipation
-
votePK
protected ParticipationPublicKey votePK
-
selectionPK
protected VRFPublicKey selectionPK
-
voteFirst
protected BigInteger voteFirst
-
voteLast
protected BigInteger voteLast
-
voteKeyDilution
protected BigInteger voteKeyDilution
-
stateProofPk
protected MerkleVerifier stateProofPk
-
-
Method Detail
-
Builder
public static KeyRegistrationTransactionBuilder<?> Builder()
Initialize aKeyRegistrationTransactionBuilder
.
-
applyTo
protected void applyTo(Transaction txn)
- Specified by:
applyTo
in classTransactionBuilder<T extends KeyRegistrationTransactionBuilder<T>>
-
participationPublicKey
public T participationPublicKey(ParticipationPublicKey pk)
Set participation public key used in key registration transactions.- Parameters:
pk
- The participation public key.- Returns:
- This builder.
-
participationPublicKey
public T participationPublicKey(byte[] pk)
Set participation public key used in key registration transactions in the raw 32 byte format.- Parameters:
pk
- The participation public key.- Returns:
- This builder.
-
participationPublicKeyBase64
public T participationPublicKeyBase64(String pk)
Set participation public key used in key registration transactions as a base64 encoded representation of the raw 32 byte format.- Parameters:
pk
- The participation public key.- Returns:
- This builder.
-
selectionPublicKey
public T selectionPublicKey(VRFPublicKey pk)
Set selection public key for the VRF private key used in key registration transactions.- Parameters:
pk
- The public selection key.- Returns:
- This builder.
-
selectionPublicKey
public T selectionPublicKey(byte[] pk)
Set selection public key for the VRF private key used in key registration transactions in the raw 32 byte format- Parameters:
pk
- The public selection key.- Returns:
- This builder.
-
selectionPublicKeyBase64
public T selectionPublicKeyBase64(String pk)
Set selection public key for the VRF private key used in key registration transactions as a base64 encoded representation of the raw 32 byte format.- Parameters:
pk
- The public selection key.- Returns:
- This builder.
-
voteFirst
public T voteFirst(BigInteger voteFirst)
Set the voteFirst value. It is the first round in which the data in this transaction will be considered.- Parameters:
voteFirst
- The voteFirst value.- Returns:
- This builder.
-
voteFirst
public T voteFirst(Integer voteFirst)
Set the voteFirst value. It is the first round in which the data in this transaction will be considered.- Parameters:
voteFirst
- The voteFirst value.- Returns:
- This builder.
-
voteFirst
public T voteFirst(Long voteFirst)
Set the voteFirst value. It is the first round in which the data in this transaction will be considered.- Parameters:
voteFirst
- The voteFirst value.- Returns:
- This builder.
-
voteLast
public T voteLast(BigInteger voteLast)
Set the voteLast value. It is the last round in which the data in this transaction will be considered.- Parameters:
voteLast
- The voteLast value.- Returns:
- This builder.
-
voteLast
public T voteLast(Integer voteLast)
Set the voteLast value. It is the last round in which the data in this transaction will be considered.- Parameters:
voteLast
- The voteLast value.- Returns:
- This builder.
-
voteLast
public T voteLast(Long voteLast)
Set the voteLast value. It is the last round in which the data in this transaction will be considered.- Parameters:
voteLast
- The voteLast value.- Returns:
- This builder.
-
voteKeyDilution
public T voteKeyDilution(BigInteger voteKeyDilution)
Set the voteKeyDilution value. This is used to indicate the number of subkeys in each batch of participation keys.- Parameters:
voteKeyDilution
- The voteKeyDilution value.- Returns:
- This builder.
-
voteKeyDilution
public T voteKeyDilution(Integer voteKeyDilution)
Set the voteKeyDilution value. This is used to indicate the number of subkeys in each batch of participation keys.- Parameters:
voteKeyDilution
- The voteKeyDilution value.- Returns:
- This builder.
-
voteKeyDilution
public T voteKeyDilution(Long voteKeyDilution)
Set the voteKeyDilution value. This is used to indicate the number of subkeys in each batch of participation keys.- Parameters:
voteKeyDilution
- The voteKeyDilution value.- Returns:
- This builder.
-
stateProofKey
public T stateProofKey(MerkleVerifier stprf)
Set the stateProofKey value. This is used to identify a state proof- Parameters:
stprf
- The stateProofKey value.- Returns:
- This builder.
-
stateProofKey
public T stateProofKey(byte[] stprf)
Set the stateProofKey value. This is used to identify a state proof- Parameters:
stprf
- The stateProofKey value.- Returns:
- This builder.
-
stateProofKeyBase64
public T stateProofKeyBase64(String stprf)
Set the stateProofKey value. This is used to identify a state proof- Parameters:
stprf
- The stateProofKey value.- Returns:
- This builder.
-
nonparticipation
public T nonparticipation(boolean nonpart)
Set the nonparticipation value. This is used to mark a key registration transaction participating/nonparticipating- Parameters:
nonpart
- The nonparticipation mark.- Returns:
- This builder.
-
-