Bitcoin Forum

Alternate cryptocurrencies => Altcoin Discussion => Topic started by: Rupert on August 27, 2014, 12:03:13 PM



Title: Version Byte
Post by: Rupert on August 27, 2014, 12:03:13 PM
Hello  :),

I know that the version byte of Bitcoin is 0 and of Namecoin it is 52.

But what if I would not have this information. Where to look in the source code of Bitcoin or Namecoin?

For my website "moneyart.info" I need the version bytes of several altcoins to create paper wallets for them but I do not know how to get the version bytes of them.



Title: Re: Version Byte
Post by: DannyHamilton on August 27, 2014, 02:11:22 PM
Hello  :),

I know that the version byte of Bitcoin is 0 and of Namecoin it is 52.

But what if I would not have this information. Where to look in the source code of Bitcoin or Namecoin?

For my website "moneyart.info" I need the version bytes of several altcoins to create paper wallets for them but I do not know how to get the version bytes of them.

Take a look at chainparams.cpp

I think this may be it:

Code:
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2014 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
.
.
.
class CMainParams : public CChainParams {
public:
    CMainParams() {
.
.
.
        base58Prefixes[PUBKEY_ADDRESS] = list_of(0);
.
.
.
    }
};
static CMainParams mainParams;
.
.
.


Title: Re: Version Byte
Post by: Rupert on May 28, 2015, 05:41:41 PM
Thanks, that is correct, but chainparams.cpp is a new class. In older versions this class does not exist. Most Altcoins do not have this class. In which class were the parameters defined before?  ???


Title: Re: Version Byte
Post by: DannyHamilton on May 28, 2015, 05:58:08 PM
Thanks, that is correct, but chainparams.cpp is a new class. In older versions this class does not exist. Most Altcoins do not have this class. In which class were the parameters defined before?  ???

Wow!  It took you nearly an entire year to read my post, think about it, and write a response?

If you are asking about an altcoin, then this thread belongs in the altcoin sub-forum.


Title: Re: Version Byte
Post by: Rupert on May 28, 2015, 06:10:02 PM
I did not work on the website for one year, but I am back. I want a website that creates paper wallets for every single coin. I also improved the crypto. It now collects entropie. The new improvements are not yet online.

I could ask for every single version byte in the altcoin forum. But it is faster if I know the old class and figure it out in the source code by myself.


Title: Re: Version Byte
Post by: Rupert on May 28, 2015, 06:24:17 PM
Thanks for the help. I think I will figure this out myself. The private key prefix is pubkey prefix + 128 I found out. For litecoin I found the prefix 48 in the class base58.h. I hope for the rest of the altcoins it is also in this class. Otherwise I will have to keep on searching. 8)