# Account

# Introduction

In Bytom, an account is an abstract entity that can determine the ownership of assets on the blockchain by tracking control programs or addresses. The control program or address will appear in the output of each transaction. Among them, the control program defines a series of conditions that must be met when consuming this output; the address is generated by hashing the public key or script. Both the control program and the address can be used as the output address of a transaction. When the next transaction consumes the output, a private key matching the public key of the output address is required to sign.

There can be multiple account entities locally. The account entity will not be saved on the blockchain, but will only exist locally. Only the control program or address created in the account will appear on the blockchain. However, when a transaction is processed, the local account data can provide more powerful and easier-to-understand queries for users.

# Account Balance

The account balance itself is also an abstract concept that is easy for users to understand. It represents the sum of all assets in the UTXO that uses the account's address or control program. When creating an asset transfer transaction, your account will collect a sufficient amount of UTXO as input for the new transaction.

# Create account

When creating an account, you need to provide the alias of the account, one or more keys, and the number of signatures.

  • The account alias is required, it is the only identifier used to operate the local account.
  • In less strict terms, the private key can be used to generate addresses and sign transactions. According to whether the key is one or more, there are single-signature account and multi-signature account. Check the address section for details.
  • The number of signatures indicates the number of signatures that require minimum of the private key when using the account to consume an asset and a signature is required.
Last Updated: 7/28/2021, 5:47:49 PM