In the encryption world, wallet address is as important as "bank card account number" and "receipt address". Any operation is inseparable from it. With the birth of Ordinals protocol, Bitcoin has been promoted based on Segregated Witness and Taproot. The adoption of the upgrade has allowed many people to use special address formats such as "bc1p" for the first time. So how many formats of wallet addresses do Bitcoin have, and what are their characteristics? Today we will do some popular science...
01. What is a Bitcoin address?
A Bitcoin address is used to send and receive Bitcoin, just like a traditional bank account. Anyone with your bank account can send you Bitcoin, You can also transfer Bitcoins to other accounts.
A Bitcoin address is a string of letters and numbers. Here are a few examples:
These Bitcoin addresses show where Bitcoins are being received and sent, telling people where they are coming from and where they are going. In fact, it is like an email system for sending and receiving emails, except that in the Bitcoin scenario, the email content is Bitcoin, the email address is a Bitcoin address, and the mailbox is a Bitcoin wallet.
However, it is worth noting that A single address does not necessarily mean a single user. There may be a group of people behind an address, and a person may also have multiple addresses.
02. Classification of Bitcoin address types
As you can see from the picture above, Bitcoin addresses all start with the prefix 1, 3 or bc1, except There is no other beginning, why is this? This is because they use a different address format. In fact, there are four main types of Bitcoin addresses:
1. Legacy/Payment Public Key Hash (P2PKH) ) Address
This type of address is a traditional Bitcoin address, called a legacy address, also called a payment public key hash (P2PKH) address, because when Bitcoin was launched in 2009, its generation method was from The generation of public/private key pairs begins, which at the time was the only way to create an address.
Today, this type of address uses the most space in transactions and is therefore the most expensive address type. However, such addresses are easy to identify because they all start with "1".
Example: 15f12gEh2DFcHyhSyu7v3Bji5T3CJa9Smn
Currently you will only use this type of address when using some old wallets that are incompatible with the new address.
2. Pay-to-Script-Hash (P2SH) address
Compared with traditional addresses starting with "1", P2SH addresses are not The hash of the public key, but the hash involving some technical scripts, can be used for transfers that require multi-signatures, etc. You can even use Segregated Witness to save transaction fees, Sending to a P2SH address is cheaper than using a wallet with an old address About 26%.
Example: 35PBEaofpUeH8VnnNSorM1QZsadrZoQp4N
3. Segregated Witness Address (SegWit) Bech32 Address
Segwit address is also called Bech32 address, their Features start with bc1q. This type of Bitcoin address reduces the amount of information stored in the transaction. They do not store signatures and scripts in the transaction, but in the witness. Therefore, relative to P2SH addresses, Segwit addresses can save about 16% of transaction fees. , saving more than 38% of the cost compared to traditional addresses. Because of this cost saving, it is the most commonly used Bitcoin transaction address.
Example: bc1q42lja79elem0anu8q8s3h2n687re9jax556pcc
However, some trading platforms and wallets do not yet support Segwit addresses, so users will be prompted to send them a P2SH address. This is why most wallets still include the option to create a P2SH or even old address wallet.
4. Taproot address
In order to improve the efficiency of block space and improve costs, SegWit has introduced some changes in the way addresses are constructed. Therefore, based on the SegWit address, a Taproot address starting with "bc1p" was developed, which is translated as the main root address. This type of address further reduces the storage space, improves transaction efficiency, and provides better Privacy.
Example: bc1pmzfrwwndsqmk5yh69yjr5lfgfg4ev8c0tsc06e
03. Summary
Bitcoin addresses have some similarities to modern bank accounts in that bank accounts are also used in transactions to send assets. However, for Bitcoin addresses, Bitcoins are sent.
Although there are different types of Bitcoin addresses, these addresses are used in the same way and have cross-compatibility functions, so Bitcoins can circulate between different addresses.
However, a warm reminder that encryption security has always been an issue worthy of attention. Please be sure to check the address carefully before sending encrypted assets to prevent unnecessary losses.
The above is the detailed content of What are the Bitcoin addresses?. For more information, please follow other related articles on the PHP Chinese website!