Skip to content
StrongSquirrelPublic

About

A useful library for validation of Bitcoin, Litecoin, Ethereum and other cryptocoin addresses

Resources

Stars

16 stars

Watchers

3 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crptwav

Simple wallet address validator for validating Bitcoin and other altcoins addresses.

It is a port of JavaScript library https://github.com/ognus/wallet-address-validator.

Documentation

https://godoc.org/github.com/StrongSquirrel/crptwav

Example

package main

import (
    "fmt"
    "github.com/StrongSquirrel/crptwav"
)

func main() {
	fmt.Println(crptwav.IsValidAddress("0xE37c0D48d68da5c5b14E5c1a9f1CFE802776D9FF", "ETH"))
	fmt.Println(crptwav.IsValidAddress("12KYrjTdVGjFMtaxERSk3gphreJ5US8aUP", "Bitcoin"))
	fmt.Println(crptwav.IsValidProdAddress("12KYrjTdVGjFMtaxERSk3gphreJ5US8aUP", "Bitcoin"))
	fmt.Println(crptwav.IsValidTestnetAddress("mzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhef", "BTC"))
	fmt.Println(crptwav.IsValidProdAddress("mzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhef", "BTC"))
	// Output:
	// true
	// true
	// true
	// true
	// false
}

Supported crypto currencies (todo)

  • Auroracoin/AUR, 'auroracoin' or 'AUR'
  • BeaverCoin/BVC, 'beavercoin' or 'BVC'
  • Biocoin/BIO, 'biocoin' or 'BIO'
  • Bitcloud/BTDX, 'bitcloud' or 'BTDX'
  • Bitcoin/BTC, 'bitcoin' or 'BTC'
  • BitcoinCash/BCH, 'bitcoincash' or 'BCH'
  • BitcoinGold/BTG, 'bitcoingold' or 'BTG'
  • BitcoinPrivate/BTCP, 'bitcoinprivate' or 'BTCP'
  • BitcoinZ/BTCZ, 'bitcoinz' or 'BTCZ'
  • Bitcore/BTX, 'bitcore' or 'BTX'
  • Bitsend/BSD, 'bitsend' or 'BSD'
  • Callisto/CLO, 'callisto' or 'CLO'
  • Dash, 'dash' or 'DASH'
  • Decred/DCR, 'decred' or 'DCR'
  • Digibyte/DGB, 'digibyte' or 'DGB'
  • Dogecoin/DOGE, 'dogecoin' or 'DOGE'
  • Ethereum/ETH, 'ethereum' or 'ETH'
  • EthereumClassic/ETH, 'ethereumclassic' or 'ETC'
  • EthereumZero/ETZ, 'etherzero' or 'ETZ'
  • Freicoin/FRC, 'freicoin' or 'FRC'
  • Garlicoin/GRLC, 'garlicoin' or 'GRLC'
  • Hush/HUSH, 'hush' or 'HUSH'
  • Komodo/KMD, 'komodo' or 'KMD'
  • Litecoin/LTC, 'litecoin' or 'LTC'
  • Megacoin/MEC, 'megacoin' or 'MEC'
  • Namecoin/NMC, 'namecoin' or 'NMC'
  • NEO/NEO, 'NEO' or 'NEO'
  • NeoGas/GAS, 'neogas' or 'GAS'
  • Peercoin/PPCoin/PPC, 'peercoin' or 'PPC'
  • Primecoin/XPM, 'primecoin' or 'XPM'
  • Protoshares/PTS, 'protoshares' or 'PTS'
  • Qtum/QTUM, 'qtum' or 'QTUM'
  • Ripple/XRP, 'ripple' or 'XRP'
  • Snowgem/SNG, 'snowgem' or 'SNG'
  • Vertcoin/VTC, 'vertcoin' or 'VTC'
  • Votecoin/VTC, 'votecoin' or 'VOT'
  • Zcash/ZEC, 'zcash' or 'ZEC'
  • Zclassic/ZCL, 'zclassic' or 'ZCL'
  • ZenCash/ZEN, 'zencash' or 'ZEN'

License

MIT

About

A useful library for validation of Bitcoin, Litecoin, Ethereum and other cryptocoin addresses

Resources

Stars

16 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages