Type Alias hedera::AccountUpdateTransaction
source · pub type AccountUpdateTransaction = Transaction<AccountUpdateTransactionData>;
Expand description
Change properties for the given account.
Any null field is ignored (left unchanged). This transaction must be signed by the existing key for this account. If the transaction is changing the key field, then the transaction must be signed by both the old key (from before the change) and the new key.
Aliased Type§
struct AccountUpdateTransaction { /* private fields */ }
Implementations§
source§impl AccountUpdateTransaction
impl AccountUpdateTransaction
sourcepub fn get_account_id(&self) -> Option<AccountId>
pub fn get_account_id(&self) -> Option<AccountId>
Returns the ID for the account that is being updated.
sourcepub fn account_id(&mut self, id: AccountId) -> &mut Self
pub fn account_id(&mut self, id: AccountId) -> &mut Self
Sets the ID for the account that is being updated.
sourcepub fn get_expiration_time(&self) -> Option<OffsetDateTime>
pub fn get_expiration_time(&self) -> Option<OffsetDateTime>
Gets the new expiration time to extend to (ignored if equal to or before the current one).
sourcepub fn expiration_time(&mut self, at: OffsetDateTime) -> &mut Self
pub fn expiration_time(&mut self, at: OffsetDateTime) -> &mut Self
Sets the new expiration time to extend to (ignored if equal to or before the current one).
sourcepub fn get_receiver_signature_required(&self) -> Option<bool>
pub fn get_receiver_signature_required(&self) -> Option<bool>
If true, this account’s key must sign any transaction depositing hbar into this account.
sourcepub fn receiver_signature_required(&mut self, required: bool) -> &mut Self
pub fn receiver_signature_required(&mut self, required: bool) -> &mut Self
Set to true to require this account to sign any transfer of hbars to this account.
sourcepub fn get_proxy_account_id(&self) -> Option<AccountId>
👎Deprecated
pub fn get_proxy_account_id(&self) -> Option<AccountId>
Gets the ID of the account to which this account will be updated to be proxy staked to.
sourcepub fn proxy_account_id(&mut self, proxy_account_id: AccountId) -> &mut Self
👎Deprecated
pub fn proxy_account_id(&mut self, proxy_account_id: AccountId) -> &mut Self
Sets the proxy account ID for this account.
If proxy_account_id
is None
, 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 proxy_account_id
account refuses to accept proxy staking, or
if it is not currently running a node, then it
will behave as if proxy_account_id
was None
.
sourcepub fn get_auto_renew_period(&self) -> Option<Duration>
pub fn get_auto_renew_period(&self) -> Option<Duration>
Returns the new auto renew period.
sourcepub fn auto_renew_period(&mut self, period: Duration) -> &mut Self
pub fn auto_renew_period(&mut self, period: Duration) -> &mut Self
Sets the auto renew period for this account.
sourcepub fn get_auto_renew_account_id(&self) -> Option<AccountId>
pub fn get_auto_renew_account_id(&self) -> Option<AccountId>
Returns the new auto renew account id.
§Network Support
Please note that this not supported on any hedera network at this time.
sourcepub fn auto_renew_account_id(&mut self, id: AccountId) -> &mut Self
pub fn auto_renew_account_id(&mut self, id: AccountId) -> &mut Self
Sets the account to be used at this account’s expiration time to extend the
life of the account. If None
, this account pays for its own auto renewal fee.
§Network Support
Please note that this not supported on any hedera network at this time.
sourcepub fn get_account_memo(&self) -> Option<&str>
pub fn get_account_memo(&self) -> Option<&str>
Returns the memo associated with the account.
sourcepub fn account_memo(&mut self, memo: impl Into<String>) -> &mut Self
pub fn account_memo(&mut self, memo: impl Into<String>) -> &mut Self
Sets the memo associated with the account.
sourcepub fn get_max_automatic_token_associations(&self) -> Option<u16>
pub fn get_max_automatic_token_associations(&self) -> Option<u16>
Returns the maximum number of tokens that an Account can be implicitly associated with.
sourcepub fn max_automatic_token_associations(&mut self, amount: u16) -> &mut Self
pub fn max_automatic_token_associations(&mut self, amount: u16) -> &mut Self
Sets the maximum number of tokens that an Account can be implicitly associated with.
sourcepub fn get_staked_account_id(&self) -> Option<AccountId>
pub fn get_staked_account_id(&self) -> Option<AccountId>
Returns the ID of the account to which this account is staking.
This is mutually exclusive with staked_node_id
.
sourcepub fn staked_account_id(&mut self, id: AccountId) -> &mut Self
pub fn staked_account_id(&mut self, id: AccountId) -> &mut Self
Sets the ID of the account to which this account is staking.
This is mutually exclusive with staked_node_id
.
sourcepub fn clear_staked_account_id(&mut self) -> &mut Self
pub fn clear_staked_account_id(&mut self) -> &mut Self
Clears the account’s staked account ID.
sourcepub fn get_staked_node_id(&self) -> Option<u64>
pub fn get_staked_node_id(&self) -> Option<u64>
Returns the ID of the node to which this account is staking.
This is mutually exclusive with staked_account_id
.
sourcepub fn staked_node_id(&mut self, id: u64) -> &mut Self
pub fn staked_node_id(&mut self, id: u64) -> &mut Self
Sets the ID of the node to which this account is staking.
This is mutually exclusive with staked_account_id
.
sourcepub fn clear_staked_node_id(&mut self) -> &mut Self
pub fn clear_staked_node_id(&mut self) -> &mut Self
Clears the account’s staked node ID.
sourcepub fn get_decline_staking_reward(&self) -> Option<bool>
pub fn get_decline_staking_reward(&self) -> Option<bool>
Returns true
if this account should decline receiving a staking reward,
false
if it should not,
and None
if the value should remain unchanged.
sourcepub fn decline_staking_reward(&mut self, decline: bool) -> &mut Self
pub fn decline_staking_reward(&mut self, decline: bool) -> &mut Self
If set to true, the account declines receiving a staking reward. The default value is false.