Bitcoin Forum
May 24, 2024, 02:43:24 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Version Byte  (Read 1009 times)
Rupert (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
August 27, 2014, 12:03:13 PM
 #1

Hello  Smiley,

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.

DannyHamilton
Legendary
*
Offline Offline

Activity: 3402
Merit: 4656



View Profile
August 27, 2014, 02:11:22 PM
 #2

Hello  Smiley,

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;
.
.
.
Rupert (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
May 28, 2015, 05:41:41 PM
 #3

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?  Huh
DannyHamilton
Legendary
*
Offline Offline

Activity: 3402
Merit: 4656



View Profile
May 28, 2015, 05:58:08 PM
 #4

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?  Huh

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.
Rupert (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
May 28, 2015, 06:10:02 PM
 #5

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.
Rupert (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
May 28, 2015, 06:24:17 PM
 #6

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. Cool
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!