The best package for validating the addresses of different wallets in the most famous blockchain networks such as Bitcoin, Tron, Ethereum, and Solana in Node.js and browser.
Before using wallet-address-validator, you must install the following package. Because the Stellar network uses CRC
npm i crc
validate USDT wallet address on TRX blockchain
validate('TAsXtbccu7UTppjCzEwo7nKyhuxPnME5rm', 'USDT', 'TRX', 'prod')
'bitcoin' (default), 'litecoin' or 'LTC''BTC' , 'LTC' , 'TRX' , 'ETH''prod' (default) to enforce standard address, 'testnet' to enforce testnet address.Returns true if the address (string) is a valid wallet address for the crypto currency specified, see below for supported currencies.
'BTC''ETH''ETC''LINK''BSC''LTC''DASH''BCH''TRX''XRP''NANO''ALG''XLM''DOT''ATOM''BNB''ICX''ARDR''SOL''XTZ''EOS''ADA'Validate Tether wallet address that you do not know which network it based
import { validate } from './walletAddressValidator'
var validate1 = validate('0xC8C5dED0aafAA04439FbE787B79DcAA62f152be8', 'USDT');
console.log(validate1); // This will log 'ETH' to the console.
var validate2 = validate('TSro8NA6VwKTFtzb692BAv8qAjqg9Cid5Z', 'USDT');
console.log(validate2); // This will log 'TRX' to the console.
validate bitcoin wallet address
import { validate } from './walletAddressValidator'
var valid = validate('31tnc6ghMGfMzR9RfhX3vTFMqYz8WNTn1W', '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.
validate ethereum wallet address
import { validate } from './walletAddressValidator'
var valid = validate('0xC8C5dED0aafAA04439FbE787B79DcAA62f152be8', 'ETH');
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.
validate shiba based on ethereum
import { validate } from './walletAddressValidator'
var valid = validate('0xC8C5dED0aafAA04439FbE787B79DcAA62f152be8', 'SHIB' , 'ETH');
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.