Class AssetCreateTransactionBuilder<T extends AssetCreateTransactionBuilder<T>>
- java.lang.Object
-
- com.algorand.algosdk.builder.transaction.TransactionParametersBuilder<T>
-
- com.algorand.algosdk.builder.transaction.TransactionBuilder<T>
-
- com.algorand.algosdk.builder.transaction.AssetCreateTransactionBuilder<T>
-
- Direct Known Subclasses:
AssetConfigureTransactionBuilder
public class AssetCreateTransactionBuilder<T extends AssetCreateTransactionBuilder<T>> extends TransactionBuilder<T>
Build an asset create transaction, a specialized form of the AssetConfigurationTransaction with a null index. Required parameters: assetTotal assetDecimals defaultFrozen genesisHash Optional parameters: assetName assetUnitName url metadataHash manager reserve freeze clawback Optional global parameters fee/flatFee note genesisID group lease
-
-
Field Summary
Fields Modifier and Type Field Description protected Integer
assetDecimals
protected String
assetName
protected BigInteger
assetTotal
protected String
assetUnitName
protected Address
clawback
protected boolean
defaultFrozen
protected Address
freeze
protected Address
manager
protected byte[]
metadataHash
protected Address
reserve
protected String
url
-
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
AssetCreateTransactionBuilder(Transaction.Type type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
applyTo(Transaction txn)
T
assetDecimals(int assetDecimals)
assetDecimals specifies the number of digits to display after the decimal place when displaying this asset.T
assetName(String assetName)
Set the assetName used to describe the asset.T
assetTotal(Integer assetTotal)
Set the assetTotal, the total number of the asset issued.T
assetTotal(Long assetTotal)
Set the assetTotal, the total number of the asset issued.T
assetTotal(BigInteger assetTotal)
Set the assetTotal, the total number of the asset issued.T
assetUnitName(String assetUnitName)
Set an assetUnitName used to describe the name of a single unit of the asset.static AssetCreateTransactionBuilder<?>
Builder()
Initialize aAssetCreateTransactionBuilder
.T
clawback(byte[] clawback)
Set the clawback account in the raw 32 byte format.T
clawback(Address clawback)
Set the clawback account.T
clawback(String clawback)
Set the clawback account in the human-readable address format.T
defaultFrozen(boolean defaultFrozen)
Set whether accounts have this asset frozen by default.T
freeze(byte[] freeze)
Set the freeze account in the raw 32 byte format.T
freeze(Address freeze)
Set the freeze account.T
freeze(String freeze)
Set the freeze account in the human-readable address format.T
manager(byte[] manager)
Set the manager account in the raw 32 byte format.T
manager(Address manager)
Set the manager account.T
manager(String manager)
Set the manager account in the human-readable address format.T
metadataHash(byte[] metadataHash)
Set the metadataHash field.T
metadataHashB64(String metadataHash)
Set the metadataHash field using a Base64 encoded string.T
metadataHashUTF8(String metadataHash)
Set the metadataHash field using a UTF-8 encoded string.T
reserve(byte[] reserve)
Set the reserve account in the raw 32 byte format.T
reserve(Address reserve)
Set the reserve account.T
reserve(String reserve)
Set the reserve account in the human-readable address format.T
url(String url)
Set url.-
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
-
assetTotal
protected BigInteger assetTotal
-
assetDecimals
protected Integer assetDecimals
-
defaultFrozen
protected boolean defaultFrozen
-
assetUnitName
protected String assetUnitName
-
assetName
protected String assetName
-
url
protected String url
-
metadataHash
protected byte[] metadataHash
-
manager
protected Address manager
-
reserve
protected Address reserve
-
freeze
protected Address freeze
-
clawback
protected Address clawback
-
-
Constructor Detail
-
AssetCreateTransactionBuilder
protected AssetCreateTransactionBuilder(Transaction.Type type)
-
-
Method Detail
-
Builder
public static AssetCreateTransactionBuilder<?> Builder()
Initialize aAssetCreateTransactionBuilder
.
-
applyTo
protected void applyTo(Transaction txn)
- Specified by:
applyTo
in classTransactionBuilder<T extends AssetCreateTransactionBuilder<T>>
-
assetTotal
public T assetTotal(BigInteger assetTotal)
Set the assetTotal, the total number of the asset issued.- Parameters:
assetTotal
- The assetTotal.- Returns:
- this builder.
-
assetTotal
public T assetTotal(Integer assetTotal)
Set the assetTotal, the total number of the asset issued.- Parameters:
assetTotal
- The assetTotal.- Returns:
- this builder.
-
assetTotal
public T assetTotal(Long assetTotal)
Set the assetTotal, the total number of the asset issued.- Parameters:
assetTotal
- The assetTotal.- Returns:
- this builder.
-
assetDecimals
public T assetDecimals(int assetDecimals)
assetDecimals specifies the number of digits to display after the decimal place when displaying this asset. A value of 0 represents an asset that is not divisible, a value of 1 represents an asset divisible into tenths, and so on. This value must be between 0 and 19 (inclusive).- Parameters:
assetDecimals
- The assetDecimals.- Returns:
- this builder.
-
defaultFrozen
public T defaultFrozen(boolean defaultFrozen)
Set whether accounts have this asset frozen by default.- Parameters:
defaultFrozen
- The defaultFrozen value.- Returns:
- this builder.
-
assetUnitName
public T assetUnitName(String assetUnitName)
Set an assetUnitName used to describe the name of a single unit of the asset. This value must be between 0 and 8 characters (inclusive).- Parameters:
assetUnitName
- The assetUnitName.- Returns:
- this builder.
-
assetName
public T assetName(String assetName)
Set the assetName used to describe the asset. This value must be between 0 and 32 characters (inclusive).- Parameters:
assetName
- The assetName.- Returns:
- this builder.
-
url
public T url(String url)
Set url. This value must be between 0 and 96 characters (inclusive).- Parameters:
url
- The asset url.- Returns:
- this builder.
-
metadataHash
public T metadataHash(byte[] metadataHash)
Set the metadataHash field.- Parameters:
metadataHash
- The metadataHash.- Returns:
- this builder.
-
metadataHashUTF8
public T metadataHashUTF8(String metadataHash)
Set the metadataHash field using a UTF-8 encoded string.- Parameters:
metadataHash
- The metadataHash.- Returns:
- this builder.
-
metadataHashB64
public T metadataHashB64(String metadataHash)
Set the metadataHash field using a Base64 encoded string.- Parameters:
metadataHash
- The metadataHash.- Returns:
- this builder.
-
manager
public T manager(Address manager)
Set the manager account. The manager account can reconfigure the asset.- Parameters:
manager
- The manager account.- Returns:
- this builder.
-
manager
public T manager(String manager)
Set the manager account in the human-readable address format. The manager account can reconfigure the asset.- Parameters:
manager
- The manager account.- Returns:
- this builder.
-
manager
public T manager(byte[] manager)
Set the manager account in the raw 32 byte format. The manager account can reconfigure the asset.- Parameters:
manager
- The manager account.- Returns:
- this builder.
-
reserve
public T reserve(Address reserve)
Set the reserve account. The reserve account holds all assets which are considered non-minted.- Parameters:
reserve
- The reserve account.- Returns:
- this builder.
-
reserve
public T reserve(String reserve)
Set the reserve account in the human-readable address format. The reserve account holds all assets which are considered non-minted.- Parameters:
reserve
- The reserve account.- Returns:
- this builder.
-
reserve
public T reserve(byte[] reserve)
Set the reserve account in the raw 32 byte format. The reserve account holds all assets which are considered non-minted.- Parameters:
reserve
- The reserve account.- Returns:
- this builder.
-
freeze
public T freeze(Address freeze)
Set the freeze account. The account which can freeze or thaw holder accounts.- Parameters:
freeze
- The freeze account.- Returns:
- this builder.
-
freeze
public T freeze(String freeze)
Set the freeze account in the human-readable address format. The account which can freeze or thaw holder accounts.- Parameters:
freeze
- The freeze account.- Returns:
- this builder.
-
freeze
public T freeze(byte[] freeze)
Set the freeze account in the raw 32 byte format. The account which can freeze or thaw holder accounts.- Parameters:
freeze
- The freeze account.- Returns:
- this builder.
-
clawback
public T clawback(Address clawback)
Set the clawback account. This account can clawback assets from holder accounts.- Parameters:
clawback
- The clawback account.- Returns:
- this builder.
-
clawback
public T clawback(String clawback)
Set the clawback account in the human-readable address format. This account can clawback assets from holder accounts.- Parameters:
clawback
- The clawback account.- Returns:
- this builder.
-
clawback
public T clawback(byte[] clawback)
Set the clawback account in the raw 32 byte format. This account can clawback assets from holder accounts.- Parameters:
clawback
- The clawback account.- Returns:
- this builder.
-
-