New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

jingtum-base-lib

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jingtum-base-lib - npm Package Compare versions

Comparing version 1.0.9 to 1.1.0

dist/jingtum-base-1.0.9-debug.js

5

package.json
{
"name": "jingtum-base-lib",
"version": "1.0.9",
"version": "1.1.0",
"description": "jingtum base lib for wallet and so on.",

@@ -42,3 +42,6 @@ "main": "index.js",

"webpack": "^1.13.3"
},
"directories": {
"test": "test"
}
}

22

src/keypairs.js

@@ -54,3 +54,3 @@ 'use strict';

*/
function __encode(version, bytes) {
exports.__encode = function(version, bytes) {
var buffer = bufCat0(version, bytes);

@@ -60,3 +60,3 @@ var checksum = new Buffer(sha256(sha256(buffer)).slice(0, 4));

return base58.encode(ret);
}
};
/**

@@ -70,3 +70,3 @@ * decode encoded input,

*/
function __decode(version, input) {
exports.__decode = function(version, input) {
var bytes = base58.decode(input);

@@ -83,3 +83,3 @@ if (!bytes || bytes[0] !== version || bytes.length < 5) {

return bytes.slice(1, -4);
}
};

@@ -92,3 +92,3 @@ /**

var randBytes = brorand(16);
return __encode(SEED_PREFIX, randBytes);
return this.__encode(SEED_PREFIX, randBytes);
};

@@ -117,3 +117,3 @@

var prefix = '00';
var entropy = __decode(SEED_PREFIX, secret);
// var entropy = __decode(SEED_PREFIX, secret);
var entropy = base58.decode(secret).slice(1, -4);

@@ -144,3 +144,3 @@ var privateKey = prefix + derivePrivateKey(entropy).toString(16, 64).toUpperCase();

var input = new Buffer(hashjs.ripemd160().update(hash256).digest());
return __encode(ACCOUNT_PREFIX, input);
return this.__encode(ACCOUNT_PREFIX, input);
};

@@ -155,7 +155,7 @@

try {
__decode(ACCOUNT_PREFIX, address);
this.__decode(ACCOUNT_PREFIX, address);
return true;
} catch (err) {
return false;
}
}
};

@@ -171,3 +171,3 @@

try {
return __decode(ACCOUNT_PREFIX, address);
return this.__decode(ACCOUNT_PREFIX, address);

@@ -186,3 +186,3 @@ } catch (err) {

try {
return __encode(ACCOUNT_PREFIX, bytes);
return this.__encode(ACCOUNT_PREFIX, bytes);

@@ -189,0 +189,0 @@ } catch (err) {

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