Addresses

Bitcoin Addresses are a wallet concern. This is very important to note. The Address itself is never seen or broadcast onto the bitcoin network. Addresses take no part in the consensus mechanism of bitcoin, and has no part in validating transactions.

The primary function of the Bitcoin Address format is to encapsulate the hash value used in a P2SH or P2PKH transaction in such a way that transcription errors are easy to detect, and hard to make.

Figure 1: Derivation of a base58-encoded address

Figure 1: Derivation of a base58-encoded address

In figure 1 it is important to note that :

  • The base58-encoded address contains a hash of the public key.
  • The address encoding is prepended with a byte that tells the wallet software which network (TEST/MAIN) the address is meant to be used on.
  • There is no way to get back the public key associated with an address, if only given the address.
  • Before constructing the P2SH or P2PK spending transaction, the wallet software needs to decode and unpack the Public Key Hash from the address.

Do note that within the TwoStack Wallet SDK, all of the above complexity is abstracted away and wrapped inside the *A

On this page