A collection of utility functions for Ethereum. It can be used in Node.js and in the browser with browserify.
Based on the incredible work by https://github.com/ethereumjs
import {
assert,
assertEquals
} from 'assert'
import {
isValidChecksumAddress,
unpadBuffer,
BN,
} from 'https://deno.land/x/npm_ethereumjs_util@0.0.2/mod.ts'
const address = '0x2F015C60E0be116B1f0CD534704Db9c92118FB6A'
assert(isValidChecksumAddress(address))
assertEquals(unpadBuffer(Buffer.from('000000006600', 'hex')), Buffer.from('6600', 'hex'))
assertEquals(new BN('dead', 16).add(new BN('101010', 2)), 57047)
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