java.lang.Object
com.hedera.hashgraph.sdk.Executable<TokenWipeTransaction,Transaction,TransactionResponse,TransactionResponse>
com.hedera.hashgraph.sdk.Transaction<TokenWipeTransaction>
com.hedera.hashgraph.sdk.TokenWipeTransaction
Wipe (administratively burn) tokens held by a non-treasury account.
On success, the requested tokens will be removed from the identified account and the token supply will be reduced by the amount "wiped". This transaction MUST be signed by the token `wipe_key`.
The identified token MUST exist, MUST NOT be deleted, and MUST NOT be paused.
The identified token MUST have a valid `Key` set for the `wipe_key` field, and that key MUST NOT be an empty `KeyList`.
The identified account MUST exist, MUST NOT be deleted, MUST be associated to the identified token, MUST NOT be frozen for the identified token, MUST NOT be the token `treasury`, and MUST hold a balance for the token or the specific serial numbers provided.
This transaction SHOULD provide a value for `amount` or `serialNumbers`, but MUST NOT set both fields. ### Block Stream Effects The new total supply for the wiped token type SHALL be recorded.
On success, the requested tokens will be removed from the identified account and the token supply will be reduced by the amount "wiped". This transaction MUST be signed by the token `wipe_key`.
The identified token MUST exist, MUST NOT be deleted, and MUST NOT be paused.
The identified token MUST have a valid `Key` set for the `wipe_key` field, and that key MUST NOT be an empty `KeyList`.
The identified account MUST exist, MUST NOT be deleted, MUST be associated to the identified token, MUST NOT be frozen for the identified token, MUST NOT be the token `treasury`, and MUST hold a balance for the token or the specific serial numbers provided.
This transaction SHOULD provide a value for `amount` or `serialNumbers`, but MUST NOT set both fields. ### Block Stream Effects The new total supply for the wiped token type SHALL be recorded.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hedera.hashgraph.sdk.Transaction
Transaction.SignableNodeTransactionBodyBytesNested classes/interfaces inherited from class com.hedera.hashgraph.sdk.Executable
Executable.GrpcRequest -
Field Summary
Fields inherited from class com.hedera.hashgraph.sdk.Transaction
customFeeLimits, DEFAULT_AUTO_RENEW_PERIOD, defaultMaxTransactionFee, DUMMY_ACCOUNT_ID, DUMMY_TRANSACTION_ID, frozenBodyBuilder, innerSignedTransactions, outerTransactions, publicKeys, regenerateTransactionId, signers, sigPairLists, sourceTransactionBody, transactionIdsFields inherited from class com.hedera.hashgraph.sdk.Executable
attemptedAllNodes, blockingUnaryCall, grpcDeadline, logger, maxAttempts, maxBackoff, minBackoff, nodeAccountIds, nodes, random, RST_STREAM -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.TokenWipeTransaction(TransactionBody txBody) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionaddSerial(long serial) Add a serial number to the list of serial numbers.(package private) TokenWipeAccountTransactionBody.Builderbuild()Build the transaction body.Extract the account id.longExtract the amount.(package private) io.grpc.MethodDescriptor<Transaction, TransactionResponse> Called to direct the invocation of the query to the appropriate gRPC service.Extract the list of serial numbers.Extract the token id.(package private) voidInitialize from the transaction body.(package private) voidonFreeze(TransactionBody.Builder bodyBuilder) Called inTransaction.freezeWith(Client)just before the transaction body is built.(package private) voidonScheduled(SchedulableTransactionBody.Builder scheduled) Called inTransaction.schedule()when converting transaction into a scheduled version.setAccountId(AccountId accountId) An account identifier.
This identifies the account from which tokens will be wiped.setAmount(long amount) An amount of fungible/common tokens to wipe.setSerials(List<Long> serials) A list of serial numbers to wipe.
The non-fungible/unique tokens with these serial numbers will be destroyed and cannot be recovered or reused.setTokenId(TokenId tokenId) A token identifier.(package private) voidvalidateChecksums(Client client) Methods inherited from class com.hedera.hashgraph.sdk.Transaction
addSignature, addSignature, batchify, buildAllTransactions, buildTransaction, doSchedule, estimateFee, freeze, freezeWith, fromBytes, fromScheduledTransaction, generateTransactionIds, getBatchKey, getDefaultMaxTransactionFee, getExecutionState, getHighVolume, getMaxTransactionFee, getRegenerateTransactionId, getRequiredChunks, getSignableNodeBodyBytesList, getSignatures, getSignaturesAtOffset, getTransactionBodySize, getTransactionHash, getTransactionHashPerNode, getTransactionId, getTransactionIdInternal, getTransactionMemo, getTransactionSize, getTransactionValidDuration, hash, isBatchedAndNotBatchTransaction, isFrozen, keyAlreadySigned, makeRequest, mapResponse, mapResponseStatus, onExecute, onExecuteAsync, regenerateTransactionId, requireNotFrozen, requireOneNodeAccountId, schedule, setBatchKey, setHighVolume, setMaxTransactionFee, setNodeAccountIds, setRegenerateTransactionId, setTransactionId, setTransactionMemo, setTransactionValidDuration, sign, signTransaction, signWith, signWithOperator, spawnBodyBuilder, toBytes, toString, wipeTransactionListsMethods inherited from class com.hedera.hashgraph.sdk.Executable
advanceRequest, checkNodeAccountIds, execute, execute, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, getGrpcRequest, getMaxAttempts, getMaxBackoff, getMaxRetry, getMinBackoff, getNodeAccountIds, getNodeForExecute, grpcDeadline, logTransaction, mergeFromClient, setGrpcDeadline, setLogger, setMaxAttempts, setMaxBackoff, setMaxRetry, setMinBackoff, setNodesFromNodeAccountIds, setRequestListener, setResponseListener, shouldRetryExceptionally
-
Constructor Details
-
TokenWipeTransaction
public TokenWipeTransaction()Constructor. -
TokenWipeTransaction
TokenWipeTransaction(LinkedHashMap<TransactionId, LinkedHashMap<AccountId, throws com.google.protobuf.InvalidProtocolBufferExceptionTransaction>> txs) Constructor.- Parameters:
txs- Compound list of transaction id's list of (AccountId, Transaction) records- Throws:
com.google.protobuf.InvalidProtocolBufferException- when there is an issue with the protobuf
-
TokenWipeTransaction
TokenWipeTransaction(TransactionBody txBody) Constructor.- Parameters:
txBody- protobuf TransactionBody
-
-
Method Details
-
getTokenId
Extract the token id.- Returns:
- the token id
-
setTokenId
A token identifier.This field is REQUIRED.
The identified token MUST exist, MUST NOT be paused, MUST NOT be deleted, and MUST NOT be expired.- Parameters:
tokenId- the token id- Returns:
this
-
getAccountId
Extract the account id.- Returns:
- the account id
-
setAccountId
An account identifier.
This identifies the account from which tokens will be wiped.This field is REQUIRED.
The identified account MUST NOT be deleted or expired.
If the identified token `kyc_key` is set to a valid key, the identified account MUST have "KYC" granted.
The identified account MUST NOT be the `treasury` account for the identified token.- Parameters:
accountId- the account id- Returns:
this
-
getAmount
public long getAmount()Extract the amount.- Returns:
- the amount
-
setAmount
An amount of fungible/common tokens to wipe.If the identified token is a non-fungible/unique token type, this value MUST be exactly zero(`0`).
If the identified token type is fungible/common:- This value SHALL be specified in units of the smallest denomination possible for the identified token (10-decimals whole tokens).
- This value MUST be strictly less than `Long.MAX_VALUE`.
- This value MUST be less than or equal to the current total supply for the identified token.
- This value MUST be less than or equal to the current balance held by the identified account.
- This value MAY be zero(`0`).
- Parameters:
amount- the amount- Returns:
this
-
getSerials
Extract the list of serial numbers.- Returns:
- the list of serial numbers
-
setSerials
A list of serial numbers to wipe.
The non-fungible/unique tokens with these serial numbers will be destroyed and cannot be recovered or reused.If the identified token type is a fungible/common type, this list MUST be empty.
If the identified token type is non-fungible/unique:- This list MUST contain at least one entry if the identified token type is non-fungible/unique.>/li>
- This list MUST NOT contain more entries than the current total supply for the identified token.
- Every entry in this list MUST be a valid serial number for the identified token (i.e. "collection").
- Every entry in this list MUST be owned by the identified account
- Parameters:
serials- the list of serial numbers- Returns:
this
-
addSerial
Add a serial number to the list of serial numbers.- Parameters:
serial- the serial number to add- Returns:
this
-
initFromTransactionBody
void initFromTransactionBody()Initialize from the transaction body. -
build
Build the transaction body.- Returns:
TokenWipeAccountTransactionBody
-
validateChecksums
- Specified by:
validateChecksumsin classTransaction<TokenWipeTransaction>- Throws:
BadEntityIdException
-
getMethodDescriptor
io.grpc.MethodDescriptor<Transaction,TransactionResponse> getMethodDescriptor()Description copied from class:ExecutableCalled to direct the invocation of the query to the appropriate gRPC service.- Specified by:
getMethodDescriptorin classExecutable<TokenWipeTransaction,Transaction, TransactionResponse, TransactionResponse>
-
onFreeze
Description copied from class:TransactionCalled inTransaction.freezeWith(Client)just before the transaction body is built. The intent is for the derived class to assign their data variant to the transaction body.- Specified by:
onFreezein classTransaction<TokenWipeTransaction>
-
onScheduled
Description copied from class:TransactionCalled inTransaction.schedule()when converting transaction into a scheduled version.- Specified by:
onScheduledin classTransaction<TokenWipeTransaction>
-