<p>Maybe my code <a href="https://github.com/circulosmeos/bitcoin-in-tiny-pieces" rel="nofollow noreferrer"><code>bitcoin-in-tiny-pieces</code></a> can serve to follow all the steps: each script is devoted to just a step of the process and has the minimal code to fulfil it. </p>

<p>Python is easy to follow if you're not a programmer, and there are comments that point to the documentation sources, though for example going from private to public key is all maths. </p>

<p>Each script is self-explanatory:</p>

<ul>
<li>bitcoin-public-from-private.py</li>
<li>bitcoin-wif-from-private-key.py</li>
<li>bitcoin-address-from-public-key.py</li>
<li>bitcoin-get-address-balance.py</li>
</ul>

CC BY-SA 4.0
2019-06-23T12:13:33.917Z
2019-06-23T12:13:33.917Z
circulosmeos
<p>The <a href="https://bitcoin.org/en/developer-guide#wallet-files" rel="nofollow noreferrer">bitcoin developper</a> pages show the steps in all details for type 1 addresses.</p>

<p>For the type 1 addresses, there is a good <a href="http://gobittest.appspot.com/Address" rel="nofollow noreferrer">link here</a> to test results.</p>

<p>Then there is HD wallets, <a href="https://bitcoincore.org/en/segwit_wallet_dev/" rel="nofollow noreferrer">Segwit</a>, and many other extensions... </p>

<p>Maybe it is good to start for type 1 addresses, and extend with your ideas of "under the hood crypto". I stick to Nate's comment though.</p>

CC BY-SA 4.0
2018-08-24T08:03:35.517Z
2018-08-24T08:03:35.517Z
pebwindkraft
<p>I wonder if it is possible to print what's going on under the hood regarding the process of getting from a random binary number to a BTC address. </p>

<p>It will look something like this:</p>

<p>Input: <code>a random 256 binary number</code></p>

<p>Output: <code>print()</code></p>

<p>Printing all possible sequential states from that number to a BTC address. </p>

<p><strong>PRIVATE KEY STATES</strong></p>

<pre><code>binary privKey [k] -&gt; decimal privKey -&gt; hexadecimal privKey -&gt; WIF privKey
</code></pre>

<p><strong>PUBLIC KEY STATES</strong></p>

<pre><code>decimal pubKey print(x,y) -&gt; print K where [K=(x,y)] -&gt; hexadecimal PubKey (A) -&gt; print A=RIPEMD160(SHA2569(K))
</code></pre>

<p>It will help a lot of people interested in the details of creating BTC addresses, from the elliptic curve private to public key process (K=k*G) to the other encoding steps until the final address. </p>

<p>On GitHub and other places, <code>.js</code> or <code>.py</code> libraries just print the WIF key and the address, and sometimes the hexadecimal public key as well.  </p>

<p>Thanks. </p>

CC BY-SA 4.0
2018-08-19T18:41:45.777Z
If you really want this, I think your best bet is to take some existing code and add print statements wherever you like, or single-step it with a debugger.  I doubt you'll find code where this has already been done, mainly because I don't think it will actually be as informative as you guess.  The individual arithmetical computations aren't very informative one by one; it's better to understand the mathematical constructions that they express collectively.
Nate Eldredge
<address-generation>
Print all states of getting from a random 256 bit private key to a corresponding encoded BTC address
Robert
# Print all states of getting from a random 256 bit private key to a corresponding encoded BTC address

(Asked by: username_0 on 2018-08-18)

I wonder if it is possible to print what's going on under the hood regarding the process of getting from a random binary number to a BTC address. 
It will look something like this:
Input: a random 256 binary number
Output: print()
Printing all possible sequential states from that number to a BTC address. 
PRIVATE KEY STATES
binary privKey [k] -> decimal privKey -> hexadecimal privKey -> WIF privKey

PUBLIC KEY STATES
decimal pubKey print(x,y) -> print K where [K=(x,y)] -> hexadecimal PubKey (A) -> print A=RIPEMD160(SHA2569(K))

It will help a lot of people interested in the details of creating BTC addresses, from the elliptic curve private to public key process (K=k*G) to the other encoding steps until the final address. 
On GitHub and other places, .js or .py libraries just print the WIF key and the address, and sometimes the hexadecimal public key as well.  
Thanks.

**Tags:** address-generation

> **Comments:**
> **username_1**: If you really want this, I think your best bet is to take some existing code and add print statements wherever you like, or single-step it with a debugger.  I doubt you'll find code where this has already been done, mainly because I don't think it will actually be as informative as you guess.  The individual arithmetical computations aren't very informative one by one; it's better to understand the mathematical constructions that they express collectively.  

---

## 2 answers

### Answer by username_2 on 2019-06-23. Score: 0 | Accepted answer

Maybe my code [`bitcoin-in-tiny-pieces`](https://github.com/username_2/bitcoin-in-tiny-pieces) can serve to follow all the steps: each script is devoted to just a step of the process and has the minimal code to fulfil it.

Python is easy to follow if you're not a programmer, and there are comments that point to the documentation sources, though for example going from private to public key is all maths.

Each script is self-explanatory:

* bitcoin-public-from-private.py
* bitcoin-wif-from-private-key.py
* bitcoin-address-from-public-key.py
* bitcoin-get-address-balance.py


---

### Answer by username_3 on 2018-08-24. Score: 1

The [bitcoin developper](https://bitcoin.org/en/developer-guide#wallet-files) pages show the steps in all details for type 1 addresses.

For the type 1 addresses, there is a good [link here](http://gobittest.appspot.com/Address) to test results.

Then there is HD wallets, [Segwit](https://bitcoincore.org/en/segwit_wallet_dev/), and many other extensions...

Maybe it is good to start for type 1 addresses, and extend with your ideas of "under the hood crypto". I stick to Nate's comment though.


---

