Public addresses in Bitcoin are produced from public keys, which consist of digits beginning with 1, or 3 for mainnet. Most Bitcoin addresses are 33 or 34 characters long and use Base58-encoding. Bitcoin public key addresses always represent the owner of the secret key and are used in the recipient field of transactions. However, addresses can also have different uses, such as representing the payment script used in Pay-to-Script-Hash (P2SH) transactions, which will be covered in the Transaction section of this chapter.
Bitcoin addresses are derived from the public key by constructing an encoded string called Base58Check. Base58Check is a Base58 encoded string along with fixed characters that acts as error-checking ...