Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 9, 2024 via pnpm

ethereumjs-util 7.1.5

A collection of utility functions for Ethereum
Package summary
Share
4
issues
2
high severity
meta
2
2
moderate severity
license
2
4
licenses
38
MIT
2
MPL-2.0
2
ISC
1
(MIT AND BSD-3-Clause)
Package created
28 Jan 2015
Version published
3 Jun 2022
Maintainers
5
Total deps
43
Direct deps
5
License
MPL-2.0

Issues

4

2 high severity issues

high
via: ethereum-cryptography@0.1.3
via: ethereum-cryptography@0.1.3
Collapse
Expand

2 moderate severity issues

moderate
Recommendation: Validate that the package complies with your license policy
via: ethereumjs-util@7.1.5
Recommendation: Validate that the package complies with your license policy
via: rlp@2.2.7
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
38 Packages, Including:
@types/bn.js@5.1.5
@types/node@20.12.11
@types/pbkdf2@3.1.2
@types/secp256k1@4.0.6
base-x@3.0.9
blakejs@1.2.1
bn.js@4.12.0
bn.js@5.2.1
brorand@1.1.0
browserify-aes@1.2.0
bs58@4.0.1
bs58check@2.1.2
buffer-xor@1.0.3
cipher-base@1.0.4
create-hash@1.2.0
create-hmac@1.1.7
elliptic@6.5.5
ethereum-cryptography@0.1.3
evp_bytestokey@1.0.3
hash-base@3.1.0
hash.js@1.1.7
hmac-drbg@1.0.1
keccak@3.0.4
md5.js@1.3.5
minimalistic-crypto-utils@1.0.1
node-addon-api@2.0.2
node-gyp-build@4.8.1
pbkdf2@3.1.2
randombytes@2.1.0
readable-stream@3.6.2
ripemd160@2.0.2
safe-buffer@5.2.1
scrypt-js@3.0.1
secp256k1@4.0.3
setimmediate@1.0.5
string_decoder@1.3.0
undici-types@5.26.5
util-deprecate@1.0.2

Mozilla Public License 2.0

Weakly Protective
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
place-warranty
use-patent-claims
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
disclose-source
include-original
2 Packages, Including:
ethereumjs-util@7.1.5
rlp@2.2.7

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
2 Packages, Including:
inherits@2.0.4
minimalistic-assert@1.0.1

(MIT AND BSD-3-Clause)

Permissive
1 Packages, Including:
sha.js@2.4.11
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of ethereumjs-util 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@types/bn.js5.1.53.59 kBMIT
prod
bn.js5.2.121.32 kBMIT
prod
create-hash1.2.02.39 kBMIT
prod
ethereum-cryptography0.1.3175.35 kBMIT
prod
2
rlp2.2.713.59 kBMPL-2.0
prod
1

Visualizations

Frequently Asked Questions

What does ethereumjs-util do?

Ethereumjs-util is a collection of utility functions specifically designed for Ethereum. With capabilities that can function both in Node.js and in the browser (thanks to browserify), this package offers a spectrum of functionalities related to Ethereum. Key features include account creation, validation, conversion, byte-related helper and conversion methods, hash functions, signature validation, and more. The tool is also able to re-export commonly used libraries such as BN.js and rlp for greater convenience.

How do you use ethereumjs-util?

In order to use ethereumjs-util, you first need to install it using npm with the command npm install ethereumjs-util. Once installed, you can import and use any function from ethereumjs-util. Here is a simple code usage example:

import assert from 'assert'
import { isValidChecksumAddress, unpadBuffer, BN } from 'ethereumjs-util'

// Validating Ethereum address 
assert.ok(isValidChecksumAddress('0x2F015C60E0be116B1f0CD534704Db9c92118FB6A'))

// Unpadding a buffer
assert.ok(unpadBuffer(Buffer.from('000000006600', 'hex')).equals(Buffer.from('6600', 'hex')))

// Using BN.js for arithmetic operation
assert.ok(new BN('dead', 16).add(new BN('101010', 2)).eqn(57047))

Another feature of ethereumjs-util is the re-exportation of popularly used libraries. Here's a sample usage:

// Importing BN.js and rlp from ethereumjs-util
import { BN, rlp } from 'ethereumjs-util'

The package also provides an internalized version of the ethjs-util package with available methods that can be directly imported:

// Importing a method from ethjs-util
import { stripHexPrefix } from 'ethereumjs-util'

Where are the ethereumjs-util docs?

The documentation for ethereumjs-util can be found in the API docs section. For more detailed package overview and standards, the EthereumJS organizational documentation is a useful reference.