3

I'm looking at creating a deterministic wallet for some of the less popular altcoins. Bitcoin has a magic byte of '0488b21e' and litecoin '019da462'. How are these determined or calculated? Also how would I generate these values for other altcoins?

Nick ODell
  • 29,396
  • 11
  • 72
  • 130
greatwitenorth
  • 215
  • 2
  • 8
  • Note that the 'version byte' is different from the private key prefix. https://en.bitcoin.it/wiki/List_of_address_prefixes – Nick ODell Jan 09 '15 at 21:55
  • Late response I realize, but see here: https://bitcoin.stackexchange.com/questions/28380/i-want-to-generate-a-bip32-version-number-for-namecoin-and-other-altcoins/56639#56639 – Christopher Gurnee Jul 13 '17 at 21:04

1 Answers1

3

0x0488B21E is the extended public key prefix / version bytes (as described in BIP32) and stands for xpub. In the same manner, 0x019DA462 stands for Ltub.

For bitcoin and litecoin these codes are:

Network             Extended private    Version bytes        Extended public    Version bytes
                    key prefix                               key prefix
---------------------------------------------------------------------------------------------         
Bitcoin main        xprv                0x0488ADE4           xpub               0x0488B21E
Bitcoin testnet     tprv                0x04358394           tpub               0x043587CF
Litecoin main       Ltpv                0x019D9CFE           Ltub               0x019DA462     
Litecoin testnet    ttpv                0x0436EF7D           ttub               0x0436F6E1