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.2 to 0.0.3

5

base58.js

@@ -23,5 +23,8 @@

var p = positions[char];
// if we encounter an invalid character, decoding fails
if (p === undefined) {
return '0';
throw new Error('invalid base58 string: ' + payload);
}
num = num.mul(base).add(p);

@@ -28,0 +31,0 @@

8

index.js

@@ -24,3 +24,8 @@

var decoded_hex = base58.decode(address);
try {
var decoded_hex = base58.decode(address);
} catch (e) {
// if decoding fails, assume invalid address
return false;
}

@@ -30,2 +35,3 @@ // make a usable buffer from the decoded data

// should be 25 bytes per btc address spec

@@ -32,0 +38,0 @@ if (decoded.length != 25) {

@@ -5,3 +5,3 @@ {

"description": "bitcoin address verification and other related functions",
"version": "0.0.2",
"version": "0.0.3",
"homepage": "https://github.com/shtylman/bitcoin-address",

@@ -8,0 +8,0 @@ "repository": {

@@ -13,3 +13,6 @@ var address = require('..');

invalid('mzBc4XEFSdzCDcTxAgf6EZXgsZWpztRhef', 'prod');
// invalid base58 string
invalid('%%@');
});
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