Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
multicoin-address-validator
Advanced tools
Multicoin address validator for Bitcoin and other Altcoins.
Simple 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 multicoin-address-validator
<script src="wallet-address-validator.min.js"></script>
'bitcoin'
(default), 'litecoin'
or 'LTC'
'prod'
(default) to enforce standard address, 'testnet'
to enforce testnet address and 'both'
to enforce nothing.'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.
'0x'
or 'zrx'
'Aave Coin'
or 'aave'
'Algorand'
or 'algo'
'Apecoin'
or 'ape'
'API3'
or 'api3'
'Aptos'
or 'apt'
'Aragon'
or 'ant'
'Arbitrum'
or 'arb'
'Arbitrum'
or 'arb'
'Augur'
or 'rep'
'AugurV2'
or 'repv2'
'AuroraCoin'
or 'aur'
'Avalanche'
or 'avax'
'Axie Infinity'
or 'axs'
'Bancor'
or 'bnt'
'Band Protocol'
or 'band'
'Bankex'
or 'bkx'
'Basic Attention Token'
or 'bat'
'BeaverCoin'
or 'bvc'
'Biconomy'
or 'bico'
'Binance'
or 'bnb'
'BinanceSmartChain'
or 'bnb'
'BioCoin'
or 'bio'
'Bitcoin'
or 'btc'
'Bitcoin SV'
or 'bsv'
'BitcoinCash'
or 'bch'
'BitcoinGold'
or 'btg'
'BitcoinPrivate'
or 'btcp'
'BitcoinZ'
or 'btcz'
'BlockTrade'
or 'btt'
'Blur'
or 'blur'
'Bonk'
or 'bonk'
'BTU Protocol'
or 'btu'
'Callisto'
or 'clo'
'Cardano'
or 'ada'
'Celo'
or 'celo'
'Chainlink'
or 'link'
'Chiliz'
or 'chz'
'Civic'
or 'cvc'
'Compound'
or 'comp'
'Cred'
or 'lba'
'Crypto.com Coin'
or 'cro'
'Curve DAO'
or 'crv'
'CUSD'
or 'cusd'
'Dash'
or 'dash'
'Decentraland'
or 'mana'
'Decred'
or 'dcr'
'DigiByte'
or 'dgb'
'District0x'
or 'dnt'
'DogeCoin'
or 'doge'
'Enjin Coin'
or 'enj'
'EOS'
or 'eos'
'Ethereum'
or 'eth'
'Ethereum Name Service'
or 'ens'
'EthereumClassic'
or 'etc'
'EthereumPow'
or 'ethw'
'EtherZero'
or 'etz'
'Expanse'
or 'exp'
'Fetch.ai'
or 'fet'
'FirmaChain'
or 'fct'
'Flare'
or 'flr'
'FreiCoin'
or 'frc'
'GameCredits'
or 'game'
'GarliCoin'
or 'grlc'
'Gnosis'
or 'gno'
'Golem'
or 'glm'
'Golem (GNT)'
or 'gnt'
'Hashflow'
or 'hft'
'HedgeTrade'
or 'hedg'
'Hush'
or 'hush'
'HyperSpace'
or 'xsc'
'iExec RLC'
or 'rlc'
'Illuvium'
or 'ilv'
'Immutable'
or 'imx'
'Injective'
or 'inj'
'Komodo'
or 'kmd'
'LBRY Credits'
or 'lbc'
'Lido DAO Token'
or 'ldo'
'LiteCoin'
or 'ltc'
'loki'
or 'loki'
'Loom Network'
or 'loom'
'Magic'
or 'magic'
'Maker'
or 'mkr'
'Marlin'
or 'pond'
'Mask Network'
or 'mask'
'Matchpool'
or 'gup'
'Matic'
or 'matic'
'MegaCoin'
or 'mec'
'Melon'
or 'mln'
'Metal'
or 'mtl'
'Monero'
or 'xmr'
'Multi-collateral DAI'
or 'dai'
'NameCoin'
or 'nmc'
'Nano'
or 'nano'
'Nem'
or 'xem'
'Neo'
or 'neo'
'NeoGas'
or 'gas'
'Numeraire'
or 'nmr'
'Ocean Protocol'
or 'ocean'
'Odyssey'
or 'ocn'
'OmiseGO'
or 'omg'
'Onyx Protocol'
or 'xcn'
'Optimism'
or 'op'
'Origin Protocol'
or 'ogn'
'Paxos'
or 'pax'
'PayPal USD'
or 'pyusd'
'PeerCoin'
or 'ppc'
'PIVX'
or 'pivx'
'Polkadot'
or 'dot'
'Polymath'
or 'poly'
'PrimeCoin'
or 'xpm'
'ProtoShares'
or 'pts'
'Qtum'
or 'qtum'
'Quant'
or 'qnt'
'Quantum Resistant Ledger'
or 'qrl'
'RaiBlocks'
or 'xrb'
'Ripio Credit Network'
or 'rcn'
'Ripple'
or 'xrp'
'Salt'
or 'salt'
'Serve'
or 'serv'
'Siacoin'
or 'sc'
'Skale'
or 'skl'
'SnowGem'
or 'sng'
'Solana'
or 'sol'
'SolarCoin'
or 'slr'
'SOLVE'
or 'solve'
'Spendcoin'
or 'spnd'
'Status'
or 'snt'
'Stellar'
or 'xlm'
'Storj'
or 'storj'
'Storm'
or 'storm'
'StormX'
or 'stmx'
'SuperVerse'
or 'super'
'Swarm City'
or 'swt'
'Synthetix Network'
or 'snx'
'Tap'
or 'xtp'
'Tellor'
or 'trb'
'TEMCO'
or 'temco'
'TenX'
or 'pay'
'Tether'
or 'usdt'
'Tezos'
or 'xtz'
'The Graph'
or 'grt'
'The Sandbox'
or 'sand'
'Tron'
or 'trx'
'TrueUSD'
or 'tusd'
'Unifi Protocol DAO'
or 'unfi'
'Uniswap Coin'
or 'uni'
'USD Coin'
or 'usdc'
'VeChain'
or 'vet'
'VertCoin'
or 'vtc'
'Viberate'
or 'vib'
'VoteCoin'
or 'vot'
'Vulcan Forged PYR'
or 'pyr'
'Waves'
or 'waves'
'Wings'
or 'wings'
'Yearn.finance'
or 'yfi'
'ZCash'
or 'zec'
'ZClassic'
or 'zcl'
'ZenCash'
or 'zen'
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.
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.
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.
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.
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.
<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'.
FAQs
Multicoin address validator for Bitcoin and other Altcoins.
We found that multicoin-address-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.