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?
-
Install Package
yarn add @brickblock/crypto-address-checker
-
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.