Difference between wallet,accounts and addresses

2

I know this question has been asked several times, But it never made any sense reading each of them. Can Anyone really explain deeply by using technical language so that I could really understand pros and cons and everything ? Thank you.

Giorgi Lagidze

Posted 2018-08-13T13:57:59.340

Reputation: 35

Answers

3

Wallets
A wallet is an application that manages your keys and can create transactions. There are many open source and closed source wallet applications for different platforms (Desktop, Mobile, custom Hardware Wallets). Bitcoin-core has an implementation that runs on a full node. See Bitcoin Wiki - Wallet.

Accounts
An account can have different meanings depending on the wallet application you are using, but in bitcoin core it is a way to give a readable name to an address and keep track of your balance. In bitcoin core, an account can include multiple receiving addresses. See Bitcoin Wiki - Accounts explained. Note: See @Pieter Wuille's comment below that this will be deprecated from bitcoin-core.

Addresses
An address can be a form of your public key (or a script), to which people can send bitcoin, and which can only be spent by the corresponding private key (or by satisfying the script). There are many forms your address can take, because it can be derived from any valid script. A simple P2PKH (Pay to public key hash) address is the RIPEMD160(SHA256(public key)) encoded using Base58 checksum. A P2SH is a hash of a script. Basically, in order to spend coins sent to any address, one must satisfy the script that address represents, which usually includes providing the script (P2SH) that the address was hashed from, and any required signatures. See Bitcoin Wiki - Address

JBaczuk

Posted 2018-08-13T13:57:59.340

Reputation: 6 172

RIPEMD160, not 140.Meni Rosenfeld 2018-08-13T14:21:09.477

Thanks JBaczuk, But here is the thing I'm really interested in. So wallet can have many accounts and those many accounts (each of them) can have many addresses? So Is it 100% right that wallet also saves private/public key for each address? Why was account even invented? so that to unite some addresses into one name and some others into another name? How can an account balance be negative? I'd really appreciate it if you could just answer all these questions. Thank you again.Giorgi Lagidze 2018-08-13T15:07:14.513

1@Giorgi Read the "How accounts work" link if you're really interested, but accounts are almost certainly not what you assume they are. They're deprecated and are expected to be removed from Core in an upcoming version even due to confusion and other reasons.Pieter Wuille 2018-08-13T15:14:00.053

Depends on what "account" means for that wallet application. Also, there are watch-only addresses that your wallet can keep track of (balance, txs, etc.) but that it does not have the private key for. Also see https://stackoverflow.com/questions/22237621/bitcoind-account-negative-balance. Maybe you should open separate questions.

JBaczuk 2018-08-13T15:14:08.420

Also, a wallet does not necessarily store private and public key for every address. For example hardware wallets or watch-only wallets don't.Pieter Wuille 2018-08-13T15:14:39.580

@JBaczuk - Bitcoin accounts are not centrally controlled, and thus don't require the exposure of one's identity. Such accounts can provide a degree of privacy.
BIP 39 accounts can be given names by users. BIP 39 accounts provides a means for wallet apps to supply substantial assurances that account sets of billions private keys and associated addresses will have no overlap. Deterministic mathematical virtual address spaces are used to firewall balancing between accounts; unless, explicit transaction confirmations occur, i.e. when funds are explicitly sent form one account to another.
skaht 2018-08-14T20:09:27.683

@skaht are you referring to BIP32?JBaczuk 2018-08-14T20:11:46.363

@JBaczuk - Brain fart! Really meant BIP 32/44/49 accounts.skaht 2018-08-15T04:06:52.440