1: General process of encoding

In the Bitcoin system, the general process for Base58Check encoding a data is as follows:

1. Input 'data' | This is the final data that will be used, and the subsequent steps are just modifications to this data.
2. Add 'version number' as 'prefix' at the front of 'data', forming 'prefix' + 'data' | That is, connecting 'prefix' and 'data' to form new data
3. Perform 'hash operation' on the connected data above, and take the front few bytes of the 'hash operation' result to append to 'data' as 'checksum', which is also the reason why Base58Check has 'Check' in its name
4. Perform Base58 encoding on the entire data formed by connecting 'prefix' + 'data' + 'checksum'

2: Base58Check encoding of the private key

We have already explained the encoding idea of private keys in the section on the function of 'prefix', now let's give an example to illustrate how the private key is generated.

1. First generate a 256-bit binary private key as 'data'

Generally, we would choose a wallet and then obtain a private key through 'Create Wallet'.
I am using OneKeyThis wallet, the official website isOneKey, if you choose other wallets, it's pretty much the same.

As most wallets no longer generate WIF format private keys, they mostly appear in the form of compressed and extended private keys, but we haven't covered these two aspects yet, so let me manually give an example for clarification.

Assume a random 256-bit private key is generated and displayed in hexadecimal: e9a7b3c2f5d1e8a4b7c9f2d3e6a1b5c8f9d2e4a3b6c7f1d5e8a2b4c9f6d3e7a1b5c8f9d2e4a3b6c7f1d5e8a2b4c9f6d3

2. Then add an 8-bit prefix 10000000 (i.e., 0x80) as the 'version number', indicating this is a Bitcoin private key

'prefix' + 'data' = 80e9a7b3c2f5d1e8a4b7c9f2d3e6a1b5c8f9d2e4a3b6c7f1d5e8a2b4c9f6d3e7a1b5c8f9d2e4a3b6c7f1d5e8a2b4c9f6d3

3. Calculate the checksum

Perform two 'SHA-256' operations on the result obtained in the previous step to get the result
8fc516966eb50ee15a8cc8f9f795ce1de155629f48e62196c62224ec32f9286c, take the first 4 bytes (32 bits binary, 8 bits hexadecimal) as the checksum, which is: 8fc51696

4. Connect 'prefix' + 'data' + 'checksum' and perform Base58 encoding

Before encoding:
80e9a7b3c2f5d1e8a4b7c9f2d3e6a1b5c8f9d2e4a3b6c7f1d5e8a2b4c9f6d3e7a1b5c8f9d2e4a3b6c7f1d5e8a2b4c9f6d38fc51696

After encoding (Using online tools):
5oPJBumpGufu4Kb8tAVk2rqTfZ94YQkqTo2Jp9TYSYrUF68PX96QUEQxiCUbTdpUe3ZpoU7ZxhpDTH4WHE8awMZSRHuEjhLTEdWSySK8TyjKWQa1HdubpP1mAL4nHfEQ8hkfGwgTDA1cZ5Bu7