Socket
Socket
Sign inDemoInstall

@swyftx/api-crypto-address-validator

Package Overview
Dependencies
31
Maintainers
3
Versions
27
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.11.1 to 1.11.2

2

package.json

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc