user124877: I am writing a program that reads Bitcoin transactions from .blk files and performs some analysis on them. I would like to get the transaction destination addresses (like in some transaction explorers: link.
Raw transaction data looks like this and I don't see any address fields anywhere.
How is it possible to calculate it? Is there a (preferably C/C++) program that already does that?
Or are there any details on how to implement this?
Best regards and thanks for all answers in advance! :)

user13866: 
Raw transaction data looks like this and I don't see any address fields anywhere.

That's because transactions don't directly involve addresses. An address is an abstraction of a Bitcoin-script used in a transaction. An address is a way for a payee to externally communicate to a payer enough information for the payer to construct an output entry for a new transaction.

are there any details on how to implement this?

See for example https://learnmeabitcoin.com/technical/p2pkh

So for a pay-to-public-key-hash (P2PKH) address you:

Calculate a Hash160 (SHA256 + RIPEMD160) of the public key
Prefix that hash with 0x00
Suffix with a checksum (first four bytes of a SHA256 hash of other data)
Encode in Base58

You'd need to separately handle address formation for every standard type of Bitcoin-script. Some don't have a standard way to derive an address.

124877: <p>I am writing a program that reads Bitcoin transactions from <code>.blk</code> files and performs some analysis on them. I would like to get the transaction destination addresses (like in some transaction explorers: <a href="https://blockchair.com/bitcoin/transaction/2221d86b44b270bfee9f83a41bee4153e330817118e0346e2d101227c54b6e05" rel="nofollow noreferrer">link</a>.</p>
<p>Raw transaction data looks like <a href="https://learnmeabitcoin.com/technical/transaction-data" rel="nofollow noreferrer">this</a> and I don't see any address fields anywhere.</p>
<p>How is it possible to calculate it? Is there a (preferably C/C++) program that already does that?
Or are there any details on how to implement this?</p>
<p>Best regards and thanks for all answers in advance! :)</p>
 13866: <blockquote>
<p><strong>Raw transaction data looks like this and I don't see any address fields anywhere.</strong></p>
</blockquote>
<p>That's because transactions don't directly involve addresses. An address is an abstraction of a Bitcoin-script used in a transaction. An address is a way for a payee to externally communicate to a payer enough information for the payer to construct an output entry for a new transaction.</p>
<blockquote>
<p><strong>are there any details on how to implement this?</strong></p>
</blockquote>
<p>See for example <a href="https://learnmeabitcoin.com/technical/p2pkh" rel="nofollow noreferrer">https://learnmeabitcoin.com/technical/p2pkh</a></p>
<p><a href="https://i.stack.imgur.com/9xaph.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9xaph.png" alt="Calculating address of P2PKH script" /></a></p>
<p>So for a pay-to-public-key-hash (P2PKH) address you:</p>
<ul>
<li>Calculate a Hash160 (SHA256 + RIPEMD160) of the public key</li>
<li>Prefix that hash with 0x00</li>
<li>Suffix with a checksum (first four bytes of a SHA256 hash of other data)</li>
<li>Encode in Base58</li>
</ul>
<p>You'd need to separately handle address formation for every standard type of Bitcoin-script. Some don't have a standard way to derive an address.</p>
