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

source

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

Get the key this account will be created with.

Returns Some(key) if previously set, None otherwise.

source

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

Sets the key for this account.

source

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.

source

pub fn initial_balance(&mut self, balance: Hbar) -> &mut Self

Sets the balance that will be transferred to this account on creation.

source

pub fn get_receiver_signature_required(&self) -> bool

Returns true if this account must sign any transfer of hbars to itself.

source

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.

source

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

Returns the auto renew period for this account.

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>

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.

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) -> &str

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

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

source

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.

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 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 get_decline_staking_reward(&self) -> bool

Returns true if the account should decline receiving staking rewards, false otherwise.

source

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.