AccountCreateTransaction(). The transaction must be signed and paid for by an existing account. To obtain the new account ID, request the receipt of the transaction.
For a complete list of account properties, see the accounts overview.
Transaction fees and signing
- The account paying for the transaction fee is required to sign the transaction.
- The sender also pays the
maxAutoAssociationsfee and the rent for the first auto-renewal period. - See the transaction and query fees table for the base transaction fee.
- Use the Hedera fee estimator to estimate cost.
Constructor
| Constructor | Description |
|---|---|
new AccountCreateTransaction() | Initializes the AccountCreateTransaction object |
Methods
| Method | Type | Requirement |
|---|---|---|
setKey(<key>) | Key | Required |
setKeyWithAlias(<key>) | Key | Optional |
setKeyWithoutAlias(<key>) | Key | Optional |
setAlias(<alias>) | EvmAddress | Optional |
setInitialBalance(<initialBalance>) | Hbar | Optional |
setReceiverSignatureRequired(<booleanValue>) | boolean | Optional |
setMaxAutomaticTokenAssociations(<amount>) | int | Optional |
setStakedAccountId(<stakedAccountId>) | AccountId | Optional |
setStakedNodeId(<stakedNodeId>) | long | Optional |
setDeclineStakingReward(<declineStakingReward>) | boolean | Optional |
setAccountMemo(<memo>) | String | Optional |
setHighVolume(<highVolume>) | boolean | Optional |
setAutoRenewPeriod(<autoRenewPeriod>) | Duration | Disabled |
EVM address from public key
Setting an ECDSA-derived EVM address at creation makes the account natively addressable from EVM wallets, JSON-RPC, and Solidity (msg.sender). The address is the rightmost 20 bytes of the Keccak-256 hash of the ECDSA public key. Use setKeyWithAlias() to enable this behavior, as shown in the example below.Immutability: The EVM address is bound to the original ECDSA public key and does not change if you later rotate keys via CryptoUpdateTransaction. Integrations keyed to that EVM address (smart-contract permissions, address-based access lists) will continue to reference the original address.If key rotation is required: Use setKeyWithoutAlias() instead. The account will fall back to its EVM Address from Account ID (the long-zero form).Recovery model: If keys are compromised or must be replaced, create a new account with a new ECDSA key, then migrate assets and state. Do not rely on key rotation to preserve the same EVM identity.High-volume entity creation
This transaction supports high-volume entity creation (HIP-1313). SettingsetHighVolume(true) routes the transaction through dedicated high-volume throttle capacity with variable-rate pricing. Always pair this with setMaxTransactionFee() to cap your costs.Maximum auto-associations
ThemaxAutoAssociations property determines how many automatic token associations an account allows.
| Value | Behavior |
|---|---|
0 | Automatic token associations and token airdrops are not allowed. Tokens must be manually associated. This also applies when the value is less than or equal to usedAutoAssociations. |
-1 | Unlimited automatic token associations. This is the default for accounts created via auto account creation and for hollow accounts that have been completed. The sender still pays the association fee and initial rent for each new token. |
> 0 | Automatic token associations are limited to the specified number. |
Example
Get transaction values
| Method | Type | Description |
|---|---|---|
getKey() | Key | Returns the public key on the account |
getInitialBalance() | Hbar | Returns the initial balance of the account |
getAutoRenewPeriod() | Duration | Returns the auto-renew period on the account |
getDeclineStakingReward() | boolean | Returns whether the account declined staking rewards |
getStakedNodeId() | long | Returns the staked node ID |
getStakedAccountId() | AccountId | Returns the staked account ID |
getReceiverSignatureRequired() | boolean | Returns whether the receiver signature is required |
getHighVolume() | boolean | Returns whether this transaction uses high-volume throttles |