bitcoin-address
Advanced tools
Comparing version 0.0.3 to 0.1.0
@@ -23,2 +23,4 @@ | ||
function validate(address, address_type) { | ||
// default is to check that address is regular production address | ||
address_type = address_type || 'prod'; | ||
@@ -35,3 +37,2 @@ try { | ||
// should be 25 bytes per btc address spec | ||
@@ -38,0 +39,0 @@ if (decoded.length != 25) { |
@@ -5,3 +5,3 @@ { | ||
"description": "bitcoin address verification and other related functions", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"homepage": "https://github.com/shtylman/bitcoin-address", | ||
@@ -16,6 +16,6 @@ "repository": { | ||
"dependencies": { | ||
"int": "0.1.0" | ||
"int": "0.1.1" | ||
}, | ||
"devDependencies": { | ||
"mocha": "1.2.x" | ||
"mocha": "1.9.x" | ||
}, | ||
@@ -22,0 +22,0 @@ "main": "index", |
@@ -11,5 +11,14 @@ var address = require('..'); | ||
invalid('mzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhe'); | ||
invalid('1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa', 'testnet'); | ||
invalid('mzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhef', 'prod'); | ||
invalid('bd839e4f6fadb293ba580df5dea7814399989983'); | ||
invalid('miCVC7QcY917Cz427qTBEUrvBzRapHrupc'); | ||
invalid('rrRmhfXzGBKbV4YHtbpxfA1ftEcry8AJaX'); | ||
// reject litecoin addresses | ||
invalid('LSxNsEQekEpXMS4B7tUYstMEdMyH321ZQ1', 'prod'); | ||
// testnet | ||
invalid('1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa', 'testnet'); | ||
// invalid base58 string | ||
@@ -16,0 +25,0 @@ invalid('%%@'); |
@@ -11,3 +11,2 @@ var address = require('..'); | ||
validate('1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa', 'prod'); | ||
validate('mzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhef'); | ||
validate('mzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhef', 'testnet'); | ||
@@ -20,9 +19,8 @@ | ||
validate('116CGDLddrZhMrTwhCVJXtXQpxygTT1kHd'); | ||
// p2sh addresses | ||
validate('3NJZLcZEEYBpxYEUGewU4knsQRn1WM5Fkt'); | ||
validate('3NJZLcZEEYBpxYEUGewU4knsQRn1WM5Fkt', 'prod'); | ||
validate('2MxKEf2su6FGAUfCEAHreGFQvEYrfYNHvL7'); | ||
validate('2MxKEf2su6FGAUfCEAHreGFQvEYrfYNHvL7', 'testnet'); | ||
}); | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5708
10
140