BREAKING NEWS! Coin.fyi has been acquired by VC firm Morningstar Ventures. Read more

Bitcoin
$36,527.59 -0.65%
BTC · 4w

A not-quite-so-simple breakdown of different output types and their address formats

No one has asked me recently about different output types and their address encodings, but I felt like writing my own description after reading [a recent similar post](https://www.reddit.com/r/Bitcoin/comments/rjdao2/people_keep_asking_me_about_the_different_types/). I'll be covering only output types that make use of a single signature. **"Legacy Outputs" aka Pay to Public Key Hash (P2PKH)** P2PKH was the first output type that got an address standard. Addresses for P2PKH outputs start with "1" and use the *Base58Check* encoding. The address encoding provides a checksum and represents a shorthand to communicate recipient information—which improved the UX over the prior situation which required the sender to handle the recipient's full public key or non-standard output script to send a transaction. Example: >*1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2* Issues: * Case-sensitive * High transaction fee * Bigger data footprint than Pay to Public Key **"Wrapped Segwit Outputs" aka Pay to Script Hash-wrapped Pay to Witness Public Key Hash (P2SH-P2WPKH)** Segwit aimed to introduce a [new family of output types](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki) which we refer to as *native segwit*, but the authors realized that adoption of a new address format would take time. The segwit softfork additionally introduced *wrapped segwit* outputs as a transitional solution, to be forward-compatible to wallets that could send to P2SH addresses. Since P2SH was rolled out in March 2012 and already widely used for multisig, most wallet software supported sending to P2SH when segwit was activated in 2017. Wrapped segwit addresses are indistinguishable from other P2SH-uses until spent. P2SH addresses start with the prefix "3" and use the *Base58Check* encoding like P2PKH addresses. Wrapped segwit outputs lock funds to a *P2SH Program*, but their input script contains a *Witness Program* that redirects the script validation to the *Witness Stack*. While this achieve...
Continue on self.Bitcoin
Recent News