AccountCreateTransaction

Type Alias AccountCreateTransaction 

Source
pub type AccountCreateTransaction = Transaction<AccountCreateTransactionData>;
Expand description

Create a new Hiero™ account.

Aliased Type§

pub struct AccountCreateTransaction { /* private fields */ }

Implementations§

Source§

impl AccountCreateTransaction

Source

pub fn set_ecdsa_key_with_alias(&mut self, ecdsa_key: PrivateKey) -> &mut Self

Sets the ECDSA(secp256k1) private key as the account key and derives the alias (EVM address) from it.

Source

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

Sets a generic key and an ECDSA(secp256k1) private key, and derives the alias from the ECDSA key.

Source

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

Sets a generic key and unsets the alias.

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

👎Deprecated: use set_key_without_alias instead

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

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: i32) -> &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.