@swyftx/api-crypto-address-validator
Advanced tools
Comparing version 1.11.1 to 1.11.2
@@ -240,3 +240,3 @@ { | ||
], | ||
"version": "1.11.1", | ||
"version": "1.11.2", | ||
"author": "Swyftx", | ||
@@ -243,0 +243,0 @@ "publishConfig": { |
@@ -1,15 +0,20 @@ | ||
# crypto-address-validator | ||
Simple wallet address validator for validating Bitcoin and other altcoins addresses in **Node.js and browser**. | ||
# @swyftx/api-crypto-address-validator | ||
Simple wallet address validator for validating Bitcoin and 124 (and counting) other altcoin addresses in **Node.js and browser**. | ||
Forked from [ognus/wallet-address-validator](https://github.com/ognus/wallet-address-validator) which was forked from [ryanralph/altcoin-address](https://github.com/ryanralph/altcoin-address). | ||
Did you know? This package is under active development by Swyftx. Swyftx allows you to buy and sell Bitcoin, Etherium, Ripple and many more assets using Australian Dollars. [Buy Bitcoin in Australia](https://swyftx.com.au) | ||
Did you know? This package is under active development by [Swyftx](https://swyftx.com.au). Swyftx allows you to buy and sell Bitcoin, Etherium, Ripple and many more assets using Australian Dollars. [Buy Bitcoin in Australia](https://swyftx.com.au) | ||
**File size is ~109 kB (minifed and gzipped - ~70.7% smaller)**. | ||
**File size is ~108.7 kB (minifed and gzipped - ~70.8% smaller)**. | ||
## Installation | ||
### Yarn | ||
``` | ||
yarn add @swyftx/api-crypto-address-validator | ||
``` | ||
### NPM | ||
``` | ||
npm install wallet-address-validator | ||
npm install @swyftx/api-crypto-address-validator | ||
``` | ||
@@ -166,10 +171,11 @@ | ||
```javascript | ||
var WAValidator = require('wallet-address-validator'); | ||
const WAValidator = require('@swyftx/api-crypto-address-validator') | ||
var valid = WAValidator.validate('1KFzzGtDdnq5hrwxXGjwVnKzRbvf8WVxck', 'BTC'); | ||
if(valid) | ||
console.log('This is a valid address'); | ||
else | ||
console.log('Address INVALID'); | ||
const 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. | ||
@@ -179,10 +185,11 @@ ``` | ||
```javascript | ||
var WAValidator = require('wallet-address-validator'); | ||
const WAValidator = require('@swyftx/api-crypto-address-validator') | ||
var valid = WAValidator.validate('1KFzzGtDdnq5hrwxXGjwVnKzRbvf8WVxck', 'litecoin', 'testnet'); | ||
if(valid) | ||
console.log('This is a valid address'); | ||
else | ||
console.log('Address INVALID'); | ||
const 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. | ||
@@ -198,9 +205,10 @@ ``` | ||
// 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'); | ||
const 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'. | ||
``` |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
212
1598103
30903