Module com.hedera.hashgraph.sdk
Package com.hedera.hashgraph.sdk.proto
Class TokenBurnTransactionBody.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<TokenBurnTransactionBody,TokenBurnTransactionBody.Builder>
com.google.protobuf.GeneratedMessageLite.Builder<TokenBurnTransactionBody,TokenBurnTransactionBody.Builder>
com.hedera.hashgraph.sdk.proto.TokenBurnTransactionBody.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,TokenBurnTransactionBodyOrBuilder,Cloneable
- Enclosing class:
TokenBurnTransactionBody
public static final class TokenBurnTransactionBody.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<TokenBurnTransactionBody,TokenBurnTransactionBody.Builder>
implements TokenBurnTransactionBodyOrBuilder
* Burns tokens from the Token's treasury Account. The token MUST have a `supply_key` set and that key MUST NOT be an empty `KeyList`.<br/> The token `supply_key` MUST sign this transaction.<br/> This operation SHALL decrease the total supply for the token type by the number of tokens "burned".<br/> The total supply for the token type MUST NOT be reduced below zero (`0`) by this transaction.<br/> The tokens to burn SHALL be deducted from the token treasury account.<br/> If the token is a fungible/common type, the amount MUST be specified.<br/> If the token is a non-fungible/unique type, the specific serial numbers MUST be specified.<br/> The global batch size limit (`tokens.nfts.maxBatchSizeBurn`) SHALL set the maximum number of individual NFT serial numbers permitted in a single `tokenBurn` transaction. ### Block Stream Effects NoneProtobuf type
proto.TokenBurnTransactionBody-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionaddAllSerialNumbers(Iterable<? extends Long> values) * A list of serial numbers to burn from the Treasury Account.addSerialNumbers(long value) * A list of serial numbers to burn from the Treasury Account.* An amount to burn from the Treasury Account.* A list of serial numbers to burn from the Treasury Account.* A token identifier.long* An amount to burn from the Treasury Account.longgetSerialNumbers(int index) * A list of serial numbers to burn from the Treasury Account.int* A list of serial numbers to burn from the Treasury Account.* A list of serial numbers to burn from the Treasury Account.getToken()* A token identifier.booleanhasToken()* A token identifier.mergeToken(TokenID value) * A token identifier.setAmount(long value) * An amount to burn from the Treasury Account.setSerialNumbers(int index, long value) * A list of serial numbers to burn from the Treasury Account.* A token identifier.setToken(TokenID.Builder builderForValue) * A token identifier.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
hasToken
public boolean hasToken()* A token identifier. <p> This SHALL identify the token type to "burn".<br/> The identified token MUST exist, and MUST NOT be deleted.
.proto.TokenID token = 1;- Specified by:
hasTokenin interfaceTokenBurnTransactionBodyOrBuilder- Returns:
- Whether the token field is set.
-
getToken
* A token identifier. <p> This SHALL identify the token type to "burn".<br/> The identified token MUST exist, and MUST NOT be deleted.
.proto.TokenID token = 1;- Specified by:
getTokenin interfaceTokenBurnTransactionBodyOrBuilder- Returns:
- The token.
-
setToken
* A token identifier. <p> This SHALL identify the token type to "burn".<br/> The identified token MUST exist, and MUST NOT be deleted.
.proto.TokenID token = 1; -
setToken
* A token identifier. <p> This SHALL identify the token type to "burn".<br/> The identified token MUST exist, and MUST NOT be deleted.
.proto.TokenID token = 1; -
mergeToken
* A token identifier. <p> This SHALL identify the token type to "burn".<br/> The identified token MUST exist, and MUST NOT be deleted.
.proto.TokenID token = 1; -
clearToken
* A token identifier. <p> This SHALL identify the token type to "burn".<br/> The identified token MUST exist, and MUST NOT be deleted.
.proto.TokenID token = 1; -
getAmount
public long getAmount()* An amount to burn from the Treasury Account. <p> This is interpreted as an amount in the smallest possible denomination for the token (10<sup>-decimals</sup> whole tokens).<br/> The balance for the token treasury account MUST contain sufficient tokens to complete this transaction with a non-negative balance.<br/> If this value is equal to zero (`0`), the token SHOULD be a non-fungible/unique type.<br/> If this value is non-zero, the token MUST be a fungible/common type.
uint64 amount = 2;- Specified by:
getAmountin interfaceTokenBurnTransactionBodyOrBuilder- Returns:
- The amount.
-
setAmount
* An amount to burn from the Treasury Account. <p> This is interpreted as an amount in the smallest possible denomination for the token (10<sup>-decimals</sup> whole tokens).<br/> The balance for the token treasury account MUST contain sufficient tokens to complete this transaction with a non-negative balance.<br/> If this value is equal to zero (`0`), the token SHOULD be a non-fungible/unique type.<br/> If this value is non-zero, the token MUST be a fungible/common type.
uint64 amount = 2;- Parameters:
value- The amount to set.- Returns:
- This builder for chaining.
-
clearAmount
* An amount to burn from the Treasury Account. <p> This is interpreted as an amount in the smallest possible denomination for the token (10<sup>-decimals</sup> whole tokens).<br/> The balance for the token treasury account MUST contain sufficient tokens to complete this transaction with a non-negative balance.<br/> If this value is equal to zero (`0`), the token SHOULD be a non-fungible/unique type.<br/> If this value is non-zero, the token MUST be a fungible/common type.
uint64 amount = 2;- Returns:
- This builder for chaining.
-
getSerialNumbersList
* A list of serial numbers to burn from the Treasury Account. <p> This list MUST NOT contain more entries than the current limit set by the network configuration value `tokens.nfts.maxBatchSizeBurn`.<br/> The treasury account for the token MUST hold each unique token identified in this list.<br/> If this list is not empty, the token MUST be a non-fungible/unique type.<br/> If this list is empty, the token MUST be a fungible/common type.
repeated int64 serialNumbers = 3;- Specified by:
getSerialNumbersListin interfaceTokenBurnTransactionBodyOrBuilder- Returns:
- A list containing the serialNumbers.
-
getSerialNumbersCount
public int getSerialNumbersCount()* A list of serial numbers to burn from the Treasury Account. <p> This list MUST NOT contain more entries than the current limit set by the network configuration value `tokens.nfts.maxBatchSizeBurn`.<br/> The treasury account for the token MUST hold each unique token identified in this list.<br/> If this list is not empty, the token MUST be a non-fungible/unique type.<br/> If this list is empty, the token MUST be a fungible/common type.
repeated int64 serialNumbers = 3;- Specified by:
getSerialNumbersCountin interfaceTokenBurnTransactionBodyOrBuilder- Returns:
- The count of serialNumbers.
-
getSerialNumbers
public long getSerialNumbers(int index) * A list of serial numbers to burn from the Treasury Account. <p> This list MUST NOT contain more entries than the current limit set by the network configuration value `tokens.nfts.maxBatchSizeBurn`.<br/> The treasury account for the token MUST hold each unique token identified in this list.<br/> If this list is not empty, the token MUST be a non-fungible/unique type.<br/> If this list is empty, the token MUST be a fungible/common type.
repeated int64 serialNumbers = 3;- Specified by:
getSerialNumbersin interfaceTokenBurnTransactionBodyOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The serialNumbers at the given index.
-
setSerialNumbers
* A list of serial numbers to burn from the Treasury Account. <p> This list MUST NOT contain more entries than the current limit set by the network configuration value `tokens.nfts.maxBatchSizeBurn`.<br/> The treasury account for the token MUST hold each unique token identified in this list.<br/> If this list is not empty, the token MUST be a non-fungible/unique type.<br/> If this list is empty, the token MUST be a fungible/common type.
repeated int64 serialNumbers = 3;- Parameters:
value- The serialNumbers to set.- Returns:
- This builder for chaining.
-
addSerialNumbers
* A list of serial numbers to burn from the Treasury Account. <p> This list MUST NOT contain more entries than the current limit set by the network configuration value `tokens.nfts.maxBatchSizeBurn`.<br/> The treasury account for the token MUST hold each unique token identified in this list.<br/> If this list is not empty, the token MUST be a non-fungible/unique type.<br/> If this list is empty, the token MUST be a fungible/common type.
repeated int64 serialNumbers = 3;- Parameters:
value- The serialNumbers to add.- Returns:
- This builder for chaining.
-
addAllSerialNumbers
* A list of serial numbers to burn from the Treasury Account. <p> This list MUST NOT contain more entries than the current limit set by the network configuration value `tokens.nfts.maxBatchSizeBurn`.<br/> The treasury account for the token MUST hold each unique token identified in this list.<br/> If this list is not empty, the token MUST be a non-fungible/unique type.<br/> If this list is empty, the token MUST be a fungible/common type.
repeated int64 serialNumbers = 3;- Parameters:
values- The serialNumbers to add.- Returns:
- This builder for chaining.
-
clearSerialNumbers
* A list of serial numbers to burn from the Treasury Account. <p> This list MUST NOT contain more entries than the current limit set by the network configuration value `tokens.nfts.maxBatchSizeBurn`.<br/> The treasury account for the token MUST hold each unique token identified in this list.<br/> If this list is not empty, the token MUST be a non-fungible/unique type.<br/> If this list is empty, the token MUST be a fungible/common type.
repeated int64 serialNumbers = 3;- Returns:
- This builder for chaining.
-