Skip to content
This repository was archived by the owner on Jun 17, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,28 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
(modification: no type change headlines) and this project adheres to
[Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [7.0.3] - 2020-07-07

This release replaces the `keccak` and `secp256k1` dependencies
(PR [#257](https://github.com/ethereumjs/ethereumjs-util/pull/257))
and instead uses the
[ethereum-cryptography](https://github.com/ethereum/js-ethereum-cryptography)
package that uses native JS implementations for cryptographic primitives
and makes use of modern and forward-compatible N-API implementations in Node
wherever possible.

This is part of a larger initiative led by Nomic Labs to improve the developer
experience within the Ethereum developer ecosystem,
see https://github.com/ethereum/js-organization/issues/18 for context.

**Other Changes:**

- Added `TypeScript` definitions for `ethjs-util` methods,
PR [#248](https://github.com/ethereumjs/ethereumjs-util/pull/248) and
PR [#260](https://github.com/ethereumjs/ethereumjs-util/pull/260)

[7.0.3]: https://github.com/ethereumjs/ethereumjs-util/compare/v7.0.2...v7.0.3

## [7.0.2] - 2020-05-25

This patch release re-establishes the state of `v7.0.0` release and upgrades
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ A collection of utility functions for Ethereum. It can be used in Node.js and in

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

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

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

assert.equal(new BN('dead', 16).add(new BN('101010', 2)), 57047)
```
Expand Down Expand Up @@ -66,6 +66,12 @@ The following methods are available provided by [ethjs-util](https://github.com/
- toAscii
- getKeys

Import can be done directly by function name analogous to the build-in function import:

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

### Re-Exports

Additionally `ethereumjs-util` re-exports a few commonly-used libraries. These include:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethereumjs-util",
"version": "7.0.2",
"version": "7.0.3",
"description": "a collection of utility functions for Ethereum",
"main": "dist/index.js",
"types": "./dist/index.d.ts",
Expand Down