wallet-validator
Advanced tools
Comparing version 0.3.6 to 0.3.7
{ | ||
"name": "wallet-validator", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"description": "Fast Wallet address validator for Bitcoin and other Altcoins.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -96,2 +96,3 @@ # wallet-validator | ||
* Emercoin/EMC, `'emercoin'` or `'EMC'` | ||
* HiveCoin/HVN, `'hivecoin'` or `'HVN'` | ||
@@ -98,0 +99,0 @@ ### Usage example |
@@ -327,2 +327,7 @@ var XRPValidator = require('./ripple_validator'); | ||
validator: BTCValidator | ||
}, { | ||
name: 'hivecoin', | ||
symbol: 'hvn', | ||
addressTypes: {prod: ['28', '80'], testnet: ['6f', 'c4']}, | ||
validator: BTCValidator | ||
} | ||
@@ -329,0 +334,0 @@ ]; |
const WAValidator = require('./src/wallet_address_validator'); | ||
let valid = WAValidator.validate('EMMP65RxczS2EPSNQyZ5h83qpeX3Quktf3', 'EMC'); | ||
let valid = WAValidator.validate('RTg8togXdjfUHf3So38k3vk4yL5DxRkzB9', 'rvn'); | ||
if(valid) | ||
@@ -6,0 +6,0 @@ console.log('This is a valid address'); |
@@ -565,2 +565,9 @@ var isNode = typeof module !== 'undefined' && typeof module.exports !== 'undefined'; | ||
it('should return true for correct HiveCoin addresses', function () { | ||
valid('HMgF4B7sTrvEa8Bx1LqwARWVQhwnFVWHhE', 'hivecoin'); | ||
valid('HGwYYA3NPuTYFyZ2hj9mQFb4SYE8dSfji3', 'hivecoin'); | ||
valid('HCNjL8qAyHNXZqBBCdMKcZurJCHPWk9wMi', 'hvn'); | ||
valid('HBDKG9NCo4Dt3WmLrnSiZJGHcQK1GFWfuf', 'HVN'); | ||
}); | ||
}); | ||
@@ -889,3 +896,7 @@ | ||
it('should return false for incorrect hivecoin addresses', function () { | ||
commonTests('hivecoin'); | ||
}); | ||
}); | ||
}); |
190720
4646
140