Class AssetClawbackTransactionBuilder<T extends AssetClawbackTransactionBuilder<T>>
- java.lang.Object
-
- com.algorand.algosdk.builder.transaction.TransactionParametersBuilder<T>
-
- com.algorand.algosdk.builder.transaction.TransactionBuilder<T>
-
- com.algorand.algosdk.builder.transaction.AssetClawbackTransactionBuilder<T>
-
public class AssetClawbackTransactionBuilder<T extends AssetClawbackTransactionBuilder<T>> extends TransactionBuilder<T>
Build an asset clawback transaction. These transactions allow the asset clawback account to take assets away from holders of the asset. This is a specialized form of an AssetConfig transaction which only succeeds when the sender is equal the clawback account address. Required parameters: sender assetClawbackFrom assetReceiver assetAmount genesisHash Optional parameters: assetCloseTo Optional global parameters: fee/flatFee note genesisID group lease
-
-
Field Summary
Fields Modifier and Type Field Description protected BigInteger
assetAmount
protected Address
assetClawbackFrom
protected Address
assetCloseTo
protected BigInteger
assetIndex
protected Address
assetReceiver
-
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
AssetClawbackTransactionBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyTo(Transaction txn)
T
assetAmount(Integer assetAmount)
Set the assetAmount.T
assetAmount(Long assetAmount)
Set the assetAmount.T
assetAmount(BigInteger assetAmount)
Set the assetAmount.T
assetClawbackFrom(byte[] assetClawbackFrom)
Set the assetClawbackFrom account.T
assetClawbackFrom(Address assetClawbackFrom)
Set the assetClawbackFrom account.T
assetClawbackFrom(String assetClawbackFrom)
Set the assetClawbackFrom account.T
assetCloseTo(byte[] assetCloseTo)
Set the assetCloseTo account in the raw 32 byte format.T
assetCloseTo(Address assetCloseTo)
Set the assetCloseTo account.T
assetCloseTo(String assetCloseTo)
Set the assetCloseTo account in the human-readable address format.T
assetIndex(Integer assetIndex)
Set the assetIndex.T
assetIndex(Long assetIndex)
Set the assetIndex.T
assetIndex(BigInteger assetIndex)
Set the assetIndex.T
assetReceiver(byte[] assetReceiver)
Set the assetReceiver account in the raw 32 byte format.T
assetReceiver(Address assetReceiver)
Set the assetReceiver account.T
assetReceiver(String assetReceiver)
Set the assetReceiver account in the human-readable address format.static AssetClawbackTransactionBuilder<?>
Builder()
Initialize aAssetClawbackTransactionBuilder
.-
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
-
assetClawbackFrom
protected Address assetClawbackFrom
-
assetReceiver
protected Address assetReceiver
-
assetCloseTo
protected Address assetCloseTo
-
assetAmount
protected BigInteger assetAmount
-
assetIndex
protected BigInteger assetIndex
-
-
Method Detail
-
Builder
public static AssetClawbackTransactionBuilder<?> Builder()
Initialize aAssetClawbackTransactionBuilder
.
-
applyTo
protected void applyTo(Transaction txn)
- Specified by:
applyTo
in classTransactionBuilder<T extends AssetClawbackTransactionBuilder<T>>
-
assetClawbackFrom
public T assetClawbackFrom(Address assetClawbackFrom)
Set the assetClawbackFrom account. This is the asset who will have assets removed from their account.- Parameters:
assetClawbackFrom
- The assetClawbackFrom account.- Returns:
- this builder.
-
assetClawbackFrom
public T assetClawbackFrom(String assetClawbackFrom)
Set the assetClawbackFrom account. This is the asset who will have assets removed from their account.- Parameters:
assetClawbackFrom
- The assetClawbackFrom account.- Returns:
- this builder.
-
assetClawbackFrom
public T assetClawbackFrom(byte[] assetClawbackFrom)
Set the assetClawbackFrom account. This is the asset who will have assets removed from their account.- Parameters:
assetClawbackFrom
- The assetClawbackFrom account.- Returns:
- this builder.
-
assetReceiver
public T assetReceiver(Address assetReceiver)
Set the assetReceiver account. This is the account who will receive the funds.- Parameters:
assetReceiver
- The assetReceiver account.- Returns:
- this builder.
-
assetReceiver
public T assetReceiver(String assetReceiver)
Set the assetReceiver account in the human-readable address format. This is the account who will receive the funds.- Parameters:
assetReceiver
- The assetReceiver account.- Returns:
- this builder.
-
assetReceiver
public T assetReceiver(byte[] assetReceiver)
Set the assetReceiver account in the raw 32 byte format. This is the account who will receive the funds.- Parameters:
assetReceiver
- The assetReceiver account.- Returns:
- this builder.
-
assetCloseTo
public T assetCloseTo(Address assetCloseTo)
Set the assetCloseTo account. If set this account will recieve any remaining balance after the assetAmount has been removed from the balance.- Parameters:
assetCloseTo
- The assetCloseTo account.- Returns:
- this builder.
-
assetCloseTo
public T assetCloseTo(String assetCloseTo)
Set the assetCloseTo account in the human-readable address format. If set this account will recieve any remaining balance after the assetAmount has been removed from the balance.- Parameters:
assetCloseTo
- The assetCloseTo account.- Returns:
- this builder.
-
assetCloseTo
public T assetCloseTo(byte[] assetCloseTo)
Set the assetCloseTo account in the raw 32 byte format. If set this account will recieve any remaining balance after the assetAmount has been removed from the balance.- Parameters:
assetCloseTo
- The assetCloseTo account.- Returns:
- this builder.
-
assetIndex
public T assetIndex(BigInteger assetIndex)
Set the assetIndex.- Parameters:
assetIndex
- The assetIndex.- Returns:
- This builder.
-
assetIndex
public T assetIndex(Integer assetIndex)
Set the assetIndex.- Parameters:
assetIndex
- The assetIndex.- Returns:
- This builder.
-
assetIndex
public T assetIndex(Long assetIndex)
Set the assetIndex.- Parameters:
assetIndex
- The assetIndex.- Returns:
- This builder.
-
assetAmount
public T assetAmount(BigInteger assetAmount)
Set the assetAmount. The number of assets to clawback.- Parameters:
assetAmount
- The assetAmount.- Returns:
- This builder.
-
assetAmount
public T assetAmount(Integer assetAmount)
Set the assetAmount. The number of assets to clawback.- Parameters:
assetAmount
- The assetAmount.- Returns:
- This builder.
-
-