Bitcoin Forum
November 15, 2024, 06:46:34 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Address generation "version" of cryptocurrencies  (Read 727 times)
crazydownloaded (OP)
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile
January 27, 2014, 01:13:21 AM
 #1

Hello,
Where can I find the "version" of the addresses in cryptocurrencies source code?
I'd like to be able to easily generate addresses for any of them by simply using this parameter.
Brainwallet provided me some, but can't find them in the currencies source codes.

Examples:
BTC/DVC/TRC => 0x00
DGC/DOGE => 0x1E
LTC => 0x30
etc.

Thanks!


NB: Yes, I'm working on a multicurrency wallet for http://coinplorer.com

Est. February 2012
poordeveloper
Hero Member
*****
Offline Offline

Activity: 896
Merit: 527


₿₿₿₿₿₿₿


View Profile WWW
January 27, 2014, 01:33:57 AM
 #2

The version seems to be in the base58.h file, and on this page there is a list of the versions of many altcoins: https://github.com/zamgo/PHPCoinAddress
And this is where you find it inside a coin's source code: https://github.com/litecoin-project/litecoin/blob/master-0.8/src/base58.h#L275 (example)

🎰 Bitcoin Casinos ⭐⭐⭐⭐⭐
.
🔵 Buy Bitcoin (Visa / Mastercard / SEPA / Bank Transfer / Western Union / MoneyGram / RIA)
crazydownloaded (OP)
Full Member
***
Offline Offline

Activity: 148
Merit: 100

Crazy!


View Profile
January 27, 2014, 01:39:20 AM
 #3

Thanks! You absolutely rocks!

Est. February 2012
fbueller
Sr. Member
****
Offline Offline

Activity: 412
Merit: 287


View Profile
January 28, 2014, 04:00:12 PM
 #4

If you don't have the source code to hand, or have an address for the specific currency and want to extract it from that, just pass it through a base58check decoding function. the first two characters (first byte) is the version byte.

Bitwasp Developer.
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!