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

source

pub fn get_account_id(&self) -> Option<AccountId>

Returns the ID for the account that is being updated.

source

pub fn account_id(&mut self, id: AccountId) -> &mut Self

Sets the ID for the account that is being updated.

source

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).

source

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).

source

pub fn get_key(&self) -> Option<&Key>

Returns the key that the account will be updated to.

source

pub fn key(&mut self, key: impl Into<Key>) -> &mut Self

Sets the key for this account.

source

pub fn get_receiver_signature_required(&self) -> Option<bool>

If true, this account’s key must sign any transaction depositing hbar into this account.

source

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.

source

pub fn get_proxy_account_id(&self) -> Option<AccountId>

👎Deprecated

Gets the ID of the account to which this account will be updated to be proxy staked to.

source

pub fn proxy_account_id(&mut self, proxy_account_id: AccountId) -> &mut Self

👎Deprecated

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.

source

pub fn get_auto_renew_period(&self) -> Option<Duration>

Returns the new auto renew period.

source

pub fn auto_renew_period(&mut self, period: Duration) -> &mut Self

Sets the auto renew period for this account.

source

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.

source

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.

source

pub fn get_account_memo(&self) -> Option<&str>

Returns the memo associated with the account.

source

pub fn account_memo(&mut self, memo: impl Into<String>) -> &mut Self

Sets the memo associated with the account.

source

pub fn get_max_automatic_token_associations(&self) -> Option<u16>

Returns the maximum number of tokens that an Account can be implicitly associated with.

source

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.

source

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.

source

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.

source

pub fn clear_staked_account_id(&mut self) -> &mut Self

Clears the account’s staked account ID.

source

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.

source

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.

source

pub fn clear_staked_node_id(&mut self) -> &mut Self

Clears the account’s staked node ID.

source

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.

source

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.