Type Alias hedera::AccountCreateTransaction
source · pub type AccountCreateTransaction = Transaction<AccountCreateTransactionData>;
Expand description
Create a new Hedera™ account.
Aliased Type§
struct AccountCreateTransaction { /* private fields */ }
Implementations§
source§impl AccountCreateTransaction
impl AccountCreateTransaction
sourcepub fn get_key(&self) -> Option<&Key>
pub fn get_key(&self) -> Option<&Key>
Get the key this account will be created with.
Returns Some(key)
if previously set, None
otherwise.
sourcepub fn get_initial_balance(&self) -> Hbar
pub fn get_initial_balance(&self) -> Hbar
Get the balance that will be transferred to this account on creation.
Returns initial_balance
if previously set, 0
otherwise.
sourcepub fn initial_balance(&mut self, balance: Hbar) -> &mut Self
pub fn initial_balance(&mut self, balance: Hbar) -> &mut Self
Sets the balance that will be transferred to this account on creation.
sourcepub fn get_receiver_signature_required(&self) -> bool
pub fn get_receiver_signature_required(&self) -> bool
Returns true
if this account must sign any transfer of hbars to itself.
sourcepub fn receiver_signature_required(&mut self, required: bool) -> &mut Self
pub fn receiver_signature_required(&mut self, required: bool) -> &mut Self
Sets to true to require this account to sign any transfer of hbars to this account.
sourcepub fn get_auto_renew_period(&self) -> Option<Duration>
pub fn get_auto_renew_period(&self) -> Option<Duration>
Returns the auto renew period for this account.
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>
Gets 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 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) -> &str
pub fn get_account_memo(&self) -> &str
Get 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) -> u16
pub fn get_max_automatic_token_associations(&self) -> u16
Get the maximum number of tokens that an Account can be implicitly associated with.
Defaults to 0
. Allows up to a maximum value of 1000
.
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_alias(&self) -> Option<EvmAddress>
pub fn get_alias(&self) -> Option<EvmAddress>
Returns the evm address the account will be created with as an alias.
§Network Support
Please note that this not currently supported on mainnet.
sourcepub fn alias(&mut self, alias: EvmAddress) -> &mut Self
pub fn alias(&mut self, alias: EvmAddress) -> &mut Self
Sets the evm address the account will be created with as an alias.
The last 20 bytes of the keccak-256 hash of a ECDSA_SECP256K1
primitive key.
§Network Support
Please note that this not currently supported on mainnet.
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 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 get_decline_staking_reward(&self) -> bool
pub fn get_decline_staking_reward(&self) -> bool
Returns true
if the account should decline receiving staking rewards, false
otherwise.
sourcepub fn decline_staking_reward(&mut self, decline: bool) -> &mut Self
pub fn decline_staking_reward(&mut self, decline: bool) -> &mut Self
If true
, the account declines receiving a staking reward. The default value is false.