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

multichain-address-validator

v0.0.1

Published

Multichain address validator for Bitcoin and other blockchains.

Downloads

46

Maintainers

chris.tsimchris.tsim

Keywords

0xzrxAave CoinaaveAlgorandalgoApecoinapeAPI3api3AragonantArbitrumarbAugurrepAugurV2repv2AuroraCoinaurAvalancheavaxAxie InfinityaxsBancorbntBand ProtocolbandBankexbkxBasic Attention TokenbatBeaverCoinbvcBiconomybicoBinancebnbBioCoinbioBitcoinbtcBitcoin SVbsvBitcoinCashbchBitcoinGoldbtgBitcoinPrivatebtcpBitcoinZbtczBlockTradebttBlurblurBonkbonkBTU ProtocolbtuCallistocloCardanoadaCeloceloChainlinklinkChilizchzCiviccvcCompoundcompCredlbaCrypto.com CoincroCurve DAOcrvCUSDcusdDashdashDecentralandmanaDecreddcrDigiBytedgbDistrict0xdntDogeCoindogeEnjin CoinenjEOSeosEthereumethEthereum Name ServiceensEthereumClassicetcEthereumPowethwEtherZeroetzExpanseexpFetch.aifetFirmaChainfctFlareflrFreiCoinfrcGameCreditsgameGarliCoingrlcGnosisgnoGolemglmGolem (GNT)gntHashflowhftHedgeTradehedgHushhushHyperSpacexsciExec RLCrlcIlluviumilvImmutableimxInjectiveinjKomodokmdLBRY CreditslbcLido DAO TokenldoLiteCoinltclokilokiLoom NetworkloomMagicmagicMakermkrMarlinpondMask NetworkmaskMatchpoolgupMaticmaticMegaCoinmecMelonmlnMetalmtlMoneroxmrMulti-collateral DAIdaiNameCoinnmcNanonanoNemxemNeoneoNeoGasgasNumerairenmrOcean ProtocoloceanOdysseyocnOmiseGOomgOnyx ProtocolxcnOptimismopOrigin ProtocolognPaxospaxPayPal USDpyusdPeerCoinppcPIVXpivxPolkadotdotPolymathpolyPrimeCoinxpmProtoSharesptsQtumqtumQuantqntQuantum Resistant LedgerqrlRaiBlocksxrbRipio Credit NetworkrcnRipplexrpSaltsaltServeservSiacoinscSkalesklSnowGemsngSolanasolSolarCoinslrSOLVEsolveSpendcoinspndStatussntStellarxlmStorjstorjStormstormStormXstmxSuperVersesuperSwarm CityswtSynthetix NetworksnxTapxtpTellortrbTEMCOtemcoTenXpayTetherusdtTezosxtzThe GraphgrtThe SandboxsandTrontrxTrueUSDtusdUnifi Protocol DAOunfiUniswap CoinuniUSD CoinusdcVeChainvetVertCoinvtcViberatevibVoteCoinvotVulcan Forged PYRpyrWaveswavesWingswingsYearn.financeyfiZCashzecZClassiczclZenCashzen

Readme

multichain address validator

Simple blockchain address validator for validating Bitcoin and other blockchain addresses Node.js and browser.

Build Status

Installation

NPM

npm install multichain-address-validator

Browser

<script src="dist/multichain-address-validator.bundle.min.js"></script>

API

validate (address, chain)
Parameters
  • address - blockchain address to validate
  • chain - blockchain name or object with networkType (mainnet or testnet)

Returns true if the address is a valid wallet address for the blockchain specified or throws if validator could not be found for chain

Supported blockchains

  • Algorand: algorand
  • Bitcoin: bitcoin, btc, omni
  • Bitcoin Cash: bitcoin-cash, bitcoincash, bitcoin cash, bch
  • Cardano: cardano, ada
  • Dogecoin: dogecoin, doge
  • EOS: eos
  • Etherum: ethereum, eth, erc20, flare, avalanche, avalanche-c, bsc, bnb, binance
  • Litecoin: litecoin, ltc
  • Monero: monero
  • Nano: nano
  • NEM: nem
  • Polkadot: polkadot
  • Ripple: ripple', xrp`
  • Sia: sia
  • Solana: solana, spl
  • Tezos: tezos
  • Tron: tron, trc20
  • XLM: xlm, stellar

Usage example

Node

import { validate } from 'multichain-address-validator'

const valid = 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.
import { validate } from 'multichain-address-validator'

const valid = validate('0xdbF03B407c01E7cD3CBea99509d93f8DDDC8C6FB', '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.
import { validate } from 'multichain-address-validator'

const valid = validate('1KFzzGtDdnq5hrwxXGjwVnKzRbvf8WVxck', { chain: 'litecoin', networkType: '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.