Multicoin address validator for Bitcoin and other Altcoins.
npm install @taasfi/multicoin-address-validatorSimple wallet address validator for validating Bitcoin and other altcoins addresses in Node.js and browser.

Forked from ryanralph/altcoin-address.
File size is ~17 kB (minifed and gzipped).
```
npm install @taasfi/multicoin-address-validator
``
yarn add @taasfi/multicoin-address-validator
##### validate (address [, currency = 'bitcoin'[, networkType = 'prod']])
###### Parameters
- address - Wallet address to validate.
- currency - Optional. Currency name or symbol, e.g. 'bitcoin' (default), 'litecoin' or 'LTC''prod'
- networkType - Optional. Use (default) to enforce standard address, 'testnet' to enforce testnet address and 'both' to enforce nothing.'ethereum'
- chainType - Optional. Specify the chainType, eg . If the given currency is not found but the chainType is, the validator for that chainType will be used, thus allowing unspecified tokens to be validated.
> Returns true if the address (string) is a valid wallet address for the crypto currency specified, see below for supported currencies.
- 0x/zrx '0x' or 'zrx''Aave Coin'
- Aave Coin/aave or 'aave''Algorand'
- Algorand/algo or 'algo''Apecoin'
- Apecoin/ape or 'ape''API3'
- API3/api3 or 'api3''Aptos'
- Aptos/apt or 'apt''Aragon'
- Aragon/ant or 'ant''Arbitrum'
- Arbitrum/arb or 'arb''Arbitrum'
- Arbitrum/arb or 'arb''Augur'
- Augur/rep or 'rep''AugurV2'
- AugurV2/repv2 or 'repv2''AuroraCoin'
- AuroraCoin/aur or 'aur''Avalanche'
- Avalanche/avax or 'avax''Axie Infinity'
- Axie Infinity/axs or 'axs''Bancor'
- Bancor/bnt or 'bnt''Band Protocol'
- Band Protocol/band or 'band''Bankex'
- Bankex/bkx or 'bkx''Basic Attention Token'
- Basic Attention Token/bat or 'bat''BeaverCoin'
- BeaverCoin/bvc or 'bvc''Berachain'
- Berachain/bera or 'bera''Biconomy'
- Biconomy/bico or 'bico''Binance'
- Binance/bnb or 'bnb''BinanceSmartChain'
- BinanceSmartChain/bnb or 'bnb''BioCoin'
- BioCoin/bio or 'bio''Bitcoin'
- Bitcoin/btc or 'btc''Bitcoin SV'
- Bitcoin SV/bsv or 'bsv''BitcoinCash'
- BitcoinCash/bch or 'bch''BitcoinGold'
- BitcoinGold/btg or 'btg''BitcoinPrivate'
- BitcoinPrivate/btcp or 'btcp''BitcoinZ'
- BitcoinZ/btcz or 'btcz''BlockTrade'
- BlockTrade/btt or 'btt''Blur'
- Blur/blur or 'blur''Bonk'
- Bonk/bonk or 'bonk''BTU Protocol'
- BTU Protocol/btu or 'btu''Callisto'
- Callisto/clo or 'clo''Cardano'
- Cardano/ada or 'ada''Celo'
- Celo/celo or 'celo''Chainlink'
- Chainlink/link or 'link''Chiliz'
- Chiliz/chz or 'chz''Civic'
- Civic/cvc or 'cvc''Compound'
- Compound/comp or 'comp''Cred'
- Cred/lba or 'lba''Crypto.com Coin'
- Crypto.com Coin/cro or 'cro''Curve DAO'
- Curve DAO/crv or 'crv''CUSD'
- CUSD/cusd or 'cusd''Conflux'
- Conflux/cfx or 'cfx''Dash'
- Dash/dash or 'dash''Decentraland'
- Decentraland/mana or 'mana''Decred'
- Decred/dcr or 'dcr''DigiByte'
- DigiByte/dgb or 'dgb''District0x'
- District0x/dnt or 'dnt''DogeCoin'
- DogeCoin/doge or 'doge''Enjin Coin'
- Enjin Coin/enj or 'enj''EOS'
- EOS/eos or 'eos''Ethereum'
- Ethereum/eth or 'eth''Ethereum Name Service'
- Ethereum Name Service/ens or 'ens''EthereumClassic'
- EthereumClassic/etc or 'etc''EthereumPow'
- EthereumPow/ethw or 'ethw''EtherZero'
- EtherZero/etz or 'etz''Expanse'
- Expanse/exp or 'exp''Fetch.ai'
- Fetch.ai/fet or 'fet''FirmaChain'
- FirmaChain/fct or 'fct''Flare'
- Flare/flr or 'flr''FreiCoin'
- FreiCoin/frc or 'frc''Flow'
- Flow/flow or 'flow''GameCredits'
- GameCredits/game or 'game''GarliCoin'
- GarliCoin/grlc or 'grlc''Gnosis'
- Gnosis/gno or 'gno''Golem'
- Golem/glm or 'glm''Golem (GNT)'
- Golem (GNT)/gnt or 'gnt''Hashflow'
- Hashflow/hft or 'hft''Hedera'
- Hedera/hbar or 'hbar''HedgeTrade'
- HedgeTrade/hedg or 'hedg''Harmony'
- Harmony/hmy or 'one''Hush'
- Hush/hush or 'hush''HyperSpace'
- HyperSpace/xsc or 'xsc''iExec RLC'
- iExec RLC/rlc or 'rlc''Illuvium'
- Illuvium/ilv or 'ilv''Immutable'
- Immutable/imx or 'imx''Injective'
- Injective/inj or 'inj''Komodo'
- Komodo/kmd or 'kmd''LBRY Credits'
- LBRY Credits/lbc or 'lbc''Lido DAO Token'
- Lido DAO Token/ldo or 'ldo''LiteCoin'
- LiteCoin/ltc or 'ltc''loki'
- loki/loki or 'loki''Loom Network'
- Loom Network/loom or 'loom''Magic'
- Magic/magic or 'magic''Maker'
- Maker/mkr or 'mkr''Marlin'
- Marlin/pond or 'pond''Mask Network'
- Mask Network/mask or 'mask''Matchpool'
- Matchpool/gup or 'gup''Matic'
- Matic/matic or 'matic''MegaCoin'
- MegaCoin/mec or 'mec''Melon'
- Melon/mln or 'mln''Metal'
- Metal/mtl or 'mtl''Monero'
- Monero/xmr or 'xmr''Multi-collateral DAI'
- Multi-collateral DAI/dai or 'dai''NameCoin'
- NameCoin/nmc or 'nmc''Nano'
- Nano/nano or 'nano''Nem'
- Nem/xem or 'xem''Neo'
- Neo/neo or 'neo''NeoGas'
- NeoGas/gas or 'gas''Numeraire'
- Numeraire/nmr or 'nmr''Ocean Protocol'
- Ocean Protocol/ocean or 'ocean''Odyssey'
- Odyssey/ocn or 'ocn''OmiseGO'
- OmiseGO/omg or 'omg''Onyx Protocol'
- Onyx Protocol/xcn or 'xcn''Optimism'
- Optimism/op or 'op''Origin Protocol'
- Origin Protocol/ogn or 'ogn''Paxos'
- Paxos/pax or 'pax''PayPal USD'
- PayPal USD/pyusd or 'pyusd''PeerCoin'
- PeerCoin/ppc or 'ppc''PIVX'
- PIVX/pivx or 'pivx''Polkadot'
- Polkadot/dot or 'dot''Polymath'
- Polymath/poly or 'poly''PrimeCoin'
- PrimeCoin/xpm or 'xpm''ProtoShares'
- ProtoShares/pts or 'pts''Qtum'
- Qtum/qtum or 'qtum''Quant'
- Quant/qnt or 'qnt''Quantum Resistant Ledger'
- Quantum Resistant Ledger/qrl or 'qrl''RaiBlocks'
- RaiBlocks/xrb or 'xrb''Ripio Credit Network'
- Ripio Credit Network/rcn or 'rcn''Ripple'
- Ripple/xrp or 'xrp''Salt'
- Salt/salt or 'salt''Serve'
- Serve/serv or 'serv''Siacoin'
- Siacoin/sc or 'sc''Skale'
- Skale/skl or 'skl''SnowGem'
- SnowGem/sng or 'sng''Solana'
- Solana/sol or 'sol''SolarCoin'
- SolarCoin/slr or 'slr''SOLVE'
- SOLVE/solve or 'solve''Sonic'
- Sonic/s or 's''Spendcoin'
- Spendcoin/spnd or 'spnd''Status'
- Status/snt or 'snt''Stellar'
- Stellar/xlm or 'xlm''Storj'
- Storj/storj or 'storj''Storm'
- Storm/storm or 'storm''StormX'
- StormX/stmx or 'stmx''Story'
- Story/ip or 'ip''SuperVerse'
- SuperVerse/super or 'super''Swarm City'
- Swarm City/swt or 'swt''Synthetix Network'
- Synthetix Network/snx or 'snx''Tap'
- Tap/xtp or 'xtp''Tellor'
- Tellor/trb or 'trb''TEMCO'
- TEMCO/temco or 'temco''TenX'
- TenX/pay or 'pay''Tether'
- Tether/usdt or 'usdt''Tezos'
- Tezos/xtz or 'xtz''The Graph'
- The Graph/grt or 'grt''The Sandbox'
- The Sandbox/sand or 'sand''Tron'
- Tron/trx or 'trx''TrueUSD'
- TrueUSD/tusd or 'tusd''Unifi Protocol DAO'
- Unifi Protocol DAO/unfi or 'unfi''Uniswap Coin'
- Uniswap Coin/uni or 'uni''USD Coin'
- USD Coin/usdc or 'usdc''VeChain'
- VeChain/vet or 'vet''VertCoin'
- VertCoin/vtc or 'vtc''Viberate'
- Viberate/vib or 'vib''VoteCoin'
- VoteCoin/vot or 'vot''Vulcan Forged PYR'
- Vulcan Forged PYR/pyr or 'pyr''Waves'
- Waves/waves or 'waves''Wings'
- Wings/wings or 'wings''Yearn.finance'
- Yearn.finance/yfi or 'yfi''ZCash'
- ZCash/zec or 'zec''ZClassic'
- ZClassic/zcl or 'zcl''ZenCash'
- ZenCash/zen or 'zen'
#### Node
`javascript
var WAValidator = require('multicoin-address-validator');
var valid = WAValidator.validate('1KFzzGtDdnq5hrwxXGjwVnKzRbvf8WVxck', 'BTC');
if (valid) console.log('This is a valid address');
else console.log('Address INVALID');
// This will log 'This is a valid address' to the console.
`
`javascript
var WAValidator = require('multicoin-address-validator');
var valid = WAValidator.validate('0xdbF03B407c01E7cD3CBea99509d93f8DDDC8C6FB', 'UNKNOWN TOKEN', { chainType: 'ethereum' });
if (valid) console.log('This is a valid address');
else console.log('Address INVALID');
// This will log 'This is a valid address' to the console.
`
`javascript
var WAValidator = require('multicoin-address-validator');
var valid = WAValidator.validate('1KFzzGtDdnq5hrwxXGjwVnKzRbvf8WVxck', 'litecoin', 'testnet');
if (valid) console.log('This is a valid address');
else console.log('Address INVALID');
// As this is a invalid litecoin address 'Address INVALID' will be logged to console.
`
`javascript
var WAValidator = require('multicoin-address-validator');
var currency = WAValidator.findCurrency('xrp');
if (currency) console.log('This currency exists');
else console.log('Currency INVALID');
// As this is a valid currency symbol 'This currency exists' will be logged to console.
`
`javascript
var WAValidator = require('multicoin-address-validator');
var currency = WAValidator.findCurrency('random');
if (currency) console.log('This currency exists');
else console.log('Currency INVALID');
// As this is not a valid currency symbol 'Currency INVALID' will be logged to console.
`
#### Browser
`html`
`javascript
// WAValidator is exposed as a global (window.WAValidator)
var valid = WAValidator.validate('1KFzzGtDdnq5hrwxXGjwVnKzRbvf8WVxck', 'bitcoin');
if (valid) alert('This is a valid address');
else alert('Address INVALID');
// This should show a pop up with text 'This is a valid address'.
``