How can blockchain.info show the output address of a transaction when the output address has never been used in any other transaction?

2

1

I've stumbled across a transition on blockchain.info where the output address was displayed even though the output address had never been used in any other transaction.

How can blockchain.info know the address when the transaction script contains only the HASH160 of the output address, not the output address itself?

Robbo

Posted 2017-10-01T11:34:38.213

Reputation: 131

Answers

1

I assume that you're talking about a Pay-to-pubkeyhash (P2PKH) transaction, which is the most common transaction type on the network at this time.

The pubkey script of a P2PKH transaction output contains the hash of the public key (what you call HASH160):
OP_DUP OP_HASH160 <PubkeyHash> OP_EQUALVERIFY OP_CHECKSIG

Said PubkeyHash can be converted into the address by prepending two zeroes and expressing it in base58check, a more human readable format.

Murch

Posted 2017-10-01T11:34:38.213

Reputation: 41 609