No commit activity in last 3 years
No release in over 3 years
CoinsAddressValidator - gem which allows you to check if virtual coin address is valid and retrieve information about it.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

Runtime

 Project Readme

CoinsAddressValidator Build Status Gem Version Test Coverage

This gem allows you to check if virtual coin address is valid and retrieve information about it.

Supported coins:

  • Bitcoin (BTC),
  • DASH (DASH),
  • Dogecoin (DOGE),
  • Litecoin (LTC),
  • Namecoin (NMC),
  • Peercoin (PPC),
  • Primecoin (XPM)

If you find this gem useful please send few coins for coffee:

  • BTC: 1HRqmR2dbuHKeNWp478W77NxLzPi63QoKi
  • LTC: LUzmQEYEMHxh7Q8JWh3vjW2BYCGd8VxANF
  • DASH: XtPu4gA71zMdp37x3XiYdG2U25UA85Gq1w

Thank you! :)

Installation

Add this line to your application's Gemfile:

gem 'coins_address_validator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install coins_address_validator

Usage

This gem has two public methods:

is_address_valid?() 

which checks if address passed as a parameter is valid BASE58 string, has correct length and checksum from decoded address is equal to first four bytes of SHA256(SHA256(h160))

Second one:

get_address_info()

returns information about network (Bitcoin, Litecoin, etc.), network symbol and type of address.

Contributing

  1. Fork it ( https://github.com/Hothza/coins_address_validator/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request