HomeGuidesAPI ReferenceChangelog
GuidesAPI ReferenceCommunityDiscordBlogFAQBug BountyAnnouncementsChange Log
Guides

TRON uses an account model. The address of an account is the unique identifier for it, and a private key signature is required for operating the account. An account has many attributes, such as TRX & TRC10 token balances, Bandwidth amount, and Energy amount. An account can send transactions to increase or reduce its TRX or TRC10 token balances, deploy smart contracts, and trigger the smart contracts released by itself or others. All TRON accounts can apply to be Super Representatives (SRs) or vote for the elected SRs. Accounts are the basis of all activities on TRON.

Account Types

TRON has two account types:

  • General account - externally-owned account, controlled by anyone with the corresponding private key.
  • Contract account - a smart contract deployed on the TRON network and controlled through the code. No one owns the private key of a contract account.

Both account types have the ability to:

  • Receive, hold, and send TRX or other tokens
  • Interact with deployed smart contracts

Accounts & Key Pairs

An account consists of a cryptographic pair of keys: a public key and a private key. The public key can be mapped to an address, while the private key is used to sign transactions. This key pair helps prove that a transaction was actually signed by the sender and prevents forgeries.

This can prevent malicious actors from broadcasting fake transactions because the sender of a transaction can always be verified.

For example, when Alice wants to send TRX from her account to Bob's, she needs to create a transaction and send it to the TRON network for verification. With the key pair, Alice can prove that she originally initiated the transaction request. However, without the encryption mechanism, the malicious actor Eve might be able to publicly broadcast a similar request, "send 5 TRX from Alice's account to Eve's account", while no one can validate whether or not the transaction is requested by Alice herself.

External Account Creation

TRON’s key pair generation algorithm is exactly the same as that of Ethereum, which uses the Elliptic Curve Digital Signature Algorithm (ECDSA) with secp256k1. The process of key pair generation is: First, generate a random private key, which consists of 64 hexadecimal characters. Then, a public key is generated from the private key according to the EDCSA. Finally, take the last 20 bytes of the Keccak-256 output of the public key and add 41 in front of the hex format address.

Account Address Formats

In addition to the hex format, addresses on the TRON network also have a Base58 format.

  • Hex
    For addresses generated from the same private key, except for the digits "41" in the header part, the remaining parts are identical for the generated addresses on both TRON and Ethereum.

    418840E6C55B9ADA326D211D818C34A994AECED808
    

    Note: For a TRON address in the hex format, you can remove the 41 prefix to get the corresponding Ethereum address.

  • Base58
    A Base58 address can be obtained through the base check encoding of a hex address. All Base58 addresses begin with T. For example:

    TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL
    

    The following section describes address format conversion between hex and Base58 using TronWeb:

    tronWeb.address.toHex("TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL")
    > "418840E6C55B9ADA326D211D818C34A994AECED808"
    
    tronWeb.address.fromHex("418840E6C55B9ADA326D211D818C34A994AECED808")
    > "TNPeeaaFB7K9cmo4uQpcU32zGK8G1NYqeL"
    

Ways to Create Accounts

Users can create an account via the following ways. The essence is to generate a private key as well as the corresponding address.

  • Create an account offline using the command line wallet wallet-cli.

    wallet> GenerateAddress
    {
        "address": "TU6JdEDQGPus64LTMksvnxF2cv4FQrXPCa",
        "privateKey": "b1ba1db577a36421924a87026cda27523851c6e88123d0a0a1def9a974376176"
    }
    
  • Create an account offline using the SDK, taking TronWeb as an example:

    tronWeb.createAccount()
    > address:
    {
        base58: "TDpBe64DqirkKWj6HWuR1pWgmnhw2wDacE"
        hex: "412A2B9F7641D0750C1E822D0E49EF765C8106524B"
        privateKey: "427139B43028A492E2705BCC9C64172392B8DB59F3BA1AEDAE41C88924960091"
        publicKey:"0404B604296010A55D40000B798EE8454ECCC1F8900E70B1ADF47C9887625D8BAE3866351A6FA0B5370623268410D33D345F63344121455849C9C28F9389ED9731"
    }
    
  • Create a private key and the corresponding address via a wallet application, e.g., TronLink.

Account Activation

Newly created accounts do not exist on the chain and need to be activated before they can be found via API queries or in the chain explorer. Accounts can be activated in the following two ways:

  • Send any amount of TRX or TRC10 tokens from an existing account to the new account;
  • Call the Java-tron's wallet/createaccountAPI to create a transaction from an existing account, then sign the transaction and broadcast it to the TRON network.

An account creation fee of 1 TRX is charged to activate a new account. Additionally, the initiator of the above two types of transactions should have enough Bandwidth resources, which can be obtained by staking TRX. Otherwise, 0.1 TRX will be burned to pay for the Bandwidth consumption.

Alternatively, you can also transfer TRX or TRC10 tokens to an inactive account address in a smart contract for account activation. In addition to the Bandwidth and Energy consumed by normal contract calls, this way will only consume an additional 25,000 Energy for activation. The 1 TRX account creation fee and the 0.1 TRX Bandwidth fee are no longer required.

Contract Accounts

After a smart contract is deployed on the TRON network, the corresponding contract account address is then returned, which is calculated based on the ID of the deployed contract transaction and the sender's account address. The format of a contract account address is the same as that of an external account, that is, in hex or Base58. For example,

Base58: TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
Hex:    41A614F803B6FD780986A42C78EC9C7F77E6DED13C