Class TransactionBuilder<T extends TransactionBuilder<T>>
- java.lang.Object
-
- com.algorand.algosdk.builder.transaction.TransactionParametersBuilder<T>
-
- com.algorand.algosdk.builder.transaction.TransactionBuilder<T>
-
- Direct Known Subclasses:
ApplicationBaseTransactionBuilder,AssetAcceptTransactionBuilder,AssetClawbackTransactionBuilder,AssetCreateTransactionBuilder,AssetDestroyTransactionBuilder,AssetFreezeTransactionBuilder,AssetTransferTransactionBuilder,KeyRegistrationTransactionBuilder,PaymentTransactionBuilder
public abstract class TransactionBuilder<T extends TransactionBuilder<T>> extends TransactionParametersBuilder<T>
TransactionBuilder has parameters common to all transactions types.
-
-
Field Summary
Fields Modifier and Type Field Description protected Digestgroupprotected Transaction.Typetype-
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 protectedTransactionBuilder(Transaction.Type type)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidapplyTo(Transaction txn)Transactionbuild()Build the Transaction object.Tgroup(byte[] group)Set the group field as a raw byte array representation.Tgroup(Digest group)Set the group field.TgroupB64(String group)Set the group field as a base64 encoded string.TgroupUTF8(String group)Set the group field as a UTF-8 encoded string.-
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
-
type
protected final Transaction.Type type
-
group
protected Digest group
-
-
Constructor Detail
-
TransactionBuilder
protected TransactionBuilder(Transaction.Type type)
-
-
Method Detail
-
applyTo
protected abstract void applyTo(Transaction txn)
-
build
public final Transaction build()
Build the Transaction object. An exception is thrown if a valid transaction cannot be created with the provided fields.- Returns:
- A transaction.
-
group
public T group(Digest group)
Set the group field. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group.- Parameters:
group- The group.- Returns:
- This builder.
-
group
public T group(byte[] group)
Set the group field as a raw byte array representation. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group.- Parameters:
group- The group.- Returns:
- This builder.
-
groupUTF8
public T groupUTF8(String group)
Set the group field as a UTF-8 encoded string. When present indicates that this transaction is part of a transaction group and the value is the sha512/256 hash of the transactions in that group.- Parameters:
group- The group.- Returns:
- This builder.
-
-