Accounts

Hedera accounts

Accounts

Accounts are the central starting point for Hedera. Accounts are stored on the public ledger and hold hbars which are used to pay for the transaction and query fees.

Accounts are the central starting point for Hedera. Accounts are stored on the public ledger and hold hbars which are used to pay for the transaction and query fees. Accounts can be created, updated, or deleted. In order to create an account, you need an exisiting account that can pay for the associated transaction fees for the new account and to optionally fund the new account with an initial balance.

Accounts are comprised of:

  • Account ID

  • Keys

  • Balance

  • Livehash(es)

To create a mainnet or testnet account, please visit one of the following:

Account ID

Each Hedera account is represented by an account ID. The account ID used to reference a specific account in transactions and queries. Hedera account IDs have the format x.y.z (eg 0.0.3) where:

  • x represents the shard number (shardId). It will default to 0 today, as Hedera only performs in one shard.

  • y represents the realm number (realmId). It will default to 0 today, as realms are not yet supported.

  • z represents the account number, the equivalent of a human-friendly public key.

The account ID is stored in the receipt of a transaction. In order to view the account for a newly created account you will have to request a receipt or record of the transaction. Requesting a transaction receipt is free of charge where requesting a record for a transaction will incur a small fee.

Keys

Each account has a public and private key pair. The private key of the account is used authorize and sign transactions for that account. This authorization allows for the modification of the account including deducting from the balance to pay for transaction and query fees. The private key is not to be shared with other members on the network as they can authorize transactions from your account on your behalf. The public key is what is visable to others on the network when account infos are requested.

The public key can be shared and is visible to other users in the network. The private key should be kept secret to the owner. Private keys cannot be recovered once they are lost.

Public and private keys are generated by an algorithm and are unique to one another. Hedera currently supports the following key generation systems:

// Ed25519 keys example
private key = 302e020100300506032...
public key = 302...

Balance

The amount of HBAR (ℏ) held by the account. An account can be created with a zero balance, however it will eventually need hbars transferred to it from another account to interact with the Hedera APIs.

Expiration

Accounts, like files and smart contracts, take up storage on the network. Accounts must have a sufficient amount of hbar to fund a renewal of its storage on the network. The amount for renewal will be charged every pre-determined number of seconds. This amount of time is known as the autoRenewPeriod.

The maximum autoRenewPeriod for an account, file, or smart contract will be limited to 3 months (7890000 seconds).

LiveHash

A hash (presumably of some kind of credential or certificate), along with a list of keys (each of which is either a primitive or a threshold key). Each of them must reach its threshold when signing the transaction, to attach this livehash to this account. At least one of them must reach its threshold to delete this livehash from this account.