<p><code>482f0027662731277fdfa3b7f639c976a3bab11e</code> is <code>HASH160</code> (<code>RIPEMD160(SHA256())</code>) of the public key. The hash is the most important part of addresses (addres: network byte + hash + checksum).</p>

<p>You can look at how P2PKH script works step-by-step <a href="https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-pubkey-hash.29" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 4.0
2018-09-06T14:51:55.840Z
what you mean "It"? The address 17afxUJouat3fkaaQ9tZrDThxdkXGL4WrM?
Carpemer
CC BY-SA 4.0
2018-09-06T15:23:09.420Z
@Capemer I have edited it.
MCCCS
CC BY-SA 4.0
2018-09-06T14:41:12.480Z
2018-09-06T15:10:53.590Z
2018-09-06T15:10:53.590Z
MCCCS
<p>Thanks for the answer here, the final code for the question is: </p>

<pre><code>import hashlib
import base58 

def gen_addr(hash_code):
  key_hash = '00' + hash_code
  # Obtain signature:
  sha = hashlib.sha256()
  sha.update( bytearray.fromhex(key_hash) )
  checksum = sha.digest()
  sha = hashlib.sha256()
  sha.update(checksum)
  checksum = sha.hexdigest()[0:8]
  address = (base58.b58encode( bytes(bytearray.fromhex(key_hash + checksum)))).decode('utf-8')
  return address, key_hash, checksum
</code></pre>

<p>gen_addr('482f0027662731277fdfa3b7f639c976a3bab11e')='17afxUJouat3fkaaQ9tZrDThxdkXGL4WrM'</p>

CC BY-SA 4.0
2018-09-08T13:28:24.777Z
2018-09-08T13:28:24.777Z
Carpemer
<p>I gusses the command <code>decoderawtransacton</code> can help you</p>

CC BY-SA 4.0
2018-09-07T16:54:57.633Z
Hi @老板鱼丸粗面, can you provide some more context, maybe some documentation, an example output and how to run the command? Short answers often don't provide enough context to be helpful.
JBaczuk
CC BY-SA 4.0
2018-09-08T00:17:39.850Z
The question here is how to convert 482f0027662731277fdfa3b7f639c976a3bab11e to it's address 146sN8tLxV2xueQXQgMJkMZi2hFazEuV8F
Carpemer
CC BY-SA 4.0
2018-09-06T15:16:15.710Z
2018-09-06T15:16:15.710Z
老板鱼丸粗面
<p><a href="https://www.blockchain.com/btc/tx/2ccc3f59d28c709770a8bc478b112e10feda4bf55197c2e48deaa0eb6bca0311?show_adv=true" rel="nofollow noreferrer">https://www.blockchain.com/btc/tx/2ccc3f59d28c709770a8bc478b112e10feda4bf55197c2e48deaa0eb6bca0311?show_adv=true</a></p>

<p>The SCRIPT in the transaction is:</p>

<p>DUP HASH160 PUSHDATA(20)[482f0027662731277fdfa3b7f639c976a3bab11e] EQUALVERIFY CHECKSIG</p>

<p>What is 482f0027662731277fdfa3b7f639c976a3bab11e ?</p>

<p>It is not a pubKey.
RIPEMD160(SHA256(482f0027662731277fdfa3b7f639c976a3bab11e)=146sN8tLxV2xueQXQgMJkMZi2hFazEuV8F.</p>

<p>The result is not the address(17afxUJouat3fkaaQ9tZrDThxdkXGL4WrM) in the blockchain.info either.</p>

<p>How we convert the 482f0027662731277fdfa3b7f639c976a3bab11e to it's addr？</p>

<transactions><address>
How to get the addr from this transaction
Carpemer
# How to get the addr from this transaction

(Asked by: username_0 on 2018-09-06)

<https://www.blockchain.com/btc/tx/2ccc3f59d28c709770a8bc478b112e10feda4bf55197c2e48deaa0eb6bca0311?show_adv=true>

The SCRIPT in the transaction is:

DUP HASH160 PUSHDATA(20)[482f0027662731277fdfa3b7f639c976a3bab11e] EQUALVERIFY CHECKSIG

What is 482f0027662731277fdfa3b7f639c976a3bab11e ?

It is not a pubKey.
RIPEMD160(SHA256(482f0027662731277fdfa3b7f639c976a3bab11e)=146sN8tLxV2xueQXQgMJkMZi2hFazEuV8F.

The result is not the address(17afxUJouat3fkaaQ9tZrDThxdkXGL4WrM) in the blockchain.info either.

How we convert the 482f0027662731277fdfa3b7f639c976a3bab11e to it's addr？

**Tags:** transactions, address


---

## 3 answers

### Answer by username_1 on 2018-09-06. Score: 2 | Accepted answer

`482f0027662731277fdfa3b7f639c976a3bab11e` is `HASH160` (`RIPEMD160(SHA256())`) of the public key. The hash is the most important part of addresses (addres: network byte + hash + checksum).

You can look at how P2PKH script works step-by-step [here](https://en.bitcoin.it/wiki/Script#Standard_Transaction_to_Bitcoin_address_.28pay-to-pubkey-hash.29).

> **Comments:**
> **username_0**: what you mean "It"? The address 17afxUJouat3fkaaQ9tZrDThxdkXGL4WrM?  
> **username_1**: @Capemer I have edited it.  

---

### Answer by username_0 on 2018-09-08. Score: 0

Thanks for the answer here, the final code for the question is:

```
import hashlib
import base58 

def gen_addr(hash_code):
  key_hash = '00' + hash_code
  # Obtain signature:
  sha = hashlib.sha256()
  sha.update( bytearray.fromhex(key_hash) )
  checksum = sha.digest()
  sha = hashlib.sha256()
  sha.update(checksum)
  checksum = sha.hexdigest()[0:8]
  address = (base58.b58encode( bytes(bytearray.fromhex(key_hash + checksum)))).decode('utf-8')
  return address, key_hash, checksum

```

gen\_addr('482f0027662731277fdfa3b7f639c976a3bab11e')='17afxUJouat3fkaaQ9tZrDThxdkXGL4WrM'


---

### Answer by username_2 on 2018-09-06. Score: 0

I gusses the command `decoderawtransacton` can help you

> **Comments:**
> **username_3**: Hi @username_2, can you provide some more context, maybe some documentation, an example output and how to run the command? Short answers often don't provide enough context to be helpful.  
> **username_0**: The question here is how to convert 482f0027662731277fdfa3b7f639c976a3bab11e to it's address 146sN8tLxV2xueQXQgMJkMZi2hFazEuV8F  

---

