npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

da-address-validator

v0.5.13

Published

Digital Assets address validator for Bitcoin and other Altcoins.

Downloads

181

Maintainers

slowair6slowair6

Keywords

aave (Aave Coin)abt (Arcblock)ada (Cardano)algo (Algorand)alpha (Alpha Venture DAO)ant (Aragon)ape (ApeCoin)aur (AuroraCoin)avax (Avalanche)axs (Axie Infinity)bal (Balancer)band (Band Protocol)bat (Basic Attention Token)bch (BitcoinCash)bio (BioCoin)bkx (Bankex)bnb (Binance)bnt (Bancor)boba (Boba Token)bsv (Bitcoin SV)btc (Bitcoin)btcp (BitcoinPrivate)btcz (BitcoinZ)btg (BitcoinGold)btt (BlockTrade)btu (BTU Protocol)busd (Binance USD)bvc (BeaverCoin)celo (Celo)chz (Chillz)clo (Callisto)comp (Compound)cro (Crypto.com Coin)crv (Curve DAO Token)ctxc (Cortex Coin)cusd (CUSD)cvc (Civic)dai (Multi-collateral DAI)dash (Dash)dcr (Decred)dgb (DigiByte)dnt (District0x)doge (DogeCoin)dot (Polkadot)dydx (dYdX)enj (Enjin Coin)ens (Ethereum Name Service)eos (EOS)etc (EthereumClassic)eth (Ethereum)etz (EtherZero)exp (Expanse)fct (FirmaChain)frc (FreiCoin)ftm (Fantom)ftt (FTX Token)gal (Project Galaxy)gala (Gala)game (GameCredits)gas (NeoGas)gf (GuildFi)glm (Golem)gno (Gnosis)gnt (Golem (GNT))grlc (GarliCoin)grt (The Graph)gt (Gate Token)gup (Matchpool)hbar (Hedera Hashgraph)hedg (HedgeTrade)hush (Hush)ilv (Illuvium)imx (Immutable X)iost (IOSToken)jfin (JFIN Coin)kmd (Komodo)knc (Kyber Network Crystal)ksm (Kusama)kub (Bitkub)lba (Cred)lbc (LBRY Credits)link (Chainlink)loki (loki)loom (Loom Network)lrc (Loopring)lsk (Lisk)ltc (LiteCoin)luna (Terra)lyxe (Lukso)mana (Decentraland)matic (Matic)mec (MegaCoin)mkr (Maker)mln (Melon)mona (MonaCoin)mtl (Metal)nano (Nano)near (NEAR)neo (Neo)nmc (NameCoin)nmr (Numeraire)ocean (Ocean Protocol)ocn (Odyssey)omg (OmiseGO)op (Optimisn)pax (Paxos)pay (TenX)pivx (PIVX)poly (Polymath)pow (Power Ledger)ppc (PeerCoin)pts (ProtoShares)qnt (Quant)qrl (Quantum Resistant Ledger)qtum (Qtum)rcn (Ripio Credit Network)rep (Augur)repv2 (AugurV2)rlc (iExec RLC)salt (Salt)sand (The Sandbox)sc (Siacoin)scrt (Secret Network)serv (Serve)six (SIX)slr (SolarCoin)sng (SnowGem)snt (Status)snx (Synthetix Network)sol (Solana)solve (SOLVE)spnd (Spendcoin)stmx (StormX)storj (Storj)storm (Storm)sushi (SushiSwap)swt (Swarm City)temco (TEMCO)trx (Tron)tusd (TrueUSD)uni (Uniswap Coin)usdc (USD Coin)usdt (Tether)vet (VeChain)vib (Viberate)vot (VoteCoin)vtc (VertCoin)wan (Wancoin)waves (Waves)wings (Wings)xem (Nem)xlm (Stellar)xmr (Monero)xpm (PrimeCoin)xrb (RaiBlocks)xrp (Ripple)xsc (HyperSpace)xtp (Tap)xtz (Tezos)yfi (Yearn Finance)zcl (ZClassic)zec (ZCash)zen (ZenCash)zil (Zilliqa)zrx (0x)

Readme

wallet-address-validator

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

Forked from christsim/multicoin-address-validator 0.5.10.

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

Installation

NPM

npm install da-address-validator

Browser

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

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'
  • Alpha Venture DAO/alpha 'Alpha Venture DAO' or 'alpha'
  • ApeCoin/ape 'ApeCoin' or 'ape'
  • Aragon/ant 'Aragon' or 'ant'
  • Arcblock/abt 'Arcblock' or 'abt'
  • 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'
  • Balancer/bal 'Balancer' or 'bal'
  • 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'
  • Binance/bnb 'Binance' or 'bnb'
  • Binance USD/busd 'Binance USD' or 'busd'
  • 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'
  • Bitkub/kub 'Bitkub' or 'kub'
  • BlockTrade/btt 'BlockTrade' or 'btt'
  • Boba Token/boba 'Boba Token' or 'boba'
  • 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'
  • Chillz/chz 'Chillz' or 'chz'
  • Civic/cvc 'Civic' or 'cvc'
  • Compound/comp 'Compound' or 'comp'
  • Cortex Coin/ctxc 'Cortex Coin' or 'ctxc'
  • Cred/lba 'Cred' or 'lba'
  • Crypto.com Coin/cro 'Crypto.com Coin' or 'cro'
  • Curve DAO Token/crv 'Curve DAO Token' 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'
  • dYdX/dydx 'dYdX' or 'dydx'
  • 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'
  • EtherZero/etz 'EtherZero' or 'etz'
  • Expanse/exp 'Expanse' or 'exp'
  • Fantom/ftm 'Fantom' or 'ftm'
  • FirmaChain/fct 'FirmaChain' or 'fct'
  • FreiCoin/frc 'FreiCoin' or 'frc'
  • FTX Token/ftt 'FTX Token' or 'ftt'
  • Gala/gala 'Gala' or 'gala'
  • GameCredits/game 'GameCredits' or 'game'
  • GarliCoin/grlc 'GarliCoin' or 'grlc'
  • Gate Token/gt 'Gate Token' or 'gt'
  • Gnosis/gno 'Gnosis' or 'gno'
  • Golem/glm 'Golem' or 'glm'
  • Golem (GNT)/gnt 'Golem (GNT)' or 'gnt'
  • GuildFi/gf 'GuildFi' or 'gf'
  • Hedera Hashgraph/hbar 'Hedera Hashgraph' 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 X/imx 'Immutable X' or 'imx'
  • IOSToken/iost 'IOSToken' or 'iost'
  • JFIN Coin/jfin 'JFIN Coin' or 'jfin'
  • Komodo/kmd 'Komodo' or 'kmd'
  • Kusama/ksm 'Kusama' or 'ksm'
  • Kyber Network Crystal/knc 'Kyber Network Crystal' or 'knc'
  • LBRY Credits/lbc 'LBRY Credits' or 'lbc'
  • Lisk/lsk 'Lisk' or 'lsk'
  • LiteCoin/ltc 'LiteCoin' or 'ltc'
  • loki/loki 'loki' or 'loki'
  • Loom Network/loom 'Loom Network' or 'loom'
  • Loopring/lrc 'Loopring' or 'lrc'
  • Lukso/lyxe 'Lukso' or 'lyxe'
  • Maker/mkr 'Maker' or 'mkr'
  • 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'
  • MonaCoin/mona 'MonaCoin' or 'mona'
  • Monero/xmr 'Monero' or 'xmr'
  • Multi-collateral DAI/dai 'Multi-collateral DAI' or 'dai'
  • NameCoin/nmc 'NameCoin' or 'nmc'
  • Nano/nano 'Nano' or 'nano'
  • NEAR/near 'NEAR' or 'near'
  • 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'
  • Optimisn/op 'Optimisn' or 'op'
  • Paxos/pax 'Paxos' or 'pax'
  • PeerCoin/ppc 'PeerCoin' or 'ppc'
  • PIVX/pivx 'PIVX' or 'pivx'
  • Polkadot/dot 'Polkadot' or 'dot'
  • Polymath/poly 'Polymath' or 'poly'
  • Power Ledger/pow 'Power Ledger' or 'pow'
  • PrimeCoin/xpm 'PrimeCoin' or 'xpm'
  • Project Galaxy/gal 'Project Galaxy' or 'gal'
  • 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'
  • Secret Network/scrt 'Secret Network' or 'scrt'
  • Serve/serv 'Serve' or 'serv'
  • Siacoin/sc 'Siacoin' or 'sc'
  • SIX/six 'SIX' or 'six'
  • SnowGem/sng 'SnowGem' or 'sng'
  • Solana/sol 'Solana' or 'sol'
  • SolarCoin/slr 'SolarCoin' or 'slr'
  • SOLVE/solve 'SOLVE' or 'solve'
  • 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'
  • SushiSwap/sushi 'SushiSwap' or 'sushi'
  • Swarm City/swt 'Swarm City' or 'swt'
  • Synthetix Network/snx 'Synthetix Network' or 'snx'
  • Tap/xtp 'Tap' or 'xtp'
  • TEMCO/temco 'TEMCO' or 'temco'
  • TenX/pay 'TenX' or 'pay'
  • Terra/luna 'Terra' or 'luna'
  • 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'
  • 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'
  • Wancoin/wan 'Wancoin' or 'wan'
  • 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'
  • Zilliqa/zil 'Zilliqa' or 'zil'

Usage example

Node

var WAValidator = require("da-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.
var WAValidator = require("da-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.
var WAValidator = require("da-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.
var WAValidator = require("da-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

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