A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ethereumjs/ethereumjs-util below:

ethereumjs/ethereumjs-util: Project is in active development and has been moved to the EthereumJS monorepo.

A collection of utility functions for Ethereum. It can be used in Node.js and in the browser with browserify.

npm install ethereumjs-util

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

const address = '0x2F015C60E0be116B1f0CD534704Db9c92118FB6A'
assert.ok(isValidChecksumAddress(address))

assert.equal(unpadBuffer(Buffer.from('000000006600', 'hex')), Buffer.from('6600', 'hex'))

assert.equal(new BN('dead', 16).add(new BN('101010', 2)), 57047)

The following methods are available provided by ethjs-util:

They can be imported by name:

import { intToHex, stripHexPrefix } from 'ethereumjs-util'

Additionally ethereumjs-util re-exports a few commonly-used libraries. These include:

See our organizational documentation for an introduction to EthereumJS as well as information on current standards and best practices.

If you want to join for work or do improvements on the libraries have a look at our contribution guidelines.

MPL-2.0


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4