{"_id":"@eddiewang/wallet-address-validator","_rev":"1-1be55120ea14c0d31010e747b2a2b80c","name":"@eddiewang/wallet-address-validator","dist-tags":{"latest":"0.2.4"},"versions":{"0.2.4":{"name":"@eddiewang/wallet-address-validator","description":"Wallet address validator for Bitcoin and other Altcoins.","keywords":["btc","bitcoin","bitcoin cash","litecoin","decred","dogecoin","ethereum","ripple","dash","neo","gas","komodo","zcash","qtum","altcoin","bankex","monero","segwit","crypto","address","wallet","validator","vertcoin","nano","raiblocks","javascript","browser","nodejs"],"version":"0.2.4","author":{"name":"Tomek Kolasa","email":"tomek@kolasa.me"},"homepage":"https://github.com/ognus/wallet-address-validator","license":"MIT","repository":{"type":"git","url":"https://github.com/ognus/wallet-address-validator.git"},"main":"src/wallet_address_validator","engines":{"node":"*"},"scripts":{"bundle":"browserify src/wallet_address_validator.js --standalone WAValidator --outfile dist/wallet-address-validator.js","minify":"uglifyjs -c -m -o dist/wallet-address-validator.min.js -- dist/wallet-address-validator.js","test:node":"mocha test","test:browser":"karma start","test":"npm run test:node && npm run test:browser","start":"npm run bundle && npm run minify && npm test"},"dependencies":{"base-x":"^3.0.4","blakejs":"1.1.0","jssha":"2.3.1","lodash":"4.17.11"},"devDependencies":{"browserify":"^15.1.0","chai":"^4.1.2","karma":"^2.0.0","karma-chai":"^0.1.0","karma-chrome-launcher":"^2.2.0","karma-mocha":"^1.3.0","mocha":"^5.0.2","uglify-js":"^3.3.13"},"licenseText":"The MIT License (MIT)\n\nCopyright (c) Roman Shtylman\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"@eddiewang/wallet-address-validator@0.2.4","dist":{"shasum":"076f2a84ce604503d9432b98368efe66295b768a","integrity":"sha512-MVW2tPMI1B7Ut2DUZXbhBUyoDoX7n8ETIHdgu3Nr94ZfFKeAHkPOXWrV1oR6dxt+Br2tMSCxvu0tqs+UTOVuuA==","tarball":"https://registry.npmjs.org/@eddiewang/wallet-address-validator/-/wallet-address-validator-0.2.4.tgz","fileCount":33,"unpackedSize":649644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGgTPCRA9TVsSAnZWagAAMckP/3PuzIg04lHwMv1laI+A\ndP/KcgqIiWPCiQZXpOlSrhpEroROXZ2FRzNKHFL4a0BXX8ew62E4/dzro+9X\n8DF75woBycd9zH8jkthmC54tLoQTBGpWYH+aiZeIvY+rVBrq5y+uSP0y+MxE\nsDzMQKeerlpgGHHUlUnCqgHbznIAs59bfpMoxSIl9OJxo1+9P5ZhhLJGJ/1a\np0eN8zsbG+zf5w5UkLpy/YFIR2ad1fJ55Vl7t9u44GEC+YaS0RnCyCUNrIP3\nfek85/WB1VNqwORdTGWYgBzJwi0gkhk6RMzai3Se/W/Gr+T4ZmmUQSZVB5J/\nKgSclxsR5UKmLjKCXO/jzpIHt1D17fwfe/LuYl293ns3GrsFWY1z3KIHh3Vv\nnAyBYzjQFdywACDh3z3jO2yT+5JGqmaR5vF1ITyMeF+4InqfiANLOWFtkeDj\n32V0pFuA+JK25XRYfwfVHFjAG3f5KkZfspNCzo7p+ksAyR3axsF+Rz/S2gPU\nmXmEA6e6mTF1R5lKe7sFpB61HHoUTKPgFrNtouuzjPVe4jPTsVPvOC+kADWd\n1aG3bIC40zQzbBxClXJRDfizOb6+/xCic0t5+gLTGyW5FHphf8cN4YLYpiSR\nkL2mY5vJoomli7OQ1uZoSnSSqcTuMECwA9ZK/Txj/WJwfiiV4VGNlM7oy+R0\nGndR\r\n=jSJi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGTR8YFoQRy3zPsFbIuT/ornX58ffblq/qgI47nOP/Y0AiEApl4B6xE81HdlWroSkpOihOnXhKS0KCMhrTM3Ha1nS2I="}]},"_npmUser":{"name":"eddiewang","email":"bonjour@eddiewang.me"},"directories":{},"maintainers":[{"name":"eddiewang","email":"bonjour@eddiewang.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/wallet-address-validator_0.2.4_1612317902890_0.10936335729549684"},"_hasShrinkwrap":false}},"time":{"created":"2021-02-03T02:05:02.831Z","0.2.4":"2021-02-03T02:05:03.229Z","modified":"2022-04-05T06:41:01.703Z"},"maintainers":[{"name":"eddiewang","email":"bonjour@eddiewang.me"}],"description":"Wallet address validator for Bitcoin and other Altcoins.","homepage":"https://github.com/ognus/wallet-address-validator","keywords":["btc","bitcoin","bitcoin cash","litecoin","decred","dogecoin","ethereum","ripple","dash","neo","gas","komodo","zcash","qtum","altcoin","bankex","monero","segwit","crypto","address","wallet","validator","vertcoin","nano","raiblocks","javascript","browser","nodejs"],"repository":{"type":"git","url":"https://github.com/ognus/wallet-address-validator.git"},"author":{"name":"Tomek Kolasa","email":"tomek@kolasa.me"},"license":"MIT","readme":"# wallet-address-validator\nSimple wallet address validator for validating Bitcoin and other altcoins addresses in **Node.js and browser**.\n\nForked from [ryanralph/altcoin-address](https://github.com/ryanralph/altcoin-address).\n\n**File size is ~22 kB (minifed and gzipped)**.\n\n## Installation\n\n### NPM\n```\nnpm install wallet-address-validator\n```\n\n### Browser\n```html\n<script src=\"wallet-address-validator.min.js\"></script>\n```\n\n## API\n\n##### validate (address [, currency = 'bitcoin'[, networkType = 'prod']])\n\n###### Parameters\n* address - Wallet address to validate.\n* currency - Optional. Currency name or symbol, e.g. `'bitcoin'` (default), `'litecoin'` or `'LTC'`\n* networkType - Optional. Use `'prod'` (default) to enforce standard address, `'testnet'` to enforce testnet address and `'both'` to enforce nothing.\n\n> Returns true if the address (string) is a valid wallet address for the crypto currency specified, see below for supported currencies.\n\n### Supported crypto currencies\n\n* Auroracoin/AUR, `'auroracoin'` or `'AUR'`\n\n* Bankex/BKX, `'bankex'` or `'BKX'`\n* BeaverCoin/BVC, `'beavercoin'` or `'BVC'`\n* Biocoin/BIO, `'biocoin'` or `'BIO'`\n* Bitcoin/BTC, `'bitcoin'` or `'BTC'`\n* BitcoinCash/BCH, `'bitcoincash'` or `'BCH'`\n* BitcoinGold/BTG, `'bitcoingold'` or `'BTG'`\n* BitcoinPrivate/BTCP, `'bitcoinprivate'` or `'BTCP'`\n* BitcoinZ/BTCZ, `'bitcoinz'` or `'BTCZ'`\n\n* Callisto/CLO, `'callisto'` or `'CLO'`\n\n* Dash, `'dash'` or `'DASH'`\n* Decred/DCR, `'decred'` or `'DCR'`\n* Digibyte/DGB, `'digibyte'` or `'DGB'`\n* Dogecoin/DOGE, `'dogecoin'` or `'DOGE'`\n\n* Ethereum/ETH, `'ethereum'` or `'ETH'`\n* EthereumClassic/ETH, `'ethereumclassic'` or `'ETC'`\n* EthereumZero/ETZ, `'etherzero'` or `'ETZ'`\n\n* Freicoin/FRC, `'freicoin'` or `'FRC'`\n\n* Garlicoin/GRLC, `'garlicoin'` or `'GRLC'`\n\n* Hush/HUSH, `'hush'` or `'HUSH'`\n\n* Komodo/KMD, `'komodo'` or `'KMD'`\n\n* Litecoin/LTC, `'litecoin'` or `'LTC'`\n\n* Megacoin/MEC, `'megacoin'` or `'MEC'`\n\n* Monero/XMR, `'monero'` or `'XMR'`\n\n* Namecoin/NMC, `'namecoin'` or `'NMC'`\n* Nano/NANO, `'nano'` or `'NANO'`\n* NEO/NEO, `'NEO'` or `'NEO'`\n* NeoGas/GAS, `'neogas'` or `'GAS'`\n\n* Peercoin/PPCoin/PPC, `'peercoin'` or `'PPC'`\n* Primecoin/XPM, `'primecoin'` or `'XPM'`\n* Protoshares/PTS, `'protoshares'` or `'PTS'`\n\n* Qtum/QTUM, `'qtum'` or `'QTUM'`\n\n* Raiblocks/XRB, `'raiblocks'` or `'XRB'`\n* Ripple/XRP, `'ripple'` or `'XRP'`\n\n* Snowgem/SNG, `'snowgem'` or `'SNG'`\n\n* Vertcoin/VTC, `'vertcoin'` or `'VTC'`\n\n* Votecoin/VTC, `'votecoin'` or `'VOT'`\n\n* Zcash/ZEC, `'zcash'` or `'ZEC'`\n\n* Zclassic/ZCL, `'zclassic'` or `'ZCL'`\n\n* ZenCash/ZEN, `'zencash'` or `'ZEN'`\n\n\n### Usage example\n\n#### Node\n```javascript\nvar WAValidator = require('wallet-address-validator');\n\nvar valid = WAValidator.validate('1KFzzGtDdnq5hrwxXGjwVnKzRbvf8WVxck', 'BTC');\nif(valid)\n\tconsole.log('This is a valid address');\nelse\n\tconsole.log('Address INVALID');\n\n// This will log 'This is a valid address' to the console.\n```\n\n```javascript\nvar WAValidator = require('wallet-address-validator');\n\nvar valid = WAValidator.validate('1KFzzGtDdnq5hrwxXGjwVnKzRbvf8WVxck', 'litecoin', 'testnet');\nif(valid)\n      console.log('This is a valid address');\nelse\n      console.log('Address INVALID');\n\n// As this is a invalid litecoin address 'Address INVALID' will be logged to console.\n```\n\n#### Browser\n```html\n<script src=\"wallet-address-validator.min.js\"></script>\n```\n\n```javascript\n// WAValidator is exposed as a global (window.WAValidator)\nvar valid = WAValidator.validate('1KFzzGtDdnq5hrwxXGjwVnKzRbvf8WVxck', 'bitcoin');\nif(valid)\n    alert('This is a valid address');\nelse\n    alert('Address INVALID');\n\n// This should show a pop up with text 'This is a valid address'.\n```\n","readmeFilename":"README.md"}