Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bitcoin-address

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitcoin-address - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

foo.js

3

index.js

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc