cryptaddress-validator

1.1.1 • Public • Published

cryptaddress-validator Build Status

Validate Bitcoin, Ethereum, Litecoin & other popular cryptocurrency addresses.

Install

~ ❯❯❯ npm install cryptaddress-validator

Usage

const cryptaddress = require('cryptaddress-validator');
 
cryptaddress().test('1Ez69SnzzmePmZX3WpEzMKTrcBF2gpNQ55')
//=> true
 
cryptaddress('eth').test('0x281055afc982d96fab65b3a49cac8b878184cb16')
//=> true
 
cryptaddress('btc').test('1dice8EMZmqKvrGE4Qc9bUFf9PX3xaYDp')
//=> true
 
cryptaddress('bch').test('LQL9pVH1LsMfKwt82Y2wGhNGkrjF8vwUst')
//=> false
 
cryptaddress('md5').test('0x281055afc982d96fab65b3a49cac8b878184cb16')
//=> 'Unsupported cryptocurrency'

API

cryptaddress (cryptocurrency)

Returns the regex of the specified cryptocurrency.

cryptocurrency

Type: string

Cryptocurrency to build the appropriate validation regex.

Supported Cryptocurrencies

Related

License

MIT © Nikolaos Kamarinakis

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.1.1
    10
    • latest

Version History

Package Sidebar

Install

npm i cryptaddress-validator

Weekly Downloads

10

Version

1.1.1

License

MIT

Unpacked Size

4.94 kB

Total Files

4

Last publish

Collaborators

  • k4m4