java.lang.Object
com.hedera.hashgraph.sdk.Executable<AccountDeleteTransaction,Transaction,TransactionResponse,TransactionResponse>
com.hedera.hashgraph.sdk.Transaction<AccountDeleteTransaction>
com.hedera.hashgraph.sdk.AccountDeleteTransaction
Delete an account.
This will mark an account deleted, and transfer all tokens to a "sweep" account. A deleted account SHALL NOT hold a balance in any token type.
A deleted account SHALL remain in state until it expires.
Transfers that would increase the balance of a deleted account SHALL fail.
A deleted account MAY be subject of a `cryptoUpdate` transaction to extend its expiration.
When a deleted account expires it SHALL be removed entirely, and SHALL NOT be archived. ### Block Stream Effects None
This will mark an account deleted, and transfer all tokens to a "sweep" account. A deleted account SHALL NOT hold a balance in any token type.
A deleted account SHALL remain in state until it expires.
Transfers that would increase the balance of a deleted account SHALL fail.
A deleted account MAY be subject of a `cryptoUpdate` transaction to extend its expiration.
When a deleted account expires it SHALL be removed entirely, and SHALL NOT be archived. ### Block Stream Effects None
-
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.Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescription(package private) CryptoDeleteTransactionBody.Builderbuild()Build the transaction body.Extract the account id.(package private) io.grpc.MethodDescriptor<Transaction, TransactionResponse> Called to direct the invocation of the query to the appropriate gRPC service.Extract the receiving account 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 deleteAccountId) An account identifier.setTransferAccountId(AccountId transferAccountId) An account 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
-
AccountDeleteTransaction
public AccountDeleteTransaction()Constructor. -
AccountDeleteTransaction
AccountDeleteTransaction(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
-
AccountDeleteTransaction
AccountDeleteTransaction(TransactionBody txBody) Constructor.- Parameters:
txBody- protobuf TransactionBody
-
-
Method Details
-
getAccountId
Extract the account id.- Returns:
- the account id
-
setAccountId
An account identifier.This account SHALL be deleted if this transaction succeeds.
This account SHOULD NOT hold any balance other than HBAR.
If this account _does_ hold balances, the `transferAccountID` value MUST be set to a valid transfer account.
This account MUST sign this transaction.
This field MUST be set to a valid account identifier.- Parameters:
deleteAccountId- The AccountId to be set- Returns:
this
-
getTransferAccountId
Extract the receiving account id.- Returns:
- the account id that receives the hbar
-
setTransferAccountId
An account identifier.The identified account SHALL receive all tokens, token balances, and non-fungible/unique from the deleted account.
The identified account MUST sign this transaction.
If not set, the account to be deleted MUST NOT have a balance in any token, a balance in HBAR, or hold any NFT.- Parameters:
transferAccountId- The AccountId to be set- Returns:
this
-
validateChecksums
- Specified by:
validateChecksumsin classTransaction<AccountDeleteTransaction>- 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<AccountDeleteTransaction,Transaction, TransactionResponse, TransactionResponse>
-
build
Build the transaction body.- Returns:
CryptoDeleteTransactionBody
-
initFromTransactionBody
void initFromTransactionBody()Initialize from the transaction body. -
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<AccountDeleteTransaction>
-
onScheduled
Description copied from class:TransactionCalled inTransaction.schedule()when converting transaction into a scheduled version.- Specified by:
onScheduledin classTransaction<AccountDeleteTransaction>
-