<p>This is known as a Pay-to-Public-Key (P2PK) output, because the public key is directly encoded, rather than the hash of the public key.</p>
<p>Bitcoin addresses starting with a 1 encode the hash of a public key. When the hash is used in the output rather than the key itself, this is known as Pay-to-Public-Key-Hash (P2PKH).</p>
<p>Thus, there is no address directly associated with this output traditionally. Deriving an address from an output like this is not intended to be done, and can be very misleading. However, it can be done following the steps on the Bitcoin wiki <a href="https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2021-12-25T04:30:32.807Z
Deriving an address like this can also result in loss of funds.
Claris
CC BY-SA 4.0
2021-12-25T02:29:45.587Z
2021-12-25T02:29:45.587Z
meshcollider
<p>I already looked at the similar question - <a href="https://bitcoin.stackexchange.com/questions/19081/parsing-bitcoin-input-and-output-addresses-from-scripts">link</a> and <a href="https://bitcoin.stackexchange.com/questions/14151/deriving-the-bitcoin-address-from-the-raw-block-script">Genesis block</a> but I have a different problem.</p>
<p>I am parsing transaction <code>39ed112558fd501424e3b33bbcbf853ef9f24536ef0f8e6fbad2f5c5098173ad</code> which has COINBASE input and 1 output. Below is the output scripts</p>
<pre><code>41046669fa7aa0167f2ec25f903e331668bf2b8f51aba721cb0dfd7857bd03836397e4d7da5d21830fc92c4b5606c94b1882d532d0806817f37c9942ddd987dc0482ac
</code></pre>
<p>I tried parsing this to pull output address but am stuck. Below is what I performed</p>
<pre><code>41 - Push(65)
046669fa7aa0167f2ec25f903e331668bf2b8f51aba721cb0dfd7857bd03836397e4d7da5d21830fc92c4b5606c94b1882d532d0806817f37c9942ddd987dc0482
ac - OP_CHECKSIG 
</code></pre>
<p>I tried hashing and converting the value in stack (<code>046669fa7aa0167f2ec25f903e331668bf2b8f51aba721cb0dfd7857bd03836397e4d7da5d21830fc92c4b5606c94b1882d532d0806817f37c9942ddd987dc0482</code>) to Base58 and tried double hash but could not pull address <code>1FVJ9qoD9di6cXXi47SUsNN18SLzYMaunP</code> . I know I must be doing something wrong/incomplete here but could not determine the issue.</p>
<p>Happy Holidays!</p>

CC BY-SA 4.0
2022-01-04T06:47:34.277Z
I you are still interested in, I think you may find this Python example handy: https://bitcoin.stackexchange.com/a/111600/124419
sci9
<public-key><address-generation>
Parsing bitcoin output script to pull address from genesis block
Ankit
# Parsing bitcoin output script to pull address from genesis block

(Asked by: username_0 on 2021-12-24)

I already looked at the similar question - [link](https://bitcoin.stackexchange.com/questions/19081/parsing-bitcoin-input-and-output-addresses-from-scripts) and [Genesis block](https://bitcoin.stackexchange.com/questions/14151/deriving-the-bitcoin-address-from-the-raw-block-script) but I have a different problem.

I am parsing transaction `39ed112558fd501424e3b33bbcbf853ef9f24536ef0f8e6fbad2f5c5098173ad` which has COINBASE input and 1 output. Below is the output scripts

```
41046669fa7aa0167f2ec25f903e331668bf2b8f51aba721cb0dfd7857bd03836397e4d7da5d21830fc92c4b5606c94b1882d532d0806817f37c9942ddd987dc0482ac

```

I tried parsing this to pull output address but am stuck. Below is what I performed

```
41 - Push(65)
046669fa7aa0167f2ec25f903e331668bf2b8f51aba721cb0dfd7857bd03836397e4d7da5d21830fc92c4b5606c94b1882d532d0806817f37c9942ddd987dc0482
ac - OP_CHECKSIG 

```

I tried hashing and converting the value in stack (`046669fa7aa0167f2ec25f903e331668bf2b8f51aba721cb0dfd7857bd03836397e4d7da5d21830fc92c4b5606c94b1882d532d0806817f37c9942ddd987dc0482`) to Base58 and tried double hash but could not pull address `1FVJ9qoD9di6cXXi47SUsNN18SLzYMaunP` . I know I must be doing something wrong/incomplete here but could not determine the issue.

Happy Holidays!

**Tags:** public-key, address-generation

> **Comments:**
> **username_1**: I you are still interested in, I think you may find this Python example handy: https://bitcoin.stackexchange.com/a/111600/124419  

---

## 1 answers

### Answer by username_2 on 2021-12-25. Score: 2 | Accepted answer

This is known as a Pay-to-Public-Key (P2PK) output, because the public key is directly encoded, rather than the hash of the public key.

Bitcoin addresses starting with a 1 encode the hash of a public key. When the hash is used in the output rather than the key itself, this is known as Pay-to-Public-Key-Hash (P2PKH).

Thus, there is no address directly associated with this output traditionally. Deriving an address from an output like this is not intended to be done, and can be very misleading. However, it can be done following the steps on the Bitcoin wiki [here](https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses).

> **Comments:**
> **username_3**: Deriving an address like this can also result in loss of funds.  

---

