Bitcoin Forum
May 24, 2024, 05:25:37 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: [Javascript / Node.js] Detect cryptocoin by address (Bitcoin, Litecoin, etc)  (Read 1156 times)
pocesar (OP)
Member
**
Offline Offline

Activity: 105
Merit: 10


View Profile WWW
July 29, 2013, 02:07:58 PM
 #1

Quote
Detects which cryptcoin is the given cryptocoin address (starts with some coins listed in CoinWarz.com that have working block explorers)

This isn't by any means accurate, it's a quick & dirty check, you have to resolve any conflicts by yourself.

The addresses are checked using base58Check native module (currently doesn't work on Windows, so it's shim'ed)

https://github.com/pocesar/node-detect-cryptocoin

supports out-of-box:

  • Bitcoin
  • Noirbits
  • Terracoin
  • Krugercoin
  • Bottlecaps
  • Fastcoin
  • Digital Coin
  • BBQCoin
  • Bitbar
  • Novacoin
  • Litecoin
  • Worldcoin
  • Feathercoin
  • Franko
  • Mincoin
  • Stablecoin
  • Megacoin
  • PPCoin
  • Hypercoin
  • Freicoin
  • Alphacoin
  • Namecoin
  • Ixcoin
  • Devcoin
  • Primecoin

Feedback and bugs leave in this thread or open an issue on github!

https://github.com/pocesar - BTC 1KLRAFHGGhE2WiRASkASatvMR1vALmkB9L
Remember remember the 5th of November
Legendary
*
Offline Offline

Activity: 1862
Merit: 1011

Reverse engineer from time to time


View Profile
July 29, 2013, 03:19:02 PM
 #2

Some cryptocoins have addresses that are the same as Bitcoin's.

BTC:1AiCRMxgf1ptVQwx6hDuKMu4f7F27QmJC2
pocesar (OP)
Member
**
Offline Offline

Activity: 105
Merit: 10


View Profile WWW
July 29, 2013, 03:36:16 PM
 #3

Some cryptocoins have addresses that are the same as Bitcoin's.

yup, that's why I added the 'conflict' member of the result of the function, so you might resolve the conflicts by yourself (either by querying a block explorer or the daemon directly)

https://github.com/pocesar - BTC 1KLRAFHGGhE2WiRASkASatvMR1vALmkB9L
peapodamus
Newbie
*
Offline Offline

Activity: 43
Merit: 0



View Profile
July 29, 2013, 06:46:08 PM
 #4

Thanks for this! This will be helpful in the many projects I plan to make but have not started yet Tongue
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!