Regards to all,
I am completely new to blockchain and bitcoin as its most popular implementation.
I have some probably basic questions for someone, but it's really important for me to get it right. It is about accounts, addresses and wallets. I will number them and give some comment as I understood it. If I have not understood something well, I would ask you to indicate it.
- What is an address?
The address is created from the public key via hash functions. It is used to indicate to whom bitcoin is sent and from whom it is received.
- What is an account?
An account represents some kind of abstract concept that is associated with an address. Blockchain does not know the concept of an account. Actually the account can be represented as the knowledge of the private-public key pair on which the address was created.
- What is a wallet?
Blockchain, similar to an address, is wallet-aware. It's just some kind of client application that will store the private-public key pairs (thus it will have the addresses associated with that account), calculate the balance, facilitate user interaction with the blockchain, etc.
- Is each wallet connected to only one address or account?
No, the wallet has as many addresses and accounts as you want. In other words, you can hold as many public-private key pairs as you like, and therefore addresses and accounts.
The last question is about the balance of the wallet. I know balance is calculated based on UTXO. So, my question is, is this balance calculated by addresses, that is, by accounts? In other words, if you have 5 private-public key pairs, there will be 5 addresses (accounts) where for each they will look which UTXOs belong to it and then calculate 5 balances (one for each address/account). So, one wallet with 5 accounts and a separate balance for each of them. Is the above written correct, or is the balance calculated by finding the UTXO associated with the wallet addresses and then the balance is calculated as the total value. In other words, no matter how many addresses there are, there will always be only one balance, that is, there will always be only one account per wallet. If the second is true, it actually means that the concept of an account does not even exist within Bitcoin, that is, that a wallet is actually an account. I ask because in Metamask wallets, as I have seen, you have multiple accounts (one account corresponds to one address) in one wallet and a balance in each account. It's separate.
Thank you very much for your help.