# multicoin-address-validator

> Multicoin address validator for Bitcoin and other Altcoins.

Latest version **0.5.26** (published 2025-06-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install multicoin-address-validator
pnpm add multicoin-address-validator
yarn add multicoin-address-validator
bun add multicoin-address-validator
```

## Health

**Score 43/100 (D)** — status: stable.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.5.26 |
| Published | 2025-06-04 |
| First published | 2018-10-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/multicoin-address-validator) |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 9 |
| Unpacked size | 869.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 156 |
| Author | Chris |
| Maintainers | chris.tsim |
| Keywords | 0x, zrx, Aave Coin, aave, Algorand, algo, Apecoin, ape, API3, api3, Aptos, apt, Aragon, ant, Arbitrum, arb, Arbitrum, arb, Augur, rep, AugurV2, repv2, AuroraCoin, aur, Avalanche, avax, Axie Infinity, axs, Bancor, bnt, Band Protocol, band, Bankex, bkx, Basic Attention Token, bat, BeaverCoin, bvc, Berachain, bera, Biconomy, bico, Binance, bnb, BinanceSmartChain, bnb, BioCoin, bio, Bitcoin, btc, Bitcoin SV, bsv, BitcoinCash, bch, BitcoinGold, btg, BitcoinPrivate, btcp, BitcoinZ, btcz, BlockTrade, btt, Blur, blur, Bonk, bonk, BTU Protocol, btu, Callisto, clo, Cardano, ada, Celo, celo, Chainlink, link, Chiliz, chz, Civic, cvc, Compound, comp, Cred, lba, Crypto.com Coin, cro, Curve DAO, crv, CUSD, cusd, Dash, dash, Decentraland, mana, Decred, dcr, DigiByte, dgb, District0x, dnt, DogeCoin, doge, Enjin Coin, enj, EOS, eos, Ethereum, eth, Ethereum Name Service, ens, EthereumClassic, etc, EthereumPow, ethw, EtherZero, etz, Expanse, exp, Fetch.ai, fet, FirmaChain, fct, Flare, flr, FreiCoin, frc, GameCredits, game, GarliCoin, grlc, Gnosis, gno, Golem, glm, Golem (GNT), gnt, Hashflow, hft, Hedera, hbar, HedgeTrade, hedg, Hush, hush, HyperSpace, xsc, iExec RLC, rlc, Illuvium, ilv, Immutable, imx, Injective, inj, Komodo, kmd, LBRY Credits, lbc, Lido DAO Token, ldo, LiteCoin, ltc, loki, loki, Loom Network, loom, Magic, magic, Maker, mkr, Marlin, pond, Mask Network, mask, Matchpool, gup, Matic, matic, MegaCoin, mec, Melon, mln, Metal, mtl, Monero, xmr, Multi-collateral DAI, dai, NameCoin, nmc, Nano, nano, Nem, xem, Neo, neo, NeoGas, gas, Numeraire, nmr, Ocean Protocol, ocean, Odyssey, ocn, OmiseGO, omg, Onyx Protocol, xcn, Optimism, op, Origin Protocol, ogn, Paxos, pax, PayPal USD, pyusd, PeerCoin, ppc, PIVX, pivx, Polkadot, dot, Polymath, poly, PrimeCoin, xpm, ProtoShares, pts, Qtum, qtum, Quant, qnt, Quantum Resistant Ledger, qrl, RaiBlocks, xrb, Ripio Credit Network, rcn, Ripple, xrp, Salt, salt, Serve, serv, Siacoin, sc, Skale, skl, SnowGem, sng, Solana, sol, SolarCoin, slr, SOLVE, solve, Sonic, s, Spendcoin, spnd, Status, snt, Stellar, xlm, Storj, storj, Storm, storm, StormX, stmx, Story, ip, SuperVerse, super, Swarm City, swt, Synthetix Network, snx, Tap, xtp, Tellor, trb, TEMCO, temco, TenX, pay, Tether, usdt, Tezos, xtz, The Graph, grt, The Sandbox, sand, Tron, trx, TrueUSD, tusd, Unifi Protocol DAO, unfi, Uniswap Coin, uni, USD Coin, usdc, VeChain, vet, VertCoin, vtc, Viberate, vib, VoteCoin, vot, Vulcan Forged PYR, pyr, Waves, waves, Wings, wings, Yearn.finance, yfi, ZCash, zec, ZClassic, zcl, ZenCash, zen |

## Links

- npm: https://www.npmjs.com/package/multicoin-address-validator
- Repository: https://github.com/christsim/multicoin-address-validator
- Issues: https://github.com/christsim/multicoin-address-validator/issues
- npm.io page: https://npm.io/package/multicoin-address-validator

## Dependencies (9)

- [crc](https://npm.io/package/crc.md) ^4.3.2
- [jssha](https://npm.io/package/jssha.md) ^3.3.1
- [base-x](https://npm.io/package/base-x.md) ^4.0.0
- [buffer](https://npm.io/package/buffer.md) ^6.0.3
- [bundle](https://npm.io/package/bundle.md) ^2.1.0
- [cbor-js](https://npm.io/package/cbor-js.md) ^0.1.0
- [js-sha512](https://npm.io/package/js-sha512.md) ^0.9.0
- [lodash.isequal](https://npm.io/package/lodash.isequal.md) ^4.5.0
- [browserify-bignum](https://npm.io/package/browserify-bignum.md) ^1.3.0-2

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 0.5.26 (latest) — 2025-06-04
- 0.5.25 — 2025-03-18
- 0.5.24 — 2025-01-16
- 0.5.22 — 2024-10-22
- 0.5.21 — 2024-07-26
- 0.5.20 — 2024-07-19
- 0.5.19 — 2024-07-17
- 0.5.18 — 2024-05-21
- 0.5.17 — 2024-05-09
- 0.5.16 — 2024-02-05
- 0.5.15 — 2024-01-03
- 0.5.14 — 2023-12-08
- 0.5.13 — 2023-11-07
- 0.5.12 — 2022-12-21
- 0.5.11 — 2022-09-24
- … 40 more at https://npm.io/package/multicoin-address-validator/versions

## README

# wallet-address-validator
Simple wallet address validator for validating Bitcoin and other altcoins addresses in **Node.js and browser**.

[![Build Status](https://travis-ci.org/christsim/multicoin-address-validator.svg?branch=master)](https://travis-ci.org/christsim/multicoin-address-validator)

Forked from [ryanralph/altcoin-address](https://github.com/ryanralph/altcoin-address).

**File size is ~17 kB (minifed and gzipped)**.

## Installation

### NPM
```
npm install multicoin-address-validator
```

### Browser
```html
<script src="wallet-address-validator.min.js"></script>
```

## API

##### 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'`
* networkType - Optional. Use `'prod'` (default) to enforce standard address, `'testnet'` to enforce testnet address and `'both'` to enforce nothing.
* chainType - Optional. Specify the chainType, eg `'ethereum'`. 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.

### Supported crypto currencies

* 0x/zrx `'0x'` or `'zrx'`
* Aave Coin/aave `'Aave Coin'` or `'aave'`
* Algorand/algo `'Algorand'` or `'algo'`
* Apecoin/ape `'Apecoin'` or `'ape'`
* API3/api3 `'API3'` or `'api3'`
* Aptos/apt `'Aptos'` or `'apt'`
* Aragon/ant `'Aragon'` or `'ant'`
* Arbitrum/arb `'Arbitrum'` or `'arb'`
* Arbitrum/arb `'Arbitrum'` or `'arb'`
* Augur/rep `'Augur'` or `'rep'`
* AugurV2/repv2 `'AugurV2'` or `'repv2'`
* AuroraCoin/aur `'AuroraCoin'` or `'aur'`
* Avalanche/avax `'Avalanche'` or `'avax'`
* Axie Infinity/axs `'Axie Infinity'` or `'axs'`
* Bancor/bnt `'Bancor'` or `'bnt'`
* Band Protocol/band `'Band Protocol'` or `'band'`
* Bankex/bkx `'Bankex'` or `'bkx'`
* Basic Attention Token/bat `'Basic Attention Token'` or `'bat'`
* BeaverCoin/bvc `'BeaverCoin'` or `'bvc'`
* Berachain/bera `'Berachain'` or `'bera'`
* Biconomy/bico `'Biconomy'` or `'bico'`
* Binance/bnb `'Binance'` or `'bnb'`
* BinanceSmartChain/bnb `'BinanceSmartChain'` or `'bnb'`
* BioCoin/bio `'BioCoin'` or `'bio'`
* Bitcoin/btc `'Bitcoin'` or `'btc'`
* Bitcoin SV/bsv `'Bitcoin SV'` or `'bsv'`
* BitcoinCash/bch `'BitcoinCash'` or `'bch'`
* BitcoinGold/btg `'BitcoinGold'` or `'btg'`
* BitcoinPrivate/btcp `'BitcoinPrivate'` or `'btcp'`
* BitcoinZ/btcz `'BitcoinZ'` or `'btcz'`
* BlockTrade/btt `'BlockTrade'` or `'btt'`
* Blur/blur `'Blur'` or `'blur'`
* Bonk/bonk `'Bonk'` or `'bonk'`
* BTU Protocol/btu `'BTU Protocol'` or `'btu'`
* Callisto/clo `'Callisto'` or `'clo'`
* Cardano/ada `'Cardano'` or `'ada'`
* Celo/celo `'Celo'` or `'celo'`
* Chainlink/link `'Chainlink'` or `'link'`
* Chiliz/chz `'Chiliz'` or `'chz'`
* Civic/cvc `'Civic'` or `'cvc'`
* Compound/comp `'Compound'` or `'comp'`
* Cred/lba `'Cred'` or `'lba'`
* Crypto.com Coin/cro `'Crypto.com Coin'` or `'cro'`
* Curve DAO/crv `'Curve DAO'` or `'crv'`
* CUSD/cusd `'CUSD'` or `'cusd'`
* Dash/dash `'Dash'` or `'dash'`
* Decentraland/mana `'Decentraland'` or `'mana'`
* Decred/dcr `'Decred'` or `'dcr'`
* DigiByte/dgb `'DigiByte'` or `'dgb'`
* District0x/dnt `'District0x'` or `'dnt'`
* DogeCoin/doge `'DogeCoin'` or `'doge'`
* Enjin Coin/enj `'Enjin Coin'` or `'enj'`
* EOS/eos `'EOS'` or `'eos'`
* Ethereum/eth `'Ethereum'` or `'eth'`
* Ethereum Name Service/ens `'Ethereum Name Service'` or `'ens'`
* EthereumClassic/etc `'EthereumClassic'` or `'etc'`
* EthereumPow/ethw `'EthereumPow'` or `'ethw'`
* EtherZero/etz `'EtherZero'` or `'etz'`
* Expanse/exp `'Expanse'` or `'exp'`
* Fetch.ai/fet `'Fetch.ai'` or `'fet'`
* FirmaChain/fct `'FirmaChain'` or `'fct'`
* Flare/flr `'Flare'` or `'flr'`
* FreiCoin/frc `'FreiCoin'` or `'frc'`
* GameCredits/game `'GameCredits'` or `'game'`
* GarliCoin/grlc `'GarliCoin'` or `'grlc'`
* Gnosis/gno `'Gnosis'` or `'gno'`
* Golem/glm `'Golem'` or `'glm'`
* Golem (GNT)/gnt `'Golem (GNT)'` or `'gnt'`
* Hashflow/hft `'Hashflow'` or `'hft'`
* Hedera/hbar `'Hedera'` or `'hbar'`
* HedgeTrade/hedg `'HedgeTrade'` or `'hedg'`
* Hush/hush `'Hush'` or `'hush'`
* HyperSpace/xsc `'HyperSpace'` or `'xsc'`
* iExec RLC/rlc `'iExec RLC'` or `'rlc'`
* Illuvium/ilv `'Illuvium'` or `'ilv'`
* Immutable/imx `'Immutable'` or `'imx'`
* Injective/inj `'Injective'` or `'inj'`
* Komodo/kmd `'Komodo'` or `'kmd'`
* LBRY Credits/lbc `'LBRY Credits'` or `'lbc'`
* Lido DAO Token/ldo `'Lido DAO Token'` or `'ldo'`
* LiteCoin/ltc `'LiteCoin'` or `'ltc'`
* loki/loki `'loki'` or `'loki'`
* Loom Network/loom `'Loom Network'` or `'loom'`
* Magic/magic `'Magic'` or `'magic'`
* Maker/mkr `'Maker'` or `'mkr'`
* Marlin/pond `'Marlin'` or `'pond'`
* Mask Network/mask `'Mask Network'` or `'mask'`
* Matchpool/gup `'Matchpool'` or `'gup'`
* Matic/matic `'Matic'` or `'matic'`
* MegaCoin/mec `'MegaCoin'` or `'mec'`
* Melon/mln `'Melon'` or `'mln'`
* Metal/mtl `'Metal'` or `'mtl'`
* Monero/xmr `'Monero'` or `'xmr'`
* Multi-collateral DAI/dai `'Multi-collateral DAI'` or `'dai'`
* NameCoin/nmc `'NameCoin'` or `'nmc'`
* Nano/nano `'Nano'` or `'nano'`
* Nem/xem `'Nem'` or `'xem'`
* Neo/neo `'Neo'` or `'neo'`
* NeoGas/gas `'NeoGas'` or `'gas'`
* Numeraire/nmr `'Numeraire'` or `'nmr'`
* Ocean Protocol/ocean `'Ocean Protocol'` or `'ocean'`
* Odyssey/ocn `'Odyssey'` or `'ocn'`
* OmiseGO/omg `'OmiseGO'` or `'omg'`
* Onyx Protocol/xcn `'Onyx Protocol'` or `'xcn'`
* Optimism/op `'Optimism'` or `'op'`
* Origin Protocol/ogn `'Origin Protocol'` or `'ogn'`
* Paxos/pax `'Paxos'` or `'pax'`
* PayPal USD/pyusd `'PayPal USD'` or `'pyusd'`
* PeerCoin/ppc `'PeerCoin'` or `'ppc'`
* PIVX/pivx `'PIVX'` or `'pivx'`
* Polkadot/dot `'Polkadot'` or `'dot'`
* Polymath/poly `'Polymath'` or `'poly'`
* PrimeCoin/xpm `'PrimeCoin'` or `'xpm'`
* ProtoShares/pts `'ProtoShares'` or `'pts'`
* Qtum/qtum `'Qtum'` or `'qtum'`
* Quant/qnt `'Quant'` or `'qnt'`
* Quantum Resistant Ledger/qrl `'Quantum Resistant Ledger'` or `'qrl'`
* RaiBlocks/xrb `'RaiBlocks'` or `'xrb'`
* Ripio Credit Network/rcn `'Ripio Credit Network'` or `'rcn'`
* Ripple/xrp `'Ripple'` or `'xrp'`
* Salt/salt `'Salt'` or `'salt'`
* Serve/serv `'Serve'` or `'serv'`
* Siacoin/sc `'Siacoin'` or `'sc'`
* Skale/skl `'Skale'` or `'skl'`
* SnowGem/sng `'SnowGem'` or `'sng'`
* Solana/sol `'Solana'` or `'sol'`
* SolarCoin/slr `'SolarCoin'` or `'slr'`
* SOLVE/solve `'SOLVE'` or `'solve'`
* Sonic/s `'Sonic'` or `'s'`
* Spendcoin/spnd `'Spendcoin'` or `'spnd'`
* Status/snt `'Status'` or `'snt'`
* Stellar/xlm `'Stellar'` or `'xlm'`
* Storj/storj `'Storj'` or `'storj'`
* Storm/storm `'Storm'` or `'storm'`
* StormX/stmx `'StormX'` or `'stmx'`
* Story/ip `'Story'` or `'ip'`
* SuperVerse/super `'SuperVerse'` or `'super'`
* Swarm City/swt `'Swarm City'` or `'swt'`
* Synthetix Network/snx `'Synthetix Network'` or `'snx'`
* Tap/xtp `'Tap'` or `'xtp'`
* Tellor/trb `'Tellor'` or `'trb'`
* TEMCO/temco `'TEMCO'` or `'temco'`
* TenX/pay `'TenX'` or `'pay'`
* Tether/usdt `'Tether'` or `'usdt'`
* Tezos/xtz `'Tezos'` or `'xtz'`
* The Graph/grt `'The Graph'` or `'grt'`
* The Sandbox/sand `'The Sandbox'` or `'sand'`
* Tron/trx `'Tron'` or `'trx'`
* TrueUSD/tusd `'TrueUSD'` or `'tusd'`
* Unifi Protocol DAO/unfi `'Unifi Protocol DAO'` or `'unfi'`
* Uniswap Coin/uni `'Uniswap Coin'` or `'uni'`
* USD Coin/usdc `'USD Coin'` or `'usdc'`
* VeChain/vet `'VeChain'` or `'vet'`
* VertCoin/vtc `'VertCoin'` or `'vtc'`
* Viberate/vib `'Viberate'` or `'vib'`
* VoteCoin/vot `'VoteCoin'` or `'vot'`
* Vulcan Forged PYR/pyr `'Vulcan Forged PYR'` or `'pyr'`
* Waves/waves `'Waves'` or `'waves'`
* Wings/wings `'Wings'` or `'wings'`
* Yearn.finance/yfi `'Yearn.finance'` or `'yfi'`
* ZCash/zec `'ZCash'` or `'zec'`
* ZClassic/zcl `'ZClassic'` or `'zcl'`
* ZenCash/zen `'ZenCash'` or `'zen'`



### Usage example

#### 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
<script src="wallet-address-validator.min.js"></script>
```

```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'.
```

---
_Source: https://npm.io/package/multicoin-address-validator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
