Socket
Socket
Sign inDemoInstall

ethereumjs-util

Package Overview
Dependencies
Maintainers
4
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereumjs-util - npm Package Compare versions

Comparing version 6.2.0 to 6.2.1

dist/secp256k1v3-adapter.d.ts

8

CHANGELOG.md

@@ -9,2 +9,10 @@ # Changelog

## [6.2.1] - 2020-07-17
This release replaces the native `secp256k1` and `keccak` dependencies with
[ethereum-cryptopgraphy](https://github.com/ethereum/js-ethereum-cryptography)
which doesn't need native compilation.
[6.2.1]: https://github.com/ethereumjs/ethereumjs-util/compare/v6.2.0...v6.2.1
## [6.2.0] - 2019-11-06

@@ -11,0 +19,0 @@

4

dist/account.d.ts

@@ -43,7 +43,7 @@ /// <reference types="node" />

*/
export declare const generateAddress2: (from: string | Buffer, salt: string | Buffer, initCode: string | Buffer) => Buffer;
export declare const generateAddress2: (from: Buffer | string, salt: Buffer | string, initCode: Buffer | string) => Buffer;
/**
* Returns true if the supplied address belongs to a precompiled account (Byzantium).
*/
export declare const isPrecompiled: (address: string | Buffer) => boolean;
export declare const isPrecompiled: (address: Buffer | string) => boolean;
/**

@@ -50,0 +50,0 @@ * Checks if the private key satisfies the rules of the curve secp256k1.

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.importPublic = exports.privateToPublic = exports.privateToAddress = exports.publicToAddress = exports.pubToAddress = exports.isValidPublic = exports.isValidPrivate = exports.isPrecompiled = exports.generateAddress2 = exports.generateAddress = exports.isValidChecksumAddress = exports.toChecksumAddress = exports.isZeroAddress = exports.isValidAddress = exports.zeroAddress = void 0;
var assert = require('assert');
var ethjsUtil = require('ethjs-util');
var secp256k1 = require('secp256k1');
var secp256k1 = require('./secp256k1v3-adapter');
var BN = require("bn.js");

@@ -7,0 +8,0 @@ var bytes_1 = require("./bytes");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.baToJSON = exports.addHexPrefix = exports.toUnsigned = exports.fromSigned = exports.bufferToHex = exports.bufferToInt = exports.toBuffer = exports.stripZeros = exports.unpad = exports.setLengthRight = exports.setLength = exports.setLengthLeft = exports.zeros = void 0;
var ethjsUtil = require('ethjs-util');

@@ -4,0 +5,0 @@ var BN = require("bn.js");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KECCAK256_RLP = exports.KECCAK256_RLP_S = exports.KECCAK256_RLP_ARRAY = exports.KECCAK256_RLP_ARRAY_S = exports.KECCAK256_NULL = exports.KECCAK256_NULL_S = exports.TWO_POW256 = exports.MAX_INTEGER = void 0;
var BN = require("bn.js");

@@ -4,0 +5,0 @@ /**

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var createKeccakHash = require('keccak');
exports.rlphash = exports.ripemd160 = exports.sha256 = exports.keccak256 = exports.keccak = void 0;
var _a = require('ethereum-cryptography/keccak'), keccak224 = _a.keccak224, keccak384 = _a.keccak384, k256 = _a.keccak256, keccak512 = _a.keccak512;
var createHash = require('create-hash');

@@ -24,5 +25,19 @@ var ethjsUtil = require('ethjs-util');

bits = 256;
return createKeccakHash("keccak" + bits)
.update(a)
.digest();
switch (bits) {
case 224: {
return keccak224(a);
}
case 256: {
return k256(a);
}
case 384: {
return keccak384(a);
}
case 512: {
return keccak512(a);
}
default: {
throw new Error("Invald algorithm: keccak" + bits);
}
}
};

@@ -29,0 +44,0 @@ /**

"use strict";
function __export(m) {
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
}
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
var secp256k1 = require('secp256k1');
exports.secp256k1 = exports.rlp = exports.BN = void 0;
var secp256k1 = require('./secp256k1v3-adapter');
exports.secp256k1 = secp256k1;

@@ -17,23 +25,23 @@ var ethjsUtil = require('ethjs-util');

*/
__export(require("./constants"));
__exportStar(require("./constants"), exports);
/**
* Public-key cryptography (secp256k1) and addresses
*/
__export(require("./account"));
__exportStar(require("./account"), exports);
/**
* Hash functions
*/
__export(require("./hash"));
__exportStar(require("./hash"), exports);
/**
* ECDSA signature
*/
__export(require("./signature"));
__exportStar(require("./signature"), exports);
/**
* Utilities for manipulating Buffers, byte arrays, etc.
*/
__export(require("./bytes"));
__exportStar(require("./bytes"), exports);
/**
* Function for definining properties on an object
*/
__export(require("./object"));
__exportStar(require("./object"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defineProperties = void 0;
var assert = require('assert');

@@ -4,0 +5,0 @@ var ethjsUtil = require('ethjs-util');

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var secp256k1 = require('secp256k1');
exports.hashPersonalMessage = exports.isValidSignature = exports.fromRpcSig = exports.toRpcSig = exports.ecrecover = exports.ecsign = void 0;
var secp256k1 = require('./secp256k1v3-adapter');
var BN = require("bn.js");

@@ -5,0 +6,0 @@ var bytes_1 = require("./bytes");

{
"name": "ethereumjs-util",
"version": "6.2.0",
"version": "6.2.1",
"description": "a collection of utility functions for Ethereum",

@@ -94,6 +94,6 @@ "main": "dist/index.js",

"create-hash": "^1.1.2",
"ethereum-cryptography": "^0.1.3",
"elliptic": "^6.5.2",
"ethjs-util": "0.1.6",
"keccak": "^2.0.0",
"rlp": "^2.2.3",
"secp256k1": "^3.0.1"
"rlp": "^2.2.3"
},

@@ -100,0 +100,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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