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

ethjs-abi

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethjs-abi - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 0.1.5 -- replace out sha3
1. Getting rid of `ethjs-sha3` for `js-sha3`
# 0.1.4 -- config fixes

@@ -2,0 +6,0 @@

2

lib/index.js

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

var signature = method.name + '(' + utils.getKeys(method.inputs, 'type').join(',') + ')';
var signatureEncoded = '0x' + utils.sha3(signature, true).slice(0, 4).toString('hex');
var signatureEncoded = '0x' + new Buffer(utils.keccak256(signature), 'hex').slice(0, 4).toString('hex');
var paramsEncoded = encodeParams(utils.getKeys(method.inputs, 'type'), values).substring(2);

@@ -102,0 +102,0 @@

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

var numberToBN = require('number-to-bn');
var sha3 = require('ethjs-sha3');
var keccak256 = require('js-sha3').keccak_256;

@@ -398,3 +398,3 @@ // from ethereumjs-util

sha3: sha3,
keccak256: keccak256,

@@ -401,0 +401,0 @@ getKeys: getKeys,

{
"name": "ethjs-abi",
"version": "0.1.4",
"version": "0.1.5",
"description": "Just the Ethereum encoding and decoding methods from the ethers-io-wallet.",

@@ -70,3 +70,3 @@ "main": "lib/index.js",

"bn.js": "4.11.6",
"ethjs-sha3": "0.1.2",
"js-sha3": "0.5.5",
"number-to-bn": "1.4.0"

@@ -73,0 +73,0 @@ },

@@ -93,3 +93,3 @@ /* eslint-disable */

const signature = `${method.name}(${utils.getKeys(method.inputs, 'type').join(',')})`;
const signatureEncoded = `0x${utils.sha3(signature, true).slice(0, 4).toString('hex')}`;
const signatureEncoded = `0x${(new Buffer(utils.keccak256(signature), 'hex')).slice(0, 4).toString('hex')}`;
const paramsEncoded = encodeParams(utils.getKeys(method.inputs, 'type'), values).substring(2);

@@ -96,0 +96,0 @@

const BN = require('bn.js');
const numberToBN = require('number-to-bn');
const sha3 = require('ethjs-sha3');
const keccak256 = require('js-sha3').keccak_256;

@@ -359,3 +359,3 @@ // from ethereumjs-util

sha3,
keccak256,

@@ -362,0 +362,0 @@ getKeys,

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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