From 616cd773c1d0b17d40f1dfa71aa08c12e13417d7 Mon Sep 17 00:00:00 2001 From: holgerd77 Date: Tue, 7 Jul 2020 13:50:47 +0200 Subject: [PATCH] Bumped version to v7.0.3, added CHANGELOG entry, updated README --- CHANGELOG.md | 22 ++++++++++++++++++++++ README.md | 10 ++++++++-- package.json | 2 +- 3 files changed, 31 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1ceba2c..a47b210d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index ea9b0372..8722aa69 100644 --- a/README.md +++ b/README.md @@ -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) ``` @@ -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: diff --git a/package.json b/package.json index 1fc2e858..27ea111c 100644 --- a/package.json +++ b/package.json @@ -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",