-
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 TypeMethodDescriptionaddHookToCreate(HookCreationDetails hookDetails) Add a hook to be created for the account.addHookToDelete(Long hookId) Mark a hook for deletion from the account.(package private) CryptoUpdateTransactionBody.Builderbuild()Create the builder.Clear decline staking rewardErase the memo field.Clear the staked account IDClear the staked nodeExtract the account id.Extract the account memo.Deprecated.with no replacementExtract the auto renew period.If true, the account declines receiving a staking reward.Extract the expiration time.Get the list of hooks to be created.Get the list of hook IDs to be deleted.getKey()Extract the key.Extract the maximum automatic token associations.(package private) io.grpc.MethodDescriptor<Transaction, TransactionResponse> Called to direct the invocation of the query to the appropriate gRPC service.Extract the proxy account id.Is the receiver required to sign?ID of the account to which this account will stakeThe node to which this account will stake(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) Sets the account ID which is being updated in this transaction.setAccountMemo(String memo) A short description of this Account.setAliasKey(Key aliasKey) Deprecated.with no replacement Sets the new key.setAutoRenewPeriod(Duration autoRenewPeriod) A duration to extend account expiration.
An amount of time, in seconds, to extend the expiration date for this account when _automatically_ renewed.setDeclineStakingReward(boolean declineStakingReward) A boolean indicating that this account has chosen to decline rewards for staking its balances.setExpirationTime(Duration expirationTime) setExpirationTime(Instant expirationTime) A new account expiration time, in seconds since the epoch.setHooksToCreate(List<HookCreationDetails> hookDetails) Set hooks to be created with the account.setHooksToDelete(List<Long> hookIds) Mark hooks for deletion from the account.An account key.
This may be a "primitive" key (a singly cryptographic key), or a composite key.setMaxAutomaticTokenAssociations(int amount) A maximum number of tokens that can be auto-associated with this account.
By default this value is 0 for all accounts except for automatically created accounts (i.e smart contracts) which default to -1.setProxyAccountId(AccountId proxyAccountId) Sets the ID of the account to which this account is proxy staked.setReceiverSignatureRequired(boolean receiverSignatureRequired) Removed to distinguish between unset and a default value.
Do NOT use this field to set a false value because the server cannot distinguish from the default value.setStakedAccountId(AccountId stakedAccountId) ID of the account to which this account is staking its balances.setStakedNodeId(Long stakedNodeId) ID of the node this account is staked to.(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
-
AccountUpdateTransaction
public AccountUpdateTransaction()Constructor. -
AccountUpdateTransaction
AccountUpdateTransaction(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
-
AccountUpdateTransaction
AccountUpdateTransaction(TransactionBody txBody) Constructor.- Parameters:
txBody- protobuf TransactionBody
-
-
Method Details
-
getAccountId
Extract the account id.- Returns:
- the account id
-
setAccountId
Sets the account ID which is being updated in this transaction.- Parameters:
accountId- The AccountId to be set- Returns:
this
-
getKey
Extract the key.- Returns:
- the key
-
setKey
An account key.
This may be a "primitive" key (a singly cryptographic key), or a composite key.If set, this key MUST be a valid key.
If set, the previous key and new key MUST both sign this transaction.- Parameters:
key- The Key to be set- Returns:
this
-
getAliasKey
Deprecated.with no replacement- Returns:
- the alias key
-
setAliasKey
Deprecated.with no replacement Sets the new key.- Parameters:
aliasKey- The Key to be set- Returns:
this
-
getProxyAccountId
Extract the proxy account id.- Returns:
- the proxy account id
-
setProxyAccountId
Sets the ID of the account to which this account is proxy staked.If proxyAccountID is null, or is an invalid account, or is an account that isn't a node, then this account is automatically proxy staked to a node chosen by the network, but without earning payments.
If the proxyAccountID account refuses to accept proxy staking, or if it is not currently running a node, then it will behave as if proxyAccountID was null.
- Parameters:
proxyAccountId- The AccountId to be set- Returns:
this
-
getExpirationTime
Extract the expiration time.- Returns:
- the expiration time
-
setExpirationTime
A new account expiration time, in seconds since the epoch.For this purpose, `epoch` SHALL be the UNIX epoch with 0 at `1970-01-01T00:00:00.000Z`.
If set, this value MUST be later than the current consensus time.
If set, this value MUST be earlier than the current consensus time extended by the current maximum expiration time configured for the network.- Parameters:
expirationTime- The Instant to be set as the expiration time- Returns:
this
-
setExpirationTime
-
getAutoRenewPeriod
Extract the auto renew period.- Returns:
- the auto renew period
-
setAutoRenewPeriod
A duration to extend account expiration.
An amount of time, in seconds, to extend the expiration date for this account when _automatically_ renewed.This duration MUST be between the current configured minimum and maximum values defined for the network.
This duration SHALL be applied only when _automatically_ extending the account expiration.- Parameters:
autoRenewPeriod- The Duration to be set for auto renewal- Returns:
this
-
getReceiverSignatureRequired
Is the receiver required to sign?- Returns:
- is the receiver required to sign
-
setReceiverSignatureRequired
Removed to distinguish between unset and a default value.
Do NOT use this field to set a false value because the server cannot distinguish from the default value. Use receiverSigRequiredWrapper field for this purpose.- Parameters:
receiverSignatureRequired- The bool to be set- Returns:
this
-
getMaxAutomaticTokenAssociations
Extract the maximum automatic token associations.- Returns:
- the max automatic token associations
-
setMaxAutomaticTokenAssociations
A maximum number of tokens that can be auto-associated with this account.
By default this value is 0 for all accounts except for automatically created accounts (i.e smart contracts) which default to -1.If this value is `0`, then this account MUST manually associate to a token before holding or transacting in that token.
This value MAY also be `-1` to indicate no limit.
If set, this value MUST NOT be less than `-1`.- Parameters:
amount- the amount of tokens- Returns:
this
-
getAccountMemo
Extract the account memo.- Returns:
- the account memo
-
setAccountMemo
A short description of this Account.This value, if set, MUST NOT exceed `transaction.maxMemoUtf8Bytes` (default 100) bytes when encoded as UTF-8.
- Parameters:
memo- the memo- Returns:
this
-
clearMemo
Erase the memo field.- Returns:
this
-
getStakedAccountId
ID of the account to which this account will stake- Returns:
- ID of the account to which this account will stake.
-
setStakedAccountId
ID of the account to which this account is staking its balances.If this account is not currently staking its balances, then this field, if set, MUST be the sentinel value of `0.0.0`.
- Parameters:
stakedAccountId- ID of the account to which this account will stake.- Returns:
this
-
clearStakedAccountId
Clear the staked account ID- Returns:
this
-
getStakedNodeId
The node to which this account will stake- Returns:
- ID of the node this account will be staked to.
-
setStakedNodeId
ID of the node this account is staked to.If this account is not currently staking its balances, then this field, if set, SHALL be the sentinel value of `-1`.
Wallet software SHOULD surface staking issues to users and provide a simple mechanism to update staking to a new node ID in the event the prior staked node ID ceases to be valid.- Parameters:
stakedNodeId- ID of the node this account will be staked to.- Returns:
this
-
clearStakedNodeId
Clear the staked node- Returns:
this
-
getDeclineStakingReward
If true, the account declines receiving a staking reward. The default value is false.- Returns:
- If true, the account declines receiving a staking reward. The default value is false.
-
setDeclineStakingReward
A boolean indicating that this account has chosen to decline rewards for staking its balances.This account MAY still stake its balances, but SHALL NOT receive reward payments for doing so, if this value is set, and `true`.
- Parameters:
declineStakingReward- - If true, the account declines receiving a staking reward. The default value is false.- Returns:
this
-
clearDeclineStakingReward
Clear decline staking reward- Returns:
this
-
addHookToCreate
Add a hook to be created for the account.- Parameters:
hookDetails- the hook creation details to add- Returns:
this
-
setHooksToCreate
Set hooks to be created with the account.- Parameters:
hookDetails- list of hook creation details- Returns:
this
-
addHookToDelete
Mark a hook for deletion from the account.- Parameters:
hookId- the hook id to delete- Returns:
this
-
setHooksToDelete
Mark hooks for deletion from the account.- Parameters:
hookIds- list of hook ids to delete- Returns:
this
-
getHooksToCreate
Get the list of hooks to be created.- Returns:
- a copy of the hook creation details list
-
getHooksToDelete
Get the list of hook IDs to be deleted.- Returns:
- a copy of the hook IDs list
-
validateChecksums
- Specified by:
validateChecksumsin classTransaction<AccountUpdateTransaction>- Throws:
BadEntityIdException
-
initFromTransactionBody
void initFromTransactionBody()Initialize from the transaction body. -
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<AccountUpdateTransaction,Transaction, TransactionResponse, TransactionResponse>
-
build
Create the builder.- Returns:
- the transaction builder
-
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<AccountUpdateTransaction>
-
onScheduled
Description copied from class:TransactionCalled inTransaction.schedule()when converting transaction into a scheduled version.- Specified by:
onScheduledin classTransaction<AccountUpdateTransaction>
-