@brickblock/crypto-address-checker

Validate crypto-currency addresses such as BTC, LTC or ETH

Usage no npm install needed!

<script type="module">
  import brickblockCryptoAddressChecker from 'https://cdn.skypack.dev/@brickblock/crypto-address-checker';
</script>

README

Crypto Address Checker

This package offers helpers to check whether a string is a valid ETH, BTC or LTC address.

How to use this package?

  1. Install Package

    yarn add @brickblock/crypto-address-checker
    
  2. Use Package

    import { isEthereumAddress } from '@brickblock/crypto-address-checker'
    
    // (ethereumAddress: string) => boolean
    function ethereumAddressValidation(ethereumAddress) {
      return (
          typeof ethereumAddress === 'string' &&
          !!ethereumAddress.length &&
          isEthereumAddress(ethereumAddress)
      )
    }
    

We're using the fantastic crypto-js underneath.