Bitcoin Forum
October 31, 2024, 02:29:11 PM *
News: Bitcoin Pumpkin Carving Contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: JavaScript library for cryptocurrency address validation  (Read 418 times)
iron888 (OP)
Newbie
*
Offline Offline

Activity: 17
Merit: 0


View Profile
March 16, 2018, 10:01:48 AM
 #1

Is there any good JS library for cryptocurrency address validation? I've found this one https://github.com/ivands/crypto-address-validator, but it doesn't support a lot of currencies.
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
March 17, 2018, 02:09:42 PM
 #2

You might try this one out: https://github.com/ognus/wallet-address-validator
This one supports 21 currencies (the majority are low cap coins). But this should be enough information to build a libary which meets your requirements.
I'm not sure whether you will find a JS libary with every coin you need.

amargow
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile WWW
September 03, 2018, 11:01:49 AM
 #3

wallet-address-validator
Simple wallet address validator for validating Bitcoin and other altcoins addresses in Node.js and browser.

Forked from ryanralph/altcoin-address.

I forked it to remove all Node.js dependencies (crypro, Buffer etc.) to make it usable in the browser as well. I didn't use browserify to achieve smaller footprint, file size is 4.0 kB (minifed and gzipped).

Installation
Node
npm install wallet-address-validator
Browser
<script src="wallet-address-validator.min.js"></script>
Using bower
bower install wallet-address-validator

Read more : https://www.mytectra.com/python-training-in-bangalore.html
RGBKey
Hero Member
*****
Offline Offline

Activity: 854
Merit: 658


rgbkey.github.io/pgp.txt


View Profile WWW
September 04, 2018, 02:33:58 PM
 #4

How many currencies are we talking about? If it's not that many, you could probably just write your own library. The checksum or equivalent for most cryptos is not that complicated.
Initscri
Hero Member
*****
Offline Offline

Activity: 1582
Merit: 759


View Profile WWW
September 12, 2018, 05:28:08 AM
 #5

I'd use a switch case, and just use different libraries to support different cryptocurrencies. Default to not validating unless a validation library is found.

Personally what I would do is use ognus's library, and try to code the needed languages yourself; or create an issue for missing languages.
https://github.com/ognus/wallet-address-validator

If you're willing to leverage a backend API for validations: (since these things are mostly verified on the backend for enforcement, you may be able to find more).
https://github.com/murich/php-cryptocurrency-address-validation
https://github.com/LinusU/php-bitcoin-address-validator

----------------------------------
Web Developer. PM for details.
----------------------------------
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!