Socket
Socket
Sign inDemoInstall

eth-sig-util

Package Overview
Dependencies
44
Maintainers
2
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.4.1 to 1.4.2

6

index.js

@@ -44,3 +44,3 @@ const ethUtil = require('ethereumjs-util')

const sender = ethUtil.publicToAddress(publicKey)
senderHex = ethUtil.bufferToHex(sender)
const senderHex = ethUtil.bufferToHex(sender)
return senderHex

@@ -82,3 +82,5 @@ },

const data = typedData.map(function (e) { return e.value })
const data = typedData.map(function (e) {
return e.type === 'bytes' ? ethUtil.toBuffer(e.value) : e.value
})
const types = typedData.map(function (e) { return e.type })

@@ -85,0 +87,0 @@ const schema = typedData.map(function (e) {

{
"name": "eth-sig-util",
"version": "1.4.1",
"version": "1.4.2",
"description": "A few useful functions for signing ethereum data",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -150,2 +150,15 @@ const test = require('tape')

test('typedSignatureHash - bytes', function (t) {
t.plan(1)
const typedData = [
{
type: 'bytes',
name: 'message',
value: '0xdeadbeaf'
}
]
const hash = sigUtil.typedSignatureHash(typedData)
t.equal(hash, '0x6c69d03412450b174def7d1e48b3bcbbbd8f51df2e76e2c5b3a5d951125be3a9')
})
typedSignatureHashThrowsTest({

@@ -152,0 +165,0 @@ testLabel: 'empty array',

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc